View License

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

» Watch video

Highlights from
Ray Casting for Implementing Map based Localization in Mobile Robots

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

3.66667
3.7 | 4 ratings Rate this file 10 Downloads (last 30 days) File Size: 58.8 KB File ID: #36892 Version: 1.1
image thumbnail

Ray Casting for Implementing Map based Localization in Mobile Robots

by

 

29 May 2012 (Updated )

The code is an efficient implementation of ray casting used to obtain simulated range measurements.

| Watch this File

File Information
Description

The code returns simulated range measurements for a robot with a range sensor placed in a known environment. It implements Ray Casting which is an important step for performing Map based localization in Mobile robots using state estimation algorithms such as Extended Kalman Filters, Particle Filters (Sequential Monte Carlo), Markov Localization etc.
The inputs to the castrays.m function are the Robot position, map of environment as logical matrix (Free space = 0, Obstacles = 1), Number of rays to cast, Range of LIDAR in cm.
The function can be used in performing simulations for Mobile robot Localization or for computing importance weights/Measurement probabilities for actual localization.

Required Products MATLAB
MATLAB release MATLAB 7.10 (R2010a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (8)
09 Jun 2016 Goitom Tesfay

Very help full site. Thank-you Very much for your help.

Comment only
01 Feb 2016 fugoide

thank you very much for the script. it is very useful but I need something more real timed. Could you please uplaod your new version? Thank you.

01 Feb 2016 fugoide  
31 Aug 2015 mustafa tanis

Whenever I try to run the code, I get "castrays requires more input arguments" error. I don't know how I can solve it

15 Feb 2014 Chuck

Chuck (view profile)

Hello,

Whenever I try to run the code, I get "castrays requires more input arguments" error. I don't know how I can solve it.

Thanks.

Comment only
04 Jun 2013 Gloria

Gloria (view profile)

 
20 Jun 2012 Jong-Hwan Kim

Jong-Hwan Kim (view profile)

Hi could you upload your faster model? Thanks

Comment only
02 Jun 2012 Shikhar Shrestha

I have a new optimized version of this code which is much faster and runs almost real-time with a particle set of around 2000 particles. Its can precast on the sample map in 20 minutes at 1 pixel resolution. Do comment if anyone is interested and I will upload the file!

Comment only
Updates
08 Jun 2012 1.1

Corrected a minor error in the code. The upper bound of the for loop has to be n (number of scan lines).

Contact us