robot_state_publisher
robot_state_publisher copied to clipboard
Issue 29: reload robot_model via Trigger-Service
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
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?
Some really good points. Thank you!
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.
would be really great to see this PR revived