Is it possible to launch a urdf file in gazebo without using xacro and clean up urdf file

asked 2018-06-12 23:46:01 -0500

Maulik_Bhatt gravatar image

updated 2018-06-12 23:49:17 -0500

jayess gravatar image

I am using this launch file to launch a urdf file into gazebo. But it comes as "libGL error: failed to create drawable". What could be the problem. Is it also possible that moment of intertias of different parts being too low is causing the problem?


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

  <!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
  <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)"/>

  <param name="robot_description" command="$(find xacro)/ $(arg model)" />

  <!-- push robot_description to factory and spawn robot in gazebo -->
  <node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model"
        args="-z 1.0 -unpause -urdf -model robot -param robot_description" respawn="false" output="screen" />

  <node pkg="robot_state_publisher" type="robot_state_publisher"  name="robot_state_publisher">
    <param name="publish_frequency" type="double" value="30.0" />

edit retag flag offensive close merge delete



libGL errors are probably issues with your graphics drivers, and are probably unrelated to your code. I would look for a built-in gazebo example and try running that to confirm that gazebo works.

ahendrix gravatar imageahendrix ( 2018-06-13 02:07:22 -0500 )edit

It's definitly related with the graphic drivers and it can even be that your graphic card isn't powerful enough. I have those error messages too but it doesn't prevent gazebo from running.

Delb gravatar imageDelb ( 2018-06-13 02:16:50 -0500 )edit