Multi Sensor Fusion Framework for Indoor-Outdoor Localization of Limited Resource Mobile Robots

This paper presents a sensor fusion framework that improves the localization of mobile robots with limited computational resources. It employs an event based Kalman Filter to combine the measurements of a global sensor and an inertial measurement unit (IMU) on an event based schedule, using fewer resources (execution time and bandwidth) but with similar performance when compared to the traditional methods. The event is defined to reflect the necessity of the global information, when the estimation error covariance exceeds a predefined limit. The proposed experimental platforms are based on the LEGO Mindstorm NXT, and consist of a differential wheel mobile robot navigating indoors with a zenithal camera as global sensor, and an Ackermann steering mobile robot navigating outdoors with a SBG Systems GPS accessed through an IGEP board that also serves as datalogger. The IMU in both robots is built using the NXT motor encoders along with one gyroscope, one compass and two accelerometers from Hitecnic, placed according to a particle based dynamic model of the robots. The tests performed reflect the correct performance and low execution time of the proposed framework. The robustness and stability is observed during a long walk test in both indoors and outdoors environments.


Introduction
Mobile robots are designed and built to perform several task simultaneously, they usually must communicate with neighbors to coordinate movements, navigate in the environment following a path, avoid obstacles, advance toward a goal point, etc. Most of these duties could not be performed without a precise knowledge of the robot current position and heading (pose) in a global reference frame [1,2]. This process, known as robot localization, is a challenging issue since the pose information is obtained from sensors subject to noise. If this fact is not taken into account, it could lead to great uncertainty while performing the localization process.
In order to improve the accuracy of the pose estimation, the several sensors available on the robot that measure the variables associated with the motion (acceleration, velocity, rotation, etc.) are used to localize the robot. These different measurements are combined by an algorithm that takes into account the different accuracy and noise levels of each sensor. The most commonly used fusion technique is the Kalman Filter (KF) or one of its variants for nonlinear systems [Extended (EKF), Unscented (UKF), etc.], all of them widely studied in the literature [3][4][5][6].
There are several examples of KF based localization algorithms developed for different types of mobile robots and sensors. Many works present only IMU and encoder based methods without a global sensor. For example, simulation results are presented in [7] where the EKF was used to fuse the encoder data with data from a gyroscope and in [8], where a range finder is also used but with a Hybrid EKF.
Other examples employ some mid-size mobile robots, such as the Pioneer family [9] with the filter algorithms being executed in a computer outside the mobile robot. This increases the computational resources available but limit the robot mobility as it adds more weight to the robot; it also adds communication delays between the robot and the fusion processing unit. For example, in [10] a Fiber-Optic Gyroscope is calibrated and integrated with the robot odometry using an EKF. This method shows good performance if the calibration is performed carefully and if the EKF with a nine state model is used. The tests use a Pioneer AT with a laptop-pc above it. In a similar way, in [11] an EKF fuse the encoder measurements with the output of an IMU while taking into account the wheel slip condition. It shows good performance in the tested skid-steered mobile robot. Also in [12] an UKF combines the information of a laser range finder with an IMU in a Pioneer 2-DxE mobile robot.
Advanced examples employ a robot with powerful processing units. Complex models and fusion schemes can be used in these cases and be implemented onboard the mobile robot, with the advantage of no communication delays and a more lightweight implementation but increasing the platform economic cost. In [13] a multi-rate EKF algorithm is presented, it combines the inertial measurements of a three-axis gyroscope and accelerometer with an optical navigation sensor (laser mice type) with the advantage of non-slip measurement. The filter is implemented onboard the custom build Ackerman type mobile robot using a CPU module with high memory capabilities showing good performance in the mapping of a 3-D pipeline.
Localization algorithms must perform the fusion with a global sensor for large distance runs to avoid unbounded error growth. These sensors can consist of a GPS sensor or an indoor global sensor (such as a zenithal camera [14] or a radio-based sensors as seen in [15]) depending on the application. There are many examples; most of them use an Ackerman type robot or a normal car adapted with and IMU, a GPS and a laptop to perform the fusion algorithm (for a general review see [16]).
Works in indoor environments include [17] that shows the EKF fusion of an ultrasonic satellite (U-SAT) with an IMU and encoders. The tests are performed with a custom made Ackerman robot and with an external computer to perform the fusion. Also in [18] an EKF is used with a Hybrid Localization Algorithm to fuse several ultrasonic sensor readings with the encoders, with good results in the Pioneer P3-DX mobile robot using ultrasonic beacons attached to the ceiling and a laptop computer to perform the fusion. In [19], a zenithal camera is used as an indoor GPS to be fused with the encoder data. The tests are performed in a low cost platform, the LEGO RCX. Good performance is shown despite the limited resources robot. This work was extended to the NXT robot in [20] with several IMU sensors but without a global sensor, thus the estimation diverges in long distance tests. In [21], several Radio Frequency Identification tags (RFID) placed in known locations along the indoor environment are identified by the mobile robot (Pioneer P3-DX) and used as a global position sensor. The sensor fusion is done by an EKF and by a Kalman quantized filter, both showing an improvement over using only the IMU and requiring less computational time with similar performance than a Particle Filter.
For outdoor environments, a basic example is shown in [22], where a Rover Dune robot with dual frequency GPS receiver uses an adaptive KF with Fuzzy Logic to improve the pose estimation. An EKF is used in [23] where an all-terrain mobile robots with four-wheel differential-drive skid-steering, where the encoder based dead-reckoning is corrected using a magnetic compass and a differential GPS (DGPS). Good performance is shown as the fusion scheme performs better than using the encoders or the DGPS alone, and when it is used in a cooperative multirobot localization scheme. A car is used in [24] with a three axis IMU (accelerometers gyroscopes, magnetometers) with a GPS fused by an EKF executed in a notebook. Tests show adequate operation even during GPS outages. In a similar configuration, [25] employs an EKF aided with a Neural Network with proper operation even with momentary interruptions in the GPS readings. Finally, in [26], a numerical algorithm adapts the model structure used in a KF. Extensive tests show low errors during GPS outages and good performance.
The great majority of these examples employ an algorithm to perform the sensor fusion that is computationally expensive, especially in the cases of fusion of multiple measurements (as large matrix inversion and manipulation are needed in these KF). This prevents the implementation onboard the robot processor (except for a few cases such as [13,19,20], with the associate disadvantage of requiring an external computer to perform the method, producing an unwanted delay in the control due to the communication between the controller computer and the robot. This establishes an important issue: the localization method precision is as important as the computational resources used and the algorithm response time. Complex Fusion schemes based in nonlinear models and filters (UKF, particle filters [27], etc.) will provide a very precise estimation but will also require longer execution times as they perform complex calculations (large matrix inversion, matrix square root, etc.). On the other hand, linear or linearized fusion schemes take less time to calculate, but if the model is highly nonlinear it will diverge quickly. Also, if the localization information is missed or delayed, the data required in the navigation control algorithm would not be available producing a miss timed control action that can lead the system to an unstable behavior. Furthermore, as the pose estimation is not the only task of the robot, not all the available resources can be assigned to the localization. This establishes a compromise between the complexity and the precision of the localization technique, especially when the robot is resource-limited.
Observing the reviewed works, many of them use a global sensor in a regular sample time basis, even if the pose estimation error (using the IMU and the encoders) is small. In this case, there is no need to use the global sensor so regularly. A better approach, to save computational resources, would be to use the global information only when the estimation error covariance is big enough (when it is greater than a predefined limit). This event based update can save process time, bandwidth and extend the battery life. Event based solutions have been previously tested with success in other areas such as multirobot cooperative control [28], multi-agent consensus [29,30] and multi-agent agreement protocols [31], with success. The event strategy produces an exchange of information among the group members (sensors, controllers, robots, etc.) only when the error (in the reference or disturbance) exceeds a given bound, reducing the communication and processor load.
Considering these factors, this paper presents a resource-efficient multi sensor fusion framework with similar performance when compared to more complex fusion schemes but with lower computational, economical and communication costs and easy implementation on limited resource mobile robots. The proposed method implements the event based fusion algorithms defining an event that depends not on the reference error (as the previous approaches) but in the covariance of the estimation error. Along with the fusion framework, two experimental low cost LEGO NXT based platforms are presented to indoor and outdoor navigation respectively.
After this review, the paper is organized as follows. In Section 2, the event based sensor fusion algorithms are presented along with the mathematical models needed by the KF equations. In Section 3, the multi sensor fusion framework implementation is described for each of the proposed experimental platforms. In Section 4 the performance and run time tests are presented for the indoor and outdoor scenarios. Finally, some conclusions are drafted in the last section.

Event Based Fusion Algorithms
The mathematical models and the proposed KF algorithms are exposed next.

Differentially Driven Wheeled Robot
A differentially driven wheeled robot consists of a rigid body with mass M G and moment of inertia I G with two non-deformable non-orientable (fixed) wheels separated a distance b and moved by two motors that apply two linear forces F R and F L as shown in Figure 1a,b. The wheels are conventional and they satisfy the pure rolling without slipping condition [32]. For this work, the "Slow Speed Motion" condition can be assumed as the maximum velocity of the experimental platforms based on the LEGO NXT, is less than 5 m/s. With this condition, the wheels are assumed without slip [33]. Also, the movement of the robot is restricted to a horizontal plane and its center of mass is denoted by P 0 that also corresponds to the center of gravity.
The kinematic model represents the robot velocities evolution in a fixed inertial frame. The robot pose is defined by its position P 0 = (x, y) with the heading angle θ in the Global reference frame (X G ,Y G ) in Figure 1a. By knowing the linear and angular velocities (v and ω) in the Local frame (X L ,Y L ), the global velocities are defined as: By discretizing and recursively integrating Equation (1) with sample time T s , the following robot global pose L is obtained: The kinematic relation between v and ω and the linear velocities in the wheels (v L , v R ) is shown in: By deriving this equation, a kinematic relation between linear and angular accelerations a and α and the accelerations at the robot wheels, is obtained. By using two 3D accelerometers, placed above each wheel, Equation (3) will give the robot accelerations that can be integrated to obtain the velocities that will be used as inputs in Equation (2). But a better approach is to take into account the robot dynamics to obtain the global accelerations.
The dynamic model represents the robot linear and angular accelerations (a,α) evolution in terms of the forces applied to it in the wheels (F L,R ) and the angular moment (τ ). The models in the literature represent the dynamics in the global reference frame (for example [34][35][36]) but these yield too complex nonlinear models with difficult implementation. Also, as no direct measurements of the motor forces or input currents are available in most robots, obtaining the dynamic model in terms of the linear accelerations is convenient. Instead of using directly the second Newton's Law in the center of mass, a better approach is to consider the robot rigid body as a dynamically equivalent particle system, formed by two mass particles M L and M R joined by a massless connector of constant length b = 2R N (with R N = R L = R R ) as shown in Figure 1b. Using this equivalence and the conditions stated by [37] (full development in Appendix A), the accelerations are obtained as: The parameters of the particle system (two constants γ and λ and the distance R N ) are obtained for different robots shapes as shown in Table 1. For example, in case of a differential robot with rectangular shape (as the one proposed in the platforms description section), the parameters to be used are the ones referred as "solid box".

Solid Cylinder
By discretizing and recursively integrating the accelerations (integrating the simple kinematic model a =v, α =ω) and substituting Equation (4), the robot local linear dynamical model is obtained in Equation (5). [ By substituting Equation (5) as inputs of Equation (2) the robot global nonlinear dynamical model is written as:  The models (4)- (6) are used in the event based algorithms for the differential indoors platform.

Ackermann Steering Mobile Robot
An Ackermann steering robot consists of a rigid body with center of mass and gravity denoted by P 0 , turning radius R G , mass M G and moment of inertia I G , with two non-orientable (fixed) rear wheels separated a distance b between them and a distance l from two orientable front wheels (also with a distance b between them) as shown in Figure 2a. The Ackermann steering system modifies the heading of the front wheels in a way that, at low speeds, all the tires are in pure rolling without lateral sliding [38]. This is accomplished when each wheel follows a curved path with different radius but with one common turn center C r , as shows Figure 2a. This system is analyzed using the bicycle model [33,38] assuming low speed planar motion and again, the non-slip condition (v y ≈ 0). By this, the mean of the inside and outside front wheels steer angles (ϕ i and ϕ o ) is used (ϕ) and the back wheels are considered as one single wheel where the motor force is applied ( Figure 2b).  Following the previous analysis for the differential case, the models (5) and (6) can be also used for the Ackermann robot by adjusting the dynamic model to form a three mass system with particles M r , M c and M f joined by two massless connectors of constant length R r and R f (with R f = R r = 0.5l) as shown in Figure 2b with forces applied in the front (F f ) and rear (F r ) equivalent wheels. Once again, following [37] and a similar development as in Appendix A, the accelerations are obtained as: The parameters of the particle system for the Ackermann robot with rectangular form, with length c and width b are obtained as: These parameters in Equation (8) are the ones used in case of an Ackermann robot with a rectangular shape (as the one proposed in the platforms description section). Finally, the kinematic relation between ϕ and ω is shown in: The models in Equations (5)- (7), are used in the event based algorithms for the Ackermann outdoors platform.

Event Based Fusion Algorithms
In this section the proposed event based fusion framework is described, but first a short review of the time based method is presented. To simplify the notation, the models used in the algorithms are referred as linear when it can be written as Equation (10) with input u k ∈ ℜ u , measurement z k ∈ ℜ m and state x k ∈ ℜ n , or nonlinear when a non-linear function f is needed to relate the state at time k with the previous time step k − 1 and h to relate the x k to z k as Equation (11) shows. Also, the terms w k , v k represent the process and measurement noises at time k that have an independent, white probability distribution with zero mean.

Time Based Fusion Algorithm
This method is the "traditional" one, which uses the model in Equation (6) and all the available measurements to estimate the robot pose at every time k. For example, in the differential case, if the available measurements are v enc and ω enc from the encoders, ω gyr from a gyroscope, ω comp from a compass, a L , a R from two 3D accelerometers [placed as shown in Figure 1a and used in Equation (3)] and the global pose information L GM = (x, y, θ) GM , obtained from a zenithal camera, then In a similar way, if L GP S = (x, y, θ) GP S is the global pose information obtained from a GPS then, the variables used in Equation (6) for the Ackermann case are ] T from two 3D accelerometers [placed as shown in Figure 2b and used in Equation (7)].
The model (7) is used in the EKF algorithm (Algorithm 1) which performs the sensor fusion at every time k (time based) using the process and measurement noises covariance matrices Q k and R k respectively and obtains the state vector estimatex k i.e., the robot pose in Equation (6) and the covariance of the estimation error P k . This method has all the available information at any time k (all available sensors are used in z k and u k ) but requires large matrix inversion to obtain the filter gain K k , thus large memory and resources are needed. The UKF [5] can also be used instead of the EKF using the same x k , u k and z k if the robot has enough resources to implement it. Step: Step: The event based approach fuse the sensor information when an event passes a predefined limit. In order to adapt the event scheme to the localization problem z k is divided into the local and global measurements. By this, using as example the variables from in the differential case, the robot pose is determined every time k using Equation (6) in the EKF and the local z k = (4), and using the global pose L GM to correct the local estimation in the event based scheme. The event in this paper is not defined based on the reference errors, but in the estimation error covariance (pose section of P k = P k,p in the EKF), that is a clear indicator of the "health" of the localization solution. By this, the event approach will use L GM only when the error in the estimation is big enough. The event can be defined in multiple ways using P k,xy . For example, a ratio R A of the robot area A N XT and the 3 − σ error interval ellipsoids area A ellip can be used, as defined in Equation (12), where the ellipsoids axis are a σ and b σ and l = 3 for the 3 − σ error. In this event definition, when R A exceeds a certain level R A,lim , e.g., 1.6 (indicating that the error area is 1.6 times the robot area) then L GM is used to correct the robot pose. This limit is chosen as a compromise between the number of calls (energy and processor time consumption) and the desired precision of the estimated pose, being a reasonable range 0.125 ≤ R A,lim ≤ 2 for the LEGO NXT (details on this R A,lim threshold are given in Section 4.2).
To correct the EKF pose x k,p with L GM , in the differential case (Algorithm 2), the difference (∆X, ∆Y ) is added to the EKF position output (x, y) EKF as stated in Equation (13). This is obtained as the difference between the estimated EKF position at the time of the eventx e,EKF ,ŷ e,EKF and the measured (x, y) values in L GM ; compensating any communication delay ∆T (assumed known or measurable) using the velocities in the global axis V x e , V y e stored in the robot memory also at the event time (details on the delay measurement are given in the platform description). The headingθ EKF is replaced by the measured value in L GM and P k,p = P k,x,y,θ is replaced by the corresponding values of P 0 which resets the event generator. To preserve the linear displacement assumed by Equation (13), the global updates are not performed when the robot is in hard motion (i.e. when applying a big control action to the motors to negotiate a curve or to avoid an obstacle). This is done checking the reference error in the wheels velocities, if it exceed a certain value (|e L,R | > 2) then the robot is assumed to be in a hard curve. In this case, the algorithm waits one second and then checks again this condition. If it is false, then it makes again the global update procedure and outputs the corrected pose (details on this e L,R error threshold and the waiting time are given in Section 4.2).

Algorithm 2: Event based KF, Differential case
Step KF: Step KF: Pose estimation using (2) Covariance propagation using (14) 3 − σ ellipsoid area A ellip using (12) Another approach to correct the EKF pose is used in the Ackermann case (Algorithm 3) that takes into account the global sensor accuracy. This is done by using the EKF output (pose states and error covariances) as the prediction step of a linear KF. The model used in the fusion is Equation (10) with A and H p both being the identity matrix I 3,3 and no input. The R k,GM values are obtained from the global sensor accuracy. With this, the KF will fuse the local estimate with L GP S . The resulting P k,p decreases when the pose is corrected, resetting the event. The event based EKF is shown in Algorithm 4 with the correction of the differential case.

Algorithm 3: Event based KF, Ackermann case
Input : u k ,z k ,x k−1 ,P k−1 ,L GP S Output:x k ,P k Data: A, B and H from model (5) Step KF: Step KF: Pose estimation using (2) Covariance propagation using (14) 3 − σ ellipsoid area A ellip using (12) Algorithm 4: Recursive EKF algorithm with event based update Input : u k ,z k ,x k−1 ,P k−1 ,L GM Output:x k ,P k Data: f and h from model (6),Q k ,R k ,A N XT Initialization: x 0 ,P 0 for current time k do Prediction Step EKF: (same as Algorithm 1) Correction Step EKF: Step: The event based algorithm is adjusted to allow its implementation in resource limited robots and also adapted to the sensors available according to the navigation environment as described next, for the indoor differential case and the outdoor Ackermann case.

Event Based KF, Differential Case
In the differential robot, instead of using Equation (6) with the full state, the velocities in Equation (5) are used to perform the local fusion, and then, Equation (2) is used to obtain the robot pose. As Equation (5) is linear, the fusion is performed using the KF instead, saving more computational resources (compared to Algorithm 1 and 4) as the linearization step of the EKF is not needed. By this, ] T is used in Equation (4). Also L GM is used to correct the local estimation in the event based scheme. As the uncertainty in the velocity measurement is not propagated to the pose estimation as does the previous methods, a linear recursive approximation is used to propagate the covariance from the velocity P k,v,ω to the pose P k,p and also propagate it in time [6,39] as shows in Equation (14). In this, ∇F u is the gradient operator applied to Equation (2) respect to the inputs (v x ,ω) and Q x are set equal to the Q k , pose terms in the EKF. The fusion filter is shown in Algorithm 2.

