0
$\begingroup$

I have a simple car robot with four wheels moving relatively slowly (5~10 mph). The robot has a velocity magnitude and yaw rate sensor and the sensor samples about every 0.1 seconds. I want to map the location of the robot in the room in a global coordinates using these two values. What I am doing is robot starts out at location (x=0,y=0). I calculate the location by saying

x = velocity*cos(yaw_rate)*sample_interval
y = velocity*sin(yaw_rate)*sample_interval

So far with this method, the location calculated is actually fairly good as long as the yaw rate is not so large. But if my understanding is correct, yaw rate is the rate of angle change and not the angle changed and to get a better model and the actual direction the vehicle is facing, I will need to say integrate the yaw rate. I want the angle the robot's face normal vector makes to vertical axis so I can figure out the direction robot is facing or it's pose.

Now this must be a very well known equation in robotics and mechanical engineering but my back ground is in programming and I have no idea where to start. I tried searching on google but my search words must not be right since I can't find a good page. Can you point me to the right direction, let me know of a starter page that I can look at?

$\endgroup$
0
$\begingroup$

First of all, two equations you have mentioned above is completely wrong. If we consider the units, velocity - m/s, yaw rate -rad/s, time - s and after multiplying an additional 1/s is remaining. Maybe you are getting the yaw, instead of yaw rate. So its better to clearly mention what types of sensors you are using.

For these kind of position estimation, we usually use Extended Kalman Filter to fuse the measurements of several sensors. I recommend you to understand what is happening inside an EKF. There are plenty of online articles and youtube videos available. Further MATLAB has an inbuilt function for this.

After understanding concepts behind the EKF, you can identify two major steps are carried out when fusing measurements ; prediction step and update step. But since you dont have an absolute positioning system you can use only the prediction step. This is also known as dead reckoning. The main disadvantage of this method is that the error of the position estimation accumulates with the time.

$\endgroup$
  • $\begingroup$ After solving the issues presented in the reply, if you have two coordinates in two following moments (x1,y1) and (x2, y2), you can think that the heading is the angle that form these points $\endgroup$ – galtor Aug 21 at 12:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.