I recently tried to fly an Anafi drone using both Olympe and using the FreeFlight app. Outdoors the drone works great. However, as soon as I am indoors, the drone starts to yaw. I ran the script below, which requested the drone to move left and right 1m continuously. You can see I don’t send any yaw commands. However, during this test, the drone yawed randomly.
# -*- coding: UTF-8 -*- import olympe from olympe.messages.ardrone3.Piloting import TakeOff, moveBy, Landing drone = olympe.Drone("192.168.42.1") drone.connection() drone(TakeOff()).wait() drone(moveBy(0, 1, 0, 0)).wait() drone(moveBy(0, -1, 0, 0)).wait() drone(moveBy(0, 1, 0, 0)).wait() drone(moveBy(0, -1, 0, 0)).wait() ... drone(Landing()).wait() drone.disconnection()
Reading through the forums, I found this question, which had similar problems. @Maxime replied stating: “Indoors the lighting, the ground reflection and its uniformity can induce a drift”. To reduce the possibility that a uniform ground pattern causes the yawing, I taped patterns on the floor using black duct tape. However, doing this did not change the behavior of the drone, and it still yawed without me sending yaw commands.
I ran more tests to try and figure out what exactly was causing the issue, and I think I have narrowed it down to bad compass readings. This video is a test I ran indoors where I hold the cage and then using the FreeFlight app display the compass readings. As I hold the drone and walk towards the north, you can see that the direction of north changes.
My questions are:
- Is there a way to fix the compass readings, either by turning them off or feeding them new data?
- Does the Anafi drone use a down-facing camera as part of its localization algorithm (i.e., why didn’t marking the floor help?). If it does use a down-facing camera, should I do something specifically in the Olympe code to activate it?
Any advice on the matter would be appreciated