Package Setup

In this exercise, we will build our package dependencies and configure the package for the Qt Creator IDE.

Download dependencies from source

In a terminal enter:

cd ~/perception_driven_ws/src
vcs import < dependencies.repos

Download debian dependencies


Make sure you installed and configured the rosdep tool.

Then, run the following command from the src directory of your workspace:

rosdep install --from-paths . --ignore-src -y

Build your workspace

cd ~/perception_driven_ws
source /opt/ros/foxy/setup.bash
colcon build


If the build fails then revisit the previous two steps to make sure all the dependencies were downloaded.

Source the workspace

In a new terminal (where you didn’t build the workspace), run the following command from your workspace parent directory to enable the ROS tools to see the new packages

source install/setup.bash

Import Package into QTCreator

In QTCreator select the following menu item: File ‣ New File or Project.

In the dialog that appears, on the left select Other Project and in the middle section select ROS Workspace. Confirm your selection with the Choose button.

Choose a name for your workspace, select /opt/ros/foxy/ as the ROS distribution, select colcon as the build system, and provide the path to your perception_ws directory as the workspace path. Click Next and Finish to complete the setup.

Rebuild the workspace inside of QTCreator, to create the metadata required for IDE code completion.

Open the Main Thread Source File

In the Edit tab, open the file pick_and_place_node.cpp in the directory [workspace source directory]/pick_and_place_application/src/nodes