Drone is shifting away in Gazebo SITL

Hello guys,

I am working on a project where I am trying to move the quad with only thrust, pitch, roll and yaw commands without GPS reliance or any flow sensors. I switch to GUIDED_NOGPS mode to achieve this. Once I switch, the drone shifts away with zero euler angles.

What I tried

  • I tried to control the drone with set_attitude_target.py of dronekit.
  • I also tried to control the drone with a mavros node

but the problem was still the same. However, when I checked the acceleration with rostopic echo, there was no acceleration in x and y direction but the drone shifts away slowly. I would appreciate any help or idea on the issue

Regards.