Issue #4 invalid

Failed to spawn URDF model in Gazebo, if first link has no inertia properties

created an issue

Hi, is this a bug?

I've created a urdf.xacro file with a robot model. This first link is an empty dummy link called "base_link":

{{{ <link name='base_link'> </link> }}}

which is connected via a fixed joint to the next link, which has visual/collision/inertial properties.

When I try to spawn this model in Gazebo using the standard launch file syntax from the tutorial, it fails with an error. Below is the last part of the console messages:

{{{ Msg Waiting for master.[ INFO] [1343134213.889006519]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting... Msg Waiting for master Msg Connected to gazebo master @ http://localhost:11345

Msg Connected to gazebo master @ http://localhost:11345 waiting for service spawn_urdf_model gzserver: /usr/include/boost/smart_ptr/shared_ptr.hpp:418: T boost::shared_ptr<T>::operator->() const [with T = urdf::Inertial]: Assertion `px != 0' failed. Aborted (core dumped) Service call failed: transport error completing service call: unable to receive data from sender, check sender's logs for details [empty_world_server-2] process has died [pid 14231, exit code 134, cmd /opt/ros/fuerte/stacks/simulator_gazebo/gazebo/scripts/gazebo /home/username/ros_workspace/hubo/hubo_sim_gazebo/worlds/ name:=empty_world_server log:=/home/username/.ros/log/19bf9996-d58e-11e1-b234-5c260a0c5681/empty_world_server-2.log]. log file: /home/username/.ros/log/19bf9996-d58e-11e1-b234-5c260a0c5681/empty_world_server-2.log


The error points to an inertial tag, and a ROS Answers post suggests something similar. Adding some inertial values to the base_link fixes the problem and Gazebo starts and spawns the model:


<link name='base_link'> <inertial> <!-- dummy values for fixed link --> <mass value="10" /> <origin xyz="0 0 0"/> <inertia ixx="1.0" ixy="0" ixz="0" iyy="1.0" iyz="0" izz="1.0" /> </inertial> </link> }}}

Other child links without inertial properties are just ignored, like they should be:


[ WARN] [1343134922.979297087]: urdf2gazebo: link(Tool_link) has no inertia, parent joint(Tool_fixed_joint) is ignored. [ WARN] [1343134922.979437714]: urdf2gazebo: link(Tool_link) has no inertia, not modeled in gazebo.


So is this a bug or a feature?

Comments (6)

  1. Anonymous

    I would even say, this is a KDL issue. I guess, the inertia in the first link was commented out, because otherwise KDL complains (sends a warning) that it is not able to handle inertia in the first link. Seems to me this is a difference in design. Anyway, I agree that this is (most probably) no Gazebo issue.


  2. Log in to comment