Minimalistic optic flow sensors applied to indoor and outdoor visual guidance and odometry on a car-like robot

Here we present a novel bio-inspired optic flow (OF) sensor and its application to visual guidance and odometry on a low-cost car-like robot called BioCarBot. The minimalistic OF sensor was robust to high-dynamic-range lighting conditions and to various visual patterns encountered thanks to its M2APIX auto-adaptive pixels and the new cross-correlation OF algorithm implemented. The low-cost car-like robot estimated its velocity and steering angle, and therefore its position and orientation, via an extended Kalman filter (EKF) using only two downward-facing OF sensors and the Ackerman steering model. Indoor and outdoor experiments were carried out in which the robot was driven in the closed-loop mode based on the velocity and steering angle estimates. The experimental results obtained show that our novel OF sensor can deliver high-frequency measurements ( > 300 Hz ) in a wide OF range (1.5– 15 rad s − 1 ) and in a 7-decade high-dynamic light level range. The OF resolution was constant and could be adjusted as required (up to 0.05 rad s − 1 ), and the OF precision obtained was relatively high (standard deviation of 0.17 rad s − 1 with an average OF of 4.5 rad s − 1 , under the most demanding lighting conditions). An EKF-based algorithm gave the robot’s position and orientation with a relatively high accuracy (maximum errors outdoors at a very low light level: 0.95 m and 0.58 rad over about 32 m and 8 π rad ) despite the low-resolution control systems of the steering servo and the DC motor, as well as a simplified model identification and calibration. Finally, the minimalistic OF-based odometry results were compared to those obtained using measurements based on an inertial measurement unit (IMU) and a motor’s speed sensor.

