Calculating Velocity with Accelerometer & Pitch for Robot Positioning

  • Context: Graduate 
  • Thread starter Thread starter erickulcyk
  • Start date Start date
  • Tags Tags
    Accelerometer
erickulcyk
Messages
8
Reaction score
0
Hello, I have an Ocean server 4000 compass/accelerometer, and I am trying to use it to gauge the position of a robot on which it is placed. I get Ax, Ay, Az, pitch, roll, and heading as the output currently. I also have the accelerometer set to do a moving average of 16 readings. I did a simple experiment where I moved the robot forward in roughly the direction and stopped it. When I calculate the velocity straight from the Ax readings, the velocity doesn't end at 0 like it should (I brought the robot to stop for several seconds at the end). Furthermore the resting Ax at the start is different then at the end. The pitch has also changed though. In fact, the Ax values followed the pitch very well. I think there must be a relation to get the true x value given the two. I have tried Ax-pitch, Ax+pitch, Ax-sin(pitch), Ax+sin(pitch), √(Ax^2-sin(pitch)^2), however non of these gives me a velocity of close to 0 at the end. Can you help me out?

Thanks,
Eric
 
on Phys.org
Yes, if angle readings change throughout, you have to take it into account. There is no simple formula, though. You need to convert Ax, Ay, Az in local coordinates to Ax, Ay, Az in "world" coordinates. The later can be arbitrary, but they need to be fixed. These two articles might help you get started.

Euler Angles
Rotation Matrix
 

Similar threads

  • · Replies 47 ·
2
Replies
47
Views
6K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 15 ·
Replies
15
Views
7K
  • · Replies 25 ·
Replies
25
Views
9K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
25K
  • · Replies 4 ·
Replies
4
Views
11K
  • · Replies 1 ·
Replies
1
Views
10K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K