Ask Your Question
0

URDF model spawns with no link

asked 2021-08-15 13:18:59 -0600

devrajPriyadarshi gravatar image

updated 2021-12-05 13:17:51 -0600

Mike Scheutzow gravatar image

Hey, so i've been making a package for a competition and made a custom model for an arena in Blender exported the .dae file for working in with ROS Melodic + Gazebo 9.

But the model spawns successfully but has no link. The code for the .launch file, URDF file below.

.launch file

<launch>

  <!-- these are the arguments you can pass this launch file, for example paused:=true -->
  <arg name="paused" default="true"/>
  <arg name="use_sim_time" default="true"/>
  <arg name="gui" default="true"/>
  <arg name="headless" default="false"/>
  <arg name="debug" default="false"/>
  <arg name="arena" default="$(find grid3)/src/urdf/arena1.urdf"/>
  <arg name="extra_gazebo_args" default="--verbose"/>

  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="debug" value="$(arg debug)" />
    <arg name="gui" value="$(arg gui)" />
    <arg name="paused" value="$(arg paused)"/>
    <arg name="use_sim_time" value="$(arg use_sim_time)"/>
    <arg name="headless" value="$(arg headless)"/>
    <arg name="extra_gazebo_args" value="$(arg extra_gazebo_args)"/>
  </include>

  <param name="arena_description" command="$(find xacro)/xacro $(arg arena)"/>

  <node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model"
        args="-urdf -z 0.0 -model arena -param arena_description" respawn="false" output="screen" />


</launch>

URDF file:

<?xml version="1.0" ?>

<robot name="arena_one" xmlns:xacro="https://www.ros.org/wiki/xacro" >

  <gazebo>
    <static>true</static>
  </gazebo>

  <link name="base_link">
    <visual name="visual">
       <geometry>
         <mesh filename="package://grid3/src/mesh/Arena_ps2.dae" scale="1 1 1"/>
       </geometry>
       <material>
         <texture filename="package://grid3/src/mesh/Screenshot from 2021-07-30 15-50-19.png"/>
       </material>
    </visual>
      <collision name="collision">
        <geometry>
          <mesh filename="package://grid3/src/mesh/Arena_ps2.dae" scale="1 1 1"/>
        </geometry>
        <surface>
          <friction>
            <ode>
              <mu>1</mu>
              <mu2>1</mu2>
              <slip1>0</slip1>
              <slip2>0</slip2>
            </ode>
          </friction>
        </surface>
      </collision>
  </link>
</robot>

Roslaunch says that the model has spawned successfully but in gazebo it doesnt seems to have any link has no link : image.

its my first time working with models of my own, thanks for your help.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2021-08-16 14:25:12 -0600

shonigmann gravatar image

This is more of a https://answers.gazebosim.org/questions/ question than a ROS question, so I'd encourage you to use the dedicated Gazebo site in the future... But this is a very common issue and almost always comes down to Gazebo not finding your .dae file on its model path.

There are 3 log files that you can check that often shed some light:

  1. ~/.gazebo/gzclientXXX/default.log
  2. ~/.gazebo/gzserverXXX/default.log
  3. ~/.gazebo/ogre.log

You will likely find a "file not found" error

(Also see:)

edit flag offensive delete link more
0

answered 2021-12-05 11:43:55 -0600

muratkoc503 gravatar image

updated 2021-12-07 03:33:04 -0600

<surface> <friction> <ode> is not link or joint tag. This is gazebo tag. So, you use this tag at the end of urdf file as below:

<gazebo reference="base_link">
  <mu1>1</mu1>
  <mu2>1</mu2>
  <material>Gazebo/Black</material>
</gazebo>

For detail information, link text friction, ode work with Gazebo. But below your code dont work:

Also, you use

    <material>
     <texture filename="package://grid3/src/mesh/Screenshot from 2021-07-30 15-50-19.png"/>
   </material>

try below code:

    <material name="black">
      <color rgba="0 0 0 1.0"/>
    </material>

if you want add texture to model for Gazebo, you look How do i add texture(.png file) in urdf

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

2 followers

Stats

Asked: 2021-08-15 11:42:46 -0600

Seen: 145 times

Last updated: Dec 07 '21