Although standard cameras have been widely used in this context, they have often proved to be unsuitable for OF computation purposes, especially outdoors, because of their low dynamic range, their low frame rate and the high computational cost of the image processing. In addition, in camera-based VO and SLAM applications, small motion is usually assumed to occur between frames, which is often not the case, and a 'scale factor' is also required to convert the visual information (e.g. the OF) into metric measurements, which is often provided by other sensors [20,21]. These issues can be overcome by using high-dynamicrange, high-frame-rate cameras and stereo-vision systems, but these solutions require even larger computational resources and are too expensive for most robotic and automotive applications.
Ethological findings on insects have shown that complex navigation tasks, such as terrain following [22,23] (see [24] for a review), speed control [25] and odometry [26] are performed by many flying insects, such as flies and bees, on the basis of OF cues, although their compound eyes have a very poor spatial resolution in comparison with our modern high-resolution cameras. In addition, it has been behaviorally shown that nocturnal insects also use these OF cues for flight control in dim light conditions [27].
Custom-made bio-inspired visual sensors have therefore been developed using technologies of various kinds [28][29][30][31] in order to deal with the issues encountered with standard cameras. However, designing effective low-cost OF sensors is a real challenge, and additional information given by other sensors or based on assumptions about the environment is still required to convert the OF to distance and/or velocity values. In addition, OF alone is generally thought to be unsuitable for VO purposes when working in complex environments where the sweeping angular speed between the sensor and the objects that induce the OF is subjected to sharp, large variations, especially in the presence of occluded objects [20,21].
Visual odometry for mobile robots and automobiles has been recently developed using downwardfacing standard cameras [32][33][34][35][36] and optical mice [37][38][39], as well as custom-made OF sensors [40,41], since the visual patterns and light conditions encountered in this way are relatively uniform, and the distance between the sensors and the ground usually changes slightly. In most cases, the authors used the car-like non-holonomic constraint to estimate the vehicle's position and orientation using simple methods involving low computational costs.
However, solutions based on standard cameras [33,36] still fail to cope with high-dynamic-range lighting conditions, as well as being impeded by the low frame rate and the high computational cost of the image processing: only a narrow range of low velocity measurements can often be obtained using this approach.
Solutions based on optical mice [37,39] are certainly very cheap and deliver high-frequency measurements, but their main disadvantage is that they have to operate very near the ground to be able to work properly, and are therefore unsuitable for use in environments with an uneven terrain. In addition, these sensors are usually highly sensitive to the lighting conditions, and like standard cameras, deliver measurements in a rather narrow velocity range.
Solutions based on custom laser or LED-lighted OF sensors [40,41], have been developed in order to reduce the sensitivity to height and improve the performance while traveling over terrains of various kinds, but no tests were run by these authors under various lighting conditions and under the robot's normal driving conditions. Physiological studies on vertebrates have shown that the retina obeys a process of adaptation whereby each photoreceptor's response is normalized by a representative value of the average local luminosity, in line with the Michaelis-Menten equation [42,43]. In light of these and subsequent findings, many efforts have been made to mimic the outer plexiform layer circuitry in silicon retinas [44,45], or to implement the model in software for image processing [46,47]. More recently, we presented a novel auto-adaptive pixel called M 2 APix, which stands for Michaelis-Menten auto-adaptive pixel, that auto-adapts in a 7-decade range and responds appropriately to both small and large contrasts [48].
Several versions of local motion sensors (LMSs) have been developed at our laboratory [5,13,49,50]: local 1D OF measurements have been obtained using very few pixels and applying methods based on findings previously obtained on the fly's visual system [51].
In this paper, we present: • a novel bio-inspired OF sensor giving measurements which are robust to high-dynamic-range lighting conditions and to the various visual patterns encountered; • an application to visual guidance and odometry, in which these minimalistic OF sensors were mounted on a low-cost car-like robot called BioCarBot (see figure 1) and tested both indoors and outdoors in a 7-decade light-level range.
An extended Kalman filter (EKF) was used to estimate the robot's velocity and steering angle using only the OF measurements delivered by two downwardfacing sensors, as presented in [52] in the case of a single indoor environment. In the present paper, the tests were extended to various indoor (see online supplementary video 1) and outdoor (see online supplementary video 2) testing conditions, including various light levels, ground textures, trajectories and vibrations, and the robot's absolute position and orientation were estimated in real time using the EKF estimates and the Ackerman steering model. These position and orientation estimates were finally compared with those obtained by applying the same model to the measurements from an inertial measurement unit (IMU) and a motor's speed sensor.
The results presented here show that our novel OF sensors were robust to changes in light in a 7-decade range (from about -10 A 10 to -10 A 3 of the photodiode current), including sharp changes of up to 2 decades occurring within 0.5 s. Although low-cost, lowresolution servos and motors and a simplified model identification and calibration method were used, the robot was able to estimate its velocity and steering angle accurately. The robot's position and orientation were estimated both indoors and outdoors while it was traveling through unstructured environments (on ground consisting of asphalt, gravel, sand, and leaves, including shadows and holes), both during the day and at night. In addition, the visual odometry method was robust to vibrations liable to change the sensors' local height by up to 6% (i.e. 10 mm over 175 mm).
In section 2, we will introduce the principles underlying a 2-pixel LMS as well as the method and the hardware used to construct our novel OF sensor.
In section 3, we will present the BioCarBot robot, the simplified model used to estimate the robot's velocity and steering angle, and the control scheme implemented on the robot. In section 4, we will present and discuss the results obtained in the indoor and outdoor experiments we performed. Some conclusions will be reached in the last section.
2. New implementation of the visual motion sensor 2.1. Principles underlying a 2-pixel local motion sensor A defocused lens placed in front of two photoreceptors determines the interreceptor angle j D between the  , where j D is the interreceptor angle and τ is the time lag between the two photoreceptors' output signals. (b), (d) Block diagram of the novel OF algorithm that determines the time lag t k between several t i in a time window t w , giving the maximum cross-correlation between the delayed and non-delayed signals. The OF sensor's output does not result directly from the correlation, as in the Reichardt-Hassenstein model [53], but from the ratio between the interreceptor angle j D and the time two photoreceptors' axes and gives them a Gaussian angular sensitivity with an acceptance angle r D (figure 2(a)), on similar lines to what occurs in many insects' eyes. A visual contrast moving in front of the LMS will induce a time lag τ between the photoreceptors' output signals (figure 2(b)). After measuring this time lag, the optic flow can be computed as follows: where the sign depends on the orientation of the sensor's axis and on which of the two output signals is delayed. The acceptance angle r D , namely the full width at half-height of the Gaussian angular sensitivity, determines the cut-off frequency of the low-pass spatial filter as follows: » r D F c 1 [54]. On the one hand, achieving a tight r D makes it possible for the photoreceptors to respond to higher spatial-frequency contrasts, but on the other hand, when r j D < D , it is difficult to estimate the time lag τ because the two output signals are rarely correlated in a short time window. Therefore, as occurs in some diurnal insects [55], we adjusted the distance between the plane of the lens and that of the photoreceptors in order to obtain r j D = D .

