Rosanswers logo

The documentation for genmsg seems to indicate that generated targets follow language-name conventions.

E.g. if you target foo depends on the C++ messages of your current bar project, you need to add: add_dependencies(foo bar_gencpp)

--- https://docs.ros.org/api/genmsg/html/usermacros.html

Is there a list of these supported languages? Is there documentation explaining how the genmsg cmake macros generate target names?

Originally posted by rubicks on ROS Answers with karma: 193 on 2019-03-25

Post score: 1


1 Answer 1


Rosanswers logo

Collecting relevant comments from the answer from @janindu :

This loop in genmsg invokes all available generators which are on their own create their targets: https://github.com/ros/genmsg/blob/f9dad2f897fc9bafec038ed8a74986ba766e9e9d/cmake/pkg-genmsg.cmake.em#L86-L132

--- dirk-thomas

Generators essentially register as plugins against genmsg using a message_generator tag in the export section of their manifests.

--- gvdhoorn

With regard to the enumeration of packages that provide language generators, this is entirely dependent on which packages are present; for most catkin workspaces, this is a function rosdep and any package.xml files present.

However, for the common case where a given project depends on the message_generation package, the following generators are dependencies thereof and guaranteed to be present:

In this case, the generate_messages macro provided by genmsg will understand (eponymous) LANGS option arguments for each of these five generators.


Much thanks to @janindu, @gvdhoorn, and @dirk-thomas for all your help.

Originally posted by rubicks with karma: 193 on 2019-03-26

This answer was ACCEPTED on the original site

Post score: 0


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.