Giter VIP home page Giter VIP logo

omnilrs's Introduction

Omniverse Lunar Robotics Simulator or OmniLRS, is a simulation tools developped jointly by the Space Robotics group from the University of Luxembourg (SpaceR), and the Space Robotics Lab from Tohoku University in Japan (SRL). We are now opening it to the community and strongly encourage Space Roboticists to help us grow the feature set of this simulation! Don't be shy shoot a PR!

Important

This readme provides basic information on how to use the simulation. For a more complete introduction to the simulation and its inner workings please visit our wiki!

Integration & Workflow with SpaceROS

Important

Isaac Sim is using ROS2 by default, most of the tools available in Isaac are meant for ROS2. Hence, this simulation uses ROS2. To use this simulation with SpaceROS, the ROS2 simulation docker must first be spinned up, and then in a second time, another container running SpaceROS must be launched to interact with the simulation. To illustrate this, we provide a simple teleop demonstration with the sim in ROS2 and SpaceROS sending velocity commands. Check the Wiki for a step-by-step guide on how to run this demo.

Simulation Environments Overview

Name
Description
Images
Lunalab
Digital-Twin of lunar analog at the University of Luxembourg. This environment also supports terrain deformation as the rover drives on it.
Lunaryard
A small scale procedually generated lunar environment. If lunar coordinates and a date is provided the position of the earth and sun are computed using ephemerides resulting in realistic lighting. This feature is also available in the large scale environments. This environment also support terrain deformation as the rover drives on it.
LargeScale
Semi procedural lunar environment. It uses real DEM to reconstuct the coarse terrain, usually 5meters per pixel and then uses procedural generation to augment it to 2.5cm per pixel. The terrain itself can be generated at a even higher resolution to smooth out shadows. This very fine terrain allows to reconstruct fine terrain features increasing the engineering value of the sim. The whole of this is bundled inside Geometry clip maps, allowing to render very large scenes.

Note

Please note that this is a partial release. More robots will be made available at a later date. Should you run into a bug, or would like to request a new feature, feel free to open an issue. Want to collaborate, reach out to us!

Installation

In this page we'll walk you through the installation process of our simulation. Since our simulation is built on top of Isaac, you will need an Nvidia GPU to run it.

Hardware requirement:

  • An Nvidia GPU:
    • with 8+ Gb of VRAM (some scene will work on 4Gb)
    • RTX Series 2000 or above.
  • A recent 12+ threads CPU.
  • 32Gb of RAM. (for some scene 16Gb is enough)
  • 10+ Gb of free space.

Operating System:

  • Linux distros similar to Ubuntu 20.04 or 22.04.

Warning

Windows is not supported.

To install the simulation we strongly suggest using docker. Though the install could also be done using a native installation.

Native installation

The first thing that needs to be done before we proceed with the native installation is to install Isaac. We support two version 2023.1.1 and 4.1.0. Though we'd recommend sticking to 2023.1.1 as there are some issues with renderings in 4.1.0. Our dockers currently come in the 2023.1.1 version of Isaac.

Tip

If you're unsure on how to install Isaac sim, look-up the following: How to install Isaac Sim.

To simplify the remainder of the installation process of the framework we provide a script that will automatically download all the assets, as well as install the required dependencies. It will not install Isaac Sim.

Important

Run this command at the root of the repository.

scripts/install_native.sh

If you'd rather do it yourself, here are the commands:

# Pulls WorldBuilder
git submodule init
git submodule update

# Install GDAL
sudo apt-get install gdal-bin
sudo apt-get install libgdal-dev
version=$(gdal-config --version)

# Install Python packages for Isaac Sim
~/.local/share/ov/pkg/isaac_sim-2023.1.1/python.sh -m pip install opencv-python omegaconf hydra-core skyfield gdal==$version zfpy numba
python3 -m pip install --upgrade pip
python3 -m pip instal gdal==$version gdown black

# Download the assets from Google Drive
gdown 1XuFlDRELPQmjJFLP1E54IOhRiFn5iM_7
unzip assets_v6.zip
rm assets_v6.zip
gdown 1sXrsT7ZdA3VslMREBtjo6-Ou1-v8-8dI
unzip lunar_rocks.zip -d assets/USD_Assets/rocks
rm lunar_rocks.zip