New cross-correlation method for computing the OF
To compute the 1D OF ω, the time lag τ between two neighboring pixels' output signals was estimated using a cross-correlation method inspired by the Reichardt-Hassenstein correlator model [53]. In the method presented here, the OF sensor's output did not result directly from the correlation, as in the Reichardt-Hassenstein model, but from the ratio between the interreceptor angle j D and the time lag t k giving the maximum cross-correlation between the delayed and non-delayed signals, i.e. w  ) in a fixed time window w CorrPh ; (iii) repeat steps (i) and (ii) for every t i (i=1,K,n) in a fixed time window t w ; (iv) set τ at a value equal to the time lag t k giving the maximum cross-correlation coefficient, as long as this maximum is greater than the fixed value r ; thr (v) compute the OF ω using equation (1) (or set ω at NaN if the maximum cross-correlation coefficient is less than r thr ).
The threshold value of the cross-correlation coefficients ( )  thr directly reflects the reliability and the robustness of the OF measurements: the higher ñ thr is, the more reliable and robust the measurements will be, but in the presence of noise, the lower the refresh rate will be.
The time window of the signals ( ) w CorrPh determines the bandwidth of the OF measurements, whereas the number of samples ( ) n in the time window determines the reliability of the correlation coefficients: the smaller w CorrPh is, the larger the bandwidth will be, and the higher n is, the higher the reliability will be.
In order to obtain a constant resolution w D , the time lags were chosen as follows: where w* i are the desired OF measurements, which are linearly separated by the resolution w D * required. The signals can then be delayed by the time t i elapsing between two sampling steps, by linearly interpolating the signals sampled.

