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

ROS Tutorial clarification

asked 2013-03-17 03:38:09 -0500

Gabor Juhasz gravatar image


I'm following the (catkin) tutorials to get started with ROS, and I run into the following.

In CreatingMsgAndSrv tutorial it says I should add this to my CMakeLists.txt:

find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs message_generation)

But in the next tutorial (WritingPublisherSubscriber) it says I should have this:

find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs genmsg)

Another inconsistency I found:

Also make sure you export the message runtime dependency.

catkin_package( ... CATKIN_DEPENDS message_runtime ... )

while on the next page:


So, the question is, which one of these should I use? Does it matter? What's the difference?


The links for pages mentioned:

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-05-27 09:42:49 -0500

tfoote gravatar image

updated 2013-05-27 09:43:57 -0500

What you put in your CMakeLists.txt depends on what you are doing in your package. If you are just writing a simple node you don't need to export CATKIN_DEPENDS and you don't need to depends on message_generation.

There's a good summary of what CATKIN_DEPENDS is for in this question

Whereas if you are creating messages like the first tutorial you do need to do those things so the the messages can be generated.

edit flag offensive delete link more

Question Tools


Asked: 2013-03-17 03:38:09 -0500

Seen: 569 times

Last updated: May 27 '13