Skip to main content

navground_learning

A Python package that adds Imitation or Reinforcement Learning to the tools user can play with in the Navigation Playground navground.

The package provides configurable single-agent Gymnasium and multi-agent Parallel PettingZoo environments. Users, by combining navigation scenarios and sensors, can build any kind of environment where to learn navigation policies.

Main features

  • Single-agent Gymnasium environment that expose actions, obervations and rewards of a single agent in a navground scenario.
  • Multi-agent PettingZoo environment that expose actions, observations and rewards of multiple agents, possibly heterogenous, in a navground scenario.
  • Ability to execute a navigation policy in navground, with support for ONNX and Stable-Baselines3.
  • User-extendable configuration for translating between navground commands/states and the POMDP actions/observations.
  • Reward functions for navigation tasks.
  • Import/export from/to YAML, like common in navground.
  • Tools to evaluate the policies during and after training, inside and outside of the environments.

Installation

pip install navground_learning[all]

We support Python>=3.10. Users should prefer Python<=3.12 because important third-party packages like Stable-BaseLine3 or PyTorch do not support Python3.13 yet.

Example

Note that to run the example, you need to install the rl and inference optional dependecies:

pip install navground_learning[rl,inference]

which are installed if you installed navground_learning[all].

The example instantiate the environment of one of the tutorials, in which it trains a policy using SAC. Then, it export the policy as an ONNX, which it uses to run a navground experiment, recording the trajectories to an HDF5 file.

from navground.learning import evaluation, io
from navground.learning.examples import corridor_with_obstacle
from stable_baselines3 import SAC

# Creates a Gymnasium environment 
env = corridor_with_obstacle.get_env()
# Train using Stable-Baseline3
model = SAC("MlpPolicy", env).learn(total_timesteps=1_000)
# Export the model to ONNX
io.export_behavior(model, "model")

# Evaluate the policy with a navground experiment
exp = evaluation.make_experiment_with_env(env, policy="model/policy.onnx")
exp.number_of_runs = 100
exp.record_config.pose = True
exp.save_directory = '.'
exp.run()

Documentation

The project documentation in addition to the API reference, includes several tutorials of Machine-Learning policies in navigation, ranging from very basics to complex multi-agent scenarios.

This software is free for reuse according to the attached MIT license.

Acknowledgement and disclaimer

The work was supported in part by REXASI-PRO H-EU project, call HORIZON-CL4-2021-HUMAN-01-01, Grant agreement no. 101070028.

The work has been partially funded by the European Union. Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Commission. Neither the European Union nor the European Commission can be held responsible for them.

Metadata

Release files for navground-learning 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for navground-learning 0.2.0
File Size Uploaded Provenance Actions
navground_learning-0.2.0.tar.gz 120.7 kB With provenance Details for navground_learning-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for navground-learning 0.2.0
File Interpreter ABI Platform Actions
navground_learning-0.2.0-py2.py3-none-any.whl Python 3, Python 2 none any Details for navground_learning-0.2.0-py2.py3-none-any.whl

Total release size: 288.8 kB

Security for navground-learning 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for navground_learning-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 8, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page