Hardware and software implementation
In this study, we used the auto-adaptive silicon retina presented in [48] soldered onto a tiny printed circuit board (PCB) on which an optical lens casing was mounted ( figure 3).
The M 2 APix pixel, which stands for Michaelis-Menten auto-adaptive pixel, can auto-adapt in a 7-decade range and responds appropriately to small contrasts, such as±2%, as well as large changes in light, such as±3 decades [48]. In the chip used here, the analog low-pass filter had a cut-off frequency of 100 Hz (instead of 300 Hz used in [48]), giving a minimum sampling frequency of 200 Hz in order to prevent the occurrence of aliasing.
The optical lens used here was taken from a Raspberry-Pi camera (focal length: 2 mm), while the lens casing was custom made using a 3D printer to precisely adjust the distance between the plane of the lens and that of the pixels during the calibration phase. The interreceptor angle j D and the acceptance angle r D were measured at j r D » D »  3.6 using the method presented in [5], giving a cut-off frequency of the low-pass spatial filter » » Depending on the velocity range required, the time lag window t w ranged from 6.3 ms-63 ms in order to obtain OF measurements w i ranging from 1--15 rad s 1 and a resolution w D * ranging from 0.05--0.5 rad s 1 . In the experiments presented here, the OF range was set prior to each test at the smallest range comprising all the reachable OF values, given the robot's velocity and steering angle commands and the sensors' height, in order to obtain the highest OF resolution, given the computational constraint on the total number of possible time lags at each time step (m = 30).
We note that having a very high threshold on the cross-correlation coefficients ( imply that the two neighboring signals have to be identical but rather that they have to be linearly dependent, i.e. there might be a gain and an offset between them. Thus, the output of our OF algorithm, i.e. the OF measurements, nearly does not depend on the color, intensity and spatial frequency of visual patterns encountered, i.e. on the amplitude and shape of the pixels' temporal signals produced, as long as these signals fall in the bandwidth of the band-pass temporal filter (see section 2.2). In other words, we can say that the pattern-based noise is very low as long as the visual patterns are not completely uniform and have spatial frequency components lower than F c . The OF algorithm was then applied to every pair of adjacent pixels in each of the two 6-pixel rows (see figure 2(b) in [48]), giving ten local 1D OF measurements within a field of view of about 18°. The visual motion sensor (VMS) was therefore composed of ten 2-pixel LMSs and the median value w m of the ten OF measurements w i was used as the actual output of the VMS to robustly filter out possible outliers.

BioCarBot: a bio-inspired visuallyguided car-like robot
3.1. The car-like robot Figure 1 shows the images of the BioCarBot robot, one of the two VMSs used and the indoor and outdoor testing environments equipped with a Vicon motioncapture system.
The present odometry method was tested using a car-like robot based on the 2WD Racecar Kit provided by Minds-I Robotics, which was chosen despite the low resolution of the servo and motor control because of its modularity and low price (US(275). The car-like robot was composed of a 1/10-scale car body (419×203×114mm), one Hitec HS-311 standard servo coupled to a steering hub, one 5000-rpm DC motor connected to a 300-A electronic speed controller (ESC), one 7.2-Volt 3000-mAh Ni-Cd rechargeable battery, one mechanical slip differential and four 90 mm-diameter crawler wheels.
Thanks to the modularity of the robot's structure, two identical VMSs (figure 3(b)) were attached to the robot's frame on both sides of its body, aligned with the rear wheel axis ( figure 1(a)). To facilitate the sensors' installation, we used the same testing board as that which was used in the study presented in [48] to connect the VMSs to the Nanowii board ( figure 1(b)). An OSRAM BPX65 photodiode connected to an analog amplifier circuit was also included on the testing board next to the VMS in order to measure the effective light levels of the scene.
To obtain the ground-truth values, the 3D robot's pose T was measured by means of a Vicon motion-capture system thanks to the infrared markers attached to the robot's frame ( figure 1(a)). Indoor experiments were performed in the flying arena at our laboratory [57], whereas four individual Vicon cameras, each mounted on a tripod, were used outdoors (figures 1(c)-(d)).

Car-like robot modeling
As the robot's velocity was relatively low and the robot did not have any suspension system, we focused here on the 2D kinematic model for a car-like robot moving on a flat surface. Figure 4 shows the kinematic diagram of the BioCarBot with the two VMSs installed on both sides, as depicted in figure 1(a).
Let us take the inertial frame á ñ I having the x-and y-axes lying on the local ground plane, with the robot's body frame á ñ B placed in the middle of the rear wheels' axis. Two VMSs were placed at x y z and r r r r T with respect to á ñ = = 175 mm) (figure 1(a), 4(a)). As the sensors' frames á ñ á ñ l r , were taken to be parallel to the body frame á ñ B , we can consider all the position and velocity vectors projected onto á ñ B . The ground OF can be measured using the method presented in section 2.2 thanks to the no-skidding x y T located near the line passing through the two rear wheel/ground contact points. Therefore, the OF measured between the i 1-th and i-th pixels of each VMS can be written as follows: ) giving the position of the intersection point P i between the i-th pixel axis and the ground plane with respect to the sensor's frame, i.e. á ñ á ñ l r or , and j i is the angle between x i and the x-axis of the sensor's frame ( figure 4(b)).
Since the sensors' frames á ñ á ñ l r , were taken to have their x-axis aligned with the rows of pixels of each VMS (i.e. » y 0 i ) and to be parallel to á ñ B (figures 4(a), (b)), the position vectors of the intersection points P i with respect to á ñ B can be written as T , for the left and right sides, respectively, and their corresponding velocities are given as follows: where W V , are the robot's longitudinal and angular velocity, respectively (figure 4(a)).
By combining equations (3) and (4), we obtain a set of redundant linear equations that relate the local OF measurements w i to the robot's longitudinal and angular velocity W V , , which can be used for odometry purposes with any wheeled robot that satisfies the no-skidding assumption, regardless of how the robot is actuated. However, if we are interested in controlling the robot in a closed loop, the dynamic equations relating W V , to the specific control parameters should be included into equation (4) for better tracking performances.
Since we are dealing here with a car-like robot which is controlled by a DC motor, giving the longitudinal velocity V , and a steering servo, giving the steering angle f, the angular velocity W can be computed as follows, according to the Ackermann steering geometry [58] (figure 4(a)): where = ( ) L 255 mm is the distance between the rear and front wheel axes ( figure 1(a)).
By substituting the median value of the OF measurements obtained with each VMS w w ,  Lastly, the dynamics of f V and , which mostly depend on the dynamics of the DC motor and the steering servo, respectively, were identified in the form of two independent first-order systems using the ground-truth measurements: It is worth noting that the identified model given in equation (7) does not take into account the non-linearities which characterize the conversion from the actual control inputs, i.e. the values delivered to the ESC and the servo controller, to the model input u, such as, for instance, the dependency of the DC motor's speed to the battery charge level and the backlash in the steering system's geometry. Such a simplified model, therefore, would not be accurate enough to be used directly for odometry purposes; however we want to show here that it is sufficient to obtain good odometry results when applied to an EKF using the measurements delivered by our novel OF sensors.

EKF and control system
In order to obtain a robust continuous estimation of the robot's longitudinal velocity and steering angle f ( ) V , , an EKF based on the discrete approximation of the model presented in (6) and (7) was implemented, taking the median values of the 10 local OF measurements w w ( ) , m l m r to be actual measurements. The first-order discrete approximation for the model presented in (7) was taken to be as follows: where the index k denotes the k-th sampling period (i.e., = D t k t); n w, denotes the model and the measurement noise, respectively, and they are assumed to be independent white noises and to have normal probability distributions, i.e. ñ( , and diag ,  steering control inputs u to the system. The real system inputs were therefore assumed to be equal to the outputs from the controller, i.e. x = --u k k 1 1 (see equation (9)).
The initial estimate of the state x 0 was set at zero, while the initial estimate of the error covariance matrix P 0 was set at the identity matrix. When there were no measurements available on at least one of the robot's sides, i.e. no w w or m l m r , the Kalman gain K k was set at zero, so that it was still possible to have an estimation of x k based on the 'a priori' prediction x k . In that case, a timeout was set at 0.5 s, after which the EKF was reinitialized and the robot was stopped. Such an event happened only in the few cases where the robot drove for a while on a non-textured area of the floor (e.g. the white or black areas in figure 1(b)), which never happened in the tests presented here.  . We note that the EKF and the PI controller were applied on the state ] V , T in order to obtain a more robust estimate of f, and therefore better closed-loop trajectories. Also, a feedforward term could be added to the PI controller to increase the tracking performances/accuracy, although it was not included here since no significant improvements were obtained.

Experimental measurements and visual odometry results
Experiments were carried out both indoors (see online supplementary video 1) and outdoors (see online supplementary video 2) using various floor patterns and trajectories to test the performances of the OF sensors as well as the method of estimation and control presented here. Figure 1 shows two examples of test environments, indoors (figure 1(c)) and outdoors ( figure 1(d)) at the flying arena at our laboratory. In the tests presented here, the car-like robot followed paths forming a circle, a square and a figure of eight. The floors used in the indoor tests showed patterns of various colors and contrasts, from small and large high-frequency contrasts to large low-frequency contrasts. The ground used in the outdoor tests, which consisted mainly of asphalt, included holes, gravel and a steel rail.
The M 2 APix output signals were sampled at a frequency of 333 Hz (D = t 3 ms) by the on-chip ADC (see [48] for details), acquired by the Nanowii board via SPI communication and transmitted to the computer-on-module (COM) via serial communication (see section 3 for details). The OF algorithm presented in section 2.2, as well as the estimation and control scheme shown in figure 5, were run at the same rate on the COM. The Linux-based program running on the COM was entirely generated in the Matlab/Simulink environment using the RT-MaG toolbox [57], a custom-made toolbox for real-time applications developed at our laboratory. The ground host-PC program conveys the control set points f * * V , to the robot's COM and receives data from the robot's COM and the Vicon system using the RT-MaG toolbox. Estimates of the absolute robot's positionX and orientation q were lastly computed in real time by integrating the equations provided in the Ackermann model [58] using the EKF estimates fV , as inputs to the model. To compare the minimalistic odometry results obtained when using the OF measurements with those obtained when using inertial measurements, the estimates of the absolute robot's position and orientation qX , IMU IMU were also computed offline using the measurements acquired from the MPU-6050 IMU a a a T

T T x y z x y z T IMU IMU
) and the measurements of the DC motor's speed W DC acquired by a hall-effect sensor attached to the motor's shaft. Several methods have been proposed through the years to perform odometry using inertial measurements based on specific dynamic models of the IMU used, in particular to handle the varying bias of the gyroscopes [59,60], but these methods require an accurate identification and calibration of the models used. Here, in order to have a meaningful comparison with our minimalistic OFbased method, estimates of the robot's velocity and steering angle fV , IMU IMU were obtained by applying an EKF to the same dynamical model, e.g. equation (7), while using the following output model 4 : is the transmission gear ratio. The angle b IMU gives the rotation about the y-axis between the body frame á ñ B and the inertial frame á ñ I and was computed by integrating the following equations 5 : 4 Note that in the first equation in (10) there is no contribution of W IMU because the body frame á ñ B was taken to be coincident to the IMU frame. 5 Note that we substituted g Ẇ with z IMU in the third equation in (10) because in the experiments presented here we always had g W »ż IMU . Also note that the angle b IMU was considered as a parameter although it depends on W z , and therefore on the state x, since its value varied within a small range and no significant improvement was obtained using a more complex output model.  ), which were adopted in order to cut off the low-frequency components due to the changes in the ground's slope and height.
The average refresh rate of the sensors w f was computed by dividing the number of median values of the OF measurements obtained during each test by the time taken to run the test. The precision of the median values of the OF measurements w w , ). The accuracy of the estimates of the robot's absolute positionX and orientation q , instead, was computed by dividing the maximum errors with respect to the ground-truth position and orientation respectively by the distance traveled and the angle covered when these maxima were reached (e.g. if -= ||ˆ|| X X 0.7 m after traveling 45 m then the accuracy will be » 1.6% 0. 7 45 ). We preferred to use these traditional metrics for the odometry accuracy instead of using other common metrics in visual odometry based on the errors in the relative camera poses, such as that presented in [61], because such metrics give values that are well representative of the 'noise' in the position and orientation estimates (error between contiguous estimates), but not necessarily of the accuracy of these estimates (absolute error). To better evaluate the odometry performances during the entire path, we also provide here the plots of the error in the position and orientation with respect to time and distance. Figure 6 shows the results obtained indoors when the robot was driven on the floor shown in figure 1(c) on a circular path, keeping a constant steering angle at a velocity ranging from 0.3- Indoor tests at constant light levels were also carried out in the same environment and using the same trajectory to determine the highest precision and widest range achievable with our novel OF sensors. First the robot was driven at constant velocities from the minimum to the maximum values, i.e. from 0.3-  figure 7(B)). In the latter case, the height of the VMSs with respect to the ground h was exceptionally decreased to 135 mm and the OF resolution w D * required was increased to -0.5 rad s 1 in order to achieve a larger OF range (from 1.5--15 rad s 1 ). The average refresh rate w f obtained was about 333 Hz in all the cases tested.

