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

ROS Tutorial clarification

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

Gabor Juhasz gravatar image

Hi,

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:

catkin_package()

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

Thanks


The links for pages mentioned:

ros.org/wiki/ROS/Tutorials/CreatingMsgAndSrv ros.org/wiki/ROS/Tutorials/WritingPublisherSubscriber%28c%2B%2B%29

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

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

Stats

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

Seen: 564 times

Last updated: May 27 '13