Virtual Robot

Virtual simulation personally developed for testing code designed to run the iRobot used in the CS101 introductory class at George Mason University. Project began from the idea of testing code without direct access to the iRobot. This was a way to ease the process of working with a group and having been assigned only one robot.

The Virtual Robot:


Environment:
The virtual environment allows the iRobot to be placed on a floor where it could freely execute the code dictating its movements. Boxes and walls can be placed alongside the robot for interactive purposes and for creating obstacles like a maze.

How Does It Work:

Mapping:
The way that this idea is implemented is by borrowing the original create.py headers for each function and mapping them to the equivalent functions of the virtual iRobot. This allows the virtual create.py module to function as the original and can be imported as such.


Examples:

Trace and Maze:
The trace and maze examples provide ideas for what exactly can be tested with this simulator. The trace example shows the use of Tkinter’s Turtle module drawing the approximated path of the robot. The maze example tests the robot’s IR and bump sensors against virtual walls and obstacles.



How To Use:

Requirements: PyGame,
Python 2.5-2.7 (not python 3.x), iRobot source code

  1. Unzip the download and locate the create.py file and VR folder inside.
  2. Place the virtual create.py file along with the VR folder into your iRobot source code directory.
  3. Compile your code to .pyc and run your byte code with python.
  4. The Virtual Environment window should come up and you should place your virtual roomba by using the ‘Environment’ drop down menu or the shortcut key ‘r’.
  5. Place any additional environment objects onto the environment
  6. Play the simulation by using the ’emulator’ drop down menu or the top right play/pause button.


Download:
Virtual Robot V1.3  beta 1/26/12
Virtual Robot V1.2

Dependencies:
PyGame 32bit
(Please download and install this first)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

www.000webhost.com