Skip to content

Running ROS Code

Benjamin Poulin edited this page Oct 1, 2022 · 1 revision

Build your packages

Run

colcon build --packages-select <package names separated by spaces...>

For example:

colcon build --packages-select pubsub service interfaces

Do the next steps in a different terminal from your building terminal

Source your overlay

Go to your workspace folder, e.g.:

cd bootcamp_ws

Run the source script

. install/setup.sh

Run your executables

Run

ros2 run <package_name> <executable_name>

For example:

ros2 run pubsub talker