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

Download a ROS2 package from GitHub and install it with colcon

asked 2023-05-29 23:53:42 -0500

LastStarDust gravatar image

Is there a standard way to download a ROS2 package from GitHub and install it withcolcon?

I am looking for something more automated than just copy-pasting or using git submodules. I am currently getting away by using CMake ExternalProject_Add but I was curious if there was a better way.

Bonus question: what if I want to compile and install only one package in a repository with multiple packages? For example the geometry_msgs package in the common_interfaces repository.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-05-30 01:21:12 -0500

tfoote gravatar image

The best way to get code that's indexed is to leverage the tool rosinstall_generator documented here

In general git repositories don't support checking out specific subtrees so we generally don't do partial checkouts, but if you really need to to that you can put COLCON_IGNORE files in checked out packages that you want to skip before you build. There are some other ignore logic available from colcon too.

The output of rosinstall_generator is then typically piped to vcstoolhttps://github.com/dirk-thomas/vcstool

The name is based on the previous downstrema tool rosinstall.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2023-05-29 23:53:42 -0500

Seen: 343 times

Last updated: May 30 '23