Indoors
Lastly, indoor tests were carried out using various trajectories and various floor textures. Figure 8 shows the results obtained indoors when the robot was driven on paths forming a figure of eight and a square, while the velocity and the steering angle were made to vary trapezoidally. The OF resolution w D * required was set at 0.1 and -0.2 rad s 1 and the average refresh rate w f obtained was about 325 Hz in both tests. The results presented here show that the OF measurements did not depend on either the average light level or the changes in the light, except in the case of very large, sudden changes (see figure 6(a) at about 46 s and 59 s), nor did they depend on the visual patterns and the types of trajectory used (there was no statistical evidence in the error distributions and in the refresh frequencies). In addition, although the error in the OF measurements increased slightly with the OF magnitude, our novel sensors were able to measure the OF in a very large range, from about 1.5- In all these tests, the overall error distributions were nearly Gaussian with a quasi-zero mean (figures 6(b), 7(A)(b), (B)(b), 8(A)(b), (B)(b)), giving values of the adjusted R-square goodness-of-fit statistics, computed using the Matlab Curve Fitting Toolbox, always greater than 0.99. However, it is worth noting that the error distributions were sometimes more peaky than their fitted Gaussian curves, meaning that the errors were statistically closer to their mean values than those obtained with a pure Gaussian distribution. We also note that such a difference in the height and shape of the error distributions was due to the fact that these distributions were extracted from histograms over a rather low-resolution grid of beams (Dbeam from 0.02-0.04) in order to have smooth curves.
The greatest OF precision obtained was about 1.2% when w D * was set at -0.05 rad s 1 , whereas the lowest was about 3.6% when w D * was set at -0.5 rad s 1 . The robot adopted the required velocity and steering angle, giving a precision of the robot's velocity and steering angle estimates ( fV , ) ranging from 1%-5% and from 6%-12%, respectively, which made it possible to drive the robot relatively close to  By using the OF-based estimates of the robot's velocity and steering angle for odometry purposes, we obtained an accuracy of the position and orientation estimates ( qX , ) ranging from 0.3%-2.3%, after the robot had been traveling from 18-71 m and turning from p 4.1 -p 8.1 rad, i.e. after about 2-8 laps. It is worth noting that such an odometry accuracy was about 2-9 times higher than that obtained by using the IMU-based estimates of the robot's velocity and steering angle ( fV , Some quantitative data and statistics on each indoor test are given in table 1. The results presented here show that our sensors responded appropriately outdoors by delivering OF measurements regardless of the luminosity in a 6-decade range (I ph ranging from about 10 −9 to -10 A 3 ) and despite the shadows produced by the robot itself under daylight conditions (see, for instance, pictures (1) and (2) in figure 9). In addition, our sensors delivered OF measurements that did not depend significantly on either the trajectory or the ground textures (grass, leaves, flowers, dark and light sand, dark and light gravel), although sometimes fewer measurements were delivered on the left side when the robot was driving on some of the textured regions ( figure 11(a)).

