ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

4 wheeled Robot does not Drive

asked 2022-03-27 15:32:22 -0500

blusser gravatar image

updated 2022-04-08 09:40:54 -0500

ljaniec gravatar image

Hello,

I made a URDF-File for a 4-wheeled Robot. I would like to test it in Gazebo. I have it working so far. I have 4 wheels, they also turn. I confirmed this by turning on View -> Wireframe. I am using the skid_steer_drive_controller and rosrun teleop_twist_keyboard teleop_twist_keyboard.py. I can see the wheels turning but the Robot does not move.

I am using an offset for my base_footprint, otherwise my robot collapses and starts jiggeling. I also took this offset in the z-Axis in account for the wheels.

I took this urdf as basis, here so i did not declare friction:

https://github.com/noshluk2/ROS-Navig...

This is my URDF:

<?xml version="1.0" ?>
 <robot name="explorer">
  <link name="world">
  </link>
<!-- -->
  <link name="base_footprint">
    <visual>
      <origin xyz="0 0 0.046"/>
      <geometry>
          <box size="0.235 0.094 0.049"/>
      </geometry>
      <material name="gray">
        <color rgba=".2 .2 .2 1" />
      </material>
    </visual>
    <inertial>
      <origin xyz="0 0 0.046"/>
        <mass value="0.6174" />
          <inertia ixx="2.84523645e-3" ixy="0.0" ixz="0" iyy="3.1763172e-3" iyz="0" izz="5.7814365e-4" />
    </inertial>
      <collision>
        <origin xyz="0 0 0.046"/>
        <geometry>
          <box size="0.235 0.094 0.049"/>
        </geometry>
      </collision>
  </link>
  <joint name="dummy_joint" type="fixed">
    <parent link="world"/>
    <child link="base_footprint"/>
  </joint>

 <!-- -->
 <link name="wheel_rf">
  <inertial>
    <mass value="0.036" />
    <inertia ixx="9.2562e-5" ixy="0.0" ixz="0" iyy="9.2562e-5" iyz="0" izz="2.9124e-5" />
  </inertial>
  <visual>
    <geometry>
        <cylinder radius="0.033" length="0.026"/>
    </geometry>
    <material name="white">
      <color rgba="1 1 1 1"/>
    </material>
  </visual>
  <collision>
    <geometry>
        <cylinder radius="0.033" length="0.026"/>
    </geometry>
  </collision>
</link>
<joint name="wheel_rf_joint" type="continuous">
  <origin xyz="0.04 0.063 0.033" rpy="1.57  0.0 0.0"/>
  <parent link="base_footprint"/>
  <child link="wheel_rf"/>
     <axis xyz="0.0 0.0 1.0"/> 
</joint>

<link name="wheel_lf">
  <inertial>
    <mass value="0.036" />
    <inertia ixx="9.2562e-5" ixy="0.0" ixz="0" iyy="9.2562e-5" iyz="0" izz="2.9124e-5" />
  </inertial>
  <visual>
    <geometry>
        <cylinder radius="0.033" length="0.026"/>
    </geometry>
    <material name="white">
      <color rgba="1 1 1 1"/>
    </material>
  </visual>
  <collision>
    <geometry>
        <cylinder radius="0.033" length="0.026"/>
    </geometry>
     </collision>
</link>

<joint name="wheel_lf_joint" type="continuous">
  <origin xyz="0.04 -0.063 0.033" rpy="1.57 0.0 0.0"/>
  <parent link="base_footprint"/>
  <child link="wheel_lf"/>
     <axis xyz="0.0 0.0 1.0"/>

</joint>
<!-- -->
 <link name="wheel_rb">
  <inertial>
    <mass value="0.036" />
    <inertia ixx="9.2562e-5" ixy="0.0" ixz="0" iyy="9.2562e-5" iyz="0" izz="2.9124e-5 ...
(more)
edit retag flag offensive close merge delete

Comments

I don't know how to embed my urdf file. the editor does not behave as expected.

blusser gravatar image blusser  ( 2022-03-27 15:36:10 -0500 )edit

You have to use this little icon with 101010 with selected text to put code there. I fixed it for you.

ljaniec gravatar image ljaniec  ( 2022-04-08 09:47:19 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-04-08 09:33:47 -0500

Joe28965 gravatar image

updated 2022-04-10 15:05:24 -0500

jayess gravatar image

I'm pretty sure you basically glued your robot to the floor by creating a fixed joint between world and base_footprint (dummy_joint)

<visual> 
    <origin xyz="0 0 0.046"/> 
    <geometry> 
        <box size="0.235 0.094 0.049"/> 
    </geometry> 
    <material name="gray"> 
        <color rgba=".2 .2 .2 1"/> 
    </material> 
</visual> 
<inertial> 
    <origin xyz="0 0 0.046"/> 
    <mass value="0.6174"/> 
    <inertia ixx="2.84523645e-3" ixy="0.0" ixz="0" iyy="3.1763172e-3" iyz="0" izz="5.7814365e-4"/>
</inertial> 
<collision> 
    <origin xyz="0 0 0.046"/> 
    <geometry> 
        <box size="0.235 0.094 0.049"/> 
    </geometry> 
</collision> 
</link> 
<joint name="dummy_joint" type="fixed"> 
    <parent link="world"/>
    <child link="base_footprint"/>
</joint>

ETA: URDF is a robot description format, there is never a reason to add links/joints that aren't relevant to the robot. In this case, the link world has nothing to do with the robot and should not be included.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-03-27 15:32:22 -0500

Seen: 110 times

Last updated: Apr 10 '22