Ask Your Question
1

How to make rostopic listen to custom messages

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

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

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
3

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

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

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
roslib.load_manifest('mocap_msgs')
import mocap_msgs.msg

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

Comments

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 -0500 )edit
sounds like a bug kwc ( 2011-08-15 04:22:05 -0500 )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]

Stats

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

Seen: 853 times

Last updated: Aug 15 '11