Simple path-following controller that uses PID controllers and a look-ahead reference pose to follow a planned path. It produces velocity commands (cmd_vel) based on the reference pose sampled at a look-ahead distance and limits linear/angular speeds and accelerations.
- Authors: Intelligent Robotics Lab
- Maintainers: Francisco Martín Rico fmrico@gmail.com
| Distribution | Status |
|---|---|
| humble | |
| jazzy | |
| kilted | |
| rolling |
- Plugin Name:
easynav_simple_controller/SimpleController - Type:
easynav::SimpleController - Base Class:
easynav::ControllerMethodBase - Library:
easynav_simple_controller - Description: Path-following controller using PID (linear and angular) and a look-ahead strategy.
All parameters are declared under the plugin namespace, i.e., /<node_fqn>/easynav_simple_controller/SimpleController/....
This plugin derives from
easynav::ControllerMethodBase.
See that section for shared collision-checking parameters and debug markers common to all controllers.
| Name | Type | Default | Description |
|---|---|---|---|
| — | — | — | Velocity and acceleration limits are not this plugin's: they are the robot limits of controller_node (robot_limits.max_linear_vel, min_linear_vel, max_angular_vel, max_linear_acc, max_linear_decel, max_angular_acc, max_angular_decel), queried with ControllerMethodBase::get_robot_limits() and also enforced by ControllerNode's velocity smoother. |
look_ahead_dist |
double |
1.0 |
Look-ahead distance to sample the reference pose on the path (m). |
tolerance_dist |
double |
0.05 |
Distance threshold to switch to pure orientation tracking (m). |
final_goal_angle_tolerance |
double |
0.1 |
Angular tolerance (rad) used to decide final-goal arrival. |
k_rot |
double |
0.5 |
Gain used to reduce linear speed based on angular velocity (higher: stronger reduction while turning). |
linear_kp |
double |
0.95 |
Proportional gain for the linear PID controller. |
linear_ki |
double |
0.03 |
Integral gain for the linear PID controller. |
linear_kd |
double |
0.08 |
Derivative gain for the linear PID controller. |
angular_kp |
double |
1.5 |
Proportional gain for the angular PID controller. |
angular_ki |
double |
0.03 |
Integral gain for the angular PID controller. |
angular_kd |
double |
0.08 |
Derivative gain for the angular PID controller. |
Deprecated: this plugin's former limit parameters (
max_linear_speed,max_angular_speed,max_linear_acc,max_angular_acc, under the plugin's name) still apply, with a warning, wherecontroller_node.robot_limits.*does not set that limit. They will stop working soon: move them torobot_limits.
This controller uses the shared NavState bag provided by the easynav_core framework. The following keys are used at runtime by SimpleController:
| Key | Type | Access | Notes |
|---|---|---|---|
robot_pose |
nav_msgs::msg::Odometry |
Read | Current robot odometry used to compute the robot pose and yaw. |
path |
nav_msgs::msg::Path |
Read | Planned path to follow. The controller samples a reference pose at look_ahead_dist along this path. |
cmd_vel |
geometry_msgs::msg::TwistStamped |
Write | Output velocity command. Header.frame_id is set to path.header.frame_id when available and stamp to the controller node clock. |
The controller itself does not create ROS publishers/subscribers or service servers. It interacts via the NavState abstraction; how NavState is exposed (topics or other IPC mechanisms) depends on the integrating node.
This controller reads pose from nav_msgs/Odometry (NavState key robot_pose). TF is not directly used in this plugin.
Apache-2.0