Anyone helps me with SLAM?

Post your NXJ projects, project ideas, etc here!

Moderators: roger, 99jonathan, imaqine

Anyone helps me with SLAM?

Postby ljw7630 » Mon Feb 06, 2012 10:16 pm

Hi

I'm new in robotics, and I'm planning implement SLAM, for me, it looks like
lejos.robotics.localization
lejos.robotics.mapping
lejos.robotics.navigation
lejos.robotics.objectdetection
lejos.robotics.pathfinding

these packages already provide enough implementation, but I have problems in putting it altogether.

Can someone describe the sequence of a simple slam application might need? Any recommend reading or sth?
also, I have a problem in understanding using tachocount to get direction.

Thanks a million.

Jinwu
ljw7630
New User
 
Posts: 7
Joined: Sun Jan 29, 2012 1:09 pm

Re: Anyone helps me with SLAM?

Postby kc123 » Mon Feb 13, 2012 9:40 pm

Using LeJOS for SLAM

Now, at first glance, the LeJOS seems to offer something close to SLAM capability. LeJOS supports both localization (Monte Carlo Localization) and mapping (line maps, sensor reading) libraries. However, if you look at the LeJOS API, you would realize the map is line based map, while the sensor is providing a distance measurement. This means there is no easy way of converting distance sensor readings into line map (which is used by MCL); and you really cannot combine LeJOS's localization and mapping libraries that easy.

For my implementation, I implemented my own occupancy grid map, and hook that into LeJOS’s Monte Carlo Localization code (the interface for that is really well designed, kudos to whoever designed it). It’s easier said than done because LeJOS’s implementation uses a different sensor and motion model, plus the sampling algorithm is wrong, so I ended up re-rewrite a major portion of the algorithm .

Before I offer more help, one thing to consider is that SLAM is a pretty challenging topic. Do you think you have sufficient computer science and mathematics background to tackle this challenge? Some of the topic you need to know including Kalman filter, statistic sampling, conditional probability, bayes filter, and sensor /motion modeling. If you think this is too difficult, I would recommend re-scoping your project.

-Kevin
kc123
New User
 
Posts: 13
Joined: Mon Oct 31, 2011 12:52 am

Re: Anyone helps me with SLAM?

Postby ljw7630 » Wed Feb 15, 2012 12:01 am

Hi Kevin,

Thanks for your detailed reply.

As you mention above, I do trying to convert Ultrasonic reading to line map, my plan is: let robot do random move in an environment, record all rangereadings and related robot position, and assuming the start position is in the middle of the screen, and the screen is a huge map, I can calculate all points' (x,y) coordinate, and link the neighbour two points in each rangereadings(to construct a line map). By doing so I create a simple but not that good map to feed into MCL given by lejos, is that enough for simple localization?(Assuming that the environment only has wall and no other objects)

the topics you given are really shocking.. It just an extended feature of my project, but I would like to try... I did some research, but didn't find any systematic way of implementation. Do you have any step by step readings recommend? Or any good resource you think is helpful? Thank you in advance.

Jinwu
ljw7630
New User
 
Posts: 7
Joined: Sun Jan 29, 2012 1:09 pm

Re: Anyone helps me with SLAM?

Postby ljw7630 » Wed Feb 15, 2012 12:47 am

In terms of complexity of probability, bayes filter, EKF, I think the algorithm is there. If I find a good way to represent the data, then it's easy to feed into the algorithm to generate result, am I correct? Or I just too naive?
ljw7630
New User
 
Posts: 7
Joined: Sun Jan 29, 2012 1:09 pm

Re: Anyone helps me with SLAM?

Postby kc123 » Wed Feb 15, 2012 9:01 pm

I can certainly help you to get started. When I first look into SLAM, I thought it’s a fascinating topic. It took me two graduate classes (Robotics and Bayesian network) to have a working implementation.

