Problems to move the wheels with a PID controller
Hi guys!
I got a robot simulated in Gazebo which i'd like to control easily. I made 3 controllers (thanks to the tutorials) : one to control the head and a controller for each wheel. I should mention that the robot stands on a 3rd wheel (it's just a ball actually), it might cause a problem but if so, I don't know which one.
By setting the effort applied on the wheel joints, it works "ok". It's not perfect (zigzags and slidings) but if the applied effort is not to high, it's ok. So, I tried to add a PID to these controllers. The head controller works just fine with it. But when I did the same with the left wheel, I got some very strange results : the robot starts jumping/flying before landing far away when the wheel comes to the position I asked.
I first thought to change the PID parameters, but the problem remains : the effort applied by the pid_controller_.updatePid(current_pos-desired_pos, dt)
function is lower than the one I apply on the wheel "by myself" to make it move without "jumping", but the robot still "jumps" (see the update loop in the .cpp file in the "add a pid" tutorial).
I also tried changing the weight of the wheels and the body in the URDF file , and I set the contact coefficient using the following code :
<gazebo reference="lefttire">
<mu1 value="100.0" />
<mu2 value="100.0" />
<kp value="1000000.0" />
<kd value="1.0" />
</gazebo>
("lefttire" is the name of the link)
...vainly
Should I add a PID controller for the wheel speed? Or should I look at this 3rd wheel?
Any help appreciated! Thanks!
UPDATE : "Please, help!"
can you share your model and code? thanks.