Skip to main content

A simple python based Intelligent Robot Simulator fpr robot navigation and Learning

Project description

Intelligent Robot Simulator (IR-SIM)

Github Release License Download

IR-SIM is an open-source, lightweight robot 2D 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:

  • A versatile and easy-to-use framework for simulating a variety of robot platforms with kinematics and sensors.
  • Customizable configurations and parameters using yaml files.
  • Real-time visualization of simulation outcomes.
  • Ideal for developing and testing algorithms related to robot navigation, motion planning, reinforcement learning.
Robot Car
robot car

Prerequisite

  • Python: >= 3.7

Installation

  • Install this package from PyPi:
pip install ir-sim
  • 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

Cases

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.2.4.tar.gz (784.2 kB view hashes)

Uploaded Source

Built Distribution

ir_sim-2.2.4-py3-none-any.whl (799.2 kB view hashes)

Uploaded Python 3

Supported by

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