Skip to content

use_colcon

Naveau edited this page Nov 20, 2020 · 15 revisions

Colcon

Description

See in this wiki and in the official documentation

Installation

pip install -U colcon-common-extensions pytest setuptools

How to?

In order to build you workspace using colcon you need to go to your workspace root and perform:

colcon build

See colcon build -h for how to build just a package selection.

To build and run the unit-tests:

colcon test 

with verbose output:

colcon test --event-handlers console_direct+

for selected package(s):

colcon test --packages-select package_name --event-handlers console_direct+

Visualize the dependency of your workspace

colcon graph --dot --legend | dot -Tpdf -o /tmp/dependencies_graph.pdf
firefox /tmp/dependencies_graph.pdf

colcon-cd and colcon-argcomplete

In order to activate the colcon-cd and colcon completion functionnalities you need to add these lines in you bashrc:

# colcon
source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash
source /usr/share/colcon_cd/function/colcon_cd.sh
Clone this wiki locally