Can't subscribe to custom ROS message

26 views (last 30 days)
Alexander on 27 Jan 2017
Answered: Alexander on 31 Jan 2017
I'm using ROS Indigo, Ubuntu 14.04 networked to my Windows Matlab machine. I created a custom message /path_management/path and I'm able to see it on the Matlab side with rostopic list /path_management/path, or rostopic info /path_management/path:
Publishers: * /path_management (<http://linux-PC:39466/>)
Subscribers: * /WaypointPathFollowing_54689 (<>) * /rostopic_7874_1485558978151 (<>)
But it times out when I try to echo. I notice in Simulink, the IsNew line never goes high.
The echo works fine on the ROS side for the custom message, and in addition, echo of /odom on ROS AND Matlab side works fine too. So it doesn't seem to be a networking issue.
Additional Info - on Ubuntu (ROS master) side the following error appears:
[ERROR] [1485635087.631443805, 5100.234000000]: Client
[/matlab_global_node_42828] wants topic /path_management/path to have
datatype/md5sum [path_management/path/aac7397a189d8edec434ccc8926eb4da], but
our version has [path_management/path/d702e7bbf3b5ac3c2b7bd081a8a34ca7].
Dropping connection.
Any help in this regard would be appreciated.

Accepted Answer

Alexander on 31 Jan 2017
Two things needed to be resolved to fix the issue - Firstly, the ROS custom msg and CMake.txt files on the Matlab side has to match the original one in the ROS node before using rosgenmsg. This eliminated the md5sum error. The custom msg data was still not being seen on the Matlab side, and there was no errors. This was due to using wireless connection with firewall and in a second instance, having a slow "weak" connection. Once a dedicated hub was used, the issue was resolved.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!