Robotics StackExchange | Archived questions

Why does not std_msgs/header generate an error?

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 ' gave a seemingly logical output, but 'rostopic echo ' gave no output or errors.

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

Asked by alf on 2016-11-14 16:45:44 UTC

Comments

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.

Asked by jarvisschultz on 2016-11-14 17:30:27 UTC

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

Asked by alf on 2016-11-15 04:07:39 UTC

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?

Asked by jarvisschultz on 2016-11-15 11:43:11 UTC

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?

Asked by jarvisschultz on 2016-11-15 11:44:52 UTC

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] ...

Asked by DavidN on 2016-11-15 11:57:16 UTC

Answers