Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to prevent revolute joint rotation ?

Hi!

I want to simulate a robot with 4 wheels (rotating around x axis) connected to 4 turrets (rotating around z axis). My problem is that when I send velocity commands to my wheels, each turret begins to rotate around z axis, even if I send them a position command to 0.0.

I have attempted several solutions :

  • change inertia of my wheels to :

     wheel_ixx = wheel_mass * (wheel_radius**2 / 4.0 + wheel_thickness**2 / 12.0)
     wheel_iyy = wheel_mass * (wheel_radius**2 / 4.0 + wheel_thickness**2 / 12.0)
     wheel_izz = wheel_mass/2.0 * wheel_radius**2
    
  • look at friction :

    • for the wheels :

      <friction>
        <ode>
          <mu>0.5</mu>
          <mu2>1.0</mu2>
          <slip1>0.0</slip1>
          <slip2>0.0</slip2>
        </ode>
      </friction>
      
    • for the turrets :

      <ode>
        <limit>
          <cfm>0.400000</cfm>
          <erp>0.800000</erp>
        </limit>
      </ode>
      
  • try torque compensation : by applying through a gazebo plugin

    this->model->GetJoints()[i]->GetParent()->SetTorque(-this->model->GetJoints()[i]->LinkTorque(1));
    

But it is still not working. I through about sending an infinite torque to my turret so that no torque can be higher and make it rotate but I don't know how to do so. I am sending position commands to my turrets through the topic /joint_cmd so I send gazebo::msgs::JointCmd and I have access only to the name, velocity, position and force of the joint.

Can you help me please? :)