# How to detect loop in robot movement observing odometer data

I have some odometer data. This data are based upon robot movement. I can transfer those raw data to a motion equation from where I get x,y,and theta co-ordinate of a Robot. If I plot those x,y coordinate I get a path which show me robot movement. This path show me that the Robot move back and forth through a corridor. So there is a looping. Now how could I determine from the raw data which consist of forward and angular velocity that in a particular time stamp robot back to its previous position?

What is residual uncertainty in context of Robotics?

I think you are thinking in the wrong direction. Loop Closing techniques where invented (and are used) exactly for the reason that you cannot trust your odometry over a longer time.

Loop closing relies on being able to re-recognize a part of your world so you need a sensor that can sense the environment (e.g. a camera or a laser scanner). Your odometry cannot sense the environment so the robot has no way to know where it is globally.

• I have a odometer data which consist of Time, Forward Velocity and Angular Velocity. I have a sensor data which consist of Time, Correspondence number,range and bearing. After 600 timestamp my robot 1st encounter a landmark then it encounter same landmark after four consecutive time stamp. Then it go straight until next 100 timestamp. After that it observed a another landmark for 5 consecutive timestamp . Then it go straight until next 100 timestamp and then observed the1st landmark again and observed it 2 consecutive time stamp.Can I say that the robot come back to its previous position? Aug 1 '18 at 15:45
• Comments are not meant for new question, you can simply open a new one, if you want to add new sensors. Regarding your question, If your robot does not turn, some of your sensors are giving you wrong values. Aug 1 '18 at 16:18
• If the robot turn and the reading is consist of previous correspondence number does that mean the robot back to its previous position? Aug 1 '18 at 17:27
• If you observe the same landmark and your sensor range is not too big, then you are somehow close to where you started. What do you want to achieve? Aug 2 '18 at 6:57
• Actually I have 75000 timestamp for odometer data. As per graph slam every node is taken as it is a full slam problem. So it is impossible to inverse 75000*75000 matrix. So after some time if the robot came to its previous position then at that timestamp no new node introduce, I just update the previous node. In this way my number of node(pose) reduced. Aug 2 '18 at 7:24

I haven't heard of residual uncertainty in the context of robotics, but I would imagine what you're getting at is the fact that odometry data has an inherent amount of uncertainty because of minor variations in things like friction, wheel diameters, chassis weight distribution, variations in motor fabrication, etc.

The best that you could probably do would be to run some baseline tests to determine first how accurate your odometry estimates are. You should wind up with something like the KITTI odometry scores, where visual odometry and/or SLAM algorithms are scored on a percent error for translation and for rotation. The rotation scores are given there as error in degrees per meter.

Once you can quantify the performance of your odometry estimates, then you can begin to build a cone of uncertainty around your position estimate, just like weather forecasters do with hurricane projections.

For example, say your robot has a rotational error of one degree per meter and a translational error of 5 percent. At the end of one meter of travel, your robot could be anywhere between 0.95 to 1.05 m, and the heading could be anywhere from -1 to +1 deg. When you advance a second meter, you compound the estimates. You could have been at 0.95 meters, with a heading of -1 deg, and traveled another 0.95 meters. Or you could have been at 1.05 meters, with a heading of +1 deg, and traveled another 1.05 meters.

Depending on how detailed you want to get, you could analyze your odometry versus truth testing and find the standard deviation of your error, and then you could do 1, 2, and 3 $\sigma$ estimates for your cone of uncertainty.

Then, once any portion of your cone of uncertainty overlaps the start position, you must assume that you have completed a lap.