I’m trying to solve the exercise 3.3 where I have to create a publisher to publish age of robot using custom message format. I followed the instructions to create the Age.msg and aslo added the necessary lines to CMakeLists.txt and package.xml.
When I start the node the topic can be seen in rostopic list and rostopic info as seen below.
But when I try to echo the topic I get an error:
user:~$ rostopic info /age_info
Type: my_examples_pkg/Age
Publishers:
* /publish_age_node (http://9_xterm:33941/)
Subscribers: None
user:~$ rostopic echo /age_info
ERROR: Cannot load message class for [my_examples_pkg/Age]. Are your messages built?
Thanks @bayodesegun I am really enjoying the course
My issue was as mentioned in the post #3. I didn’t understand it the first time. But I realized that I hadn’t done source devel/setup.bash in shell 2 where I was running the command rostopic echo.