-
Notifications
You must be signed in to change notification settings - Fork 9
Control
The current control module implements a basic path-following system using the Pure Pursuit algorithm, which is a geometric path tracking controller. It consists of two main components:
-
Pure Pursuit Controller (
pure_pursuit.py):- Subscribes to
/path(nav_msgs/Path) from the path planning module and/odom(nav_msgs/Odometry) for current pose. - Uses a configurable lookahead distance (default 3.0m) to select a target point on the path ahead of the vehicle.
- Calculates the required steering angle using the Pure Pursuit formula: curvature = (2 * lateral_offset) / (lookahead_distance²), then steering_angle = atan(wheelbase * curvature).
- Sets a target speed (default 4.0 m/s), reducing it as the vehicle approaches the goal (within 1m, and stops within 0.2m).
- Publishes AckermannDrive messages to
/ackermann_cmdwith speed and steering angle. - Vehicle parameters: wheelbase = 1.534m, max_steering_angle = 0.366 rad.
- Subscribes to
-
Ackermann to CmdVel Converter (
ackermann_to_cmdvel_node.py):- Subscribes to
/ackermann_cmd(ackermann_msgs/AckermannDrive). - Converts to geometry_msgs/Twist for
/cmd_velusing Ackermann steering geometry: angular_velocity = speed * tan(steering_angle) / wheelbase. - Clamps steering angle to max (default 0.4 rad).
- Directly transfers linear speed to linear.x in Twist.
- Vehicle parameter: wheelbase = 1.534m.
- Subscribes to
This implementation provides a simple, reactive path-following capability suitable for basic autonomous driving on planned paths. It runs at 10 Hz and includes debug logging.
Last year's team did some research and decided to use MPC (Model Predictive Control) controllers, specifically the MPPI (Model Predictive Path Integral) variant, with MATLAB for the control module.
May need MATLAB pre-requisites.
-
AMZ Driverless: The Full Autonomous Racing System Go through the section 5 (Control) of this paper.
Approach 2: Implementing Control using nav2 instead
- QUTMS Driverless uses Nav2 libraries