localization - Robot Navigation


Localization

As discussed,Localization is the process of position it self with respect to the surrounding, surrounding can be define as the global or the local . Consider a person who is in a dark room. if he does not have sens of where he is with respect to the features of the room , next movement could not grantee that he will not hit a wall. So it is important to localize itself if it is moving with respected to it surrounding. If the system has map of it's surrounding , once he has the current and goal positions, actions are straight forward. If there is no map,like in our case, it need to build a accurate enough map while exploring. And also movement should not be too costly to the goal. So to resolve this problem karlman filter integrated particle filter is used to probabilistically map the position and the surrounding.

Lidar Scan Data

since 2D Lidar is used , Algorithm is only compatible with signal ,one set of distance measurement around fix z axis coordinate with resolution of 1degree.

Encoder Data

Here encoder Data will be two set of counts related to left and right wheel ,generated optical encoders connected to left and right wheels

Algorithm

localization is determining the position with respected to it surrounding , surrounding may be the nearest set of object which it can detect or the globally it position respect to the earth. Determining the it position is important since it determine how much it can move round with out bumping to passing object and also for get to its goal position with minimum number of maneuver .

we cannot totally rely on the measurement from integrated sensors since they obviously have errors. So compunction for the errors is necessary.

So To the compunction for the error and build out accurate set of prediction,we need,really good mathematical model of the system .

Robot Dynamics

As discuss before system uses left and right speed variations for manure, as bellow we can define right and left motor travel as r and l for distance travel for unit time ,then we can calculate the steering angle alpha.

 and Its steering radius R as following,
  


















despite 4 motors, for this design ,motors works left motors as one and right motors as one , for the simplification of the dynamics. Robot uses speed of the left and right motor to rotate, That means if left motors rotate faster than the right motors ,Robot  will rotate to right side.

  To make a dynamic equation, robot state can be define as the x and y coordinate related to the reference point and also the robot heading angle to theta . So it can be move that the new position P'  from the current position  P.

equation to the next position can be derive using last position P as following,     

                        

 It can be seen that there is  two possible cases, l = r and l != r, And also that  model is nonlinear one.
                        
So, to apply karlman filter approach for the system, equations  should converted to a linearize one, like following                       
It can be derive that the At and Bt vectors as,
                                

So we have to calculate the two G's partial derivatives with respect to the state and control vectors

first we can define function G as following
then, G/ state can be calculate as,
                         




and G/control can be define as,

                                





          

















Finally we have to consider the observation of the system, since observation are distances and the angles to the landmark with respected to the robot position

 So,
                         
 

r and l can be define derive as following   when coordinate of the landmark is (Xm ,Ym) and coordinate of the sensor is (Xe ,Ye

                           

 So this is also non-linear and need to convert to linear model.
                             
                             





















It can be seen that landmarks does not integrated to the system model .since it is part of the system state,it is essential to integrated.


so as bellow calculation proven that initial model that we build does not affect much with land mark but state vector and other transition vector getting bigger every time sensor get new landmark to the system . This should be expected since It tend to build the local map.


 With this new state element system going to extend like this,

                       

then, equation will be,
 so that will affect to the calculation as




and








Now we can apply this calculation to the kalmarn filter

Comments

Popular posts from this blog

Measuring 3D Distances between points using Kinect

Implementation - Robot Navigation

Full stack development of Robot navigation