Vehicle driven by joint motors does not move when increasing / decreasing speed / steering

asked 2019-02-18 04:50:41 -0500

ce_guy gravatar image

Hello,

I am modeling a vehicle with an articulated steering (like a wheel loader) and wrote my own model plugin to drive this vehicle.

To control the wheel speeds and steering angle I used joint motors to set the velocity and position of a specific joint. For this I calculated the right wheel speeds for inner and outer wheels based on the steering angle, front / back track width and wheelbase.

In the tutorial http://gazebosim.org/tutorials?tut=se... there is a disadvantage of joint motors mentioned: "When using to set a link's velocity all other degrees of freedom are locked".

Does this mean when I set the velocity on one wheel joint all others wheel do not spin in this moment (or if I set a steering angle)?

When I drive at a constant speed with a constant steering angle I don't really have problems but when I try to increase or decrease the speed or set a new steering angle the vehicle is not moving anymore until the new steering angle / speed is reached. For example when I set a new steering angle the wheel are still spinning while the new angle is set but the stands still.

I added a positive and negative acceleration and steering rate to the plugin by calculating a time difference between the update calls of gazebo and increasing and decreasing the joint velocities with this acceleartion values. So the setParam and setPosition are called like a thousand times per second except there is no change in desired velocities or steering angle. Is this maybe a problem and I should specify a rate (that it is just called 10 times per second)?

To add a few background informations why I use joint motors and don't use pid controllers:

I just want to test different path planning algorithms on this simulation model and want to be sure that my commanded velocities and steering angles are set perfectly. So if the wheel speeds are overshooting for example due to poor pid value tuning (I am not an expert in control technology) my simulation model will behave very different to the real world vehicle (which is controlled very well).

Thank you guys in advance for help!

edit retag flag offensive close merge delete