2
$\begingroup$

Using rospy/ROS1, I would like a callback when a certain parameter on the ROS1 parameter server is changed.

The closest I could find was get_param_cached which probably has some sort of parameter subscription under the hood, but the details appeared a little cloudy at first sight.

Are rosparam callbacks supported in any rospy APIs? Or do you have a code snippet that can show me how it can be done?

$\endgroup$

2 Answers 2

1
$\begingroup$

Adding parameter events is a new feature added in ROS 2 for . Part of the parameter design document It's a new feature and not available in ROS 1, either rospy or roscpp.

You will need to do some sort of polling process if you want to monitor for a change.

$\endgroup$
0
$\begingroup$

You have to use dynamic reconfigure to get the events. But it doesn't work for "pure" params, of course.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.