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

Num.msg is not used

asked 2015-04-22 16:46:29 -0500

Jayantha gravatar image

updated 2015-04-23 01:52:40 -0500

I have just completed ros Beginner Level Tutorials. At Level 3 a package is created by the name "beginner_tutorials". At level 10 we add msg file called "Num.msg" to msg folder of the same package.

When I made the package I made sure that Num.msg file is empty. So "int64 num" not there in the file.

Later at levels 11 and 13 we add and run simple publisher and subscriber.

Now Program runs smoothly. talker publish "hello world' and listener picks it up.

Can anybody explain how it publish using empty Num.msg file.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-04-22 20:30:37 -0500

marguedas gravatar image

I don't get what you mean.
If I understand well, you deleted the msg folder in beginners_tutorial AND the generated Num.h in catkin_ws/devel/inclute/beginners_tutorial and you can still publish Num messages ?

In ROS the messages includes files are created at build time, that is why these packages depends on message_generation (in CMakeLists.txt). The directive generate_messages takes care of that. The generated messages are stored in catkin_ws/devel/include/PACKAGE_NAME. As long as they're present in this directory you can include them and use them in your codes

If you removed only the Num.msg file, the Num.h generated during previous build is not deleted. As long as Num.h exists you can process Num messages.

Hope this helps

edit flag offensive delete link more

Question Tools


Asked: 2015-04-22 16:46:29 -0500

Seen: 156 times

Last updated: Apr 23 '15