When I try to do a client of a service of ROS Matlab give me an error!

1 visualizzazione (ultimi 30 giorni)
Hello! I'm trying to interface Matlab and ROS. I've a service in ROS and I want to do a client of this service in Matlab but when I do: rosinit ('http://....:11311') client = rossvcclient('/launch_by_service') Matlab make me an error as this: Failed to create a /launch_by_service service client. [ERROR] ServiceClientHandshakeHandler - Service client handshake failed: client wants service /launch_by_service to have md5sum e1d8c050aed05957d504a68117eb0528, but it has 546971982e3fbbd5a41e60fb6432e357. Dropping connection. When I do rosservice list from Matlab I see the service and its type. Can somebody help me? Thanks!

Risposte (1)

Florian Kraemer
Florian Kraemer il 11 Mag 2017
For me this error occurred after creating a custom-msg service and using it to communicate between a standard ROS node and matlab. Make sure the internal matlab rosmsg is the same as in ROS. In matlab:
rosmsg('show','[custom_msg_package/custom_srv_nameRequest')
rosmsg('show','[custom_msg_package/custom_srv_nameResponse')
And in a terminal:
rossrv show custom_msg_package/custom_srv_name
They probably differ, which if you are not dealing with custom msgs is probably a version incompatibility issue.

Categorie

Scopri di più su Custom Message Support in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by