robot_state_publisher icon indicating copy to clipboard operation
robot_state_publisher copied to clipboard

Issue 29: reload robot_model via Trigger-Service

Open NikolasE opened this issue 10 years ago • 4 comments

Node now advertises a reload_robot_model (std_srvs/Trigger) service that allows another node to trigger a reload of the robot model (e.g. after an calibration that changed the urdf-model).

So far, the robot_state_publisher had to be restarted, which is not suitable for an automated process. With the new adaption, the server can be restarted by calling the service:

c = rospy.ServiceProxy("/robot_state_publisher/reload_robot_model", Trigger)
result = c()
print result.success, result.message

If the reload failed (e.g. due to a wrong urdf-model (rosparam set /robot_description "InvalidFooBar"), the publisher stops and no tf-frames are published anymore so that no one is working with the deprecated model. If the /robot_description is corrected and the service called again, the publisher continues to publish frames.

Publication of frames is stopped before loading the model, so that reading and writing does not happen at the same time.

Discussion in Issue 29: https://github.com/ros/robot_state_publisher/issues/29

NikolasE avatar Jul 25 '15 20:07 NikolasE

I'm currently in the process of fixing up the existing tests for this package so that they run again. In the meantime, can you write a test for this feature and make it available, in this branch or another?

jacquelinekay avatar Oct 19 '15 21:10 jacquelinekay

Some really good points. Thank you!

NikolasE avatar Nov 10 '15 12:11 NikolasE

Any news on this pull request, is there any branch with this change. I am interested in using this functionality, it looks pretty useful to me. @NikolasE did you get to test this change successfully.

enryan avatar Nov 03 '16 15:11 enryan

would be really great to see this PR revived

davetcoleman avatar Feb 27 '18 00:02 davetcoleman