Ask Your Question
0

How to make rostopic listen to custom messages

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

David Lu gravatar image David Lu flag of United States
2644 43 64 96
http://www.cse.wustl.edu/...

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

kwc gravatar image kwc
7572 29 77 126
http://kwc.org/

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 delete

1 Answer

Sort by ยป oldest newest most voted
2

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

kwc gravatar image kwc
7572 29 77 126
http://kwc.org/

updated 2011-08-15 09: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 publish 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 08:26:31 -0500 )edit
sounds like a bug kwc ( 2011-08-15 09:22:05 -0500 )edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

subscribe to rss feed

Stats

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

Seen: 424 times

Last updated: Aug 15 '11