ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The most natural way of updating Orocos component properties online is using the TaskBrowser. Orocos component properties are just ordinary member variables, but made available to the component interface using addProperty()
. See the Orocos component builders manual, Sect. 3.5 for details.
With the rtt_ros_param service, you can store and refresh your component's properties using the ROS parameter server as well. I use the service with the following workflow:
rosparam.refreshProperties()
So all basic functionality is there, and if you want to use the dynamic reconfigure tool to change the properties online, you basically just need to call rosparam.refreshProperties()
as soon as any changes are detected by dynamic reconfigure. I'm unfortunately not that familiar with how dynamic reconfigure works and how difficult implementation would be.
One way of doing it is e.g. by creating a node receiving triggers upon property changes by dynamic reconfigure. Your Orocos component listens to this node and calls rosparam.refreshProperties()
every time new data arrives.
A quick and dirty way would be to just refresh all component properties in every updateHook() (not recommended!)