ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

cannot use custom message

asked 2021-02-18 19:38:53 -0500

Kansai gravatar image

I have written a custom message file. I have done the necessary modifications in CMakeLists.txt. and I have run catkin build

So now when I do rosmsg list I can clearly see my custom message

roscustom_test/TheObject

also when I do this: rosmsg show TheObject I can clearly see

[roscustom_test/TheObject]
....components

However when I try to use it from a script.py I do

from roscustom_test.msg import TheObject

I get

from roscustom_test.msg import TheObject 
Import Error: No module named roscustom_test.msg

What am I doing wrong here?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-02-18 19:48:49 -0500

Kansai gravatar image

Never mind. I found out that after catkin build I should source devel/setup.bash again

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2021-02-18 19:38:53 -0500

Seen: 140 times

Last updated: Feb 18 '21