Skip to main content

IR-SIM is an open-source, lightweight robot simulator based on Python, designed for robotics navigation, control, and learning. This simulator provides a simple and user-friendly framework for simulating robots, sensors, and environments, facilitating the development and testing of robotics algorithms with minimal hardware requirements.

Project description

Intelligent Robot Simulator (IR-SIM)

Github Release License PyPI Downloads Read the Docs Python Version

Documentation: https://ir-sim.readthedocs.io/en

中文文档: https://ir-sim.readthedocs.io/zh-cn

IR-SIM is an open-source, Python-based, lightweight robot simulator designed for navigation, control, and reinforcement learning. It provides a simple, user-friendly framework with built-in collision detection for modeling robots, sensors, and environments. Ideal for academic and educational use, IR-SIM enables rapid prototyping of robotics and learning algorithms in custom scenarios with minimal coding and hardware requirements.

Features

  • Simulate robot platforms with diverse kinematics, sensors, and behaviors (support).
  • Quickly configure and customize scenarios using straightforward YAML files. No complex coding required.
  • Visualize simulation outcomes using a naive visualizer matplotlib for immediate debugging.
  • Support collision detection and customizable behavior policies for each object.
  • Suitable for mutli-agent/robot reinforcement learning (Reinforcement Learning Projects).

Demonstrations

Scenarios Description
drawing In scenarios involving multiple circular differential robots, each robot employs Reciprocal Velocity Obstacle (RVO) behavior to avoid collisions. See Usage - collision avoidance
drawing A car-like robot controlled via keyboard navigates a binary map using a 2D LiDAR sensor to detect obstacles. See Usage - grid map
drawing A car-like robot controlled via keyboard navigates a grid map generated from 3D habitat spaces datasets like HM3D, MatterPort3D, Gibson, etc. See Usage - grid map hm3d
drawing Each robot employing RVO behavior is equipped with a field of view (FOV) to detect other robots within this area. See Usage - fov
drawing A car-like robot navigates through the randomly generated and moving obstacles. See Usage - dynamic random obstacles
drawing 200 agents with ORCA behavior implemented by pyrvo See Usage - ORCA group behavior world

Prerequisite

  • Python: >= 3.9

Installation

  • Install this package from PyPi:
pip install ir-sim

This does not include dependencies for all features of the simulator. To install additional optional dependencies, use the following pip commands:

# install dependencies for keyboard control
pip install ir-sim[keyboard]

# install all optional dependencies
pip install ir-sim[all]  
  • Or if you want to install the latest main branch version (which is more up-to-date than the PyPI version) from the source code:
git clone https://github.com/hanruihua/ir-sim.git    
cd ir-sim   
pip install -e .  
  • If you are using uv
git clone https://github.com/hanruihua/ir-sim.git    
cd ir-sim   
uv sync

Usage

Quick Start

import irsim

env = irsim.make('robot_world.yaml') # initialize the environment with the configuration file

for i in range(300): # run the simulation for 300 steps

    env.step()  # update the environment
    env.render() # render the environment

    if env.done(): break # check if the simulation is done
        
env.end() # close the environment

YAML Configuration: robot_world.yaml

world:
  height: 10  # the height of the world
  width: 10   # the width of the world
  step_time: 0.1  # 10Hz calculate each step
  sample_time: 0.1  # 10 Hz for render and data extraction 
  offset: [0, 0] # the offset of the world on x and y 

robot:
  kinematics: {name: 'diff'}  # omni, diff, acker
  shape: {name: 'circle', radius: 0.2}  # radius
  state: [1, 1, 0]  # x, y, theta
  goal: [9, 9, 0]  # x, y, theta
  behavior: {name: 'dash'} # move toward to the goal directly 
  color: 'g' # green

Advanced Usage

The advanced usages are listed in the usage

Support

Currently, the simulator supports the following features. Further features, such as additional sensors, behaviors, and robot models, are under development.

Category Features
Kinematics Differential Drive mobile Robot
Omni-Directional mobile Robot
Ackermann Steering mobile Robot
Sensors 2D LiDAR
FOV detector
Geometries Circle
Rectangle
Polygon
linestring
Binary Grid Map
Behaviors dash (Move directly toward the goal)
rvo (Move toward the goal using Reciprocal Velocity Obstacle behavior)
orca (Move toward the goal using Optimal Reciprocal Collision Avoidance group behavior)

Projects Using IR-SIM

  • Academic Projects:

    • rl-rvo-nav: [RAL & ICRA2023] A Reinforcement Learned based RVO behavior for multi-robot navigation.
    • RDA_planner: [RAL & IROS2023] An Accelerated Collision Free Motion Planner for Cluttered Environments.
    • NeuPAN: [T-RO 2025] Direct Point Robot Navigation with End-to-End Model-based Learning.
  • Deep Reinforcement Learning Projects:

Contributing

This project is under development. I appreciate and welcome all contributions. Just open an issue or a pull request. Please refer to the CONTRIBUTING.md for more details.

Acknowledgement

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ir_sim-2.9.0.tar.gz (708.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ir_sim-2.9.0-py3-none-any.whl (688.8 kB view details)

Uploaded Python 3

File details

Details for the file ir_sim-2.9.0.tar.gz.

File metadata

  • Download URL: ir_sim-2.9.0.tar.gz
  • Upload date:
  • Size: 708.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for ir_sim-2.9.0.tar.gz
Algorithm Hash digest
SHA256 9a4c122dc5c118e6cdc2eabb151fd5fdf1925213895df24a80e48945cd3e6af3
MD5 2be4a562c1d817e808cc18cfa4236e27
BLAKE2b-256 44c350599d123e1e8267bc262c9dc4eff7169ca3615aee3c7bd40308d6c50dd6

See more details on using hashes here.

File details

Details for the file ir_sim-2.9.0-py3-none-any.whl.

File metadata

  • Download URL: ir_sim-2.9.0-py3-none-any.whl
  • Upload date:
  • Size: 688.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for ir_sim-2.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fcf9ede90d5072af59b07d90453350985dc4d386fb9cb4abdf9ae8e3d8e491ae
MD5 502931404516d776edfbdf5b5aba55e7
BLAKE2b-256 2eef55e52e622e5edc6b4af2ac5da40e268123587d79e02bc9ff5d26c4f2396d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page