diff --git a/doc/index.rst b/doc/index.rst
index 22d75e48..84cbc7bb 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -398,13 +398,13 @@ When the Gazebo world is launched you can run the following command to move the
.. code-block:: shell
- ros2 run gz_ros2_control_demos example_mobile_robots
+ ros2 run gz_ros2_control_demos example_mobile_robots --ros-args -p use_sim_time:=true
You can also drive the robots from the keyboard using the following command:
.. code-block:: shell
- ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -p stamped:=true
+ ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -p stamped:=true -p use_sim_time:=true
You can also manually publish on the ``/cmd_vel`` topic to drive the robots:
diff --git a/gz_ros2_control_demos/config/tricycle_drive_controller.yaml b/gz_ros2_control_demos/config/tricycle_drive_controller.yaml
index ff90ad57..52add4e0 100644
--- a/gz_ros2_control_demos/config/tricycle_drive_controller.yaml
+++ b/gz_ros2_control_demos/config/tricycle_drive_controller.yaml
@@ -9,44 +9,40 @@ joint_state_broadcaster:
tricycle_controller:
ros__parameters:
- type: tricycle_controller/TricycleController
+ type: tricycle_steering_controller/TricycleSteeringController
# Model
- traction_joint_name: traction_joint # Name of traction joint in URDF
- steering_joint_name: steering_joint # Name of steering joint in URDF
- wheel_radius: 0.3 # Radius of front wheel
+ traction_joints_names: ["traction_joint"] # Name of traction joint in URDF
+ steering_joints_names: ["steering_joint"] # Name of steering joint in URDF
+ traction_wheels_radius: 0.3 # Radius of front wheel
wheelbase: 1.7 # Distance between center of back wheels and front wheel
+ # Rate Limiting
+ linear:
+ x:
+ max_acceleration: 5.0
+ max_deceleration: -8.0
+ max_jerk: 1000.0
+ angular:
+ z:
+ max_velocity: 1.0
+ max_acceleration: 5.0
+ max_deceleration: -8.0
+ max_jerk: 1000.0
+
# Odometry
odom_frame_id: odom
base_frame_id: base_link
open_loop: false # if True, uses cmd_vel instead of hardware interface feedback to compute odometry
enable_odom_tf: true # If True, publishes odom<-base_link TF
- odom_only_twist: false # If True, publishes on /odom only linear.x and angular.z; Useful for computing odometry in another node, e.g robot_localization's ekf
pose_covariance_diagonal: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0] # Need to be set if fusing odom with other localization source
twist_covariance_diagonal: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0] # Need to be set if fusing odom with other localization source
velocity_rolling_window_size: 10 # Rolling window size of rcppmath::RollingMeanAccumulator applied on linear and angular speeds published on odom
- # Rate Limiting
- traction: # All values should be positive
- # min_velocity: 0.0
- # max_velocity: 1000.0
- # min_acceleration: 0.0
- max_acceleration: 5.0
- # min_deceleration: 0.0
- max_deceleration: 8.0
- # min_jerk: 0.0
- # max_jerk: 1000.0
- steering:
- min_position: -1.57
- max_position: 1.57
- # min_velocity: 0.0
- max_velocity: 1.0
- # min_acceleration: 0.0
- # max_acceleration: 1000.0
+ reduce_wheel_speed_until_steering_reached: true # If true, limits wheel speed when steering angle is far from reference to avoid slipping.
# cmd_vel input
- cmd_vel_timeout: 500 # In milliseconds. Timeout to stop if no cmd_vel is received
+ reference_timeout: 0.5 # In seconds. Timeout to stop if no cmd_vel is received
- # Debug
- publish_ackermann_command: true # Publishes AckermannDrive. The speed does not comply to the msg definition, it the wheel angular speed in rad/s.
+ # debug
+ publish_limited_velocity: true
diff --git a/gz_ros2_control_demos/launch/tricycle_drive_example.launch.py b/gz_ros2_control_demos/launch/tricycle_drive_example.launch.py
index 99d194f1..46b6e592 100644
--- a/gz_ros2_control_demos/launch/tricycle_drive_example.launch.py
+++ b/gz_ros2_control_demos/launch/tricycle_drive_example.launch.py
@@ -79,7 +79,7 @@ def generate_launch_description():
'--param-file',
robot_controllers,
'--controller-ros-args',
- '-r /tricycle_controller/cmd_vel:=/cmd_vel'
+ '-r /tricycle_controller/reference:=/cmd_vel'
],
)
diff --git a/gz_ros2_control_demos/urdf/test_tricycle_drive.xacro.urdf b/gz_ros2_control_demos/urdf/test_tricycle_drive.xacro.urdf
index c0971c1a..e92ee008 100644
--- a/gz_ros2_control_demos/urdf/test_tricycle_drive.xacro.urdf
+++ b/gz_ros2_control_demos/urdf/test_tricycle_drive.xacro.urdf
@@ -121,6 +121,7 @@
+
@@ -148,6 +149,7 @@
+