Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: custom proto code in urdf #31

Open
Timple opened this issue Oct 22, 2019 · 4 comments
Open

Feature request: custom proto code in urdf #31

Timple opened this issue Oct 22, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@Timple
Copy link

Timple commented Oct 22, 2019

For our application we need support for closed-loop kinematics.
Unfortunately the urdf format does not support it.

I could modify the generated .proto file to contain the SolidReference required to do so. But this would mean the proto starts deviating from the urdf and cannot be re-generated anymore.

Would it be possible / wise to allow for custom .proto entries in the urdf model? Kind of similar how you can add sdf elements for gazebo.

@DavidMansolino
Copy link
Member

That's feasible on the importer side this should be easy to support. But on the URDF side, this will differ from the norm and create non-standard URDF file, this might be problematic when you then want to use your URDF file with something else than the importer, right?

@Timple
Copy link
Author

Timple commented Oct 22, 2019

Unknown elements seem to be ignored. Now we have items like this in our urdf:

<gazebo reference="left_track_link">
  <material>Gazebo/Black</material>
</gazebo>

And I just tested if I created a <webots> element and nobody complained :).

Ideally it can reference links/joints so we can keep the webots.urdf file seperate from the rest of the implementation.

@DavidMansolino
Copy link
Member

DavidMansolino commented Oct 22, 2019

Ok, that makes sense indeed, adding a <webots> tag seems fine.
Then would something like this be fine?

    <link name="wrist_3_link">
      <visual>
        <geometry>
          <mesh filename="myfile.dae" />
        </geometry>
      </visual>
      <collision>
        <geometry>
          <mesh filename="myfile.stl" />
        </geometry>
      </collision>
      <webots>
        <node name="NodeName">
          <field name="translation" value="0 0 0"/>
          <field name="rotation" value="0 1 0 0"/>
        </proto>
      </webots>
    </link>

If you have any other ideas in mind do not hesitate to make some proposition.

@Timple
Copy link
Author

Timple commented Oct 22, 2019

I think that is already a good proposal!
But it also 'clutters' the urdf file for normal operations.

In addition to the above this would also be nice:

    <link name="wrist_3_link">
      <visual>
        <geometry>
          <mesh filename="myfile.dae" />
        </geometry>
      </visual>
      <collision>
        <geometry>
          <mesh filename="myfile.stl" />
        </geometry>
      </collision>
    </link>

<!-- Somewhere else in an include file: -->
<webots reference="wrist_3_link">
  <node name="NodeName">
    <field name="translation" value="0 0 0"/>
    <field name="rotation" value="0 1 0 0"/>
  </proto>
</webots>

(But we're already happy with your proposal)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

3 participants