# Create Own Python Robotics Simulator

This guide is for creating own Python Robotics Simulator using pygames

# DISCLAIMER

This Create Own Python Robotics Simulator using pygames course is a small initiative for stepping towards AI and use of most widely popular computer language PYTHON for everybody who are involve in robotics in our country and are just wandering with embedded system and mechanics .

I hope to collaborate with you

Santosh Dahal

(adsbygoogle = window.adsbygoogle || []).push({});

# What is robot simulator ?

The digital version of your robot inside computer , where you can operate , test your algorithm before using on real robot .

Wikipedia

A robotics simulator is used to create application for a physical robot without depending on the actual machine, thus saving cost and time. In some case, these applications can be transferred onto the physical robot (or rebuilt) without modifications.

# Open source simulators

breve: a 3D-world multi-agent simulator in Python.

EZPhysics: Combination of Ogre3D and ODE physics, GUI exposes all of ODE's objects data, network closed loop remote control optionally via Matlab/Simulink.

Khepera Simulator an open-source Windows simulator for the Khepera robot predating Webots.

Klamp't : a simulator introduced in 2013 specializing in stable trimesh-trimesh contact. Supports legged locomotion and manipulation.

LpzRobots: a 3D-physics robot simulator developed at the University of Leipzig.

miniBloq: This robot programing software for Arduino boards has a new simulator.

Moby: a rigid-body dynamics library written in C++.

OpenSim Simulator for articulated and wheeled robots with a wide range of characteristics. Further development stopped in the year 2006.

Robotics Toolbox for MATLAB is Free Software that provides functionality for representing pose (homogeneous transformations, Euler and RPY angles, quaternions), arm robots (forward/inverse kinematics, dynamics, simulation, animation) and mobile robots (control, localisation, planning and animation).

ARTE A Robotics Toolbox for Education (ARTE) is a Free Software educational tool based on Matlab. It provides functions to represent position and orientation. As well, includes functions to simulate robotic arms (direct/inverse kinematics, dynamics, path planning and more). The toolbox includes a large set of 3D robotic models that can be viewed and simulated inside a robotic cell.

Simbad 3d Robot Simulator Java based simulator

SimRobot: A robot simulator software package developed at the Universität Bremen and the German Research Center for Artificial Intelligence.

Stage: 2.5D simulator often used with Player to form the Player/Stage system. Part of the Player Project

STDR Simulator A simple, flexible and scalable 2D multi-robot simulator for use within Robot Operating System.

(adsbygoogle = window.adsbygoogle || []).push({});

UCHILSIM: A physics based simulator for AIBO Robots introduced in RoboCup 2004.

UWSim : an UnderWater SIMulator for marine robotics research and development which incorporates sensor, dynamic and physics simulation.

# What are benefits of own robot simulator ?

There are other simulator around like ROS , V-REP. They consist of high level of abstraction and own hardware which are expensive . By using this simulator you can make your robot intelligence with help of your own computer.

This course is designed as a guide for all the robotics enthugist outside there who are interested for making their robot intelligence and get yourself updated with robotics trends and technology.

# Requirement and Resource

This guide requires basic understanding of python . You can check yourself at learn python programming for robotics

All the code are found at : Github .

# Getting started

# 1. Download Code

Download or clone the GitHub repository Download .

If you downloaded the zipped version, unzip the directory somewhere you can access it.

# 2. Installing python

This simulator work with python 2.7.X.

# Linux, BSD and Unix users

You are probably lucky and Python is already installed on your machine. To test it type python on a command line.

If you have to install Python, just use the operating system's package manager or go to the repository where your packages are available and get Python.

# Windows users

Python doesn’t come prepackaged with Windows.

  1. Go to Python Download page .
(adsbygoogle = window.adsbygoogle || []).push({});
  1. Download python 2.7.x version
  2. Double-click the icon labeling the file python-2.7.x.exe.

# 3. Running code

In order to run code , Just move to code directory and type

python filename.py
1

# Topics Covered

# Basic GUI application on python

You will be able to create basic GUI application after finishing basic chapter.

# Basic Math and Physic usage

Do you wonder "Where we can apply Math and Physic , that we study ?". This course give you the usage of math and physic.

# Machine Learning and AI

This course implement different AI algorithms , this will sure give you the understanding of general AI and Machine learning

# Embeeded System interfacing

You will learn to interface physical robot into simulated environment .

# Basic Terms

# Python

Python is an interpreted high-level programming language for general-purpose programming. Created by Guido van Rossum and first released in 1991, Python has a design philosophy that emphasizes code readability, notably using significant whitespace.

# Pygames

Pygame is a cross-platform set of Python modules designed for writing video games. It includes computer graphics and sound libraries designed to be used with the Python programming language

# PIP

pip is a package management system used to install and manage software packages written in Python. Many packages can be found in the default source for packages and their dependencies — Python Package Index. Python 2.7.9 and later, and Python 3.4 and later include pip by default

# OOP

Object-oriented programming is a programming paradigm based on the concept of "objects", which may contain data, in the form of fields, often known as attributes; and code, in the form of procedures, often known as methods.

(adsbygoogle = window.adsbygoogle || []).push({});

# Trigonometry

Trigonometry (from Greek trigōnon, "triangle" and metron, "measure") is a branch of mathematics that studies relationships involving lengths and angles of triangles.

# Probability

Probability is the measure of the likelihood that an event will occur. See glossary of probability and statistics. Probability quantifies as a number between 0 and 1, where, loosely speaking, 0 indicates impossibility and 1 indicates certainty.

# Artificial Intelligence

Artificial intelligence, sometimes called machine intelligence, is intelligence demonstrated by machines, in contrast to the natural intelligence displayed by humans and other animals.

# Localization

Robot localization is the process of determining where a mobile robot is located with respect to its environment. Localization is one of the most fundamental competencies required by an autonomous robot as the knowledge of the robot's own location is an essential precursor to making decisions about future actions

# Path-planning

Path-planning is an important primitive for autonomous mobile robots that lets robots find the shortest – or otherwise optimal – path between two points. Otherwise optimal paths could be paths that minimize the amount of turning, the amount of braking or whatever a specific application requires. Algorithms to find a shortest path are important not only in robotics, but also in network routing, video games and gene sequencing.

# Dijkstra's algorithm

Dijkstra's algorithm is an algorithm for finding the shortest paths between nodes in a graph, which may represent, for example, road networks

# RRT Path Planning

A rapidly exploring random tree is an algorithm designed to efficiently search nonconvex, high-dimensional spaces by randomly building a space-filling tree.

# Machine learning

Machine learning is a field of artificial intelligence that uses statistical techniques to give computer systems the ability to "learn" from data, without being explicitly programmed.

# Dead Reckoning

In navigation, dead reckoning is the process of calculating one's current position by using a previously determined position, or fix, and advancing that position based upon known or estimated speeds over elapsed time and course.