The goals for this section:
Task 1.1 — Cleanup. Remove directory ~/autonomy_ws
if it exists. This may be leftover from a previous section.
Task 1.2 — Directories. Create the base directory structure for your group’s ROS workspace, ~/autonomy_ws/src
.
Task 1.3 — Clone and Branch. Clone your group’s GitHub repo to the src/
directory, and create a new branch called section5
.
Task 1.4 – Copy homework navigator. We will be adding the code you wrote in HW2 to your autonomy stack to control the TurtleBot. Copy the file navigator.py
to the folder ~/autonomy_ws/src/<group_repo>/autonomy_repo/scripts
and the file navigator.launch.py
to the folder ~/autonomy_ws/src/<group_repo>/autonomy_repo/launch
on the AA274 laptop.
Task 1.5 — Build. Register your navigator node by updating CMakeLists.txt
. Then, navigate back to the root of your workspace and build it using colcon build --symlink-install
.
Task 2.1 — Launch simulator. Firstly, we will test out your HW2 code before you can test it out on the actual robot. Start the TurtleBot simulator by:
ros2 launch asl_tb3_sim root.launch.py
Task 2.2 — Launch your navigator. In a new terminal, source your workspace, and then launch the navigator:
source ~/autonomy_ws/install/setup.bash
ros2 launch autonomy_repo navigator.launch.py
Task 2.3 – Navigate to goal. Set a new goal pose in RViz by selecting the 2D Goal Pose
button on the top toolbar and then clicking and dragging in the environment to set a goal pose.
Checkpoint — Show the CA your TurtleBot navigating in sim.
Time to test this out on the actual robot! First, ensure all launch files and running ROS nodes are properly shut down. Then, determine the ROS_DOMAIN_ID
of the laptop you are using for this section with the command:
echo $ROS_DOMAIN_ID