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

Robot doesnt spawn correctly in Gazebo

asked 2022-04-02 00:17:37 -0500

wolf gravatar image

updated 2022-04-05 21:18:53 -0500

Hi all,

I am trying to spawn a simple bot in gazebo which I designed in solidworks and converted to urdf with sw2urdf plugin, but the bot doesnt spawn properly, I checked the TF in Rviz, it is proper, yet the meshes are somehow off place.

image description

<?xml version="1.0" encoding="utf-8"?>
<!-- This URDF was automatically created by SolidWorks to URDF Exporter! Originally created by Stephen Brawner (brawner@gmail.com) 
     Commit Version: 1.6.0-4-g7f85cfe  Build Version: 1.6.7995.38578
     For more information, please see http://wiki.ros.org/sw_urdf_exporter -->
     <!-- xyz="0.037221 1.1102E-16 0.11497" -->
<robot
  name="assem8">
  <link
    name="base_link">
    <inertial>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <mass
        value="26.716" />
      <inertia
        ixx="0.71662"
        ixy="3.8253E-17"
        ixz="-0.10412"
        iyy="1.5159"
        iyz="-2.9715E-16"
        izz="1.6669" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://assem8/meshes/base_link.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.79216 0.81961 0.93333 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://assem8/meshes/base_link.STL" />
      </geometry>
    </collision>
  </link>
  <link
    name="br_wheel">
    <inertial>
      <origin
        xyz="2.77555756156289E-17 -0.01 -5.55111512312578E-17"
        rpy="0 0 0" />
      <mass
        value="0.15707963267949" />
      <inertia
        ixx="0.000103410758180664"
        ixy="-5.64688631502868E-22"
        ixz="6.77626357803441E-21"
        iyy="0.000196349540849362"
        iyz="-1.12937726300573E-21"
        izz="0.000103410758180664" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://assem8/meshes/br_wheel.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.792156862745098 0.819607843137255 0.933333333333333 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://assem8/meshes/br_wheel.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="j_br_wheel"
    type="continuous">
    <origin
      xyz="-0.28 -0.175 0.025"
      rpy="0 0 0" />
    <parent
      link="base_link" />
    <child
      link="br_wheel" />
    <axis
      xyz="0 1 0" />
  </joint>
</robot>
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-04-03 20:56:59 -0500

ljaniec gravatar image

You can use this site to check if your URDF is defined correctlr, e.g. default example with R2D2:

http://www.mymodelrobot.appspot.com/5...

image description

Your URDF seems to not working correctly there too - the screen after loading the URDF is blank...

There is a slider for j_br_wheel only, without any parts.

edit flag offensive delete link more

Comments

The screen is blank because it cant access the mesh objects, present in my urdf

wolf gravatar image wolf  ( 2022-04-04 08:04:42 -0500 )edit

I stand corrected, you are right, Can you link the whole URDF with STL meshes to your question? Maybe inertia values are off?

ljaniec gravatar image ljaniec  ( 2022-04-04 09:20:48 -0500 )edit

Yeah the inertia and visual boxes arent aligned, maybe the inertia values are off, i'll attach the mesh objects

wolf gravatar image wolf  ( 2022-04-05 21:14:20 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2022-04-02 00:17:37 -0500

Seen: 301 times

Last updated: Apr 05 '22