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

[WIP] Robotics Coordinate System Migration #2523

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

aclegg3
Copy link
Contributor

@aclegg3 aclegg3 commented Dec 21, 2024

Motivation and Context

This PR represents a prototype of converting the default Habitat coordinate system to robotics conventions (Z-up, X-forward).

To make this work several systems needed to be changed:

  • PathFinder: Recast Navigation is hard-coded to a local coordinate system with Y-up. To accommodate this requirement, we convert points between the coordinate systems in the wrapper layer. Part of this refactor is also to remove Eigen from the wrapper layer in preparation for parallel refactor (--[BE] Remove Eigen dependency Part 1 #2301).
  • CoordinateFrame and ESP_UP/ESP_FRONT logic and defaults changed to fix a bug and correctly represent the new defaults.
  • gravity vector is now -Z in the default config
  • All configs for stages and objects should correctly represent the local up and front vectors in their own local asset coordindate system. This is now correctly converted to the new coordinate system.
  • All Habitat custom URDFs previously had a default 1.56 radian rotation around X in the rpy. These should now be removed. Default URDF coordinate system will import correctly now.
  • Added some test axis assets for debugging

TODO:

  • needs many adaptations in the code where Y-up is hardcoded.
  • needs many changes in the asset configs we host

How Has This Been Tested

Added examples/coordinate_system.py to test this migration.

  • Changed hab_spot_arm.urdf to remove the base rotation rpy
  • Changed the stage_config.json to correctly identify the local up and front.
  • Apply a rotation to the camera (default cameras are in graphics convention with Y-up and need to be rotated).

Example. Note the colored axis (RGB == XYZ) indicating that we're now in robotics conventions!:
tmpa8rh9jur

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants