The VEX AIM Coding Robot’s Inertial Sensor includes a built-in 3-axis gyroscope for measuring rotational movement and a 3-axis accelerometer for detecting changes in motion. These sensors allow the robot to track its orientation and acceleration. In addition, the robot can report its current position. This article explains these various values.
Axes
At the beginning of a project, the robot starts at location (0, 0). As the robot moves around the field, it can report it's current x and y position. The x-axis runs horizontally with positive to the right of the robot and negative to the left. The y-axis runs vertically with positive in the forward direction of the robot and negative in the reverse direction.
The x-axis is the red arrow in the image here. If the robot moves to the right from the starting position, that's moving in the positive (+x) direction. If the robot moves to the left, that's moving in the the negative (-x) direction.
The y-axis is the green arrow in the image here. If your robot moves forward (or up in this image) from the starting position, it’s moving in the positive (+y) direction. If the robot moves backward (or down in this image) it's moving in the negative (-y) direction.
Orientation
As the robot moves around the field or is moved by hand, it can report the degree of turn along different axes from –180 degrees to +180 degrees. This is also called orientation. The three axes for orientation are shown here.
Pitch (red arrow in the image here) is like your robot looking up toward the sky or down toward the ground. Tilting up increases the value while tilting down decreases the pitch value.
Roll (green arrow in the image here) is like your robot tipping from side to side, similar to tilting your head to one shoulder or the other. Tipping to the right increases the value while tipping to the left decreases the roll value.
Yaw (blue arrow in the image here) is like your robot spinning around, turning to the left or right, just like when you shake your head 'no.' Spinning to the right increases the value while spinning to the left decreases the yaw value.
Acceleration
Acceleration values from the robot show the rate of change in one of the directions shown here.
Rightward indicates acceleration to the right or left. Positive values mean the robot is accelerating to the right, negative values mean it’s accelerating to the left.
Forward indicates acceleration to the front or back of the robot. Positive values mean the robot is accelerating forward, negative values mean it's accelerating backward.
Downward indicates acceleration up or down. Positive values mean the robot is accelerating upward, negative values mean it’s accelerating downward.
When the robot is sitting still on a flat surface, it’s not moving up or down, but gravity still acts on it. As a result, the acceleration values in the downward direction will typically read about -1 g (since gravity is pulling downward). If you lift or tilt the robot, or if it moves up/down, these readings will change accordingly. By watching these acceleration values, you can tell not only if your robot is speeding up or slowing down, but also which direction it’s moving or tilting in.