Problems while parsing <gazebo> URDF elements with Gazebo7 and ROS Jade
I use Gazebo 7 with ROS Jade for which EDITED after ros-jade-gazebo7-ros-pkgs
cannot yet be installed (due to the dependency to ros-jade-gazebo7-plugins
which does not exist). Thus, I've cloned the jade-devel
branch of the gazebo_ros_pkgs
package in the catkin workspace and compiled it with catkin_make
.ros-jade-gazebo7-ros-pkgs
release: still the same behaviour.
Issue created on 2016/03/08
Check the details in the issue and follow the linked repository: https://bitbucket.org/osrf/sdformat/i...
Update 2016/03/01
I've been investigated more on this problem and I've found out that it could be due to the new naming convention from Gazebo 6 on.* I've tried the example below with ROS Jade and Gazebo 5, 6 and 7 and it works only with the first one (which relies on *sdformat2).
Using sdformat3 and sdformat4, <visual>
and <collision>
elements get augmented unique names when they are converted to SDF (which differ from those given in the URDF). Indeed, using <gazebo>
tags it is possible to add any element which will not end in <visual>
or <collision>
elements, e.g. <enable_wind>
or <velocity_decay>
which are directly children of the <link>
tag.
On the other hand, every element which has to be put inside <visual>
or <collision>
is completely ignored (without errors) from the parser. I think that it expects to use the URDF visual/collision names but they differ, e.g. visual_waist
and collision_waist
are the name in the URDF and the respectively SDF ones are waist_fixed_joint_lump__visual_waist_visual
and waist_fixed_joint_lump__collision_waist_collision
.
Should I report this bug on https://bitbucket.org/osrf/sdformat/o... ?
Example
I have made a simple example (download) to show that (at least with my configuration) elements inside <gazebo>
urdf tags are not correctly parsed by either spawn_model
or gz sdf -p
commands.
I followed this Gazebo tutorial: Using a URDF in Gazebo.
This is the package structure inside my caktkin workspace:
/robot: /robot_description: /urdf: robot.gazebo robot.urdf robot.xacro CMakeLists.txt package.xml /robot_gazebo: /launch: robot_world.launch /worlds: robot.world CMakeLists.txt package.xml
where robot.world
is a simple empty world and robot_world.launch
contains the URDF spawner:
<param name="robot_description"
command="$(find xacro)/xacro --inorder '$(find robot_description)/urdf/robot.xacro'"/>
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
args="-urdf -model robot -param robot_description"/>
and where the file in the /urdf
folder are as follow:
robot.xacro
<?xml version="1.0"?>
<robot name="robot" xmlns:xacro="http://www.ros.org/wiki/xacro">
<!-- imports all Gazebo-customization elements, including Gazebo colors -->
<xacro:include filename="$(find robot_description)/urdf/robot.gazebo"/>
<!-- imports URDF robot model -->
<xacro:include filename="$(find robot_description)/urdf/robot.urdf"/>
</robot>
robot.urdf
<?xml version="1.0"?>
<robot name="robot">
<link name="pelvis">
<inertial>
<origin xyz="-1e-06 0.060095 -0.014315" rpy="0 0 0"/>
<mass value="2.468"/>
<inertia ixx="0.015171" ixy="0" ixz="0" iyy="0.022628" iyz="0" izz="0.018252"/>
</inertial>
<visual name="visual_pelvis">
<origin xyz="-4.5e-05 0.021 -0.01302" rpy="0 0 0"/>
<geometry ...
I ue the same notation as your <gazebo reference="waist"> in Gazebo6 adn ros indigo and I have no problem.
Thank you. I've just made some tests again after the realease (this morning) of `ros-jade-gazebo7-ros-pkgs`, but it has still the same behaviour...
Same Problem here on Gazebo6 and Ros Indigo
http://answers.gazebosim.org/question/15095/gazebo-contact-sensor-added-to-a-robot-link-in-urdf-file-is-not-working-as-expected/
Sorry for not updating the post, I've created an issue which describes the same behavior exactly one year ago, but it is still not assigned. You can find it here: https://bitbucket.org/osrf/sdformat/issues/113/parsing-from-urdf-to-sdf-does-not-handle
It works if the collision has no explicit name in URDF or if the name of the collision is
$LINKNAME_collision
. Any other names cause the tags to be ignored.