Search code examples
drake

Name scoping fails with <drake:child> SDF tag [Drake 1.19.0]


Is it possible to use a scoped name inside the <drake:child> SDF tag? I would like to attach a link from another model to a link in the current model with a planar joint, but Drake throws an error when I try to do this. This appears to be the case with <drake:parent> as well.

<model name="test">
  <include>
    <uri>package://drake/manipulation/models/iiwa_description/sdf/iiwa14_polytope_collision.sdf</uri>
    <name>robot</name>
  </include>

  <link name="b">

  <!-- Works, but I want this to be a planar joint -->
  <joint name="b_to_robot" type="fixed">
    <parent>b</parent>
    <child>robot::iiwa_link_0</child>
  </joint>

  <!-- Doesn't work: 'Frame 'robot::iiwa_link_0' specified for <drake:child> does not exist in the model' -->
  <drake:joint name="b_to_a" type="planar">
    <drake:parent>b</drake:parent>
    <drake:child>robot::iiwa_link_0</drake:child>
    <drake:damping>0.0 0.0 0.0</drake:damping>
  </drake:joint>
</model>

Am I doing something incorrectly, is this a bug, or is this something that is not currently supported?


Solution

  • Thanks for the question. I've just started looking into this, but my first impressions are leaning towards "bug". I'll update here with further findings.