8
$\begingroup$

A little background of my aim

I am in the process of building a mobile autonomous robot which must navigate around an unknown area, must avoid obstacles and receive speech input to do various tasks. It also must recognize faces, objects etc. I am using a Kinect Sensor and wheel odometry data as its sensors. I chose C# as my primary language as the official drivers and sdk are readily available. I have completed the Vision and NLP module and am working on the Navigation part.

My robot currently uses the Arduino as a module for communication and a Intel i7 x64 bit processor on a laptop as a CPU.

This is the overview of the robot and its electronics:

overview of the robot electronics of the robot


The Problem

I implemented a simple SLAM algorithm which gets robot position from the encoders and the adds whatever it sees using the kinect (as a 2D slice of the 3D point cloud) to the map.

This is what the maps of my room currently look like:

what a map looks like of my room Another map my room

This is a rough representation of my actual room:

enter image description here

As you can see, they are very different and so really bad maps.

  • Is this expected from using just dead reckoning?
  • I am aware of particle filters that refine it and am ready to implement, but what are the ways in which I can improve this result?

Update

I forgot to mention my current approach (which I earlier had to but forgot). My program roughly does this: (I am using a hashtable to store the dynamic map)

  • Grab point cloud from Kinect
  • Wait for incoming serial odometry data
  • Synchronize using a time-stamp based method
  • Estimate robot pose (x,y,theta) using equations at Wikipedia and encoder data
  • Obtain a "slice" of the point cloud
  • My slice is basically an array of the X and Z parameters
  • Then plot these points based on the robot pose and the X and Z params
  • Repeat
$\endgroup$
1
$\begingroup$

Is this what would be expected: in principle yes. Although you may be able to improve your odometry model, in general it is not enough to get a good map. Without a description of your system its difficult to say how to improve it. On most systems translation estimation is better than rotation. You could add a gyro and measure the rotation. This should improve your results significantly.

Instead of implementing a particle filter yourself, you could use a SLAM implementation e.g. from openslam. This should save you a lot of time, and will most likely give better results.

$\endgroup$
  • $\begingroup$ You make me feel better by saying thats expected :D, but I am really confident that my odometry is very good, (specially my rotation :D). I have added an update that briefly describes the system, (if thats not enough, I can give you code or any other information). I shall try using a gyro tomorrow and then update the results. I would love to use openslam's algorithms, but I am using C# (so that I can use the official SDK), and most libraries for such tasks are either in C++ or are provided in ROS (linux only). I would certainly love to use them but I just don't see sharp! $\endgroup$ – Shreyas Kapur Jun 11 '13 at 14:50
  • $\begingroup$ tinyslam claims to use 200 lines of c code. I guess porting it to c# shouldn't be so hard. $\endgroup$ – Jakob Jun 12 '13 at 15:53
  • $\begingroup$ Wow! But I guess it does not use any particle filter and does the same thing that i'm doing. But I will surely try to implement that. Thanks a lot :-) $\endgroup$ – Shreyas Kapur Jun 12 '13 at 16:42
1
$\begingroup$

I'd suggest that you try particle filters/ EKF.

What you currently do:

--> Dead Reckoning: You're looking at your current position without any reference.

--> Continuous Localization: You roughly know where you are in the map.

If you don't have a reference and don't know where you are on the map, regardless of what actions you take, you will find it dificult to obtain a perfect map.

For example: You're in a circular room. You keep moving forward. You know what was your last move. The map which you get will be that of a straight box like structure. This will occur unless and until you have some way to localize or to know where are you precisely on the map, continuously.

Localization can be done via EKF/Particle Filters if you have a starting reference point. However, the starting reference point is a must.

$\endgroup$
  • $\begingroup$ Thanks for the answer, very nice example indeed, I will surely use EKF, but the problem is I am not bad at math, but not very good also, and I am using C#, so I don't have any libraries and implementing it myself will take me ages. Any suggestions on that? $\endgroup$ – Shreyas Kapur Jun 12 '13 at 14:06
  • $\begingroup$ It would be far better to brush up on your math and take a few courses than to make something which you don't understand and cannot debug. Learn it and implement it. It will definitely be of use in the future. $\endgroup$ – Naresh Jun 12 '13 at 14:44
  • $\begingroup$ Also look for C# implementations on github. The work is more popular than it looks. $\endgroup$ – Naresh Jun 12 '13 at 15:02
  • $\begingroup$ Thanks for the suggestions, will surely do it tomorrow. I am trying my best to learn the math, and hope to do it and am sure that it'll go a long way. I am 13 years old which is the bottleneck for learning here, we haven't even been introduced to matrices at school! :-( $\endgroup$ – Shreyas Kapur Jun 12 '13 at 16:41
  • $\begingroup$ I know that you're 13 :) The internet cares not. You can pick up matrices from Khan Academy. Probability and Statistics as well. $\endgroup$ – Naresh Jun 12 '13 at 16:47
1
$\begingroup$

Because you are using dead reckoning the errors in estimating the pose of the robot accumulate in time. From my experience, after a while, dead reckoning pose estimation becomes useless. If you use extra sensors,like Gyroscope or Accelerometer the pose estimation will improve but since you have no feedback at some point it will diverge as before. As a result, even if you have good data from the Kinect, building an accurate map is difficult since your pose estimation is not valid.

You need to localize your robot at the same time as your try to build your map (SLAM!). So as the map is being created, the same map is also used to localize the robot. This ensures that your pose estimation will not diverge and your map quality should be better. Therefore I would suggest to study some SLAM algorithms (i.e. FastSLAM) and try to implement your own version.

$\endgroup$
  • $\begingroup$ Thanks for your answer :-). I do realize that dead reckoning is erroneous but the map I built was at a very small scale. I moved the robot slowly and slowly to minimize as much error as possible, the robot didn't move much. I actually have studying a lot of SLAM algorithms from openslam, but as I said to Naresh, "I am not bad at math, but not very good also, and I am using C#, so I don't have any libraries and implementing it myself will take me ages." Any suggestions on that? $\endgroup$ – Shreyas Kapur Jun 12 '13 at 14:10
  • $\begingroup$ Do you do any post processing with the Kinect data? It is possible that data contains some noise and if you let it untreated it could invalidate your map. Try to make the problem simple. Let the robot stationary and map the walls ahead of it. How does it work now? If the map is clear then it means the problem happens because of the movement. If not, then the problem is much more fundamental. $\endgroup$ – Demetris Jun 13 '13 at 5:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.