Event Based KF, Ackermann Case
For the Ackermann robot, the same algorithm of the differential case is employed but with ] T is used in Equation (7) as inputs of Equation (5) to perform the local fusion and then obtain the robot pose with Equation (2) that is corrected with L GP S . The event used is a combination of R A with and additional requirement for the satellites available N sat in the GPS sensor. A minimum N sat,min is defined to improve the accuracy of L GP S and avoid a correction of the local estimate with an inaccurate measurement. Also, the R k,GM values in the KF are increased (if N sat is low) or decreased (if N sat is high) online according to the current N sat , with this, L GP S measurements are taken more in account in the KF fusion when there are more satellites used in the GPS sensor. The fusion filter is shown in Algorithm 3.
As the proposed algorithms (Algorithm 4, 2 and 3) have a reduced z k and x k (comparing to the time based scheme Algorithm 1), the matrix inversion required for K k is performed faster, reducing the memory use and leaving resources for other tasks. The proposed experimental platforms are presented next.

Platforms Description
Two experimental low cost platforms are developed using the LEGO R ⃝NXT mobile robot platform due its low cost and easy setup. Its control unit is the NXT based on an ARM7 32-bits microcontroller with 256 Kbytes FLASH and 64 Kbytes of RAM. It also has an USB 2.0 port and a wireless Bluetooth class II, V2.0 device with 4 inputs and 3 analog outputs. If offers basic sensors such as touch, light, sound and distance, but it also can work with third party sensors like vision cameras, magnetic compass, accelerometers, gyroscopes, etc. [40,41]. The actuators are DC motors with integrated encoders sensors of 1-degree resolution [42]. The programing platform used is the Java based LeJOS, due to the programming advantages in the communications between a robot and a supervising PC. The main limitation of this robot is the memory being only able to manage up to 255 local variables, 1024 constants, 1024 static fields and a maximum code length of 64 kb when programing with LeJOS. Because of this, it is an excellent option to implement the proposed filters as it does not have enough memory to implement a large KF with many states and measurements.
All the local sensors are calibrated to remove any bias present, and their values are set to the S.I. system. Also for the encoders, the calibration procedure exposed in [2] is followed to improve the measurements accuracy. The preprocessing is done to obtain v and ω from the sensor data by integrating the encoders reading with a sample time of T s = 50ms to obtain the wheels velocities employed in Equation (3) to obtain v enc and ω enc . The gyroscope measures directly ω gyr . And θ comp is measured from the compass in a range [0, 2π], its change every T s is used to obtain ω comp . As both, the calibration and the preprocessing steps, depend on the used sensors and robot, these processes are performed for every robot used in the experiments and also when a sensor or a motor is replaced. The experimental platforms are described next.

