Overview

The goals for this section:

  1. Learn to use RViz for visualizing information from your robot.
  2. Learn to write launch files to launch multiple nodes.
  3. Install nodes, launch files, and RViz configuration files in your ROS2 package.
  4. Test out code on hardware!

0. Initial Preparation

Task 0.1 — Cleanup. Remove directory ~/autonomy_ws if it exists.

Task 0.2 — GitHub Account. Use the following commands to log out of any existing GitHub accounts, and log in to the account of one of your group members.

gh auth logout  # Log out of any accounts from previous sections.
gh auth login   # Login to the account your group is using.

Git commits may still show a previous user’s name because of the local Git configuration. You can update the git config to attribute ownership correctly (If you don’t do it, it does not matter. You will still have all your data saved properly):

git config --global user.name "Your name"
git config --global user.email "[email protected]"

Task 0.3 — Group Repo. If you haven’t already, create a private GitHub repository for your group, and add the other members of your group as collaborators (to do this go to Settings > Collaborators in your repo once you’ve created it).

1. Set Up the Workspace

Task 1.1 — Directories. Create the base directory structure for your group’s ROS workspace, ~/autonomy_ws/src.

Task 1.2 — Clone and Branch. Clone your group’s GitHub repo to the src/ directory, and create a new branch called section3.

Task 1.3 — Create a Package. Create an empty ROS package inside of your group's git repository with the name s3_basic.

Task 1.4 — Examine and Customize. Just like you did in the previous section, use the cd and ls commands to explore your group’s newly created package.

Optional: Use any editor to fill in the description, maintainer, and license fields of your newly created package.xml file. Use Apache License 2.0 for the license field.