Home | Tutorials | Wiki | Issues
Ask Your Question
0

I cant get my 4 wheeler stabile

asked 2018-07-04 09:43:39 -0600

aego gravatar image

I trayed many variants but nothing works. I have gazebo 9.1.1 I just want a model car with 4 wheels. I almost got it but when i add camera then its off agaen.

 <?xml version="1.0" ?>
<sdf version="1.6">

<model name="robot3">
    <!-- 
    <static>true</static>


     <plugin name="gaztest" filename="liblibgaztest.so"/>
     -->
     <link name='chassis'>
          <pose>0 0 .045 0 0 0</pose>
          <collision name='collision'>
            <geometry>
              <box>
                <size>.18 .05 .06</size>
              </box>
            </geometry>
          </collision>

          <visual name='visual'>
            <geometry>
              <box>
                <size>.18 .05 .06</size>
              </box>
            </geometry>
          </visual>
        <inertial>
      <mass>0.4</mass>
        <inertia>
            <ixx>0.0002033333333</ixx>
            <iyy>0.0012</iyy>
            <izz>0.001163333333</izz>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyz>0</iyz>
        </inertia>
      </inertial>
      </link>
 <!-- 
     <joint name="fix_cam1" type="fixed">
      <child>cam1</child>
      <parent>chassis</parent>
    </joint>
      <link name="cam1">
        <pose>0.09 0.025 .045 0 0 0</pose>
        <sensor name="camera" type="camera">
            <camera>
            <horizontal_fov>1.047</horizontal_fov>
            <image>
                <width>32</width>
                <height>24</height>
            </image>
            <clip>
                <near>0.1</near>
                <far>100</far>
            </clip>
            <distortion>
                <k1>-0.25</k1>
                <k2>0.12</k2>
                <k3>0.0</k3>
                <p1>-0.00028</p1>
                <p2>-0.00005</p2>
                <center>0.5 0.5</center>
            </distortion>
            </camera>
            <always_on>1</always_on>
            <update_rate>30</update_rate>
            <visualize>true</visualize>
        </sensor>
                <inertial>
      <mass>0.00001</mass>
        <inertia>
            <ixx>0</ixx>
            <iyy>0</iyy>
            <izz>0</izz>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyz>0</iyz>
        </inertia>
      </inertial>
      </link>



        <link name="bleft_wheel">
        <pose>-0.067 0.0425 0.023 0 1.5708 1.5708</pose>
        <collision name="collision">
          <geometry>
            <cylinder>
              <radius>.023</radius>
              <length>.015</length>
            </cylinder>
          </geometry>
           <surface>
          <friction>
            <ode>
              <mu>100000.0</mu>
              <mu2>100000.0</mu2>
              <slip1>0.0</slip1>
              <slip2>0.0</slip2>
            </ode>
          </friction>
        </surface>
        </collision>
        <visual name="visual">
          <geometry>
            <cylinder>
              <radius>.023</radius>
              <length>.015</length>
            </cylinder>
          </geometry>
        </visual>
          <inertial>
            <mass>0.025</mass>
            <inertia>
            <ixx>0.000003775</ixx>
            <iyy>0.000003775</iyy>
            <izz>0.0002875</izz>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyz>0</iyz>
        </inertia>
        </inertial>
      </link>
 -->
      <link name="bright_wheel">
        <pose>-0.067 -0.0425 0.023 0 1.5708 1.5708</pose>
        <collision name="collision">
          <geometry>
            <cylinder>
              <radius>.023</radius>
              <length>.015</length>
            </cylinder>
          </geometry>
           <surface>
          <friction>
            <ode>
              <mu>100000.0</mu>
              <mu2>100000.0</mu2>
              <slip1>0.0</slip1>
              <slip2>0.0</slip2>
            </ode>
          </friction>
        </surface>
        </collision>
        <visual name="visual">
          <geometry>
            <cylinder>
              <radius>.023</radius>
              <length>.015</length>
            </cylinder>
          </geometry>
        </visual>
          <inertial>
            <mass>0.025</mass>
            <inertia>
            <ixx>0.000003775</ixx>
            <iyy>0.000003775</iyy>
            <izz>0.0002875</izz>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyz>0</iyz>
        </inertia>
        </inertial>
      </link>

      <link name="left_wheel">
        <pose>0.067 0.0425 0.023 0 1.5708 1.5708</pose>
        <collision name="collision">
          <geometry>
            <cylinder>
              <radius>.023</radius>
              <length>.015</length>
            </cylinder>
          </geometry>
           <surface>
          <friction>
            <ode>
              <mu>100000.0</mu>
              <mu2>100000.0</mu2>
              <slip1>0.0</slip1>
              <slip2>0.0</slip2>
            </ode>
          </friction>
        </surface>
        </collision>
        <visual name="visual">
          <geometry>
            <cylinder>
              <radius>.023</radius>
              <length>.015</length>
            </cylinder>
          </geometry>
        </visual>
          <inertial>
            <mass ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-07-05 02:24:30 -0600

Raskkii gravatar image

Try removing the inertial tag from the camera link. It's a fixed joint so I see no reason to add a separate inertial element to it.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-07-04 09:40:15 -0600

Seen: 44 times

Last updated: Jul 05