Differential Indoors LEGO NXT
The Differential LEGO NXT robot used in the tests is shown in Figure 3a. The sensors used in the fusion scheme are two accelerometers placed above the center of each wheel axis (for the dynamic model, Figure 1b), one gyroscope, one magnetic compass and the wheels encoders as marked in Figure 3a. The global sensor scheme is the system shown in Figure 3b that is composed by the camera (640 × 480, 30 fps), the server that processes the image (camera server-C.S.) and the server that communicates with the robot (supervision server-S.S.). The C.S. executes a Java based program that constantly gets the image from the webcam, and makes the image processing to obtain the global measured pose L GM along with the time that the server took to obtain this value T cam (50 ms in average but the sent value is the actual measured time). This information forms the message that is communicated to the S.S. This server also stores every measure in a file and a video with the camera capture for the later analysis of the robot motion.
The delay ∆T is assumed known or measurable in the proposed algorithms. This can be obtained as a mean value from several experiments and this constant value can be used directly in the algorithms as a numeric approximation of the real delay time. But a better approach is to use the real measurement values, obtained each time the global information is accessed. This way, no approximation or mean value of ∆T is used in the algorithm, as the actual value is obtained by the following method. When the event is generated, the robot asks the S.S. via Bluetooth for a global measurement and the output provided is the EKF/KF estimation until the message from the S.S. arrives. As the S.S. executes a Java program that is continuously listening for the robot calls, the request is processed immediately, so it sends the last message from the C.S that contains L GM and T cam to the robot. When this message is received, the robot has also measured the round trip time T ss through an internal timer. As the measurement of T ss also includes the time of the image processing T cam , the communication delay is obtained as ∆T = (T ss −T cam ) /2; given that L GM is obtained as soon as the message is received by the S.S. and considering that the trip times are equal (from the robot to the S.S. and vice versa). The delay is used in Equation (13) to correct the EKF pose (Algorithm 2), and as the update is restricted to not be performed during the hard movements, the heading angle θ is assumed to be constant during T ss .
It should be noted that ∆T is considered as an input to the event based algorithms and in the present paper is obtained using the real measurements of T ss and T cam . Other approaches can be used to obtain it but for the proposed platforms, the measurement equation of ∆T is considered sufficient.

