RoboticsClubatUCF / AGV

4 stars 2 forks source link

Sensor Models: GPS/IMU/Odometry #4

Closed wesfletch closed 2 years ago

wesfletch commented 2 years ago

Verify that the simulated sensors for GPS/IMU and other Odometry sources are working properly in simulation. Ideally, we would check against similar, real world data.

DinoDerk commented 2 years ago

Orientation IMU

The IMU rotations are measured in Quaternions in which are 4d imaginary numbers. The rotation of z axis will turn about 0.7 at the first 90 degrees and will go 0.3 for the following 90. So, each 180 degrees, the robot does indeed change by either 1 quaternion. This will change due to current z value. It will go to 1 then down to –1 in which will go back up. It will bounce repeatedly

We tested the position using the odom. In both the x and y direction the robot was able to move about 10 units in the positive and negative direction in relation to the origin. At start, the robot moving forward will have a positive x display approaching 10. As we reverse, it goes back to 0 when hitting origin. If we continue reversing, the value x displays become negative approaching -10. The y value acts in the same way depending on orientation. (20 units by 20 units is the size of the starting square that the robot is on at launch of rviz or gazebo)

When testing the pitch we noticed that the orientation records y in terms of 0 and 1. While the robot rotates the printed values will move from 0 to 1 and then back to 0 and then to –1 and back to 0. loWhen the front of the robot is facing in an upward direction the value gets closer to 1. If the robot is facing in the downward direction the value will move closer to –1.