How abmorobotics/rlroverlab works
Project type and purpose
• RLRoverLab is an open-source Reinforcement Learning (RL) suite that integrates NVIDIA’s Isaac Sim & Isaac Lab to simulate and train autonomous planetary rovers.
• It provides task-specific environments (navigation & manipulation), assets (robots & terrains), and RL pipelines (entrypoints + example scripts) in a modular, extensible framework.
File structure
• Top-level directories:
• docker – container definitions, entrypoint scripts, ROS2 & simulation config
• docs – static site source (mdBook) for installation, development, examples
• examples – Python scripts demonstrating demos, training, inference, ROS integration
• rover_envs – core Python package subdivided into:
· assets (USD robots, terrains, textures)
· entrypoints (CLI wrappers to launch specific envs)
· envs (navigation & manipulation implementations, each with MDP config + SKRL agents)
· mdp (generic RL abstractions: actions, observations, rewards, terminations, recorders)
· utils (config loading, logging utilities, ROS2 publishers/subscribers)
• setup.py / pyproject.toml – package configuration for installation
• download_usd.py – utility to fetch USD assets externally
Extract architecture hints from the README
• Emphasizes Isaac Sim/Isaac Lab integration, extensibility for new tasks/robots.
Main components
a. Container & Orchestration layer
• Docker engine & docker-compose.yaml
• Environment variables (.env, .env.ros2)
• Entry point scripts (run.sh, run_ros.sh, stop.sh)
b. Simulation layer
• Isaac Sim / Isaac Lab (inside Docker container)
• USD assets loader (download_usd.py + rover_envs/assets)
• DDS middleware (CycloneDDS / FastDDS configured under docker/.ros)
c. RL framework & environment definitions
• rover_envs package
– envs/navigation & manipulation (MDP + SKRL configs + agent models)
– mdp abstractions (actions, observations, rewards, terminations, recorders)
– utils (config management, logging, ROS2 pub/sub interfaces)
• Entrypoint Python scripts (ManagerBasedRLEnv.py, rover_env.py, train.py, eval.py)
• Examples layer demonstrates usage scenarios
d. External services & interfaces
• ROS2 topics for real-time data exchange (publishers/subscribers under utils/ros2)
• Optional external storage for pretrained policies (policies/*.pt)
• Documentation site (docs/) – static site generator
Relationships & data flows
• Docker Compose sets up the Isaac Sim container with ROS2 DDS and mounts USD assets.
• The entrypoint script inside Docker invokes a Python CLI module in rover_envs/entrypoints.
• The CLI module initializes the Isaac Sim environment by loading USD scenes (assets → simulation), sets up environment wrappers from rover_envs/envs.
• The MDP layer (rover_envs/mdp) exchanges observations and rewards with the simulation, issues actions via the Isaac Sim API or ROS2 topics.
• The RL algorithm (SKRL agents configured in rover_envs/envs/*/learning/skrl) processes observations and outputs actions.
• Recorders capture trajectories and metrics (rover_envs/mdp/recorders).
• Optionally, ROS2 nodes publish sensor data and subscribe to control commands for external visualization or control loops.
• Example scripts orchestrate full pipelines: create scene → train agent → evaluate using pretrained models.
Architectural patterns & principles
• Modular separation: assets ←→ env definitions ←→ MDP abstractions ←→ RL algorithms ←→ entrypoints
• Clear layering: Containerization → Simulation → Wrapper API → RL layer → External interfaces
• Configuration-driven: YAML / Python configs under rover_envs/envs/*/config facilitate new tasks or robots
• Extensibility: New assets or tasks plug into the same MDP → env → agent pipeline without touching core code