<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">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/~johannb/Papers/umbmark.pdf" target="_blank">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">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">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">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">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">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">DPRGlist@lists.dprg.org</a><br>
          <a href="http://lists.dprg.org/listinfo.cgi/dprglist-dprg.org" rel="noreferrer" target="_blank">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">DPRGlist@lists.dprg.org</a>
<a href="http://lists.dprg.org/listinfo.cgi/dprglist-dprg.org" target="_blank">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">DPRGlist@lists.dprg.org</a><br>
<a href="http://lists.dprg.org/listinfo.cgi/dprglist-dprg.org" rel="noreferrer" target="_blank">http://lists.dprg.org/listinfo.cgi/dprglist-dprg.org</a><br>
</blockquote></div>