colcon
CommonThe recommended build tool for ROS 2, compiling an entire workspace with a single command.
colcon is the officially recommended command-line build tool for ROS 2; its name comes from “collective construction.” A ROS workspace usually contains many packages with dependencies on each other, and colcon automatically works out the build order and calls each package’s own build system in turn or in parallel — CMake/ament_cmake for C++ packages, setuptools for Python packages — installing the results into an install directory. It replaced catkin_make and catkin_tools from the ROS 1 era. After building, you need to source install/setup.bash before the terminal can find the newly built packages.
ExampleRunning colcon build --symlink-install in ~/ros2_ws, then source install/setup.bash, followed by ros2 run to launch a node you wrote yourself.
- Also called
- collective construction, colcon build
- Related
- ROS Workspace · Package (ROS) · ament · catkin · CMake · rosdep
- Sources
- colcon documentation
ROS 2 Documentation: Using colcon to build packages