Course Project - IMU coordinate system

Dear all,

I spent much time in finding out what is coordinate system of the IMU. Are there some documents about it?

And in the given solution, "right, left " is also not easy to think about…


Hi @kailin.tong,
This took me a while to figure out too. The Imu coordinate system is fixed to the robot, meaning it rotates with it. The y axis is defined pointing back, so opposite to rolling forward direction. the x axis is defined pointing right in rolling direction, and the z axis points up. So when you bump sphero in front, there will be acceleration along the y axis and it will be positive. Hope that helps :slight_smile:


Hi! I experimented and analyzed the values of the linear accelerations in a collision with an obstacle and found that in a frontal impact the value of linear acceleration in x takes a negative value, and when the backward motion is a positive value. I.e. the x-axis of the IMU coincides with the movement back and forth. However, the values on the y axis change slightly. This differs from your statement that the y-axis points in the direction opposite to the forward direction, and the x-axis points to the right of the rolling direction. The same behavior can be observed in rviz by observing the IMU axes and the direction of movement of the sphero. Help me figure it out.

Hey @kongv1,
Welcome to the community :slight_smile: !
Perhaps some things changed. You should open rviz, add the robot model and TF and have a look at where things point. As you wont see the maze, it helps to move the robot forward very slowly, so you know what direction is what.

Thanks! :slightly_smiling_face:
In the example of the method that defines the strike sector (def for_sector_detection(self)), the solution logic is based on movement along the y axis. And I had to work hard to figure it out. :exploding_head: :slightly_smiling_face:

Ohh I think I understand your confusion. To move the robot forward, you add x_velocity, but the IMU data points in the way I described. Yeah, it’s a bit weird…