ArduPilot / ardupilot_gazebo

Plugins and models for vehicle simulation in Gazebo Sim with ArduPilot SITL controllers
GNU Lesser General Public License v3.0
81 stars 76 forks source link

Fix transform from ENU to NED in examples #58

Closed srmainwaring closed 1 year ago

srmainwaring commented 1 year ago

Bug report

The plugin xml has an incorrect mapping between the world frames used in Gazebo and ArduPilot.

The change required to correct the transform from ENU to NED is:

-      <gazeboXYZToNED>0 0 0 3.141593 0 0</gazeboXYZToNED>
+      <gazeboXYZToNED>0 0 0 3.141593 0 1.57079632</gazeboXYZToNED>

The inconsistency becomes apparent when fixing geo coordinates in a Gazebo world file and using the NavSat sensor, or when using ROS to bridge data via MAVProxy or DDS to the flight controller.