Ackermann Outdoors LEGO NXT
The Ackermann LEGO NXT robot used in the tests is shown in Figure 4. Once again, the sensors used in the fusion scheme are two accelerometers placed above the center of each wheel axis (for the dynamic model, Figure 2b, one gyroscope, one magnetic compass and the wheels encoders, these sensors are marked in Figure 4. Also, a differential is added to transmit the motor movement to the wheels while allowing them to rotate at different speeds (being v x the average of them), allowing the correct turn of the vehicle. As a global sensor, a SBG Systems IG-500N GPS [43] is used. It has an internal IMU that is not used during the test performed, only the GPS measurements along with N sat are employed to observe the behavior of the proposed algorithm with the robot IMU. To provide access to the GPS, an IGEPv2 board [44] is used to serve as a bridge between the GPS and the LEGO robot, it also serves as a data-logger to store the GPS sensor information along with the internal variables of the NXT robot. An USB hub connects the IGEP to the NXT with the setup (GPS-IGEP-HUB) being powered by a LiPo battery using a DC-DC converter to step-down the voltage to 5V. The fusion algorithm (Algorithm 3) is executed inside the NXT (not in the IGEPv2) to prove its applicability in limited resources platforms. The access to L GP S is handled using logic similar to the differential case, being the IGEPv2 the equivalent to the C.S. and S.S. in the outdoor framework. Also, the delay time ∆T is measured and used to adjust the L GP S used by the NXT.
The tests performed for both platforms are exposed next.

Experimental Results
To observe the performance of the proposed sensor fusion framework with the event based approach, in this section, several tests are performed in the platforms for indoors and outdoors scenarios. Also, an execution time test of the proposed algorithms is presented.

Local Fusion Performance Tests
To observe the correctness of the local fusion execution, the first test is done without the event based global correction EBGC or any global information (L GM ). The robot is set to follow a square and a circular reference trajectory using only the encoder measurements while recording the local sensor data and the C.S. recorded information. This data is employed in an Matlab R ⃝ simulation to compare the proposed KF (Algorithm 4) with an EKF (Algorithm 1), an UKF ( [5,45], same (x, z, u) k as Algorithm 1), and a KF version with z k = [ v enc ω enc ] T (encoder KF) along with Equation (3) as the estimation model to show the performance of the KF alone, without using the proposed sensor fusion with the dynamic model. This is shown in Figure 5, where the proposed algorithm show a good performance. From this figure it is clear that the KF, EKF and UKF filters perform very similar among them when using the sensor fusion with the proposed model and no global information. But in the case of the KF (Algorithm 2) it uses less computational resources. Also, using the encoders only or the encoder KF is insufficient for this platform. In the second test, the performance of Algorithm 2 implemented on the differential LEGO NXT is shown in the experimental results of Figure 6. Again good pose estimation is observed as the robot follows different desired trajectories.

Event Based Algorithm Parameters
The parameters of the event based approach are analyzed in the following tests. The relation between R A,lim , the performance index IAE (integral of the absolute error) and the number of camera queries is shown in Figure 7 for a 3 min test of the differential robot following a square trajectory. From this test, it is clear that the performance index IAE (in the position x, y) increases with R A,lim ; this is expected because a greater event level will produce less global updates, generating an increase in the pose estimation error and thus in the IAE. On the other hand, a decrease in the R A,lim values will improve the performance, producing a lower value of the IAE indicator down to a limit, defined by the maximum number of calls that the platform can made (according to the available resources and the communications delay ∆T ). From this figure it can also be observed that there is a tradeoff between the number of calls and the performance IAE ruled by the used R A,lim value. Less resources and global sensor queries are obtained with R A,lim > 2 but it will also produce a greater IAE. On the contrary, values of R A,lim < 0.125 generate smaller IAE values but with more resources and camera queries used.
With this, the recommended range of the event level parameter is 0.125 < R A,lim < 2, as these values will give a solution of compromise, with an adequate IAE and fewer camera calls. Figure 7. Relation between R A,lim , IAE performance, mean percentage error and camera queries for a 3 min square trajectory test, differential robot. In this Figure 7 an additional axis is added to show the mean x, y equivalent percentage error, obtained for each individual test by measuring the corresponding IAE of a one percent upscale in the x or y trajectory, and using this value to scale the corresponding IAE values from the tests. For the recommended R A,lim range, an error increase from 1.1% to 2.6% is expected (from 95 to 9 calls in 3 min), if R A,lim > 2 then the error can increase up to 6.2% (2 calls in 3 min) and if R A,lim < 0.125 then a minimum error of 0.2% can be obtained but with great resources and communications cost (142 calls or more in 3 min). From this it is clear that the proposed event based algorithm with and adequate R A,lim can obtain an acceptable IAE and percentage error while saving computational and communication resources by performing just the necessary queries to the global sensor to update the local estimation. This analysis can be performed for different platforms in order to obtain the optimum R A,lim range according to the setup employed.
The hard motion detection can be implemented in several ways according to the physical characteristics of the platform and the available sensors. For the proposed platforms, a hard turn or movement can be detected by observing the errors e L,R between the robot wheels velocities and the desired references, as this error increases when the direction changes suddenly and then rapidly decreases due the actuation of the PID controllers. The evolution of e L,R is observed in Figure 8 for the initial part of the square trajectory test, from it, a dual threshold can be established to define whether the robot is turning or not. By this, if |e L,R | > 2 then the robot is considered to be in a hard motion and thus, no global update must be performed. Finally, to allow the stabilization of the robot and to avoid the update in the case there are two consecutive hard movements, the algorithm can wait a predefined time (when returning to |e L,R | < 2) and then try to perform the global update. This waiting time depends on the settling time of the PID control of the wheels velocities, which in case of the proposed Lego platform, a minimum of 1s should be used due the noisy characteristic of the e L,R errors evolution. In case of other platforms, the e L,R errors evolution must be studied in order to obtain the error threshold |e L,R | and the corresponding waiting time.

Event Based Algorithm, Indoor Tests
The performance of the event based fusion framework with Algorithm 2 is observed in a long distance run. The robot is set to follow a square trajectory for 30min, as shows the experimental results of Figure 9. In this, the robot using encoder-odometry only works well in the first lap but the estimated pose quickly diverges from the actual one. The proposed KF in Algorithm 2 without global update works well at first, but the trajectory diverge slowly as the error covariance increases. But in the case of the KF, Algorithm 2, with the event based update using L GM , the pose is estimated properly as the trajectory remains very similar to the square reference and the pose covariance does not increase indefinitely (estimation error is bounded). The evolution of R A is shown in Figure 9d for the first seconds of the test in Figure 9c. It shows how the global update is requested when R A exceeds a R A,lim = 0.5, for example, at time 6.25 s. At this moment, the robot checks the hard motion indicator. As it is "true" the camera was only requested and the pose was not updated. The algorithm waits 1s and at time 7.25 s it checks again. As the indicator is "false", in this case the condition is cleared so the camera is requested again and the pose is updated at second 7.45 with a reset in the error covariance.
The IAE performance indicator has been obtained for the x and y position coordinates for the Figure 9 as it can be used as the main comparison of the proposed event based algorithm with the traditional odometry and the local fusion method. The results are summarized in the Table 2 from which the performance improvement obtained with the event based approach can be observed more clearly.
As a final performance test for the differential robot, two new trajectories are shown in the experimental results of Figure 10. Again a good performance is observed, with Algorithm 2, since the robot follows the desired path and the estimation does not diverge due the event based approach. A video of the tests performed can be found in http://wks.gii.upv.es/cobami/webfm_send/5.    Prior the outdoor test, the Ackermann robot is tested indoors in a long distance run using the camera setup instead of the GPS. The robot is set to follow a square trajectory for 30 min, as shows the experimental results of Figure 11a. Good performance is observed, with Algorithm 3, with the robot following the desired path and without divergence in the estimation due the event based approach.

Event Based Algorithm, Outdoor Tests
The outdoor test is performed for the Ackermann robot, a long distance run is done following an outdoor velodrome track in a clockwise sense. A differential GPS (DGPS) is added to the platform (Figure 11b) to validate the result and obtain a more precise measurement of the real trajectory followed, but its information is not used by the robot to estimate the pose (only the IG-500 GPS is used in the event based scheme). The trajectory followed and the absolute estimation error is shown in Figure 12. Good performance is observed with Algorithm 3, since the estimation does not diverge due the event based approach (the estimation error is bounded) and the estimated pose is similar to the DGPS measurement. By modifying R A,lim the accuracy can be adjusted to allow the robot more queries to the GPS depending on the resources available, but the overall accuracy will depend on the GPS sensor used. The execution time of the different algorithms is analyzed next.

Run Time test
To evaluate the run time efficiency of the proposed algorithms, a simulation of several KF algorithms using Matlab R ⃝ running on a computer (2.4 GHz with 4 GB RAM) is performed. This is shown in Figure 13a where the first two columns correspond to the proposed methods KF in Algorithm 2, and EKF in Algorithm 4 that are compared to Algorithm 1 and an UKF (same (x, z, u) k as Algorithm 1). From this test, it is clear that the proposed KF Algorithm 2 and EKF Algorithm 4 have less computational effort (as they uses less ms of processor time) to obtain the pose estimate when comparing to the traditional approach Algorithm 1 or when comparing to the newer approach of the UKF. Although Algorithm 2 uses less time, it has similar performance as the more complex ones, as it was shown in the Figure 5. A second test, where the execution time is measured for the different tasks running inside the robot, is performed. In this, the proposed KF Algorithm 2 and EKF Algorithm 4 are tested (with and without the event based approach) and compared with the time based EKF Algorithm 1. The task measured is the sensor reading (with calibration and preprocessing), the Kalman fusion algorithm, the control algorithm (navigation and motor control) and the write task which store the variables needed for supervision in a text file. This is shown in Figure 13b. Execution times are measured every cycle over a one minute test; and, as they are not constant, three cases are presented. Case a shows the mean task time per cycle, case b shows the time of the worst execution, and case c shows all the maximum times measured during the test although they don't occur at the same time at any cycle (or through the 30 min run), but is an indicator of worst case possible. This test show that only the proposed methods fulfill the sample time of 50 ms for cases a and b, being the KF Algorithm 2 the less resource consuming of all filters. The proposed EKF exceed the T s only in case c, but this is only a theoretical case, in all the tests performed this case never showed. As for the Algorithm 1, this exceeds T s in all the cases, not being suitable for being used in this robot where this sample time is needed. With this tests and the one in Figure 13a, the UKF will also exceed the required T s . Also, the memory limitations of the robot will not allow the implementation of any other task when using the Algorithm 1 or the UKF if T s = 50 ms and when the calculation of K k is performed in every cycle.

Conclusions
An efficient sensor fusion framework using the event based KF with a particle dynamical model of a differential wheel mobile robot for indoors navigation and an Ackermann mobile robot for outdoor navigation, have been presented as a solution for the localization problem. The results show that the performance of the proposed sensor fusion framework is similar to those obtained by using more complex EKF and UKF strategies with time based update and larger state and measurement vectors, but with a faster execution and less memory usage, allowing the implementation of the algorithm inside a limited resource robot while leaving enough resources for other tasks that must be executed inside the robot.
The sensor fusion framework can be adapted to other platforms by adding more or less sensors according to the robot capabilities, adjusting the KF matrices and vectors as needed. If the robot has very limited resources, this method can work using only the encoder measurements and one heading angle/rate sensor. Also, both accelerometers can be substituted for a model (identified from experimental data) that relates the motors control action and the linear accelerations of the wheels, to use as inputs in the proposed dynamic model. On the other hand, in an advanced robot with more resources, the event approach can be used to save bandwidth (reducing the number of queries to a global sensor) while substituting the KF with an UKF to improve accuracy.
Due to the evolution of the error covariance observed in the results, the event based method is necessary to correct the estimated pose. The results show an improved estimation and performance over the traditional odometry or with a fusion method without global sensor. Also, the event based approach reduces the processor usage, communications and battery consumption in the mobile robot, as it updates the pose only when it is necessary.
As future work, the method can be extended into different mobile robots configurations such as the Omnidirectional by adding particles to the proposed equivalent dynamical model. These particle-equivalent models can also be compared with more traditional dynamic and kinematic models in terms of accuracy, computational performance and implementation feasibility. Additionally, different sources of global information can be used, for example a scanning laser rangefinder to extend the method into a SLAM algorithm. Finally the event approach can be extended to provide a solution to the multirobot cooperative localization problem. A. Appendix

Dynamically Equivalent Particle System
To study the robot rigid body as a dynamically equivalent particle system, formed by two particles of mass M L and M R joined by a massless connector of constant length b (Figure 1b), the following conditions must be met [37]: By defining R L = R R = R N the masses can be obtained as it is shown in Equation (15). The masses M L and M R are proportional to the total mass M G expressed by the constant γ. Also the constant λ is defined as the ratio between the mass and moment of inertia of the rigid body multiplied by the distance between the mass center and the particle.
By substituting I G in Equation (15), the parameters of the particle system are obtained for different robots shapes as shown in Table 1. To obtain the dynamic model, first, the second Newton's Law is applied to both the rigid body and the particle system shown in Figure 1b to obtain Equations (16a) and (16b).
Both systems Equations (16a) and (16b) are dynamically equivalent when using Equation (15) and the parameters from the Table 1, but also the forces and torques applied to Equations (16a)