Home | Tutorials | Wiki | Issues
Ask Your Question
1

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 -0600

Markus Bader gravatar image

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

Hi

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>
    <geometry>
      <box>
        <size>5 0.1 2</size>
      </box>
    </geometry>
  </collision>
  <visual name='visual_01'>
    <pose>0 0.05 1 0 -0 0</pose>
    <geometry>
      <box>
        <size>5 0.1 2</size>
      </box>
    </geometry>
    <material>
      <script>
        <uri>file://media/materials/scripts/gazebo.material</uri>
        <name>Gazebo/Grey</name>
      </script>
    </material>
  </visual>
</link>

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

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

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

Comments

Using xacro was my final solution

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

Question Tools

Stats

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

Seen: 820 times

Last updated: Oct 07 '13