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

Creating msg and srv tutorial

asked 2016-08-11 00:59:09 -0600

alienmon gravatar image

updated 2016-08-11 04:56:13 -0600

NEngelhard gravatar image

I'm doing this tutorial

There's one more step, though. We need to make sure that the msg files are turned into source code for C++, Python, and other languages:

Open package.xml, and make sure these three lines are in it and uncommented:

<build_depend>message_generation</build_depend>
  <run_depend>message_generation</run_depend>
  <run_depend>message_runtime</run_depend>

Note that at build time, we need "message_generation", while at runtime, we only need "message_runtime".

My question is: It says that while at runtime, we only need "message_runtime". , then why it put the message generation in run_depend (look at the three lines)?

In addition, can you please explain what are message_generation, message_runtime , and all these things we put in the middle of build_depend ,run_depend, and other tags are? noob questions

Lastly.... I noticed that in the tutorial: while in creating msg, it mentions to call generate_message function and to make sure we export message_runtime dependecy. In creating srv, it doesn't mention to do so. Is it not required for creating a srv? Why?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-08-12 03:47:03 -0600

ghkraju gravatar image

1 I think you can remove the message_generation in run_depend. Please have a look at here ( http://wiki.ros.org/ROS/Tutorials/Cre... ) It is just :

<build_depend>message_generation</build_depend>

<run_depend>message_runtime</run_depend>

2 (Despite its name, message_generation works for both msg and srv.) I think its the same for message_runtime.

edit flag offensive delete link more

Comments

Yah I know message_generation works for both msg and srv. What I means is that : If I create a srv (assuming I haven't created anything before), do I need call generate_message function and make sure exporet message_runtime dependecy as well?

alienmon gravatar image alienmon  ( 2016-08-14 20:13:02 -0600 )edit

Yes, You need them while catkin_make otherwise you will get a compilation error for the source file where you linked the respective service since it doesn't what that service is......

ghkraju gravatar image ghkraju  ( 2016-08-15 02:30:28 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-08-11 00:59:09 -0600

Seen: 254 times

Last updated: Aug 11 '16