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 <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.
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.
I've tried cleaning and rebuilding, but there's still no error. Here's my CMakeLists.txt file: https://gist.github.com/anlif/e4f5782...
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?
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
?Agreed with @jarvisschultz. I have tried to change my msg to use
std_msgs/header
and i had this errorCannot locate message [header] in package [std_msgs] ...