facebookresearch / facebookresearch/fairo

Use URDF robot model to simulate in MuJoCo with Polymetis

Open
#1,332 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
929
Forks
123
PR merge metrics
No merged PRs in 30d

Description

## Type of Issue

Select the type of issue:
- [ ] Bug report (to report a bug)
- [x] Feature request (to request an additional feature)
- [ ] Tracker (I am just using this as a tracker)
- [ ] Refactor request
- [ ] Documentation Ask

## Description

Polymetis consumes robots in the URDF format since some simulators exclusively use URDF (Habitat, Pinocchio). While MuJoCo can accept these models (with minimal modification), no controllable joints are found since MuJoCo requires explicit specification of actuators. I have not been able to specify an actuator in URDF but am able to do so in the MJCF file format. Ideally, only a single robot model specification would be used across all simulators.

Specifically, the mujoco_manipulator should ingest a URDF file and generate a model object with actuators at each of the specified joints. The inclusion of actuators could be through augmenting the URDF files to specify actuators at the joints in a way that does not affect parsing in other simulators (i.e. under the element). Alternatively, the actuators can be added to a generated MJCF file based on the known controlled joint indices and the MuJoCo model can be loaded from there.

## Current Behavior

A URDF file is specified in the robot_description_path. This file is used to construct the metadata and ultimately the pinocchio model. The mujoco_manipulator searches for a file with the identical path/name but with a ".mjcf" file extension and throws an error if this file is not found. This file can be generated through MuJoCo from the URDF, but the actuators must be manually added. If found, the MJCF file is used to construct the MuJoCo model object.

## Expected Behavior

A single file (likely URDF due to the Pinocchio dependency) that is compatible with Bullet, Habitat, and MuJoCo is specified in the robot_description_path. The model is loaded appropriately into MuJoCo with control over all joints

## Links to any relevant pastes or documents

[Discussion details](https://docs.google.com/document/d/1oOmXAOC7ohapHlrh8mbyq_-w4WZ15orQ659z7B-Qwdk/edit)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.