Ask Your Question
0

Concepts of parameters and services

asked 2011-05-30 05:18:15 -0500

roboren gravatar image

updated 2012-02-27 07:36:48 -0500

kwc gravatar image

I'm going through this tutorial ( http://www.ros.org/wiki/ROS/Tutorials... ) and am unclear about one thing. After setting a new parameter (rosparam set background_r 150), why we need to call clear service (rosservice call clear) to make the change take effect?

How do they work? Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
5

answered 2011-05-30 05:29:32 -0500

dornhege gravatar image

The parameter is only stored in the parameter server (that lives with roscore). When you change it the program does not necessarily know about this and will not react to a change.

The clear service call just triggers the program to redraw and in the process acquire the current (newly set) parameter.

For parameter changes that should take effect immediately there is dynamic_reconfigure.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2011-05-30 05:18:15 -0500

Seen: 293 times

Last updated: Feb 27 '12