Skip to main content

IR-SIM with C++ accelerated LiDAR, collision detection, and kinematics

Project description

IR-SIM-X: C++ Accelerated IR-SIM

A C++-accelerated fork of IR-SIM — faster LiDAR, collision detection, and kinematics via AVX2 SIMD and pybind11

Python Version License

Overview

irsim-x is a C++-accelerated fork of IR-SIM, an open-source, Python-based lightweight robot simulator for navigation, control, and reinforcement learning. The core simulation loop (LiDAR raycasting, collision detection, kinematics stepping, and A* planning) has been ported to C++ via pybind11, with AVX2 SIMD acceleration for LiDAR and batch multi-environment simulation.

The original Python-only paths have been removed — C++ is the only execution path. Compared to the original IR-SIM, IR-SIM-X achieves 5–50× faster LiDAR raycasting, 8× faster end-to-end step on sparse environments, and supports batch SIMD simulation across up to 1024 parallel environments.

Key Features

  • C++ LiDAR — AVX2 SIMD circle/rect raycast + spatial hash grid for polygon/linestring, 5–50× faster
  • C++ Collision Detection — SAT (Separating Axis Theorem) with ear-clip triangulation for concave polygons
  • C++ Kinematics — diff, omni, omni_angular, ackermann steering
  • C++ SimWorld — unified step, collision, dynamic obstacle (circle/rect/polygon/linestring) management
  • Batch SIMD — up to 1024 environments with cross-environment SIMD LiDAR and kinematics
  • FMCW LiDAR — C++ accelerated per-beam radial velocity computation
  • YAML-driven — same simple configuration as IR-SIM, no code changes needed for existing scenarios

Installation

Requires Python >= 3.10 and a C++17 compiler (for building the extension)

pip install irsim-x

# With keyboard control and extras
pip install irsim-x[all]

From source

git clone https://github.com/Ethereal1024/ir-simX.git
cd ir-simX
pip install -e .

Quick Start

A minimal example — a differential-drive robot navigates toward a goal:

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

robot:
  kinematics: {name: 'diff'}
  shape: {name: 'circle', radius: 0.2}
  state: [1, 1, 0]
  goal: [9, 9, 0]
  behavior: {name: 'dash'}

For more examples, see the usage directory.

Support

Category Features
Kinematics Differential Drive · Omnidirectional · Omnidirectional with Angular · Ackermann Steering
Sensors 2D LiDAR · 2D FMCW LiDAR · FOV Detector
Geometries Circle · Rectangle · Polygon · LineString · Binary Grid Map
Behaviors dash · RVO (Reciprocal Velocity Obstacle) · ORCA (Optimal Reciprocal Collision Avoidance) · SFM (Social Force Model)

Performance

Scenario Beams Time FPS Path
NeuPAN corridor (mixed) 100 0.866 ms 1,154 Grid DDA
10 polygons 1200 299 µs 3,345 Grid DDA
Circle (AVX2) 1200 31.5 µs 31,709 AVX2 SIMD
Maze 251 segs (Grid) 1200 189 µs 5,291 Grid DDA

Projects Using IR-SIM

Academic Publications

  • [RAL & ICRA 2023] rl-rvo-nav — Reinforcement learning-based RVO behavior for multi-robot navigation.
  • [RAL & IROS 2023] RDA_planner — Accelerated collision-free motion planner for cluttered environments.
  • [T-RO 2025] NeuPAN — Direct point robot navigation with end-to-end model-based learning.

Community Projects

Citation

IR-SIM-X is a C++-accelerated fork of IR-SIM. If you find it useful, please consider citing the original IR-SIM paper:

@article{han2026ir,
  title={IR-SIM: A Lightweight Skill-Native Simulator for Navigation, Learning, and Benchmarking},
  author={Han, Ruihua and Wang, Shuai and Li, Chengyang and Gao, Rui and Wang, Xinyi and Liu, Zhe and Li, Guoliang and Lu, Yupu and Hao, Qi and Pan, Jia and Zhao, Hengshuang},
  journal={arXiv preprint arXiv:2606.08729},
  year={2026}
}

License

irsim-x is released under the MIT License. The original IR-SIM is also MIT-licensed — see the original repository for details.

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

irsim_x-1.1.4.tar.gz (850.5 kB view details)

Uploaded Source

Built Distribution

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

irsim_x-1.1.4-cp313-cp313-manylinux_2_34_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

File details

Details for the file irsim_x-1.1.4.tar.gz.

File metadata

  • Download URL: irsim_x-1.1.4.tar.gz
  • Upload date:
  • Size: 850.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for irsim_x-1.1.4.tar.gz
Algorithm Hash digest
SHA256 c15e6d679e7f94dd7b21b35489aa5ff06069d71351541f328640b351ef2f8696
MD5 0289d4a91502d2256748f9441298d776
BLAKE2b-256 0a151eb0ae51fb742b3ac9e10b42b4bf0cd57c37765b0797c62f83612a4dc8f4

See more details on using hashes here.

File details

Details for the file irsim_x-1.1.4-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for irsim_x-1.1.4-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 30e4379c855c6f0473f74502f849caac8ba219548465c8eeea986ab5c715cc73
MD5 64558e4d0b5852fb271478ac1434e2c5
BLAKE2b-256 d5402c65ed67c6bba2282f70b588ffaf21436b51a30f1ccb41e5cde80003ecf1

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