setPeriod(newPeriod) fails

Hi,

I have a periodic component and I want to change the period of the
updateHook after a certain state has been reached.

I tried doing with this->setPeriod(newPeriod) (inside the updateHook).
But it always fails. Please let me know how do I go ahead debugging
it.

FYI:I also tried to stop the component and then setPeriod (in the
deployer). But it still failed.

Thanks,
Gajan

setPeriod(newPeriod) fails

Hey Gajan,

2011/7/14 Gajamohan Mohanarajah <gajamohan [dot] m [..] ...>:
> Hi,
>
> I have a periodic component and I want to change the period of the
> updateHook after a certain state has been reached.
>
> I tried doing with this->setPeriod(newPeriod) (inside the updateHook).
> But it always fails. Please let me know how do I go ahead debugging
> it.
>
> FYI:I also tried to stop the component and then setPeriod (in the
> deployer). But it still failed.

Can you give us some more information:
- what version of orocos are you using?
- what is the actual error message you get?

I can update the period of a periodic component while running:

reporter [R]> setPeriod (0.5)
= true

Steven

>
> Thanks,
> Gajan
> --
> Orocos-Users mailing list
> Orocos-Users [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>

gajan's picture

setPeriod(newPeriod) fails

Hi Steven,

I am running ros-diamondback-orocos-toolchain-ros
(0.4.0-s1308766814~lucid)

Component is deployed using
<struct name="Connector" type="re_articulationOROCOS_coupling::Connector">
<struct name="Activity" type="PeriodicActivity">
<simple name="Priority" type="short"><value>0<value><simple>
<simple name="Period" type="double"><value>0.1<value><simple>
<simple name="Scheduler"
type="string">\<value>ORO_SCHED_OTHER<value>\<simple>
<struct>
<simple name="AutoConf" type="boolean"><value>1<value><simple>
<simple name="AutoStart" type="boolean"><value>1<value><simple>
<struct name="Properties" type="PropertyBag">
<simple name="learningSpeedFactor"
type="double"><description>Speed Factor for learning
<description><value>5.0<value><simple>
<simple name="newPeriod4PlayBack" type="double"><description>New
Period for play back <description><value>0.05<value><simple>
<struct>
<struct name="Ports" type="PropertyBag">
<simple name="msrJntPosPort"
type="string"><value>MsrJointPos<value><simple>
<simple name="msrCartPosPort" type="string"><value>MsrCartPos<value><simple>
<simple name="RobotStatePort"
type="string"><value>RobotStateConn<value><simple>
<simple name="FRIStatePort" type="string"><value>FRIStateConn<value><simple>
<simple name="cartPosCmdPort"
type="string"><value>cartPosCmdPort<value><simple>
<struct>
<struct name="Peers" type="PropertyBag">
<simple type="string"><value>FRIServer<value><simple>
<simple type="string"><value>trajectoryGeneratorJntPos<value><simple>
<struct>
<struct>

> - what is the actual error message you get?
I am not getting any error msgs. It is just returning false
http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/classRTT_1_...

I am also attaching my component cpp file for your reference.

Thanks,
Gajan

On Thu, Jul 14, 2011 at 1:54 PM, Steven Bellens
<steven [dot] bellens [..] ...> wrote:
> Hey Gajan,
>
> 2011/7/14 Gajamohan Mohanarajah <gajamohan [dot] m [..] ...>:
>> Hi,
>>
>> I have a periodic component and I want to change the period of the
>> updateHook after a certain state has been reached.
>>
>> I tried doing with this->setPeriod(newPeriod) (inside the updateHook).
>> But it always fails. Please let me know how do I go ahead debugging
>> it.
>>
>> FYI:I also tried to stop the component and then setPeriod (in the
>> deployer). But it still failed.
>
> Can you give us some more information:
> - what version of orocos are you using?
> - what is the actual error message you get?
>
>
> I can update the period of a periodic component while running:
>
> reporter [R]> setPeriod (0.5)
>  = true
>
>
> Steven
>
>>
>> Thanks,
>> Gajan
>> --
>> Orocos-Users mailing list
>> Orocos-Users [..] ...
>> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>>
>

setPeriod(newPeriod) fails

On Thu, Jul 14, 2011 at 2:10 PM, Gajamohan Mohanarajah
<gajamohan [dot] m [..] ...> wrote:
> Hi Steven,
>
> I am running ros-diamondback-orocos-toolchain-ros
> (0.4.0-s1308766814~lucid)
>
> Component is deployed using
> <struct name="Connector" type="re_articulationOROCOS_coupling::Connector">
>    <struct name="Activity" type="PeriodicActivity">

Please use type="Activity" instead of type="PeriodicActivity"

Then it will work. the PeriodicActivity type has a fixed period, the
normal Activity is variable.

Peter
--
Orocos-Users mailing list
Orocos-Users [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users