ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Dynamic Reconfiguration using orocos_toolchain

asked 2011-12-08 18:22:50 -0500

updated 2012-04-06 22:35:25 -0500

For the implementation of control system satisfying hard real-time constraints, I'm currently looking into using orocos_toolchain. I'm especially interested in having dynamically reconfigurable parameters for said control system. I noticed that parameters apparently can be loaded from the parameter server using the rtt_ros_integration (a tutorial that demonstrates all current capabilities of the integration would be nice btw :) ), but that of course does not give me dynamic reconfigurability. In my view, the easiest scenario would be to use dynamic_reconfigure, but I'm not sure how difficult adding support for that in the integration would be. The easiest way that comes to my mind right now is to just do it manually using messages/(latched) topics or services.

Are there any other plans/best practices/suggestions for achieving this?

/edit: To clarify: The scenario I have in mind is basically as also described here. As an example, let's say I have a robot that has multiple parameters and I want to be able to change them online during operation. The robot controller is running in a TaskContext and how parameters are represented there (component properties, ordinary member variables..) is basically part of the question. As the robot will be part of a larger ROS-based system, it would be nice to just be able to use the dynamic_reconfigure mechanisms.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2012-04-10 01:11:41 -0500

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:

  • define your properties in the .yaml file format
  • load them on the ROS parameter server
  • start your Orocos component and load the rosparam service
  • refresh the component's properties using 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!)

edit flag offensive delete link more

answered 2012-04-06 01:27:37 -0500

Can you elaborate a bit on just what kind of properties you want to update using dynamic_reconfigure? Are those orocos component properties? Those you can just update online using the taskbrowser or within scripts / statemachines.

edit flag offensive delete link more


@Steven: I added some more details about what I have in mind. Thanks for digging out the question :)

Stefan Kohlbrecher gravatar image Stefan Kohlbrecher  ( 2012-04-06 22:36:03 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2011-12-08 18:22:50 -0500

Seen: 404 times

Last updated: Apr 10 '12