Outdoors
As in the indoor tests, the overall error distributions were consistently nearly Gaussian with a quasizero mean (figures 9(b), 10(b), 11(b), 12(b)), giving values of the adjusted R-square goodness-of-fit statistics, computed using the Matlab Curve Fitting Toolbox, always greater than 0.98. The same observations on the height and shape of the error distributions done for the indoor tests can also be done for the outdoor tests.
The OF precision obtained here was slightly higher than that obtained in the indoor tests, ranging from 2.6%-3.8%, and did not significantly depend on the light levels, the ground textures or the type of trajectory 6 . However, the average precision of the robot's velocity and steering angle estimates ( fV , ) is similar to that obtained in the indoor tests (2.3% versus 2.4% and 9.3% versus 9.8%, respectively), showing the robustness of the method presented here to vibrations liable to cause a change in the sensors' local height of up to 10 mm (figures 9(f), 10(f)), amounting to about 6 % of the nominal height.
In the case of larger changes in height, such as those caused by the rail (shaded regions in figures 9(a)-(g) and 10(a)-(g)), the robot could still estimate V and f but with a much lower precision, and a more complex method of estimation, including information from other sensors, would therefore have to be implemented in order to achieve a higher level of robustness. In fact, the error in the position and orientation estimates ( qX , ) seems to particularly increase when the robot was driving on the rail at relatively high speed because of larger errors in the OF-based velocity and steering angle estimates (see, for instance, the shaded regions in figure 9 at about 18 s and in figure 10 at about 12 s). However, even in the presence of such large vibrations, we still obtained a good accuracy of the position and orientation estimates, i.e. from 2%-3% after the robot had been traveling about 30 m and turning about 6-p 8 rad (i.e. about 3-4 laps), which was slightly higher than that obtained by using the IMU-based estimates of the robot's velocity and steering angle ( fV , IMU IMU ) (figures 9(e), 10(e), 11(e), 12(e)). In particular, the OF-based odometry gave better performances on average than the IMU-based odometry when using trajectories where the steering angle, and therefore the angular velocity, changed in sign, i.e. when driving on an eight-shaped path 6 The standard deviations and the corresponding precision in the first two tests (figures 9, 10) were computed without taking into account the moments when the robot was driving on the steel rail (shaded regions in figures 9(a)-(g), 10(a)-(g)) as the impact with the rail produced very large vibrations.
( figure 12(e)). However, we note that, in the outdoor tests, the errors in the IMU-based estimates were often lower than those in the OF-based estimates in the first part of the tests and then started increasing very rapidly, probably because of the gyroscope's varying bias. All in all, we note that the accuracy of the solely IMU-based odometry strongly depends on the nonlinear dynamics intrinsic to the IMU used, therefore better odometry results could be obtained by including these non-linearities in the EKF.
Some quantitative data and statistics on each outdoor test are given in table 2.

