From Noisebridge
Jump to navigation Jump to search

Hi, Mark here. I'm building a robot for drones: (prototype stage). Email me here.

Here's a summary of the RESTful Robots 5MoF talk I'm giving on Thur 2/15. If you have any suggestions or concentrations please let me know.

I'm building a robot called Birdhouse, a remote telepresence launchpad for consumer drones like the Phantom. It looks like a breadbox (shelter / charge), and opens to a flight deck (launch / fly / land). In this talk I'll discuss the software stack I'm running since this is my first robot and I'm probably doing it wrong. Anyway, here's one non-ROS approach and I'm open to suggestions!

While it doesn't walk or fly, I call Birdhouse a "robot" since it does run an autonomous event loop (no human UI):

  1. gather data from sensors and telemetry
  2. apply realtime logic
  3. run actuators, etc to change state

To minimize pilot loading, this loop runs whenever props are spinning i.e. the pilot is piloting. It's a worst-case scenario and consequently a best-case for system requirements. Consider the scenario of an outbound drone breaching a departure geofence, signaling Birdhouse to close:

  • stream LOS (line-of-sight) video (RasPi cam, mplayer)
  • ingest drone telemetry @50 Hz
  • downsample to Birdhouse @5 Hz (REST updates)
  • read sensors: light, weather, audio, video (ZeroMQ pub/sub)
  • logic & logging (e.g. waypoint math for LOS aiming and geofence detection)
  • re-aim LOS camera at drone
  • run "close" sequence (5X motors, lights)
  • serve file from network share (smb)
  • serve web and REST requests (http)

The software architecture I'm proposing draws from a number of OSS projects. It provides system services for general robotics like low-to-zero latency and high concurrency. On top of that I'm implementing some abstractions for dev-stage robotics:

  • HAL (hardware abstraction library)
  • Virtual clock
  • RESTful hardware singleton

References: Python, Django, Django Rest Framework (DRF), Django Q / Channels, ZeroMQ, NGINX, uWSGI