0
$\begingroup$

Rosanswers logo

I've created a four-wheeled robot with skid steer controller which works with teleop_twist_keyboard node. However the robot can only move forward or backward and I can't get it to turn left or right.

The skidsteer controller:

<gazebo>
    <plugin name="skid_steer_drive_controller" filename="libgazebo_ros_skid_steer_drive.so">
          <updateRate>100.0</updateRate>
          <robotNamespace>/</robotNamespace>   
          <leftFrontJoint>left_front_wheel_joint</leftFrontJoint>
          <rightFrontJoint>right_front_wheel_joint</rightFrontJoint>
          <leftRearJoint>left_back_wheel_joint</leftRearJoint>
          <rightRearJoint>right_back_wheel_joint</rightRearJoint>
          <wheelSeparation>5</wheelSeparation>
          <wheelDiameter>0.6</wheelDiameter> 
          <robotBaseFrame>base_footprint</robotBaseFrame>  
          <torque>20</torque>
          <topicName>/cmd_vel</topicName>
          <broadcastTF>true</broadcastTF>
          <commandTopic>/cmd_vel</commandTopic>
          <odometryTopic>/odom</odometryTopic>
          <odometryFrame>/odom</odometryFrame>
          <covariance_x>0.0001</covariance_x>
          <covariance_y>0.0001</covariance_y>
          <covariance_yaw>0.0001</covariance_yaw>
    </plugin>
</gazebo>

<gazebo>
    <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
        <robotNamespace>/</robotNamespace>
    </plugin>
</gazebo>

Thanks.


Originally posted by the3kr on ROS Answers with karma: 91 on 2018-12-01

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

I'm not sure why but adding contact stiffness, friction co-efficient and damping fixed it. Like:

<kp>1000000.0</kp> <!-- kp and kd for rubber -->
<kd>100.0</kd>
<mu1>1.0</mu1>
<mu2>1.0</mu2>
<maxVel>1.0</maxVel>
<minDepth>0.00</minDepth>

Originally posted by the3kr with karma: 91 on 2019-03-18

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by omers on 2022-05-26:
Can you post an example of how you added it please?

$\endgroup$
0
$\begingroup$

Rosanswers logo

HI,I just got the same problem,and i fixed it with the following steps: 1.Upside down your model in gazebo with tools in toolsbar. 2.Control the wheels and see if they are turing in right direction. This step is to make sure that your plugin is working fine. 3.Then loose the model weight with the tag "mass". 4.If step 3 doesn't work fine, try to reduce the force param on wheel with tag "mu1 mu2 kd". 5.The final step is to increase the torque in controler plugin.

The following values can be used: robot body: mass = 20 wheel : mu1=1 mu2=1 kd=100


Originally posted by wfcola with karma: 11 on 2020-06-15

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.