# Download the DEMs of the lunar southpole and format them. This can take a long time.
./scripts/get_dems.sh
./scripts/extract_dems_override.sh
# Get Ephemeris data
./scripts/get_ephemeris_data.sh

Once this is done you should be off to the races! However, before you venture forward, check that the assets folder has been created with success. It should contain the following:

├── assets
│   ├── Ephemeris
│   ├── Terrains
│   |   ├── Lunalab
│   |   ├── Lunaryard
│   |   └── SouthPole
│   ├── Textures
│   └── USD_Assets
│       ├── common
│       ├── environments
│       ├── lunalab
│       ├── robots
│       └── rocks

See getting started to learn more about starting your first scene.

Docker Installation

Before we install the simulation, please follow the procedure here to install all the required components to install IsaacSim in a docker container.

Tip

You will need an nvcr.io account.

Once you're all set, the use following to build the image:

./omnilrs.docker/build_docker.sh

Once the image is built the simulation should be ready to go. Though you will still need to download the assets. If you want to, you can download them from docker directly.

First pull the submodule

# Pulls WorldBuilder
git submodule init
git submodule update

Then start the docker

./omnilrs.docker/run_docker.sh

And run the script in the docker:

scritps/install_docker.sh

This will download the assets from docker and it should work fine. The issue is that all the generated folder will be owned by root. So you may want to change that afterwards by running:

chown -r $USER assets
chgrp -r $USER assets

Provided you have Gdal and gdown installed on your system, you can also run:

scripts/download_only_native.sh

See getting started to learn more about starting the simulation.

Getting started:

Caution

The following assumes you are running ROS2/SpaceROS. While the code has ROS1 compatibility, we do not provide base configs or robots for ROS1.

Important

If you are using docker, first run the container by using:

./omnilrs.docker/run_docker.sh

Important

If you are using the native installation, make sure ROS2 is sourced before running the simulation.

You can then run the commands inside the docker, as if you were using the native installation. To run isaac prefix python.sh by /isaac-sim/ in docker, and ~/.local/share/ov/pkg/isaac_sim-2023.1.1/ in the native installation. Before

Run your first scene using:

python.sh run.py

This will launch a lunalab environment with ROS2 and ray_traced rendering.

You can run the lunaryard by using:

python.sh run.py environment=lunaryard_20m

You can run the largescale environment by using:

python.sh run.py environment=largescale

Tip

To learn more about how to run scenes please refere to the Wiki here!

ROS interactions with the scene

The simulation allows user to interact with the Scene through ROS topics. This allows for instance to reset or teleport a robot, or to change the intensity of a light!

We provide a complete description of the interactions available with the sim from ROS on the Wiki here.

ROS2 demo

We've prepared another separate git repository to run ROS2 demo.
It supports joystick teleoperation and navigation for now.
https://github.com/jnskkmhr/omnilrs_ros2_demo

Citation

Please use the following citations if you use OmniLRS in your work.

