First steps
First steps into recreating the demo
Creating the workspace
We’re going to start by making the workspace that will hold all our ROS packages.
$ mkdir ~/demo && cd ~/demo
$ mkdir src
We won’t do cd
to any other directory, we will always work from this path. This makes it less confusing because the ROS build will write the build files to the current working directory, and we don’t want to make a mess.
Creating the packages needed
Ultimately, we will have the following structure:
Package | Build type | Notes |
---|---|---|
world | ament_python | Handles all logic and physics of the car |
driverless | ament_python | Algorithm for calculating the steer |
um_msgs | ament_cmake | Contains all custom messages |
qt_interface | ament_python | This package will be provided by us |
To make these packages, we can start using the following command:
$ ros2 pkg create PACKAGE --build-type BUILD_TYPE --destination-directory src --dependencies rclpy
The last package, qt_interface
, can be downloaded from this repository and imported into src
.
Once we have our packages set up, we can go to the next chapter!
Last modified March 18, 2023: Fix link to image (62e4b8e)