isaac-sim / IsaacLab

Unified framework for robot learning built on NVIDIA Isaac Sim
https://isaac-sim.github.io/IsaacLab
Other
2.13k stars 862 forks source link

[Question] Where should I put my own library in orbit? #235

Closed fan-ziqi closed 8 months ago

fan-ziqi commented 9 months ago

Question

Where should I put my own library like RL-Games or RSL-RL in orbit?

Mayankm96 commented 8 months ago

Hi,

These libraries are installed as Python modules when you run ./orbit.sh -e. You can integrate your library in a similar way by the following steps:

  1. Add your library as a dependency for installation: https://github.com/NVIDIA-Omniverse/orbit/blob/main/source/extensions/omni.isaac.orbit_tasks/setup.py#L34-L41
  2. Install your library by running ./orbit.sh -e "YOU_LIB_NAME"
  3. Create a wrapper for the library (in-case it doesn't follow gym.Env convention): https://github.com/NVIDIA-Omniverse/orbit/tree/main/source/extensions/omni.isaac.orbit_tasks/omni/isaac/orbit_tasks/utils/wrappers
  4. (optional) Add some tests to make sure your wrappers work: https://github.com/NVIDIA-Omniverse/orbit/tree/main/source/extensions/omni.isaac.orbit_tasks/test/wrappers
  5. Create workflow scripts for your library to train and play the trained agents using your library: https://github.com/NVIDIA-Omniverse/orbit/tree/main/source/standalone/workflows

If you want to use your library from source, then instead of doing (1) and (2), you can just install your library similar to other Python libraries. As an example:

# Option 1: You are using a conda environment with Orbit
cd PATH/TO/YOUR_LIB_DIR
python -m pip install -e .

# Option 2: You are using the Python shipped with Isaac Sim
cd orbit
./orbit.sh -p -m pip install -e PATH/TO/YOUR_LIB_DIR
fan-ziqi commented 8 months ago

Thank you very much!