View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Virtual Robot Demo

3.0 | 3 ratings Rate this file 7 Downloads (last 30 days) File Size: 20.7 KB File ID: #19723 Version: 1.0
image thumbnail

Virtual Robot Demo


Shawn Lankton (view profile)


25 Apr 2008 (Updated )

Test navigation algorithms in a virtual robot simulator

| Watch this File

File Information

This program demonstrates obstacle avoidance/navigation a simulated two-wheel robotics platform. I simulate the drive train with the differential steering model, which is simple, but very useful model for robotic actuation. This type of drive system can drive straight, trace an arc, and turn in place.
The simulated robot makes its way around a simulated environment represented by a .png file where black represents walls, and white represents flat, clear terrain. The “environment” a black and white image. For testing, I include an organic-looking obstacle course and an “office” with square walls and corners.

The simulated robot wanders around the environment and covers most of the area without hitting walls. This is accomplished with this algorithm:

   1. Go straight unless sensors are blocked
   2. If one sensor is blocked, turn away from it
   3. If both are blocked, turn towards the farthest
   4. Turn until both sensors are free
   5. Continue going straight (with random arcs)

Check this site for videos of the demo and more robotics, and computer vision projects.

[ ]

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.4 (R2007a)
MATLAB Search Path
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (5)
15 Aug 2016 nasma salam

I wip exicution this programe but the cours.png it do disply not whay?

Comment only
15 Oct 2012 Wern-Juin Choy

I have tried changing the code to add two robots instead of one. Struggling ... Any hints?

28 Feb 2010 shlomix

shlomix (view profile)

I like this code and I'm using the simulation within it as a to make an evolutionary nural network controler for a Khepera robot. For now on I found one bug:
In rangefinder function [dimy, dimx] = size(course); should be [dimx, dimy] = size(course); . It's not important for symmetrical PNG's but for nonsimetrical the robot is able to go through walls - nice but not desirable.

18 May 2008 jggg kjhh


14 May 2008 jia qing


Comment only
31 Mar 2016 1.0

Added BSD License

Contact us