Ask Your Question

How to make rostopic listen to custom messages

asked 2011-08-14 09:10:08 -0600

David Lu gravatar image

updated 2011-08-14 16:54:13 -0600

kwc gravatar image

I've created my own message type, and have a C++ program generating messages. When I attempt to listen to the messages using rostopic echo, I get the following message.

ERROR: Cannot load message class for [mocap_msgs/LocalMocapFrame]. Are your messages built?

My messages are built and compiled. Why do I still get this error message?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2011-08-14 10:14:38 -0600

kwc gravatar image

updated 2011-08-15 04:21:55 -0600

Are you sure that rostopic is running with the same ROS_PACKAGE_PATH and that the messages are built correctly? A quick test:

#!/usr/bin/env python
import roslib
import mocap_msgs.msg

print mocap_msgs.msg.LocalMocapFrame
edit flag offensive delete link more


Excellent. Thank you. Two things: 1) It should be mocap_msgs.msg.LocalMocapFrame 2) The problem was a missing dependency in the manifest. However, rosmake-ing the package showed no errors. Is that a bug? David Lu ( 2011-08-15 03:26:31 -0600 )edit
sounds like a bug kwc ( 2011-08-15 04:22:05 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]


Asked: 2011-08-14 09:10:08 -0600

Seen: 906 times

Last updated: Aug 15 '11