Lab 3: Closed Loop Control

Overview

In this lab, we are going to apply closed-loop control to trajectory tracking. A ROS Subscriber is included in the script to receive real-time odometry feedback from Gazebo simulator. With the odom/pose updates, the robot can adjust its moving direction accordingly and check if the desired waypoint has been reached.


Specifically, the task is to implement a PD controller (a variant/subset of PID controller) to track the diamond shape trajectory. Same as in Lab 2, the waypoints are (0, 0), (3, -4), (6, 0), and (3, 4), and the sequence does matter. After task completion, the robot should stop at the origin and the Python script should exit gracefully. Please plot the trajectory (using another provided Python script) and discuss your results in the lab report.


To help you complete the lab, please review the Classes section in Python Docs.