ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

RViz notification on "params modified"

asked 2015-06-23 13:42:01 -0600

arennuit gravatar image

Hello all,

I want to create a panel in RViz (part of a plugin) and this panel would contain widgets allowing me to create/modify ROS parameters.

Now, as is, my RViz panel will not be updated if the parameter gets modified outside of RViz - the parameter value displayed by RViz will be wrong. Hence my question: is there a ROS mechanism allowing to get notified on parameters value change? ...or another mechanism allowing to sync my panel?

Should I simply setup a 5Hz timer to update my panel? Or is there a better approach?

Thanks,

Antoine.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2015-06-23 14:54:11 -0600

For parameters that are expected to change, dynamic_reconfigure is generally a better solution. If that isn't an option, I believe you will have to poll for changes (like with a timer as you mentioned).

edit flag offensive delete link more

Comments

1

Dan's answer is good, but if you must use params, note that if you are using C++ you can reduce the overhead associated with constantly polling the parameter server by using ros::NodeHandle::getParamCached()

jarvisschultz gravatar image jarvisschultz  ( 2015-06-23 21:27:37 -0600 )edit

Question Tools

Stats

Asked: 2015-06-23 13:42:01 -0600

Seen: 178 times

Last updated: Jun 23 '15