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

How to compile ROS messages "by hand"?

asked 2014-07-25 02:18:35 -0500

foopeter gravatar image

updated 2014-07-27 14:16:48 -0500

gvdhoorn gravatar image

In our project, we use SCons as our build system. However, I compiled a ROS node (publisher) and try to integrate ROS as good as possible without catkin.

Now I need a custom message type and wonder, how the language-specific code is compiled from a .msg file? Which is the executable catkin calls to build the messages?

edit retag flag offensive close merge delete

Comments

You could also create a dummy package and generate your messages there and copy them to your Ros node. The generated C++ messages will be in the dummy_pkg/include package, the Python messages will be under dummy_pkg/src/dummy_pkg

Mehdi. gravatar image Mehdi.  ( 2014-07-27 21:28:40 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-07-27 14:16:14 -0500

gvdhoorn gravatar image

Looking at wiki/genmsg, it would seem that it invokes github/gencpp, github/genpy and any other message generators based on parameters supplied by some catkin / cmake macro wrappers.

I haven't done this myself, but I can imagine those generators can be invoked from a command line as well, provided you provide the proper arguments. The genpy readme even seems to give some hints about how to do that:

$ ./scripts/genmsg_py.py -p geometry_msgs -Istd_msgs:`rospack find std_msgs`/msg -Igeometry_msgs:`rospack find geometry_msgs`/msg -o gen `rospack find geometry_msgs`/msg/PoseStamped.msg

This can probably be integrated into a Scons build, by declaring the correct dependencies?

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-07-25 02:18:35 -0500

Seen: 1,407 times

Last updated: Jul 27 '14