I am trying to send a message of the custom type called Age. I have a package called my_package with a msg directory which contains Age.msg
running rosmsg show Age gives
[my_package/Age]:
float32 years
float32 months
float32 days
and it even says my_package in front of age.
When I try to run the a publisher node it gives me an error on the following line of my python file
from my_package.msg import Age
This is the error it gives
Traceback (most recent call last):
File “/home/user/catkin_ws/src/my_package/src/agePublisher.py”, line 4, in
from my_package.msg import Age
ImportError: No module named my_package.msg
This is the structure of the my_package folder
launch
msg
src
cmakelist
packageXML
I tried running the code using a message type that was different than Age and it works fine, so it does not seem to be a problem with the launch file.
Any ideas?