Documentation: https://ir-sim.readthedocs.io/en
IR-SIM is an open-source, lightweight robot simulator based on Python, specifically designed for intelligent robotics navigation and learning. Primarily intended for research and educational purposes, it is user-friendly and easily customizable.
It provides the following features:
- Versatile and User-Friendly Framework: Simulate a wide range of robot platforms with diverse kinematics and sensors.
- Easy Configuration with YAML: Easily set up and modify simulation scenarios using straightforward YAML files, no complex coding required for quick and flexible environment customization.
- Real-Time Visualization: Visualize simulation outcomes in real time for immediate feedback and analysis.
- Predefined Benchmark Behaviors: Utilize a comprehensive library of pre-defined behaviors that serve as benchmarks for evaluating and comparing algorithm performance.
- Ideal for Algorithm Development: Suitable for developing and testing algorithms related to robot navigation, motion planning, optimal control, and reinforcement learning.
Scenarios | Description |
---|
| In scenarios involving multiple circular differential robots, each robot employs Reciprocal Velocity Obstacle (RVO) behavior to avoid collisions. |
| A car-like robot controlled via keyboard navigates a binary map using a 2D LiDAR sensor to detect obstacles. |
| Each robot employing RVO behavior is equipped with a field of view (FOV) to detect other robots within this area. |
| A car-like robot navigates through the randomly generated and moving obstacles |
Prerequisite
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 for development, you may install from source:
git clone https://github.com/hanruihua/ir-sim.git
cd ir-sim
pip install -e .
Usage
Quick Start
import irsim
env = irsim.make('robot_world.yaml')
for i in range(300):
env.step()
env.render()
if env.done(): break
env.end()
YAML Configuration: robot_world.yaml
world:
height: 10
width: 10
step_time: 0.1
sample_time: 0.1
offset: [0, 0]
robot:
kinematics: {name: 'diff'}
shape: {name: 'circle', radius: 0.2}
state: [1, 1, 0]
goal: [9, 9, 0]
behavior: {name: 'dash'}
color: 'g'
Advanced Usage
The advanced usages are listed in the irsim/usage
Academic Cases
Acknowledgement