Obstruction Avoidance Overview

Here’s what ‘H’ does detecting an obstacles within one meter:

Now it’s time to get her to move around the obstacle and continue to her destination.  All sensors are installed and working; this is pure code in the autopilot process*.

Here’s the general idea for how the code should work for full maze exploration:

  • Takeoff, then…
    • hover
    • record current GPS location in map dictionary, including previous location (i.e index “here I am” : content “here I came from” in units of meters held in a python dictionary
    • do Sweep 360° scan for obstacles
    • find next direction based on the current map contents either…
      • unexplored unobstructed direction (beyond 2m) biased towards the target GPS point (e.g. the centre of the maze)
      • previously visited location marking the current location in the map dictionary as blocked to avoid further return visits
    • head off on the new direction until
      • obstacle found in the new direction
      • unexplored direction (i.e not in the map so far) found
    • repeat

And in fact, this same set of rules are required for just avoiding obstacles, which is good, as I doubt I’ll ever be able to find / build a suitably sized maze, and if I did, the LiPo will run out long before the centre of the maze is reached.

* The fact it’s pure code means it’s going to be quiet on the blogging front apart from GPS tracking videos when the weather warms up.  I’m also considering building a new version of Hermione from the spares I have in stock, provisionally called “Penelope”.  She’s there for shows only; I can then use Hermione purely for testing new features without worrying about breaking her prior to an event.

2 thoughts on “Obstruction Avoidance Overview

  1. Hi,
    Need your advice. I took an embedded systems course and it involves a design project. How would you rate using a raspberry pi to make a quadrotor capable of stable flight and clicking pictures using pi cam. We were thinking about buying a DJI F4550 kit so we’ll be just working on the controls code. We have about 3 months of time. Should we go for it? Any piece of advice will be helpful from your experience.
    Thank you.

    • I think this is a lot to do in 3 months. I’ve spent 5 years getting this working. Even if you started with my code, I still think 3 months is difficult. Also, my drone is autonomous – there’s no remote control. Once I press go, my only control is a kill-switch. That make it costly as the drone needs more sensors because there’s no human in the loop. Also, my drone doesn’t take pictures as the camera is pointing at the ground tracking lateral motion.

      Crashes from the sky always cost lots of money to repair. I’ve spent many thousands over the 5 years. If I was you, I’d do the same thing but with a robot on wheels firmly on the ground!

Leave a Reply

Your email address will not be published. Required fields are marked *