Conclusions
The low-cost car-like robot called BioCarBot presented in this paper is able to estimate its velocity and steering angle, and therefore its position and orientation via an EKF, using only the OF measurements delivered by two novel downward-facing VMSs. Thanks to the cross-correlation method and the autoadaptive pixels used, these novel VMSs have the following advantages: • the OF measurements are robust to high-dynamicrange lighting conditions (in a 7-decade range with sharp changes of up to 2 decades within 0.5 s) and to the various visual patterns encountered; • the refresh rate of the OF measurements is relatively high (300-333 Hz) and nearly constant, and does not depend on the bandwidth of the band-pass filter; • the resolution on the OF measurements is also relatively high (up to -0.05 rad s 1 ) and constant, i.e. it does not depend on the OF magnitude, and can be set at whatever value is required; • the OF measurement range is relatively wide (from 1.5--15 rad s 1 , i.e. 85 to o 850 s 1 ) and can also be adjusted as required; • the sensor's precision can be relatively high (3.8% in the worst case), depending on the OF resolution required, the OF range and the robot's vibrations.
With these OF sensors, the robot was able to estimate its own velocity and steering angle, and therefore its position and orientation accurately, both indoors and outdoors, and the drifts liable to occur when it was driven in the open-loop mode were greatly reduced. The main features of the minimalistic visual odometry method presented here can be listed as follows: • robustness to high-range light levels (by daylight and at night, i.e. from about 1-30000 Lux, including shadows) and various ground textures (asphalt, gravel, sand, leaves, etc); • robustness to vibrations liable to affect change in the sensors' local height up to 6% (i.e. about 10 mm-175 mm); • fairly high-accuracy position and orientation estimation (from 0.3%-3% ) after covering a distance from 30 m-75 m and turning through an angle from p 6 -p 16 rad.
We also showed that the accuracy was higher on average than that of the IMU-based odometry, especially in the indoor tests and when the distance and the rotation angle covered were relatively large.
It is worth noting that both the sampling frequency, and hence the refresh rate, and the OF resolution, and hence the precision, could be increased by either optimizing the implementation of the algorithm or increasing the computational resources. These two parameters could be also adjusted in real time to the values required depending on the robot's reference trajectory, and therefore on the OF setpoint profile.
The precision of the estimates could also be improved by (i) adapting the EKF to include just a single OF measurement (i.e. on one side only) when no measurement is available on the other side, and (ii) precisely adjusting the values of the measurement and process covariance matrices of the EKF after performing a calibration phase prior to each test. In addition, the OF and inertial measurements could be combined together in one EKF by including accurately-identified dynamic models of the sensors used, which take into account their intrinsic non-linearities in order to achieve greater robustness and precision, as required for the autonomous vehicles of the future [62] and even tomorrow's flying robots [21].
Tests involving more complex and longer trajectories as well as more challenging environments, such as forest paths, are now being considered, and we are planning to test the sensors and the estimation method presented here on a real vehicle with a view to improving the existing odometry techniques. In this way, we are willing to apply the improvements discussed above and to evaluate the results obtained also by using the metrics presented in [61].