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

Support loading models from SDF (Simulation Description Format) #481

Open
traversaro opened this issue Sep 11, 2018 · 4 comments
Open

Support loading models from SDF (Simulation Description Format) #481

traversaro opened this issue Sep 11, 2018 · 4 comments

Comments

@traversaro
Copy link
Member

traversaro commented Sep 11, 2018

For a long time with iCub we used both the URDF format and the SDF format to represent our robots, see for example the models available at icub-models.

We use URDF for our control software, while we use SDF for Gazebo simulation.

The reason for this duality were two:

  • URDF is much easier to write/parse/debug, and is supported by far more support w.r.t. to SDF. For this reason, official or semi-official URDF are available for many robots.
  • SDF is necessary because not all Gazebo features are accessible in the Gazebo URDF-extensions. However, we could not go SDF-only as it did not support many features that we need to have for our control/planning software:
    • Fixed joints, for representing six axis F/T sensors
    • Purely kinematic frames ( https://discourse.ros.org/t/urdf-ng-link-and-frame-concepts/56 ) that are necessary to specify in the model frames to use for control and planning
    • The official SDFormat library, that is essential to use given the complexity of the specification, was depending on the Boost libraries, that are always a problematic dependency to have on Windows

As the problem with fixed joints was solved years ago ( https://bitbucket.org/osrf/sdformat/pull-requests/194 ), the boost dependency has been finally removed by migrating to C++17 (https://bitbucket.org/osrf/sdformat/pull-requests/438/removal-of-boost/diff), and there is ongoing work to support purely kinematic frames (https://bitbucket.org/osrf/sdformat/issues/200/support-multiple-frames-in-a-single-parent), it may be interesting to also (not replacing URDF) support for import and export of iDynTree::Model to SDF.

The advantages of SDF over URDF are the following:

@traversaro
Copy link
Member Author

This may be even more attractive with the recent developent of SDFormat 1.7, see the discussion in https://discourse.ros.org/t/sdformat-pose-frame-semantics-proposal/9852 . That adds some additional advantages:

@diegoferigo
Copy link
Member

SDF support would be an excellent addition, particularly with the new frame semantics feature.

Beyond the comprehensive list of advantages your listed, I would add that we can directly use sdformat for the deserialization. It will provide an effortless parser for the SDF files.

Moreover, upstream there's a SDF -> URDF converter in WIP that we could make use.

@traversaro
Copy link
Member Author

traversaro commented Nov 12, 2019

Also loading meshes from relative paths (see https://bitbucket.org/osrf/sdformat/pull-requests/558) would be a great feature that currently the "official" URDF specs lacks (see #291).

@traversaro
Copy link
Member Author

Related but different issue: support the export of SDF files: #835 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants