Ask Your Question

My balls are in a perpetual motion in gazebo

asked 2019-10-01 08:55:01 -0600

Jérémy_Synergize gravatar image

Hi, I am trying to modelize a robot for testing in gazebo, but I get trouble whith him staying still.

The simplifiate version i use is compose of a square base (base_link), two balls (with 3 degrees of liberty, for stability), and two wheels (With motors, for movement). I changed a lot, but the main problem I encounter is that the balls move by herself (in some configuration they made the robot shake or move. In the current one they just roll-on herself (and maybe do crazy thinks when I try to turn ) ). I don't understand where that could come exactly and what to do to fix it. (The current model is not based on anything real, so I could have messed up the values of mass and inertia ) (I'm new on the forum and i don't know if I should past all my codes or not :/ ) There the xacro file I use :

<?xml version="1.0"?>

<robot <a="" href="http://xmlns:xacro="">xmlns:xacro="" name="dummy"></robot>

<xacro:property name="size_base" value="1.0" />
<xacro:property name="height_base" value="0.05" />
<xacro:property name="half_size_base" value="${size_base/2.0}" />
<xacro:property name="mass_base" value="1.0" />

<xacro:property name="boule_size" value="0.05" />
<xacro:property name="boule_mass" value="0.05" />

<material name="green">
    <color rgba="0 0.8 0 1"/>
<material name="blue">
    <color rgba="0 0 1 1"/>
  <plugin name="gazebo_ros_control" filename="">

<xacro:macro name="origin_base">
            <origin rpy="0.0 0.0 0.0" xyz="0 0 0"/> 

<!-- WHEELS -->

    <xacro:property name="wheel_length" value="0.08"/>
    <xacro:property name="wheel_mass" value="0.03"/>
    <xacro:property name="wheel_radius" value="0.10"/>
<xacro:macro name="wheel" params="rpy xyz name">

    <xacro:macro name="origin_wheel">
        <origin rpy="${rpy}" xyz="${xyz}"/>

    <link name="wheel_${name}_link">
            <xacro:origin_base />
            <mass value="${wheel_mass}" />
             <inertia ixx="1.1175580e-05" ixy="-4.2369783e-11" ixz="-5.9381719e-09" iyy="1.1192413e-05" iyz="-1.4400107e-11" izz="2.0712558e-05" />

            <xacro:origin_base />
                <cylinder radius="${wheel_radius}" length="${wheel_length}"/>
              <xacro:origin_base />
                    <cylinder radius="${wheel_radius}" length="${wheel_length}"/>
              <material name="green"/>

      <joint name="wheel_${name}_join" type="continuous">
          <parent link="base_link"/>
          <child link="wheel_${name}_link"/>
          <xacro:origin_wheel />
          <limit lower="-0.2" upper="0.2" effort="100" velocity="100"/>
          <axis xyz="0 0 1"/>

    <gazebo reference="wheel_${name}_link">
    <fdir1>1 0 0</fdir1>

    <!-- BASE -->

    <link ...
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2019-10-10 04:12:44 -0600

Jérémy_Synergize gravatar image

I add <dynamics friction="0.06"/> to the joints, and that solve it.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools



Asked: 2019-10-01 08:55:01 -0600

Seen: 75 times

Last updated: Oct 10 '19