steering_controllers_library
Library with shared functionalities for mobile robot controllers with steering drives (2 degrees of freedom), with so-called non-holonomic constraints.
The library implements generic odometry and update methods and defines the main interfaces.
The update methods only use inverse kinematics, it does not implement any feedback control loops like path-tracking controllers etc.
For an introduction to mobile robot kinematics and the nomenclature used here, see Wheeled Mobile Robot Kinematics.
Execution logic of the controller
The controller uses velocity input, i.e., stamped twist messages where linear x
and angular z
components are used.
Values in other components are ignored.
In the chain mode the controller provides two reference interfaces, one for linear velocity and one for steering angle position. Other relevant features are:
support for front and rear steering configurations;
odometry publishing as Odometry and TF message;
input command timeout based on a parameter.
The command for the wheels are calculated using odometry
library where based on concrete kinematics traction and steering commands are calculated.
Currently implemented kinematics
Bicycle - with one steering and one drive joints;
Tricycle - with one steering and two drive joints;
Ackermann - with two steering and two drive joints.
Description of controller’s interfaces
References (from a preceding controller)
Used when controller is in chained mode (in_chained_mode == true
).
<controller_name>/linear/velocity
double, in m/s<controller_name>/angular/velocity
double, in rad/s
representing the body twist.
Command interfaces
<steering_joints_names[i]>/position
double, in rad<traction_joints_names[i]>/velocity
double, in m/s
State interfaces
Depending on the position_feedback
, different feedback types are expected
position_feedback == true
–>TRACTION_FEEDBACK_TYPE = position
position_feedback == false
–>TRACTION_FEEDBACK_TYPE = velocity
With the following state interfaces:
<steering_joints_names[i]>/position
double, in rad<traction_joints_names[i]>/<TRACTION_FEEDBACK_TYPE>
double, in m or m/s
Subscribers
Used when controller is not in chained mode (in_chained_mode == false
).
<controller_name>/reference
[geometry_msgs/msg/TwistStamped]
Publishers
<controller_name>/odometry
[nav_msgs/msg/Odometry]<controller_name>/tf_odometry
[tf2_msgs/msg/TFMessage]<controller_name>/controller_state
[control_msgs/msg/SteeringControllerStatus]
Parameters
This controller uses the generate_parameter_library to handle its parameters.
For an exemplary parameterization see the test
folder of the controller’s package.
- reference_timeout (double)
Timeout for controller references after which they will be reset. This is especially useful for controllers that can cause unwanted and dangerous behavior if reference is not reset, e.g., velocity controllers. If value is 0 the reference is reset after each run.
Default: 1.0
- front_steering (bool)
DEPRECATED: Use ‘traction_joints_names’ or ‘steering_joints_names’ instead
Read only: True
Default: true
- rear_wheels_names (string_array)
DEPRECATED: Use ‘traction_joints_names’ or ‘steering_joints_names’ instead
Read only: True
Default: {}
Constraints:
length is less than 5
contains no duplicates
- traction_joints_names (string_array)
Names of traction wheel joints. For kinematic configurations with two traction joints, the expected order is: right joint, left joint.
Read only: True
Default: {}
Constraints:
length is less than 5
contains no duplicates
- front_wheels_names (string_array)
DEPRECATED: Use ‘traction_joints_names’ or ‘steering_joints_names’’ instead
Read only: True
Default: {}
Constraints:
length is less than 5
contains no duplicates
- steering_joints_names (string_array)
Names of steering joints. For kinematic configurations with two steering joints, the expected order is: right joint, left joint. The orientation of the steering axes is expected as such: When positive steering position value is commanded, then the robot should turn in positive direction of the z-axis of the vehicle (see REP-103).
Read only: True
Default: {}
Constraints:
length is less than 5
contains no duplicates
- traction_joints_state_names (string_array)
(Optional) Names of tractions joints to read states from. If not set joint names from ‘traction_joints_names’ will be used.
Read only: True
Default: {}
Constraints:
length is less than 5
contains no duplicates
- rear_wheels_state_names (string_array)
DEPRECATED: Use ‘traction_joints_state_names’ or ‘steering_joints_state_names’ instead
Read only: True
Default: {}
Constraints:
length is less than 5
contains no duplicates
- steering_joints_state_names (string_array)
(Optional) Names of steering joints to read states from. If not set joint names from ‘steering_joints_names’ will be used.
Read only: True
Default: {}
Constraints:
length is less than 5
contains no duplicates
- front_wheels_state_names (string_array)
DEPRECATED: Use ‘traction_joints_state_names’ or ‘steering_joints_state_names’ instead
Read only: True
Default: {}
Constraints:
length is less than 5
contains no duplicates
- open_loop (bool)
Choose if open-loop or not (feedback) is used for odometry calculation.
Default: false
- reduce_wheel_speed_until_steering_reached (bool)
Reduce wheel speed until the steering angle has been reached.
Default: false
- velocity_rolling_window_size (int)
The number of velocity samples to average together to compute the odometry twist.linear.x and twist.angular.z velocities.
Default: 10
- base_frame_id (string)
Base frame_id set to value of base_frame_id.
Default: “base_link”
- odom_frame_id (string)
Odometry frame_id set to value of odom_frame_id.
Default: “odom”
- enable_odom_tf (bool)
Publishing to tf is enabled or disabled?
Default: true
- twist_covariance_diagonal (double_array)
diagonal values of twist covariance matrix.
Default: {0.0, 7.0, 14.0, 21.0, 28.0, 35.0}
- pose_covariance_diagonal (double_array)
diagonal values of pose covariance matrix.
Default: {0.0, 7.0, 14.0, 21.0, 28.0, 35.0}
- position_feedback (bool)
Choice of feedback type, if position_feedback is false then
HW_IF_VELOCITY
is taken as interface type, if position_feedback is true thenHW_IF_POSITION
is taken as interface typeDefault: false