Hello,
I've got everything up and running now. Soem is working completely and I can start everything with a single launch file. So thanks for that :)
So it was time to move all the properties to the parameter server. This way you have everything in one place.
The documentation on ros.org was pretty good however I still have problems with loading arrays.
I did a BaseController.rosparam.storeProperties command in the deployer. BaseController being my component name.
I have two properties, volt_limit which is a double and Gain_values which is a array of doubles.
So a rosparam list gives:
/amigo_base_controller/BaseController/Gain_values/Element0 /amigo_base_controller/BaseController/Gain_values/Element1 /amigo_base_controller/BaseController/Gain_values/Element2 /amigo_base_controller/BaseController/volt_limit
I can change on of them like this: rosparam set /amigo_base_controller/BaseController/Gain_values/Element1 22.22
And a: BaseController.rosparam.refreshProperties in the deployer changes the element in the array accordingly.
That's the way it should be I assume. So now I want to load the parameters with a yaml file. rosparam dump dump.yaml creates a yaml file with the properties of the component.
Launching with a launch file including this yaml file gives this error while loading the component:
0.783 [ Warning][ScriptingService] Could not update Gain_values
The volt_limit is loaded correctly.
The rosparam list looks exactly the same, so I don't know where it goes wrong.
Thanks for the insights,
Tim
Ros parameter arrays
On Monday 21 February 2011 14:27:22 t [dot] t [dot] g [dot] clephas [..] ... wrote:
> Hello,
>
> I've got everything up and running now. Soem is working completely and I can
> start everything with a single launch file. So thanks for that :)
>
> So it was time to move all the properties to the parameter server. This way
> you have everything in one place.
>
> The documentation on ros.org was pretty good however I still have problems
> with loading arrays.
>
> I did a BaseController.rosparam.storeProperties command in the deployer.
> BaseController being my component name.
>
> I have two properties, volt_limit which is a double and Gain_values which is
> a array of doubles.
>
> So a rosparam list gives:
>
> /amigo_base_controller/BaseController/Gain_values/Element0
> /amigo_base_controller/BaseController/Gain_values/Element1
> /amigo_base_controller/BaseController/Gain_values/Element2
> /amigo_base_controller/BaseController/volt_limit
>
> I can change on of them like this: rosparam set
> /amigo_base_controller/BaseController/Gain_values/Element1 22.22
>
> And a:
> BaseController.rosparam.refreshProperties
> in the deployer changes the element in the array accordingly.
>
>
> That's the way it should be I assume. So now I want to load the parameters
> with a yaml file. rosparam dump dump.yaml creates a yaml file with the
> properties of the component.
In the dump.yaml, are the arrays shown as [x,x,x,] or as
Segment0: x
> Launching with a launch file including this yaml file gives this error while
> loading the component:
>
> 0.783 [ Warning][ScriptingService] Could not update Gain_values
>
> The volt_limit is loaded correctly.
>
> The rosparam list looks exactly the same, so I don't know where it goes
> wrong.
>
> Thanks for the insights,
>
> Tim
Ros parameter arrays
________________________________________
Van: Ruben Smits [ruben [dot] smits [..] ...]
Verzonden: maandag 21 februari 2011 15:56
Aan: orocos-users [..] ...
CC: Clephas, T.T.G.
Onderwerp: Re: [Orocos-users] Ros parameter arrays
On Monday 21 February 2011 14:27:22 t [dot] t [dot] g [dot] clephas [..] ... wrote:
> Hello,
>
> I've got everything up and running now. Soem is working completely and I can
> start everything with a single launch file. So thanks for that :)
>
> So it was time to move all the properties to the parameter server. This way
> you have everything in one place.
>
> The documentation on ros.org was pretty good however I still have problems
> with loading arrays.
>
> I did a BaseController.rosparam.storeProperties command in the deployer.
> BaseController being my component name.
>
> I have two properties, volt_limit which is a double and Gain_values which is
> a array of doubles.
>
> So a rosparam list gives:
>
> /amigo_base_controller/BaseController/Gain_values/Element0
> /amigo_base_controller/BaseController/Gain_values/Element1
> /amigo_base_controller/BaseController/Gain_values/Element2
> /amigo_base_controller/BaseController/volt_limit
>
> I can change on of them like this: rosparam set
> /amigo_base_controller/BaseController/Gain_values/Element1 22.22
>
> And a:
> BaseController.rosparam.refreshProperties
> in the deployer changes the element in the array accordingly.
>
>
> That's the way it should be I assume. So now I want to load the parameters
> with a yaml file. rosparam dump dump.yaml creates a yaml file with the
> properties of the component.
In the dump.yaml, are the arrays shown as [x,x,x,] or as
Segment0: x
Adding them like this also doesn't help:
> Launching with a launch file including this yaml file gives this error while
> loading the component:
>
> 0.783 [ Warning][ScriptingService] Could not update Gain_values
>
> The volt_limit is loaded correctly.
>
> The rosparam list looks exactly the same, so I don't know where it goes
> wrong.
>
> Thanks for the insights,
>
> Tim
Tim
Ros parameter arrays
Hello all,
The question about the rosparam using arrays is still unsolved.
To summarize:
We are able to set parameters in orocos by using rosparam. However we can't get this to work with parameters that are arrays.
Does anyone has this already implemented? Or does anyone know how to do this?
Thanks,
Tim
Ros parameter arrays
2011/7/1 t [dot] t [dot] g [dot] clephas [..] ... <t [dot] t [dot] g [dot] clephas [..] ...>:
> Hello all,
>
> The question about the rosparam using arrays is still unsolved.
>
> To summarize:
>
> We are able to set parameters in orocos by using rosparam.
> However we can't get this to work with parameters that are arrays.
>
> Does anyone has this already implemented? Or does anyone know how to do this?
I'm using this functionality using std::vector arrays. There is one
current limitation of the ros param service in orocos: you have to
make sure that the C++ vector array is correctly sized before you load
in the properties.
some code snippets:
*.yaml:
PoseController:
kp: {Element0: -0.63, Element1: 0.63, Element2: -2.1, Element3: -6.0}
*.ops:
loadService("PoseController","rosparam")
PoseController.rosparam.refreshProperty("kp",false,true)
*.cpp (constructor):
,m_kp(4,0.0)
Regards,
Steven
>
> Thanks,
>
> Tim
> --
> Orocos-Users mailing list
> Orocos-Users [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>