@article{richard2024omnilrs,
  title={OmniLRS: A Photorealistic Simulator for Lunar Robotics},
  author={Richard, Antoine and Kamohara, Junnosuke and Uno, Kentaro and Santra, Shreya and van der Meer, Dave and Olivares-Mendez, Miguel and Yoshida, Kazuya},
  booktitle={2024 IEEE International Conference on Robotics and Automation (ICRA)},
  url={https://arxiv.org/abs/2309.08997},
  year={2024}
}

@article{kamohara2024modelingterraindeformationgrouser,
      title={Modeling of Terrain Deformation by a Grouser Wheel for Lunar Rover Simulation}, 
      author={Junnosuke Kamohara and Vinicius Ares and James Hurrell and Keisuke Takehana and Antoine Richard and Shreya Santra and Kentaro Uno and Eric Rohmer and Kazuya Yoshida},
      year={2024},
      eprint={2408.13468},
      booktitle={21st International and 12th Asia-Pacific Regional Conference of the ISTVS}
      primaryClass={cs.RO},
      url={https://arxiv.org/abs/2408.13468}, 
}

Directory Structure

.
├── assets
├── cfg
│   ├── environment
│   ├── mode
│   └── rendering
├── src
│   ├── configurations
│   ├── environments
│   ├── environments_wrappers
│   │   ├── ros1
│   │   ├── ros2
│   │   └── sdg
│   ├── labeling
│   ├── robots
│   ├── ros
│   └── terrain_management
└── WorldBuilders

omnilrs's People

Contributors

antoinerichard avatar jnskkmhr avatar gabryss avatar

Stargazers

 avatar Dr.Harsh Maithani avatar Xiaomeng Yang avatar 爱可可-爱生活 avatar Assia avatar  avatar Andrej Orsula avatar XU QINCHAO avatar yinghui li avatar L.F. Wang avatar Alexander avatar Gurjas Kapur avatar SHREYA SANTRA avatar Louis Burtz avatar Tuan Dinh Luong avatar Raudie avatar Chen Yao avatar  avatar Tatsuya Matsushima avatar  avatar Fabian Dubois avatar ThathariT avatar Khaled Sharif avatar Aman Arora avatar  avatar Charlotte Morrison avatar  avatar Tavo avatar  avatar Vinicius Emanoel Ares avatar Anton Bjørndahl Mortensen avatar Damien LaRocque avatar marco.lu avatar  avatar  avatar

Watchers

trna avatar Tatsuya Matsushima avatar  avatar

omnilrs's Issues

Isaac Sim 2023.1.1 crashes when starting simulation with provided robots

Hi,
I have been testing the new release using the native installation instruction and the largescale environment is great!

I am running into an issue now where Isaac Sim crashes whenever I start a simulation with the provided robot USD (both Husky and Jackal). However, it works fine with an USD that i made attached here
viper.zip

The error dump is attached below.
70aa3d0c-9bc5-4cea-d0b0a2ae-b5ed8441.dmp.zip

The error message that appeared is

2024-09-13 21:14:30 [49,900ms] [Warning] [omni.fabric.plugin] No source has valid data array=0x1e72dff0 usdValid=0 cpuValid=0
2024-09-13 21:14:30 [49,900ms] [Warning] [omni.fabric.plugin] No source has valid data array=0x1e731628 usdValid=0 cpuValid=0
terminate called without an active exception
2024-09-13 21:14:30 [0ms] [Warn] [carb.crashreporter-breakpad.plugin] [crash] A crash has occurred.  If a debugger should be attached, please set the '/crashreporter/debuggerAttachTimeoutMs' setting to a timeout in milliseconds.  This can be used to allow the crash reporter to wait for up to that long for a debugger to attach before processing or sending the crash report.
2024-09-13 21:14:30 [47ms] [Warn] [carb.crashreporter-breakpad.plugin] [crash] compressing 3 files into '/home/lagerworkstation/.local/share/ov/data/Kit/Isaac-Sim/2023.1/9d6e91f4-19f3-485f-e17143b4-ead4777d.dmp.zip' for upload.
'crashreport.gui' exited with code 127Segmentation fault (core dumped)

I have brought up the issue on Nvidia forum but am curious if you guys encountered this problem as well?

Thanks for the work

Missing textures on sim startup

Great project! Thanks for all your hard work

I'm getting a few missing texture errors on startup:

2024-04-18 17:51:01 [31,098ms] [Error] [omni.hydra] [UsdToMdl] Prim '/Lunalab/Lab/LunaLabDetails_textured/Looks/Black_Matte/Shader' parameter 'reflectionroughness_texture': References an asset that can not be found: './Textures/BlackPaint/BlackPaint_rough_4k.exr'
2024-04-18 17:51:01 [31,098ms] [Error] [omni.hydra] [UsdToMdl] Prim '/Lunalab/Lab/LunaLabDetails_textured/Looks/Black_Matte/Shader' parameter 'normalmap_texture': References an asset that can not be found: './Textures/BlackPaint/BlackPaint_nor_dx_4k.exr'
2024-04-18 17:51:01 [31,098ms] [Error] [omni.hydra] [UsdToMdl] Prim '/Lunalab/Lab/LunaLabDetails_textured/Looks/Black_Matte/Shader' parameter 'normalmap_texture': References an asset that can not be found: './Textures/BlackPaint/BlackPaint_nor_dx_4k.exr'
2024-04-18 17:51:01 [31,098ms] [Error] [omni.hydra] [UsdToMdl] Prim '/Lunalab/Lab/LunaLabDetails_textured/Looks/Black_Matte/Shader' parameter 'reflectionroughness_texture': References an asset that can not be found: './Textures/BlackPaint/BlackPaint_rough_4k.exr'
2024-04-18 17:51:03 [32,604ms] [Error] [omni.hydra] [UsdToMdl] Prim '/Lunalab/Lab/LunaLabWalls_textured/Looks/Black_Matte/Shader' parameter 'reflectionroughness_texture': References an asset that can not be found: './Textures/BlackPaint/BlackPaint_rough_4k.exr'
2024-04-18 17:51:03 [32,604ms] [Error] [omni.hydra] [UsdToMdl] Prim '/Lunalab/Lab/LunaLabWalls_textured/Looks/Black_Matte/Shader' parameter 'normalmap_texture': References an asset that can not be found: './Textures/BlackPaint/BlackPaint_nor_dx_4k.exr'
2024-04-18 17:51:03 [32,605ms] [Error] [omni.hydra] [UsdToMdl] Prim '/Lunalab/Lab/LunaLabWalls_textured/Looks/Black_Matte/Shader' parameter 'normalmap_texture': References an asset that can not be found: './Textures/BlackPaint/BlackPaint_nor_dx_4k.exr'
2024-04-18 17:51:03 [32,605ms] [Error] [omni.hydra] [UsdToMdl] Prim '/Lunalab/Lab/LunaLabWalls_textured/Looks/Black_Matte/Shader' parameter 'reflectionroughness_texture': References an asset that can not be found: './Textures/BlackPaint/BlackPaint_rough_4k.exr'

Besides that, the environment renders well, see screenshot below

image

License?

Can you please add a license to this code? Thank you.

Weird jolts during drives

First and foremost, thank you for the great work. I have been experimenting with the simulator and I seeing some behavior during driving where sometime there are just random jolts that shake the rover. The video had modification made to the physics scene where gravity is set to 1.62 m/s^2 but the behavior still exist at the default gravity of 9.81. Changing the simulation dt to 0.01 doesn't seem to get rid of it completely.

Screencast.from.08-16-2024.02.58.56.PM.webm

I would like to ask if you guys are also seeing this phenomenon during your runs and have some suggestion of what could be done? I am currently reading into different collision mesh by isaac sim as well.

Thank you

Can't download Assets

The link to download the Assets seems to to not work due to the file being deleted. Can you please upload the assets again? Thanks for the great work

Lunalab Prim Error

cd OmniLRS  # commit fe1d57
alias PYTHON_PATH=~/.local/share/ov/pkg/isaac_sim-2023.1.1/python.sh
PYTHON_PATH run.py environment=lunalab mode=ROS2 rendering=ray_tracing
Error executing job with overrides: ['environment=lunalab', 'mode=ROS2', 'rendering=ray_tracing']
Traceback (most recent call last):
  File "/home/khaled/Documents/GitHub/OmniLRS/run.py", line 73, in run
    SM, simulation_app = startSim(cfg)
  File "/home/khaled/Documents/GitHub/OmniLRS/src/environments_wrappers/__init__.py", line 32, in startSim
    SM = ROS2_SimulationManager(cfg, simulation_app)
  File "/home/khaled/Documents/GitHub/OmniLRS/src/environments_wrappers/ros2/simulation_manager_ros2.py", line 118, in __init__
    self.ROSRobotManager.RM.preloadRobot(self.world)
  File "/home/khaled/Documents/GitHub/OmniLRS/src/robots/robot.py", line 75, in preloadRobot
    self.addRRG(
  File "/home/khaled/Documents/GitHub/OmniLRS/src/robots/robot.py", line 134, in addRRG
    rrg.initialize(world)
  File "/home/khaled/Documents/GitHub/OmniLRS/src/robots/robot.py", line 335, in initialize
    rigid_prim = RigidPrim(
  File "/home/khaled/.local/share/ov/pkg/isaac_sim-2023.1.1/exts/omni.isaac.core/omni/isaac/core/prims/rigid_prim.py", line 115, in __init__
    self._rigid_prim_view = RigidPrimView(
  File "/home/khaled/.local/share/ov/pkg/isaac_sim-2023.1.1/exts/omni.isaac.core/omni/isaac/core/prims/rigid_prim_view.py", line 144, in __init__
    XFormPrimView.__init__(
  File "/home/khaled/.local/share/ov/pkg/isaac_sim-2023.1.1/exts/omni.isaac.core/omni/isaac/core/prims/xform_prim_view.py", line 126, in __init__
    raise Exception(
Exception: Prim path expression /Robots/ex1/left_front_wheel_link is invalid, a prim matching the expression needs to created before wrapping it as view

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.