Home | Tutorials | Wiki | Issues
Ask Your Question
1

Frames in SDF robot model: how to define relative links?

asked 2016-02-29 14:15:36 -0500

mrjogo gravatar image

I just started writing an SDF model for a robot arm and I would like to define the pose of a link relative to another link, as opposed to the model frame. The SDF spec mentions both a frame tag (http://www.sdformat.org/spec?ver=1.5&...) and a frame attribute of the pose tag (http://www.sdformat.org/spec?ver=1.5&...), but I can't find any documentation or examples of how to properly use it.

Here's a simple example of what I'm trying to do that isn't working:

<?xml version="1.0"?>
<sdf version="1.6">
  <model name="example">

    <link name="base">
      <pose>0 0 0 0 0 0</pose>
      <visual name="visual">
        <geometry>
          <cylinder>
            <radius>0.1</radius>
            <length>0.025</length>
          </cylinder>
        </geometry>
      </visual>
    </link>

    <link name="link1">
      <pose>0 0 0.1 0 0 0</pose>
      <visual name="visual">
        <geometry>
          <box>
            <size>0.2 0.05 0.1</size>
          </box>
        </geometry>
      </visual>
    </link>

    <link name="link2">
      <!-- Want this to be relative to link1 -->
      <pose frame="link1">0.2 0 0 0 0 0</pose>
      <visual name="visual">
        <geometry>
          <box>
            <size>0.2 0.05 0.1</size>
          </box>
        </geometry>
      </visual>
    </link>

  </model>
</sdf>

However, this is the output (I'd like link2 to be at same z-height as link1): image description

Given that the frame information isn't exposed in the Gazebo Model Editor GUI, I suspect frame isn't completely supported?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-03-04 13:26:19 -0500

iche033 gravatar image

Hi, not long ago we added the frame tag to the sdformat spec as the first step towards allowing entities to have different reference frames. We still need to add support for it in gazebo.. it's in the todo list.

edit flag offensive delete link more

Comments

1

Hi iche033! Thanks for the answer ... how is it possibile to check whatever or not a tag has been implemented ? I mean, if I see it in the sdformat I assume it is already implemented if in its description it is not stated otherwise

Marco gravatar imageMarco ( 2016-03-05 10:11:45 -0500 )edit
Login/Signup to Answer

Question Tools

2 followers

Stats

Asked: 2016-02-29 14:15:36 -0500

Seen: 3,271 times

Last updated: Mar 04 '16