Yaw offset between Gazebo world and Mavros GPS

I have spawned a drone (based on Multi-robot Systems (MRS) group at Czech Technical University in Prague · GitHub), using ROS noetic on ubuntu 20.

The gazebo world is a digital copy of a real world agriculture farm and the GPS coordinates mimic that of a real world. However, the mavros gps results showcase a 90 degree offset between the gazebo gps coordinate value and the mavros gps values.

Can you please tell me if there is a way I can overcome this offset from the mavros side. Sorry if the solution seems trivial, I am new to mavros.

Thanks in advance

How are you simulating the “real” gps coordniates? It is likely your map is in different coordinate frame compared to gazebo.

Therefore you shouldnt fix it on the mavros side

1 Like

Thank you for the prompt reply and apologies for my delayed response.

The snippet for the spherical coordinates in the gazebo.world file can be found here

  <!-- <yaw>1.5708</yaw> -->
  <!-- <world_frame_orientation>NWU</world_frame_orientation> -->

I have tried to add the yaw, world frame orientation and heading_deg here…but to no effect on the mavros gps result.

Can you please suggest a possible alternative solution( that is not from mavros side).