Gazebo | Ignition | Community
Ask Your Question

Setting joint positions without using a PID Controller

asked 2016-02-08 07:44:58 -0500

sarvesh0303 gravatar image

I have created a four-wheeled vehicle in sdf format and want to simulate its motion by providing the desired angles to joints. I have been looking up ways to do this.

First thing I found was Joint::SetAngle but it has been deprecated. Next I tried, Joint::SetPosition and also, JointController::SetJointPosition. In both the cases, the wheels would rotate as desired but they wouldn't make the vehicle move. It seemed to be slipping on the ground, but I don't think the problem was with the friction parameters as I tried increasing mu and mu2 values to no avail, and also the model worked perfectly using Joint::SetVelocity.

I looked up this website and found that on many of the questions, a PID controller to apply force on the model was recommended, which indeed works. However, the problem is that my end-goal is to simulate a complex robot structure which will have many revolute joints (one for each motor). Therefore, PID tuning for each joint will be time-consuming and quite frankly, annoying. So is there a safe alternative to using a PID tuner?

TLDR: SetAngle is deprecated, SetJointPosition makes wheels rotate but model doesn't move. Looking for alternatives to PID Controller, as PID Tuning can be time-consuming and erroneous

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-02-17 09:51:38 -0500

debz gravatar image

I might suggest you to use a P controller (set I and D parameters to zero) and increase the damping of your joints. You'll get almost what you want. The damping prevents the PID to oscillate or diverge, and using a PID controller is the most integrated solution I know for gazebo. I use this solution to avoid PID tuning for a robot arm.

<joint type="revolute" name="wheel_joint">
  <pose>0 0 0 0 0 0</pose>
    <xyz>0 1 0</xyz>
edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-02-08 07:44:58 -0500

Seen: 2,048 times

Last updated: Feb 17 '16