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

Creating a ROS msg

asked 2018-05-31 12:49:50 -0500

Spyros gravatar image

updated 2018-06-01 09:52:56 -0500

gvdhoorn gravatar image

I was following the steps of the tutorial "Creating a ROS msg and srv" http://wiki.ros.org/ROS/Tutorials/Cre... and the step 3 I got this message:

Unable to load msg [beginner_tutorials/Num]: Cannot locate message [unit8] in package [beginner_tutorials] with paths [['/home/spyros/catkin_ws/src/beginner_tutorials/msg', '/home/spyros/catkin_ws/devel/share/beginner_tutorials/msg']]

At the step 2.1 how can I know if these two lines are uncommented ? Do I have to open the package.xml file with the editor as I did with the CMakeLists.txt? After I finish editing the CMakeLists.txt file, do I have to save it with the same name?

I followed the similar steps for Creating a srv and the result in step 4.2 was correct.

I am using ROS kinetic. I am running Ubuntu 16.04 LTS.

edit retag flag offensive close merge delete

Comments

step 3 didn't work normally

What does this mean? What happened, what errors did you get? Please update your question with this information.

jayess gravatar image jayess  ( 2018-05-31 15:34:43 -0500 )edit

I updated my question with the message I got. I tried again with the same results.

Spyros gravatar image Spyros  ( 2018-06-01 08:11:01 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-05-31 15:12:37 -0500

updated 2018-06-01 14:17:10 -0500

At the step 2.1 how can I know if these two lines are uncommented ? Do I have to open the package.xml file with the editor as I did with the CMakeLists.txt?

Yes, you have to open the xml file using any text editor and uncomment those lines. Usually for xml files, comments are between <!-- and -->. So, just make sure that is not the case.

After I finish editing the CMakeLists.txt file, do I have to save it with the same name?

Yes, that is necessary as it enables you to run catkin_make correctly (without errors).

Unable to load msg [beginner_tutorials/Num]: Cannot locate message [unit8] in package [beginner_tutorials] with paths [['/home/spyros/catkin_ws/src/beginner_tutorials/msg', '/home/spyros/catkin_ws/devel/share/beginner_tutorials/msg']]

This error can be solved by correcting unit8 to uint8.

edit flag offensive delete link more

Comments

I tried the tutorial again and I have the same problem. At the step 3 I got the message:

Unable to load msg [beginner_tutorials/Num]: Cannot locate message [unit8] in package [beginner_tutorials] with paths [['/home/spyros/catkin_ws/src/beginner_tutorials/msg', '/home/spyros/catkin_ws/devel/share/

Spyros gravatar image Spyros  ( 2018-06-01 08:12:23 -0500 )edit
1

unit8 is not a message type, so that error is understandable. Should it be uint8? And that is not a message, but a primitive type.

gvdhoorn gravatar image gvdhoorn  ( 2018-06-01 09:52:42 -0500 )edit

Yes, it should be uint8.

akshayk07 gravatar image akshayk07  ( 2018-06-01 10:00:17 -0500 )edit

Yes. That was my mistake. I changed it to uint8 and I got the correct result in the command rosmsg show beginner_tutorials/Num

Thank you!

Spyros gravatar image Spyros  ( 2018-06-01 14:09:47 -0500 )edit

I have updated the answer. If this answer is correct, then click the green tick so that this question is answered and can be closed.

akshayk07 gravatar image akshayk07  ( 2018-06-01 14:17:57 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-05-31 12:49:50 -0500

Seen: 656 times

Last updated: Jun 01 '18