Command Line: Colcon
My Aliases
I hate typing - so these are the aliases in my ~/.bashrc
for my most common workflow:
alias build2="colcon build --symlink-install"
alias test2="colcon test --event-handlers console_direct+"
Build
colcon is used to build ROS 2 packages in a workspace.
Build all packages:
To avoid having to rebuild when tweaking Python scripts, config files, and launch files:
To fix most build issues, especially if you have added or removed packages to your workspace or installed new RMW implementations, clean the CMake cache. See this ROS Answers post for more details.
CMake Arguments
Test
To test and get results to screen:
Build/test a single package:
Formatting
Get the output to the screen:
Be Careful With Workspaces
You should probably build your workspace in a window where you have NOT sourced the setup.bash of that workspace. For more details on why, see this ticket.