Gazebo | Ignition | Community
Ask Your Question

How to set the visual and collision at ones using sdf to use the same geometry and pose

asked 2013-10-07 05:02:12 -0500

Markus Bader gravatar image

updated 2013-10-07 05:03:23 -0500


I like to define the visual and collision apparans of a link at ones.
Is there a way to define variables?
Or is there a way to say visual == collision?
The example shows a link which has the same collision and visual dimensions is it possible to write that shorter:

<link name='Wall_01'>
  <pose>0 0 0 0 0 0</pose>
  <collision name='collision_01'>
    <pose>0 0.05 1 0 -0 0</pose>
        <size>5 0.1 2</size>
  <visual name='visual_01'>
    <pose>0 0.05 1 0 -0 0</pose>
        <size>5 0.1 2</size>


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-10-07 19:42:55 -0500

scpeters gravatar image

There have been discussions about this, but no pull requests.

One proposal is to use xacro (gazebo issue #210), which could be used to insert blocks of repeated sdf elements. This would require xacro to be packaged independently from ROS to avoid a gazebo dependency on ROS.

There were some alternative syntax proposals in gazebo issue #427. One of the concerns with expanding the syntax is overwhelming complexity.

Feel free to chime in with either or both of these feature requests.

edit flag offensive delete link more


Using xacro was my final solution

Markus Bader gravatar imageMarkus Bader ( 2013-11-04 08:51:59 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2013-10-07 05:02:12 -0500

Seen: 1,391 times

Last updated: Oct 07 '13