Home | Tutorials | Wiki | Issues
Ask Your Question
0

Is it possible to use the <gazebo reference /> with different properties in multiple files?

asked 2018-09-27 12:56:50 -0600

sherlockshome221 gravatar image

I have a situation in which the <gazebo reference=""/> tag is specified in two files that are on my ROS_PACKAGE_PATH. I have given a small example below to clarify things:

file1.gazebo.xacro:

<gazebo reference="${prefix}shoulder_link">
  <selfCollide>true</selfCollide>
</gazebo>

file2.gazebo.xacro:

<gazebo reference="${prefix}shoulder_link">
  <turnGravityOff>true</turnGravityOff>
</gazebo>

In this scenario, I receive the following warning from urdf_parser:

Warning [parser_urdf.cc:1232] multiple inconsistent <gravity> exists due to fixed joint reduction overwriting previous value [true] with [false].
Warning [parser_urdf.cc:1232] multiple inconsistent <self_collide> exists due to fixed joint reduction overwriting previous value [true] with [false].

So, I thought, I will just put both <selfCollide> and the <turnGravityOff> tags in file1.gazebo.xacro like this:

<gazebo reference="${prefix}shoulder_link">
  <selfCollide>true</selfCollide>
  <turnGravityOff>true</turnGravityOff>
</gazebo>

And now, the urdf_parser says:

Warning [parser_urdf.cc:1232] multiple inconsistent <self_collide> exists due to fixed joint reduction overwriting previous value [true] with [false].

And I am new to Gazebo. So, I am not sure if I am completely wrong in understanding the <gazebo reference /> tag.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-09-27 14:26:50 -0600

sherlockshome221 gravatar image

Ok, it seems I have a solution. Indeed it is possible to specify different elements in the <gazebo reference /> tag for the same link in different URDF/XACRO files. And urdf_parser was warning me that by default, <gravity> is supposed to be enabled for these links, but you are asking me to disable it and I shall do so.

The confusion for me was the opposite convention to the tag name that should be set in the URDF/XACRO file. Apparently, using <gravity>false</gravity> in URDF/XACRO does not work (at least on Gazebo 7 debian install from about 3 months ago). But, the same result is achieved with <turnGravityOff>true</turnGravityOff>. So, I had implemented this in my XACRO files, but the warning was telling something about the <gravity> tag. In essence, I missed the point that: <gravity>false</gravity>==<turnGravityOff>true</turnGravityOff>.

And It seems from the warning that <self_collide>false</self_collide> is the default setting.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-09-27 07:30:51 -0600

Seen: 222 times

Last updated: Sep 27 '18