The best resource I found is the following book “The Probabilistic Robotics” from the MIT Press. It explains the background theories for understanding the SLAM algorithm. The downside is the book tends to be more abstract and theoretical based.

Another good resource is “SLAM for Dummies”, if you type in Google you can find and download the PDF online. It is a more hands on approach and explain the implementation details (it even included source code).
kc123
New User
 
Posts: 13
Joined: Mon Oct 31, 2011 12:52 am

Re: Anyone helps me with SLAM?

Postby kc123 » Wed Feb 15, 2012 9:10 pm

Getting Started with SLAM

The basic idea behind SLAM is to have a feedback loop to use sensor reading to improve robot’s position, and use improved robotic position to update the sensor reading.

Sensor->Update Environment Representation->Update Robot’s Position -> repeat the steps

In the LegoNXT case, your sensor is the ultrasonic sensor. You would extract the lines to get a line based environment map. then use Monte Carlo Localization to re-estimate robot’s position. <- here are the steps you are looking for :D

That approach might be ok, but the main problem is errors in your map will accumulate over time. Comparing to a standard version SLAM using Kalman Filter SLAM or particle approach SLAM, the algorithms will correct errors in the map. But this is a descent starting point.
kc123
New User
 
Posts: 13
Joined: Mon Oct 31, 2011 12:52 am

Re: Anyone helps me with SLAM?

Postby kc123 » Wed Feb 15, 2012 9:19 pm

Anyway, let me point out the first problem you will likely encountered…ultrasonic sensor sucks. It tends to produces a lot noises. Actual even worse than noise, it tends to get phantom readings in a cluttered environment (due to how sound wave can bounce around between objects in the environment). So a naïve, connecting the dots approach is not going to work well.

However, it is possible to use RANdom Smple Consensus (RANSAC) algorithm (http://en.wikipedia.org/wiki/RANSAC) to estimate lines from noisy measurement.
kc123
New User
 
Posts: 13
Joined: Mon Oct 31, 2011 12:52 am

Re: Anyone helps me with SLAM?

Postby ljw7630 » Thu Feb 16, 2012 9:38 pm

Thanks for your patient, Kevin. I will start diving into the resource you suggest.
ljw7630
New User
 
Posts: 7
Joined: Sun Jan 29, 2012 1:09 pm

Re: Anyone helps me with SLAM?

Postby Aswin » Fri Feb 17, 2012 1:02 pm

kc123 wrote:Anyway, let me point out the first problem you will likely encountered…ultrasonic sensor sucks. It tends to produces a lot noises. Actual even worse than noise, it tends to get phantom readings in a cluttered environment (due to how sound wave can bounce around between objects in the environment). So a naïve, connecting the dots approach is not going to work well.

However, it is possible to use RANdom Smple Consensus (RANSAC) algorithm (http://en.wikipedia.org/wiki/RANSAC) to estimate lines from noisy measurement.


Hi,

To my experience the ultrasonic sensor does not produce a lot of noise. It has its occasional illegal reading (255) but this can be filtered out quite easily with a median filter. Phantom readings will only occur when getting an array of distances from the sensor. When getting a single distance this is not a problem as this returns the shortest distance and this is not from a bounced wave. So phantom readings can also be avoided.

There is one other problem with the US sensor though. It's beam is very wide, I think something like 30 degrees. You get the shortest distance within this angle. As a result objects that are straight seem bent when plotted. See this image that represents a circular scan of the environment with a US sensor. The inner arcs you see are actually straight objects. The outer arcs represent the maximum range of the sensor, these are not objects.Image

As the main problem of the US sensor is not noise I do not think the RANSAC algorithm will produce useful results with the US sensor.
My NXT blog: http://nxttime.wordpress.com/
Aswin
Active User
 
Posts: 122
Joined: Tue Apr 26, 2011 9:18 pm
Location: Netherlands


Return to NXJ Projects

Who is online

Users browsing this forum: Google [Bot] and 0 guests

more stuff