-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ackerman drive controller odometry rotation changes continuously #1244
Comments
Can you share your controller parameters? Are you using open_loop mode? Could you change that parameter and see if the behavior changes? Which version are you using? |
you mean the robot state publisher? |
The version is 2.35.0.
Screencast.from.08-08-2024.06.45.06.AM.webm |
But actually, this should be reproducible with Mock Hardware as well if you have the same behavior with open loop control. |
I will shares the files, no problem. |
files.zip I have not tried the ackerman drive example from demos yet. |
I have setup an ackerman controller based on the demo's mentioned in the repo - https://github.com/ros-controls/gz_ros2_control/tree/master.
The controller is used in non chained mode. I have setup the plugin to remap tf_odometry messages as follows:
<remapping>/ackermann_steering_controller/tf_odometry:=/tf</remapping>
In addition to the controller, the joint state braodcaster also publisher messages to /tf topic.
When viewed in rviz2, everything works when things are stationary. When the car is moved linearly by publishing twist messages as below with only a linear velocity, the Rviz properly shows the movement and it is in sync with what is shown in gazebo.
ros2 topic pub /ackermann_steering_controller/reference_unstamped geometry_msgs/msg/Twist '{linear: {x: 1.0, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 0.0}}'
If I include a steering angle component in the twist message, the movement is not in sync with gazebo. When these is only a steering angle component as below, in Rviz, the car rotates.
ros2 topic pub /ackermann_steering_controller/reference_unstamped geometry_msgs/msg/Twist '{linear: {x: 0.0, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 0.1}}'
Please see below for a video. Also, when inspected /tf topic with ros2 topic echo, I can see that odom to base_link transform changes continuously. This agrees with what is shown in RViz.
Since what is set is steering angle and the vehicle movement is zero, can there be a continuous change in odom to base_link?
Screencast.from.07-27-2024.06.23.35.PM.webm
The text was updated successfully, but these errors were encountered: