Why does not std_msgs/header generate an error?

asked 2016-11-14 15:45:44 -0500

alf gravatar image

I just fixed an extremely annoying bug. I had defined a message in the following way:

std_msgs/header header
# etc

While the correct way would be

std_msgs/Header header
# etc

Why didn't I get any build errors from catkin? I did not get any runtime errors when subscribing to the message either, I simply did not recieve any messages. The strange thing was that 'rostopic hz <topic>' gave a seemingly logical output, but 'rostopic echo <topic>' gave no output or errors.

I guess this should possibly be filed as a bug report, if anyone can confirm the issue.

edit retag flag offensive close merge delete



This should throw an error in catkin. Likely something related to "Could not find messages which YOUR_MESSAGE depends on". If there wasn't an error, I'd suspect you weren't (re)building your message. Maybe an issue with the CMakeLists.txt? Please edit your question and include your CMakeLists.txt.

jarvisschultz gravatar image jarvisschultz  ( 2016-11-14 16:30:27 -0500 )edit

I've tried cleaning and rebuilding, but there's still no error. Here's my CMakeLists.txt file: https://gist.github.com/anlif/e4f5782...

alf gravatar image alf  ( 2016-11-15 03:07:39 -0500 )edit

That same CMakeLists.txt file (I had to comment out a few missing message files) produces an error exactly like I suspected when I use your first definition. Would it be possible to share the entire package? Or at least include the culprit message file and the package.xml in your Gist?

jarvisschultz gravatar image jarvisschultz  ( 2016-11-15 10:43:11 -0500 )edit

What OS, and ROS version are you on? Can you find out what catkin version you have (if apt-get, something like dpkg -l |grep catkin?

jarvisschultz gravatar image jarvisschultz  ( 2016-11-15 10:44:52 -0500 )edit

Agreed with @jarvisschultz. I have tried to change my msg to use std_msgs/header and i had this error Cannot locate message [header] in package [std_msgs] ...

DavidN gravatar image DavidN  ( 2016-11-15 10:57:16 -0500 )edit