New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ir-sim

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ir-sim

Open-source, lightweight robot 2D simulator based on Python, specifically designed for intelligent robotics navigation and learning.

  • 2.3.2
  • PyPI
  • Socket score

Maintainers
1

Intelligent Robot Simulator (IR-SIM)

Github Release License PyPI Downloads Read the Docs

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.
ScenariosDescription
drawingIn scenarios involving multiple circular differential robots, each robot employs Reciprocal Velocity Obstacle (RVO) behavior to avoid collisions.
drawingA car-like robot controlled via keyboard navigates a binary map using a 2D LiDAR sensor to detect obstacles.
drawingEach robot employing RVO behavior is equipped with a field of view (FOV) to detect other robots within this area.
drawingA car-like robot navigates through the randomly generated and moving obstacles

Prerequisite

  • Python: >= 3.7

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') # 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 height 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 irsim/usage

Academic Cases

Acknowledgement

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc