# Fixing yaw keeps overshooting

Hello,

I'm building a 4-wheeled skid steering robot. Currently I'm implementing the functionality to drive towards a point (x, y) based on its odometry data. One node (drive control) sends twist messages containing linear x and angular z speed, which the other node (wheel control) receives. This node calculates the desired speed for the left and right wheels, and tries to obtain that speed using PD-controlled PWM signals. An odometry node takes care of the feedback of the front two wheels. This all seems to work fine. However, when the heading (yaw) of the robot needs to be corrected to eventually reach the desired point, it sends a twist message which an angular speed (PD controlled). The problem is that the yaw always overshoots. So the robot's yaw always passes the desired yaw which causes the robot's movement to oscillate. The following I tried:

• Increase the yaw error margin
• Decrease the angular velocity
• Control the desired angular velocity with a PD-control mechanism
• Increase all node work rates

These things did not fully solve this issue, and now I ran out of ideas. Does anyone have a grasp of what I can do to fix this problem? If you need some code, feel free to ask! Can't put all of it on here!

edit retag close merge delete

If you have the possibility, you could look at using the diff_drive_controller from ros_control. It should also support skid steering setups.