0
$\begingroup$

Rosanswers logo

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.


Originally posted by devrajPriyadarshi on ROS Answers with karma: 1 on 2021-08-15

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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:)


Originally posted by shonigmann with karma: 1567 on 2021-08-16

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.