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

UrdfImporter plugin #122

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

UrdfImporter plugin #122

wants to merge 1 commit into from

Conversation

mosra
Copy link
Owner

@mosra mosra commented May 13, 2022

The main purpose is two-fold -- being able to visualize the URDF hierarchy using standard tools, and as a showcase of the flexibility of SceneData custom fields, which preserve everything including the URDF-specific physics properties.

Originally just a fun exercise of "how far can I get with implementing a parser for a format I know nothing about in under 3 hours", but because I got quite far it'd be bad to just throw it away now. Things left to do because yes everything always explodes into 100+ tasks in the end:

  • Prefix the CMake option and everything else with MAGNUM_, especially the static build etc
  • Update copyright year
  • finish the data import (inertia matrices, etc.), make it more robust
  • mesh & material import -- delegating to AnySceneImporter for these, joining the nested hierarchies somehow not handled here, will be a high-level utility in SceneTools instead
  • expose nested models as a custom SceneData (string) ExternalModel field with their filename
    • keep the filename as-is in the file or make it absolute? should the users be expected to do the path operations themselves?
    • needs ability to store strings there
    • what about the color overrides then? have a MeshMaterial field alone, without any Mesh? or store the color as a custom scene field in that case instead? have a ExternalModelMaterial field tied to ExternalModel, same as is MeshMaterial tied to Mesh
  • explicitly mark what's a joint and what's a link (via a custom SceneData bit field, or maybe have a string "type" field?)
    • needs bitfields in Corrade containers first
    • needs bitfield support in SceneData
  • ability to visualize various joint links, DoFs with wireframes
  • docs
    • custom fields
    • nested scene joining nested model references
    • coordinate system conventions, ...
    • pugixml dependency
    • building & cmake docs
  • snippet for pugixml as a CMake subproject
  • CI setup (yeah, that's why it builds green now, because it's not enabled)
  • tests, look for constraints in the URDF itself
  • expose in all packages
  • expose in FindMagnumPlugins.cmake

@codecov
Copy link

codecov bot commented May 13, 2022

Codecov Report

Base: 97.03% // Head: 95.70% // Decreases project coverage by -1.33% ⚠️

Coverage data is based on head (6135412) compared to base (eb08051).
Patch has no changes to coverable lines.

❗ Current head 6135412 differs from pull request most recent head c12a4c7. Consider uploading reports for the commit c12a4c7 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #122      +/-   ##
==========================================
- Coverage   97.03%   95.70%   -1.33%     
==========================================
  Files         133      118      -15     
  Lines       15028    11875    -3153     
==========================================
- Hits        14582    11365    -3217     
- Misses        446      510      +64     
Impacted Files Coverage Δ
src/MagnumPlugins/DdsImporter/DdsImporter.cpp 78.57% <0.00%> (-21.43%) ⬇️
...numPlugins/PngImageConverter/PngImageConverter.cpp 79.01% <0.00%> (-19.11%) ⬇️
src/MagnumPlugins/KtxImporter/KtxImporter.cpp 89.89% <0.00%> (-4.02%) ⬇️
...numPlugins/KtxImageConverter/KtxImageConverter.cpp 99.08% <0.00%> (-0.70%) ⬇️
...ns/MiniExrImageConverter/MiniExrImageConverter.cpp 96.00% <0.00%> (-0.67%) ⬇️
...lugins/BasisImageConverter/BasisImageConverter.cpp 90.22% <0.00%> (-0.43%) ⬇️
...rc/MagnumPlugins/AssimpImporter/AssimpImporter.cpp 90.47% <0.00%> (-0.31%) ⬇️
...mPlugins/DevIlImageImporter/DevIlImageImporter.cpp 92.68% <0.00%> (-0.26%) ⬇️
.../MagnumPlugins/OpenGexImporter/OpenGexImporter.cpp 96.33% <0.00%> (-0.07%) ⬇️
src/Magnum/OpenDdl/OpenDdl.cpp 90.70% <0.00%> (-0.05%) ⬇️
... and 85 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

The main purpose is two-fold -- being able to visualize the URDF
hierarchy using standard tools, and as a showcase of the flexibility of
SceneData custom fields, which preserve everything including the
URDF-specific physics properties.

TODO: finish the data import (inertia matrices, etc.), make it more
  robust
TODO: mesh & material import -- delegating to AnySceneImporter for
  these, joining the nested hierarchies somehow (needs a utility in
  SceneTools, ideally)
TODO: ability to not import nested models but instead expose them as
  custom SceneData (string) fields -- needs ability to store strings
  there; what about the color overrides then? have a MeshMaterial field
  alone, without any mesh?
TODO: explicitly mark what's a joint and what's a link via a custom
  SceneData bit field, ideally -- needs bitfields in Corrade first
TODO: docs about custom fields
TODO: CI setup
TODO: tests, look for constraints in the URDF itself
TODO: expose in all packages
TODO: expose in FindMagnumPlugins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant