C++ Service Client & Python Service Server m5sums Error

asked 2021-10-21 03:49:11 -0600

ADIMADE gravatar image

updated 2021-10-21 03:51:00 -0600

Hey ROS Community

I am having an issue with a C++ Service Client and a Python Service Server. When I try to send a request from the client I get the following error:

[WARN] [1634805125.905940]: Could not process inbound connection: request from [/HardwareInterface]: md5sums do not match: [2676f1a8670ea1cb7ff5f4213b06a56a] vs. [1ccc0331d4dc897e023437886ebe5e62]{'callerid': '/HardwareInterface', 'md5sum': '2676f1a8670ea1cb7ff5f4213b06a56a', 'persistent': '0', 'service': '/target_positions_server'}

Can someone give me a tip how to solve this problem?

I am working in one workspace with a custom service message. I have found already this post but it didn't help... https://answers.ros.org/question/226746/subcribe-and-publish-md5-error/

Thank you in advance!

edit retag flag offensive close merge delete

Comments

It's very likely your two nodes are using different (versions of) the service definition.

The custom message you refer to, is that defined in a single file, or have you duplicated it across packages (or in some other way)?

Please describe your workspace and the packages and nodes which are involved here.

gvdhoorn gravatar image gvdhoorn  ( 2021-10-21 04:06:47 -0600 )edit

Thanks for your fast response!

I have a hardware_interface node in one package and a canopen_interface node in a different package. The hardware_interface node sends service requests to the canopen_interface in its read() and write() function to get the current robot position and to send the new position commands. The canopen_interface is written in python and the hardware_interface in c++. The service message files are located in the canopen_interface package.

In the CMAKE-List of the canopen_interface I choose the settings for generating a .h version of the service message files.

ADIMADE gravatar image ADIMADE  ( 2021-10-21 04:17:51 -0600 )edit

Off-topic, but: what you describe sounds like an unorthodox way to interface a hw-interface with a CANopen bus, but perhaps it'll work for your use-case (I expect lots of jitter and performance overhead). There are also already packages which implement a hardware_interface for CANopen based systems.

Have you tried removing your build, devel (and install if you have it) folders and completely rebuilding your workspace again? C++ and Python nodes don't use the same generated headers/.py files for services, so if you've made changes and somehow those have gone out-of-sync, you could run into these kinds of problems.

gvdhoorn gravatar image gvdhoorn  ( 2021-10-21 04:22:52 -0600 )edit

Thank you for the idea I will try it! Regarding to the "Off-topic" comment: I know that it is quite a tinkering. But my c++ skills are not sufficient to integrate the canopen commands directly in the hw_interface. Is there an alternative and more professional option to connect my python canopen_node to moveit?:)

ADIMADE gravatar image ADIMADE  ( 2021-10-21 04:32:43 -0600 )edit

One example of an existing CANopen package: wiki/ros_canopen.

Compatible with ros_control, so usable out-of-the-box with MoveIt.

There are multiple others. You can probably find them using Google or similar search engines.

gvdhoorn gravatar image gvdhoorn  ( 2021-10-21 04:54:10 -0600 )edit