Skip to content

Incorrect odometry when turning vehicle with Ackermann steering controller (ROS2 Humble). #933

Closed
@aizmailovs

Description

@aizmailovs

Description of the bug
When turning the vehicle with Ackermann steering controller, the odometry gets wrong. This issue looks similar to the #789.

To Reproduce
To reproduce the bug, launch the car-like robot with the ackermann_steering_controller. My .yaml file is:

controller_manager:
  ros__parameters:
    update_rate: 50

    use_sim_time: true

    joint_state_controller:
      type: joint_state_broadcaster/JointStateBroadcaster

    ackermann_steering_controller:
      type: ackermann_steering_controller/AckermannSteeringController

ackermann_steering_controller:
  ros__parameters:

    reference_timeout: 2.0
    front_steering: true
    open_loop: false
    velocity_rolling_window_size: 10
    position_feedback: true
    use_stamped_vel: true   # Use true to make controller topic /ackermann_steering_controller/reference listen to TwistStamped type data
                            # Use false ro make controller topic /ackermann_steering_controller/reference_unstamped listen to Twist type data
    rear_wheels_names: [right_rear_joint, left_rear_joint]
    front_wheels_names: [front_steer_right_joint, front_steer_left_joint]

    wheelbase: 0.65               # Distance between front and rear wheel axes
    front_wheel_track: 0.605      # Distance between front wheels
    rear_wheel_track: 0.605       # Distance between rear wheels
    front_wheels_radius: 0.165
    rear_wheels_radius: 0.165

joint_state_controller:
  ros__parameters:
    type: joint_state_controller/JointStateController

Reality and expected behavior
While the robot is going in a straight line, the odometry is pretty accurate, but when the robot turns the odometry starts to spin with much shorter radius than expected.

odometry2.webm

Just curious if anybody else have similar issue with Ackermann steering controller.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions