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 section4
.
Task 1.4 — Copy homework repo. We will be using the code you wrote in HW1 to control the TurtleBot. Copy the autonomy_repo
ROS package (of any of your group members) inside of your group's git repository.
Task 1.5 — Build. Navigate back to the root of your workspace, ~/autonomy_ws/
, and build your ROS workspace using colcon build
.
Task 2.1 — Launch simulator. Firstly, we will test out your HW1 code before you can test it out on the actual robot. Just like in HW1, start your TurtleBot simulator by:
ros2 launch asl_tb3_sim root.launch.py
Task 2.2 — Launch your heading controller. In a new terminal, source your workspace, and then run:
source ~/autonomy_ws/install/setup.bash
ros2 launch autonomy_repo heading_control.launch.py
Inside RVIZ window, you can select the goal pose
button. To set a goal orientation, drag your mouse anywhere in the map.
Checkpoint — Show the CA that your homework code is working as expected.
ROS2 comes with a built-in parameter service which can be useful for tuning parameters such as control gains. We will define the heading controller gain as a ROS2 parameter. Navigate to your heading_controller.py
script.