SRU Navigation Learning - RL Training Framework
SRU Navigation Learning - RL Training Framework
** Important Note**: This repository contains the RL training framework for the SRU navigation project, providing neural network architectures and on-policy training algorithms (PPO/MDPO). This repository does not include the simulation environments or task definitions. See the project website for the complete navigation system.
End-to-end RL training framework for visual navigation with SRU (Spatially-Enhanced Recurrent Units) architecture. This repository extends the original rsl_rl framework with:
This framework is designed to train navigation policies that achieve 23.5% improvement over standard RNNs and enable zero-shot sim-to-real transfer.
✅ Neural Network Architectures
✅ RL Training Algorithms
✅ Training Infrastructure
✅ Model Export
✅ Logging & Monitoring
❌ Simulation environments (Isaac Lab tasks, maze generation, terrain) ❌ Task definitions (observation spaces, reward functions, action interfaces) ❌ Robot models and locomotion policies ❌ Depth encoder pretraining infrastructure
Note: The simulation environment must be installed separately. See sru-navigation-sim for the IsaacLab extension.
The repository is organized as follows:
…ActorCriticSRU (rsl_rl/modules/actor_critic_sru.py)
LSTM_SRU (rsl_rl/networks/sru_memory/lstm_sru.py)
CrossAttentionFuseModule (rsl_rl/networks/sru_memory/attention.py)
Training Algorithms (rsl_rl/algorithms/)
git clone https://github.com/leggedrobotics/sru-navigation-learning.git
cd sru-navigation-learning
python3 -m venv sru_nav_learning
source sru_nav_learning/bin/activate
pip install -e .If you're using this package with Isaac Lab, you need to replace the pre-installed rsl_rl package.
You can place this repository anywhere, but the recommended structure is:
IsaacLab/
├── source/
│ ├── isaaclab/ # Core Isaac Lab
│ ├── isaaclab_assets/ # Asset library
│ ├── isaaclab_rl/ # RL framework wrappers
│ ├── isaaclab_tasks/ # Task definitions
│ └── isaaclab_nav_task/ # Your navigation task extension
├── rsl_rl/ # This SRU-enhanced RL framework (recommended location)
├── _isaac_sim/ # Isaac Sim installation
└── isaaclab.sh # Isaac Lab launcher scriptAlternative locations:
source/ directory (e.g., source/rsl_rl/)…Important Notes:
rsl_rl (not rsl_rl_lib) to maintain compatibility with Isaac Lab importssru-navigation-learning, rsl_rl, etc.), but the installed package name will always be rsl_rl-e) allows you to modify the code without reinstallingDependencies:
Note: This package provides only the RL training framework. To train navigation policies, you also need:
Training hyperparameters are specified in YAML configuration files. See config/dummy_config.yaml for an example PPO configuration.
Key parameters:
policy: Network architecture configuration (SRU layers, attention heads, hidden dimensions)algorithm: PPO/MDPO hyperparameters (learning rate, entropy coefficient, clip range)runner: Training settings (number of steps per rollout, max iterations)The typical training workflow with a compatible environment:
from rsl_rl.runners import OnPolicyRunner
from your_env import YourNavigationEnv # From simulation package
# Initialize environment
env = YourNavigationEnv(num_envs=4096)
# Create runner with configuration
runner = OnPolicyRunner(env, config, device='cuda:0')
# Train
runner.learn(num_learning_iterations=10000)The framework supports multiple logging backends configured through the logger parameter:
Export trained policies for deployment:
# Load trained model
policy = ActorCriticSRU(...)
policy.load_state_dict(torch.load("checkpoint.pt"))
# Export to JIT (PyTorch deployment)
policy.export_jit(path="./exported", filename="policy.pt", normalizer=obs_normalizer)
# Export to ONNX (C++, ROS, TensorRT deployment)
policy.export_onnx(path="./exported", filename="policy.onnx", normalizer=obs_normalizer)ONNX Export Notes for Recurrent Models:
h_in, c_in → h_out, c_out)Spatial Transformation Gates: Element-wise multiplication operations enabling implicit spatial memory from egocentric observations
Multi-Camera Fusion: Native support for multiple depth cameras with proper padding, masking, and attention mechanisms
Temporally Consistent Dropout: Dropout masks maintained across trajectory timesteps for stable training
Efficient Attention: Batched self-attention and cross-attention computed outside RNN loop for computational efficiency
Deep Mutual Learning: MDPO algorithm with KL-divergence distillation between dual networks
MUON Optimizer Integration: Momentum Orthogonalized by Newton-schulz optimizer for hidden weight layers
| Repository | Description |
|---|---|
| sru-pytorch-spatial-learning | Core SRU PyTorch module (standalone) |
| sru-navigation-sim | IsaacLab simulation environments |
| sru-depth-pretraining | Self-supervised depth encoder pretraining |
| sru-robot-deployment | Real robot deployment (ROS2, Gazebo) |
If you use this code in your research, please cite:
@article{yang2025sru,
author = {Yang, Fan and Frivik, Per and Hoeller, David and Wang, Chen and Cadena, Cesar and Hutter, Marco},
title = {Spatially-enhanced recurrent memory for long-range mapless navigation via end-to-end reinforcement learning},
journal = {The International Journal of Robotics Research},
year = {2025},
doi = {10.1177/02783649251401926},
url = {https://doi.org/10.1177/02783649251401926}
}For documentation, we adopt the Google Style Guide for docstrings.
We use the following tools for maintaining code quality:
To set up pre-commit hooks:
# Installation (one time)
pre-commit install
# Run on all files
pre-commit run --all-filesThis repository is built upon rsl_rl from ETH Zurich Robotic Systems Lab and NVIDIA.
Original rsl_rl Maintainers: David Hoeller and Nikita Rudin SRU Extension: Fan Yang Affiliation: Robotic Systems Lab, ETH Zurich Contact: [email protected]
This project is licensed under the BSD-3-Clause License - see the LICENSE file for details.
See licenses/ directory for dependency licenses.
No open issues yet, or sync has not completed.