rosflight / rosplane

Fixed-wing autopilot for ROSflight
https://rosflight.org/
BSD 3-Clause "New" or "Revised" License
15 stars 3 forks source link

IMU sim update #25

Closed iandareid closed 4 months ago

iandareid commented 4 months ago

The IMU does not simulate the accelerometer correctly. It should use the same model as the UAV book. Specifically it should measure the specific force.

iandareid commented 4 months ago

If we use the exact same model as in the book, it will not account for friction or collisions. These are not the primary focuses of ROSplane, so this is not an issue. This problem may not apply as much to ROScopter. I do think that we will have similar issues but it is something to be aware of.

iandareid commented 4 months ago

The current standing on this branch is a simulation using the aerodynamic forces and moments, however, under .5 meters it uses the old Gazebo based method. This allows for the friction and collision to still work while the airplane takes off and lands. I was going to leave this out but, I think it was causing the results of the estimated state to be poor, especially early in the flight.

Another note is that Gazebo uses a NWU reference frame rather than a NED. This caused some issues while coding. Additionally, The original Gazebo based implementation had to add gravity back into the measure, but the forces as reported include gravity.

Noise and bias characteristics remain the same.

iandareid commented 4 months ago

The parameters have been added are controlled from the same location as the aerodynamic coefficients. The cutoff point where the specific force is used is still hard coded.

This will unfortunately not solve our issues with calibration, since we still use the Gazebo accels below 0.5 meters.