ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

"Are your messages built?" error from echoing that message (Groovy)

asked 2013-05-08 18:29:39 -0600

Poofjunior gravatar image

Hello, everyone,

I've followed the steps closely defined here to create a custom message, editting my CMakeLists.txt, my package.xml, and my msg/data_logger_measurement.msg to create a new message.

I've been able to display the data with "rostopic echo /data_logger_measurement" in the past; however, now that I've rosbagged the data to revisit it a few weeks later, I cannot "rostopic echo /data_logger_measurement" when I'm playing a rosbag.

Instead, I get the error:

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

The only changes that I can remember making are updating ROS when I performed a software update on Ubuntu.

Does anyone have any possible leads? (I may have made a few other changes in the past few weeks to ROS, but I cannot currently remember them.)

Thanks very much in advance!

edit retag flag offensive close merge delete

Comments

1

Can you roscd to your package from that shell? If not, your ROS environment is not set up correctly.

joq gravatar image joq  ( 2013-05-09 05:14:07 -0600 )edit

Ah, this has got to be the problem. roscd won't tab-complete to that package. Under the old flavor, I could just change my package path to fix this. How do I resolve this in the Groovy?

Poofjunior gravatar image Poofjunior  ( 2013-05-09 08:08:10 -0600 )edit

There are several ways. The recommended approach is here: http://www.ros.org/wiki/groovy/Installation/Overlays

joq gravatar image joq  ( 2013-05-09 09:19:36 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-05-09 08:59:26 -0600

Souldier gravatar image

updated 2013-05-09 09:04:26 -0600

Not sure if this will help you or not but I figured I might as well add...

I was having this same problem a couple of weeks back and here is what I learned:

  1. Make sure that you have a package called "external_sensor_interface" that contains a msg directory with your "data_logger_measurement" msg defined there. This package should be on your ROS_PACKAGE_PATH (see http://ros.org/wiki/ROS/EnvironmentVariables). Changing it should look something like...

    echo ROS_PACKAGE_PATH="/path/to/your/project/":$ROS_PACKAGE_PATH

  2. Build your messages - You need to edit your CMakeLists file (and you indicated that you already did this..) and rebuild your project. NOTE: This is where I was having problems - specifically with catkin. I switched my entire project to use rosbuild and I had smooth sailing from that point forward.

If all that worked correctly, you should be able to do,

rosmsg show data_logger_measurement

which will display your message details...From there you should be good to go.

edit flag offensive delete link more

Comments

1

Oops! I forgot to source my setup.sh script in the devel folder. Afterwards, my ROS_PACKAGE_PATH points to the right directory and the ROSBAG that I wanted to play will now display the data from data_logger_measurement. Thanks everyone!

Poofjunior gravatar image Poofjunior  ( 2013-05-09 21:08:35 -0600 )edit

I did the #1. As for the #2 it does not work, but then again it does not work either for some messages that work correctly!

Kansai gravatar image Kansai  ( 2021-04-01 06:01:24 -0600 )edit

Question Tools

Stats

Asked: 2013-05-08 18:29:39 -0600

Seen: 8,340 times

Last updated: May 09 '13