Ask Your Question
0

Adding friction to model wheels

asked 2020-03-03 08:22:50 -0500

John999991 gravatar image

updated 2020-03-03 10:16:27 -0500

Dear all, I have a 4-wheel small car URDF model which spawns correctly on Gazebo but when I issue a pub command on the velocity controller to move it, I have an unexpected slippery behavior. If for example I issue a velocity command on the front left wheel, I would expect the robot to perform an (almost) perfect circle around an axis but what I get is the robot to start rotate for 0.5sec, go straight for 0.4sec rotate again then straight again etc. This is showing a lost contact of the wheels with the ground due to low friction. How can I add rotational friction to the connection between wheel-ground?

Please note that I have already added a friction part on my URDF but I don't think it is working properly. Otherwise, the weights on my robot are quite realistic.

URDF:

<?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- |    This document was autogenerated by xacro from robot.xacro                    | -->
<!-- |    EDITING THIS FILE BY HAND IS NOT RECOMMENDED                                 | -->
<!-- =================================================================================== -->
<robot name="robot" xmlns:xacro="http://www.ros.org/wiki/xacro">
  <!--This URDF was automatically created by SolidWorks to URDF Exporter! Originally created by Stephen Brawner (brawner@gmail.com) 
     Commit Version: 1.5.1-0-g916b5db  Build Version: 1.5.7152.31018
     For more information, please see http://wiki.ros.org/sw_urdf_exporter -->
  <link name="dummy">
  </link>
  <link name="base_link">
    <inertial>
      <origin rpy="0 0 0" xyz="0.00390777224516517 -0.032446267219719 0.184169550820421"/>
      <mass value="4.20121630268732"/>
      <inertia ixx="0.0149000386129946" ixy="-4.66831001352174E-09" ixz="5.23920338795194E-08" iyy="0.0234359493013497" iyz="0.000771538751024883" izz="0.0286744535302635"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://robot/meshes/base_link.STL"/>
      </geometry>
      <material name="">
        <color rgba="0.529411764705882 0.549019607843137 0.549019607843137 1"/>
      </material>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://robot/meshes/base_link.STL"/>
      </geometry>
    </collision>
  </link>
  <joint name="dummy_joint" type="fixed">
    <parent link="dummy"/>
    <child link="base_link"/>
  </joint>
  <link name="FL">
    <inertial>
      <origin rpy="0 0 0" xyz="-5.55111512312578E-17 9.10729824887824E-18 -6.93889390390723E-18"/>
      <mass value="0.0615219544751675"/>
      <inertia ixx="5.54433425808419E-05" ixy="-1.45453466603006E-20" ixz="-1.00225538664655E-21" iyy="3.00921775305435E-05" iyz="2.309188417276E-21" izz="3.00921775305435E-05"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://robot/meshes/FL.STL"/>
      </geometry>
      <material name="">
        <color rgba="0.298039215686275 0.298039215686275 0.298039215686275 1"/>
      </material>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://robot/meshes/FL.STL"/>
      </geometry>
      <surface>
        <friction>
          <ode>
            <mu>100000.0</mu>
            <mu2>100000.0</mu2>
          </ode>
        </friction>
        <contact>
          <ode>
            <min_depth>0.003</min_depth>
          </ode>
        </contact>
      </surface>
    </collision>
  </link>
  <joint name="FLJ" type="continuous ...
(more)
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2021-04-11 05:07:39 -0500

taewonkim gravatar image

I was experience same problem but I was find simple solution just move center of mass

I raised center of mass above wheel axis and also set on centor of 4wheel

I hope this answer will be work on your code this is my first QnA :)

edit flag offensive delete link more
0

answered 2020-03-03 10:19:05 -0500

bob-ROS gravatar image

I would try to pull down the mu1 and mu2 values and increase min_depth to 0.01 or higher. I believe this behavior is caused by the robot being pushed off the ground and some wheels losing contact with the ground, simply increasing friction doesn't make it stick to the ground. Min_depth on the other hand allows the wheels to grip despite hovering slightly over the ground.

edit flag offensive delete link more

Comments

Nop. That didn't do the trick. Behavior is the same. Turned mu and mu2 down to 1000 and raised min_depth to 0.5 but no change.

I have also edited the ground model of Gazebo and raised friction of the world ground plane but didn't work. Do you sir, have any other ideas?

John999991 gravatar image John999991  ( 2020-03-03 10:49:50 -0500 )edit

I think the issue is that due to friction between the other 3 wheels and the ground, when spinning only 1 wheel, you get this type of not-cyclic movement which I don't think it is realistic... Also, when I turn velocity to zero for all 4 wheels, I get a parallel movement of the robot, without any wheels spinning, like the robot moving sideways with no effort...

John999991 gravatar image John999991  ( 2020-03-03 14:31:19 -0500 )edit

I have a project here were we built a car that worked somewhat well in Gazebo.

https://github.com/bob-ROS/asc_project/blob/master/asc_description/urdf/macro_wheel.urdf.xacrohttps://github.com/bob-ROS/asc_project/blob/master/asc_description/urdf/asc.urdf.xacro

Video of it running

We did very little tinkering with the physics properties to make it work.

The hardware interface is a bit odd (such as static revolute steering joints) because we wanted to reuse a specific controller.

bob-ROS gravatar image bob-ROS  ( 2020-03-04 03:09:01 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-03-03 08:22:50 -0500

Seen: 1,573 times

Last updated: Mar 03 '20