<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Fellow itinerant dabblers and madmen:</p>
<p>The jBot outdoor robot uses a 3 axis magnetometer as a sort of 3D
compass, so that it doesn't have to remain level, as part of the
Kalman filter that fuses the gyros and accelerometers. It works
remarkably well, and for all practical purposes it eliminates the
odometry drift in theta, the robot's heading. The Holy Grail.<br>
</p>
<p>The RCAT robot doesn't use a magnetic heading sensor. In fact,
it really doesn't use the CH6 IMU at all, but rather only the
IMU's raw Z axis rate gyro. The robot does the rest of the
processing.<br>
</p>
<p>Basically it is sampling the rate gyro every time it generates a
wheel odometry-based theta measurement. Here's a graph showing
the rate of the wheel theta in blue and the sampled gyro rate
(scaled) in red. The robot is driving back and forth between two
way points.<br>
</p>
<p><a class="moz-txt-link-freetext" href="http://www.geology.smu.edu/dpa-www/robo/rcat/wheel_and_gyro_theta_rate.png">http://www.geology.smu.edu/dpa-www/robo/rcat/wheel_and_gyro_theta_rate.png</a></p>
<p>That is the value that gets integrated to produce the robot's
heading. It's the heading, the accumulated theta, that drifts
over time and needs correction, whether gyro or wheel generated. <br>
</p>
<p>My observation was that most buildings are orthogonal with rooms
and hallways organized at right angles and rectangular with
corners. So the idea is that such corners could serve as
landmarks where the robot could learn what the X/Y coordinates
were and how far away the two walls are using it's sonar, and
subsequently use that landmark to correct odometry errors.</p>
<p>The new algorithm for aligning with the wall scans along in the
direction of the shorter of the two sonars looking for two
readings that are equal, to a tenth of an inch. When it finds
that it scans left and right 5 degrees to see if the surface is
really flat and the robot is really normal to it. Else it's
rejected, and a new search started in a different location.
The algorithm also monitors for the left/right oscillations that
signal the robot is trapped in a local minimum, like when it's
pointed into a corner, and again starts a new search. If the
surface is flat and the robot is normal to it, the robot's theta
is corrected to the normal angle, and the distance X or Y is read.<br>
</p>
<p>In the RCAT video there was only one landmark, made with my
office door as one wall and some cardboard taped to a desk leg for
the other. The robot is first initialized in that corner, so it
squares up with and measures the distance to the two walls, and
saves the location and distances. Then it runs around for a
while. It could be doing any task, collecting soda cans or
whatever. In this video it is doing perimeter following. After a
while --- 3 minutes in the video --- a timer expires and the robot
stops whatever it is doing and enables navigation with the nearest
(in this case the only) landmark as it's destination.</p>
<p>When it gets to the landmark, it again squares up and measures
the distance to the two walls, and uses that to correct it's
location and theta, as compared to the saved values. If it's off
less than 6 inches, meaning the waypoint is underneath the robot,
it makes a happy sound. If it's off more than 12 inches, it makes
a sad sound and recalibrates the Z axis rate gyro, which takes
about 5 seconds. In the video the robot does this sequence
several time, alternating left and right (and random) perimeter
following.<br>
</p>
<p>Here is a similar video except I also let the robot run out into
the hallway. The whole thing takes place inside of a 30x40 foot
bounding box, also implemented with odometry, to keep the robot
from wandering off. <br>
</p>
<p> For some reason my web server has stopped streaming video, so
you have to wait on a down load in order to view it. <br>
</p>
<p><a class="moz-txt-link-freetext" href="http://www.geology.smu.edu/dpa-www/robo/mpeg/rcat-odom-01.mpg">http://www.geology.smu.edu/dpa-www/robo/mpeg/rcat-odom-01.mpg</a></p>
regards,<br>
dpa
<p><br>
</p>
<div class="moz-cite-prefix">On 05/16/2020 09:19 PM, Karim Virani
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAKtnkizE9bakmGF2NWb7CkM5yAXF5420JwUBh4FPhvEsZyvoJg@mail.gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div dir="ltr">Hey Murray,<br>
<br>
In my earlier forays into robotics I was similarly fixated on
compass heading. Even for indoor situations. I've been down that
road and learned a bit through my failures. In a purely
pragmatic way I would say give up now. Learn from the pain of
those who have traveled before you. Turn back from this mire.<br>
<br>
I haven't noticed anything that indicates whether you are
thinking indoor vs. outdoor. But simply by the scale of the
robots you are working on I'll assume indoors. Indoors is an
untrustworthy environment for working with a mems compass or any
kind of compass really. Even if you have it on a mast. This is
why I advise turning off the compass of the BNO055. All it can
really do is inject uncertainty into the system. Transient
anomaly filtering is usually good. But what if your robot comes
to rest in an anomaly or just spends some time there? Can you
predict how that will challenge the sensor's fusion? Do you have
map of the anomalies in your space? Can you take the time to
build one?<br>
<br>
Magnetic heading is also pretty much not helpful indoors. How
exactly does it help you to navigate knowing which way the robot
is pointed vs. the magnetic north and south poles of the planet?
Heading is important, but one based on an arbitrary local
coordinate system is more than enough. And from that point a
good imu and good odometry are enough to carry you a long way.
Get these capabilities thoroughly implemented and you'll have a
good sense of where you are relative to your starting point.
This still has nothing to do with navigation, just relative
location history.<br>
<br>
Over the longer term (minutes vs. seconds), correction of drift
can happen by referencing known landmarks or using a positioning
system. Methods and technologies abound for various
environments. Have fun spending money exploring these - I do.
But I wouldn't recommend going down that road until I had decent
location history implemented and thoroughly tested.<br>
<br>
It didn't appear as if David's RCAT used any of the sonic
landmarks in the room to correct drift during the run? It does
look like it used the corner it started in to calculate the
final X & Y drift. If it achieved that accuracy without
correction on carpet over that duration, then he has an
extremely dialed in solution. Kinda like we expect, but that
doesn't make it any less impressive. I'd like to hear if a
compass was used, necessary or even helpful in that test.<br>
<br>
Outside is different. Especially for drones and ships. Even with
a goodly mast, I'd still be cautious with a compass on a small
rover - though modern IMU's have fairly good secret sauce for
filtering anomalies. And outdoors "compass" heading is quite
relevant. Though latitudes, longitudes, headings and bearings
are relative to the current rotational axis of the earth
(maybe/probably still measured celestially - let's not get into
a precession discussion) and not the faster drifting magnetic
axis. But hey, we are outside. Why not look into GPS at this
point? Most code libraries tagged as "navigation" kind of assume
they are being used in an outdoor context and with access to GPS
data.<br>
<br>
Every bit of the universe is moving with respect to every other
bit. The point is we can arbitrarily choose the coordinate
system that has the most practical value and support behind it
for our application. Indoors you don't need to worry about great
circles and the obliquity of the earth. Most of us are happy to
just get around that next corner. It's a different problem and
can have a simpler solution. Indoors, figure out where you are
and then calculating heading to where you want to be is just
Trig.<br>
<br>
Now with all that said. Ignore my earlier advice. Don't be the
burnt (or should I say sodden) and hopeless victim of the
compass like I am. Be its ruler. Become the first person to use
indoor magnetic anomalies to improve a SLAM algorithm...<br>
<br>
Cheers, Karim<br>
ps. strike everything I've said and do what you want. These are
just the random mutterings of an itinerant dabbler and madman.<br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sat, May 16, 2020 at 4:36
PM David Anderson via DPRGlist <<a
href="mailto:dprglist@lists.dprg.org" moz-do-not-send="true">dprglist@lists.dprg.org</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p>Howdy DPRG,</p>
<p>Maybe it's not clear that the video of RCAT I showed at
the monthly meeting is actually a superset of the four
corners contest methodology to which Doug refers.
Sometimes things are not as obvious as I think they are.
To wit:</p>
<p>The four corners contest is actually the University of
Michigan Bench Mark (UMBmark) odometry calibration method
developed by J. Borenstien. <br>
</p>
<p><a
href="http://www-personal.umich.edu/%7Ejohannb/Papers/umbmark.pdf"
target="_blank" moz-do-not-send="true">http://www-personal.umich.edu/~johannb/Papers/umbmark.pdf</a></p>
<p>The concept is to drive around a large square, clockwise
and counter-clockwise, while tracking the robot's position
with odometry, and stop at the starting point and measure
the difference between the stopping point and the starting
point. This shows how much the odometry is in error and
in which direction, and allows calibration of the
odometry constants and also the potential difference in
size between the two wheels of a differentially driven
robot. The DPRG uses this calibration method as a
contest.</p>
<p>Here is a paper I wrote about how I used the UMBMark to
calibrate the RCAT robot as an example:<br>
</p>
<p><a
href="http://www.geology.smu.edu/dpa-www/robo/rcat/calibrate.html"
target="_blank" moz-do-not-send="true">http://www.geology.smu.edu/dpa-www/robo/rcat/calibrate.html</a><br>
</p>
<p>The video of RCAT I showed earlier this month does the
same thing except: 1) the route taken is MUCH longer than
a 10 foot square (hence the errors should be larger), 2)
the route taken involves many, many turns, not just four
nice ninety degree turns as in the contest, so again the
errors should be much larger, 3) the route taken is not
symmetrical, is different for each run, and is not known
in advance, 4) the robot itself measures the error
between the starting and ending point using it's sonars,
as Borenstien suggests in his paper, and 5) the robot
corrects its position and pose for the next run each time
after measuring those errors.</p>
<p>As I have opined before, robot contests are easy compared
to the real world!</p>
<p>So the robot is turned loose to do whatever tasks it has
been assigned, in the case of the video it was to do
perimeter following, and at the end of three minutes or
whatever the timeout is set for, it stops what it is doing
wherever it is and enables navigation to seek its way back
to the starting point, or to wherever it thinks the
starting point now is.<br>
</p>
<p>With those behaviors the RCAT robot can, after a three
minute run as seen on the video, return to within a few
inches of the starting point repeatedly. This means that
the locations that the robot is tracking during it's run
are accurate to within a few inches or less FOR THE ENTIRE
RUN. <br>
</p>
<p>In all humility this is virtuosic perfomance from that
little robot, which may not be apparent if one does not
understand what it is doing and what the implications
are. <br>
</p>
<p>cheers,</p>
<p>dpa</p>
<p><br>
</p>
<br>
<div>On 05/15/2020 02:18 PM, Doug Paradis via DPRGlist
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Murray,
<div> John's points are very valid. You can get a
feel for the accuracy needed on an indoor robot by
marking a point on your robot and the floor of your
test space. Travel a square that is 375 cm (~12 ft) on
side, with a total travel distance of 1500 cm (48 ft),
and mark where your robot ends on the floor using the
mark on the robot, and measure the distance it is off.
This is a short description of a DPRG Four Corner
contest (see: <a
href="https://www.dprg.org/wp-content/uploads/2018/09/four_corners-201804303.pdf"
target="_blank" moz-do-not-send="true">https://www.dprg.org/wp-content/uploads/2018/09/four_corners-201804303.pdf</a>).
Typical performance a winning robot is sub - 12 mm,
the 2nd and 3rd place robots sub - <a
href="http://75.mm" target="_blank"
moz-do-not-send="true">75.mm</a>. Often in the past
only encoders were used for navigation (i.e., no
gyro).Now usually a gyro is used for heading. Several
years ago John S. used a unique sonic trilateration
system to achieve a 17.5 mm error, at the time a club
record. Similar competitions by other clubs have about
the same outcomes. </div>
<div><br>
</div>
<div>Regards,</div>
<div>Doug P.</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, May 15, 2020
at 4:36 AM Murray Altheim via DPRGlist <<a
href="mailto:dprglist@lists.dprg.org"
target="_blank" moz-do-not-send="true">dprglist@lists.dprg.org</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px
0px 0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">Hi John,<br>
<br>
A one degree error may be two inches after ten feet,
but I'll be reading<br>
that heading continuously so over that ten feet
wouldn't things tend to<br>
balance out?<br>
<br>
I don't disagree but I think you may be missing my
ultimate point: that<br>
even with low accuracy a robot will still have "a
behaviour" and that is<br>
plenty good enough for my purposes, which are not
competitive but rather<br>
the exploration of an indoor environment using a
Behaviour-Based System,<br>
basically following along the research path set by
Rodney Brooks et al.<br>
<br>
I am aware of the difference between resolution and
accuracy, and having<br>
both a higher resolution and a higher accuracy would
improve the robot's<br>
ability to navigate accurately -- certainly -- and I'm
hardly against<br>
that; it's just that I'll be satisfied with much less.
As I described<br>
previously, something akin to a determining which
point on a 16 or 32-<br>
point compass rose is fine. If I can get better
accuracy I might explore<br>
navigating according to a bearing but I have no
requirement for that at<br>
this point. Maybe in the future... it's an interesting
journey either way.<br>
<br>
Cheers,<br>
<br>
Murray<br>
<br>
On 15/05/20 8:00 pm, John Swindle via DPRGlist wrote:<br>
> A quick note: A one-degree error is two inches
after ten feet. Not <br>
> good enough for small robot navigation unless
something is constantly <br>
> providing better pointing accuracy. Even for the
contests, if the robot<br>
> depends on that amount of error, it would miss
the goal in 6 Can, might<br>
> hit the cone in Square Dance, etc. Outdoors, the
accuracy has to be a<br>
> lot better. I think you will be very unhappy with
11.25 degree <br>
> resolution. And be careful that resolution and
accuracy are not the<br>
> same thing.<br>
> <br>
> Later,<br>
> John Swindle<br>
...........................................................................<br>
Murray Altheim <murray18 at altheim dot com>
= = ===<br>
<a href="http://www.altheim.com/murray/"
rel="noreferrer" target="_blank"
moz-do-not-send="true">http://www.altheim.com/murray/</a>
=== ===<br>
= = ===<br>
In the evening<br>
The rice leaves in the garden<br>
Rustle in the autumn wind<br>
That blows through my reed hut.<br>
-- Minamoto no Tsunenobu<br>
<br>
_______________________________________________<br>
DPRGlist mailing list<br>
<a href="mailto:DPRGlist@lists.dprg.org"
target="_blank" moz-do-not-send="true">DPRGlist@lists.dprg.org</a><br>
<a
href="http://lists.dprg.org/listinfo.cgi/dprglist-dprg.org"
rel="noreferrer" target="_blank"
moz-do-not-send="true">http://lists.dprg.org/listinfo.cgi/dprglist-dprg.org</a><br>
</blockquote>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
DPRGlist mailing list
<a href="mailto:DPRGlist@lists.dprg.org" target="_blank" moz-do-not-send="true">DPRGlist@lists.dprg.org</a>
<a href="http://lists.dprg.org/listinfo.cgi/dprglist-dprg.org" target="_blank" moz-do-not-send="true">http://lists.dprg.org/listinfo.cgi/dprglist-dprg.org</a>
</pre>
</blockquote>
<br>
</div>
_______________________________________________<br>
DPRGlist mailing list<br>
<a href="mailto:DPRGlist@lists.dprg.org" target="_blank"
moz-do-not-send="true">DPRGlist@lists.dprg.org</a><br>
<a href="http://lists.dprg.org/listinfo.cgi/dprglist-dprg.org"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.dprg.org/listinfo.cgi/dprglist-dprg.org</a><br>
</blockquote>
</div>
</blockquote>
<br>
</body>
</html>