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

md5sum issue when calling service from Python

asked 2021-03-20 01:24:21 -0500

cambel07 gravatar image


I have a problem when I try to call a Trigger service from Python. There is a service call /ur_hardware_interface/dashboard/program_state of the Universal Robots Driver, I can successfully call the service using the terminal rosservice call /ur_hardware_interface/dashboard/program_state. However when I try to call the service using a simply Python script, it fails

import rospy
from std_srvs.srv import Trigger, TriggerRequest

check_connection = rospy.ServiceProxy('/ur_hardware_interface/dashboard/program_state', Trigger)

req = TriggerRequest()
res = check_connection(req)
print("Check connection", res)

I get the following error message:

rospy.service.ServiceException: unable to connect to service: remote error reported: client wants service /ur_hardware_interface/dashboard/program_state to have md5sum 937c9679a518e3a18d831e57125ea522, but it has 522d35a6f2ebd9702cb1e33489e1aa96. Dropping connection.

The universal robot driver is compiled from source in my catkin_ws, it is up-to-date, and has no modifications. The service and the client are running on the same PC so I don't really understand, though just in case I rebuild my catkin_ws but it does not change anything. Additionally, other services published by the Universal Robots Driver do work without problem from the Python script

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2021-03-20 02:13:20 -0500

gvdhoorn gravatar image

updated 2021-03-20 02:15:56 -0500

As you can see in the documentation (here), the dashboard/program_state service is not of type std_srvs/Trigger, but type ur_dashboard_msgs/GetProgramState.

You cannot call that service with a std_srvs/TriggerRequest, and the MD5 mismatch error is correct.

You can verify this by running rosservice type /ur_hardware_interface/dashboard/program_state (or rosservice info ... for more information).

Many services offered by that node actually use types other than Trigger, see again the documentation.

edit flag offensive delete link more


I see, thank you!

cambel07 gravatar image cambel07  ( 2021-03-20 02:17:34 -0500 )edit

Question Tools



Asked: 2021-03-20 01:24:21 -0500

Seen: 1,124 times

Last updated: Mar 20 '21