Several people are - or have been working on ways to implement optical SLAM on MAV's (I am trying to do this for my thesis as well).
OpenPilot is almost the perfect underlying flight control platform for such an attempt.
For that to work smoothly, the INS board needs to support one important feature, and that is means for external correction of its internal representation.
Assume an indoor environment where - in the worst case - GPS is unavailable and magnetic data gets highly unreliable, optical SLAM is the only save way of navigation. Or even worse - a mixed outdoor/indoor environment, like flying into caves or ruins where both magnetometers and GPS become unavailable during flight.
In such cases, a slam algorithm on an external board can provide the INS with external attitude, velocity and position data - already nicely translated to the openpilot reference frame - even with dynamic uncertainty data supplied for each of those on the fly. There's only one caveat:
SLAM is slow, the data supplied by it will be
1. relatively infrequent (between once every 10 or every 100 ms - like GPS or even longer)
2. outdated! Even more so than GPS, SLAM takes time. That starts with the image acquisition, optical filtering, feature detection, ... Takes between 10 and 100ms depending on hardware and calculation method.
To use this data I propose the following:
1. Introduce a (32bit INT)Timestamp in the AttitudeRaw object (and possible also AttitudeActual), that is simply an internal cycle counter of the INS algorithm in use.
2. Introduce a new object INSCorrection, which allows to feed correction data to the INS. It should contain the following fields:
Timestamp (uint32_t the corresponding timestamp when the external measurement was made)
delta-Attitude (quaternion q1,q2,q3,q4, (un)certainty)
delta-Velocity (X,Y,Z, (un)certainty(in each axis))
delta-Position (X,Y,Z, (un)certainty(in each axis))
Whenever the INSCorrection UAVObject gets updated the following should happen:
- The INS both knows the reference cycle count when the external measurement was made (T1) and its current internal cycle count (T2)
- Assuming that the gyroscope sensor works correctly, it can be assumed that the attitude error around all 3 axis is still the same in T2 as it was in T1 (plus an additional a per-cycle uncertainty factor depending on how long ago T1 was) so in the next update cycle, the attitude in time T2 corrected by the SAME delta-Attitude (rotational error) as supplied should be taken into account with a certainty derived from the supplied certainty reduced slightly by the age-uncertainty (difference between T1 and T2)
- The same goes for the velocity, which is basically an integration over accelerometers. Take the velocity in T2, apply the same correction, and include in the next cycle with the calculated total uncertainty
- position is a bit more tricky, since the assumption of "same error" doesn't necessarily hold. I propose two approaches:
1. simply correct the exact same way and just add the delta (hoping that as the velocity error approaches zero, so will eventually the position error over many SLAM based corections)
2. assume the velocity error had remained mostly constant, and calculate a corected position by
(current position - delta-Position - (deltaVelocity*(deltaTime)))
that too won't be perfect, but it at least allows a crude assumption regarding the additional error introduced since T1 - either way - and depending on the corection mechanism used, I would set the certainty decrease of this position "measurement" (or educated guess) over time much higher than for attitude and velocity.
So 2 questions:
1. Can this be implemented at all with the current INS approach?
2. Would you who are working on INS put that feature in please
It would not only allow SLAM, but for any external sensor data to be fed to the INS - like sonic/light distance sensors, radar distance, possibly pivot/airspeed, ..., ...,


Germany

United States
Luxembourg
United Kingdom







