Garuda Robotics Software Development Engineer Nicholas Ng speaks about open source drones in everyday life at NTU Open Source Society's TGIFHacks on 23 September 2016. He will be sharing on how to use open source UAV technology to solve real world problems. He believes that open source movement enables everybody to kickstart their UAV journey with the correct platforms and frameworks, which he will be sharing with few examples used by Garuda Robotics in their solutions.
3. About Myself
• NTU Computer Engineering, Class of 2014
• Love robotics
• Basic electronics, embedded control, mobile
application, robotics AI
• Everyone will have their own robots
26. Step 2: Install GCS
• Windows – Mission Planner
– http://ardupilot.org/planner/docs/common-install-mission-planner.html
• Linux, Mac OS X – APM Planner 2
– OS X
http://ardupilot.org/planner2/docs/mac-install.html
– Linux
http://ardupilot.org/planner2/docs/installation-for-linux.html
• Android
– https://play.google.com/store/apps/details?id=org.droidplanner.android&hl=e
n
27. Step 3: Code
print "Start simulator (SITL)"
import dronekit_sitl
sitl = dronekit_sitl.start_default()
connection_string = sitl.connection_string()
# Import DroneKit-Python
from dronekit import connect, VehicleMode
# Connect to the Vehicle.
print("Connecting to vehicle on: %s" % (connection_string,))
vehicle = connect(connection_string, wait_ready=True)
# Get some vehicle attributes (state)
print "Get some vehicle attribute values:"
print " GPS: %s" % vehicle.gps_0
print " Battery: %s" % vehicle.battery
print " Last Heartbeat: %s" % vehicle.last_heartbeat
print " Is Armable?: %s" % vehicle.is_armable
print " System status: %s" % vehicle.system_status.state
print " Mode: %s" % vehicle.mode.name # settable
# Close vehicle object before exiting script
vehicle.close()
# Shut down simulator
sitl.stop()
print("Completed")
Save as hello.py
More code example:
http://python.dronekit.io/examples/index.html
31. Summary
• Explore the potential of drones technology in
improving people’s lives
• Everyone have access to UAV technology
• Time to build your own drone at home =)
Current UAV technology can be used to enhance people’s daily lives. 3 examples will be shown to demonstrate the possibilities.
NEA solve the Zika/Dengue problems by stopping the breeding of mosquitoes.
Fogging is one of the solution, but it can’t eliminate mosquito breeding on the roof top.
In the past, they use ladder to reach the roof, then dispatch larvicides in the water patches.
Develops a UAV system that able to identify water patches on the roof based on live video feed, then dispatch larvicides accurately to the spots.
Before building, a survey conducted to ensure nothing blocking between extisting and new tower.
Sending someone up 30 meters on the boom lift, that person has to stay there for half and hour more.
Takes up time and unsafe.
UAV system that includes a drone that carry a zoom camera
Mobile app that allows a surveyor to control drone and photo taking from the ground
Tower survey safter
Faster, because working autonoumously
We have seen how drones used in pest control and tower survey
Lets move on to something very relevant to Southeast East Asia but you cant find in Singapore
Using drones in palm oil plantation
How do you know which tree is unhealthy in large plantation area?
THOUSANDS HECTARES, THOUSANDS TREES.
With current computer vision technology, tree classification and identification is possible
Solution:
1) Identify tree which is unhealthy
2) Position UAV on top of unhealthy tree
3) Deliver pesticide
After sharing examples of how drones solves real world problem
How you and I, together we can get started to build open source drones
Dronecode Alliance coordinates and prioritizes funding for five other initiatives with backing from 28 member organizations all committed to collaborating on a de facto standard platform for consumer and commercial drone/robotics open projects.
What do we have in this whole package?
On Board Vehicle – components sits on the drones, AKA air unit
Off Vehicle – components used by operator to command drones, AKA ground unit
As you can see, not everything is directly under dronecode, some are affiliated, some are even under development
Garuda Robotics generally interested to develop the advanced controls and customized ground control for specific use cases
Now it’s the time for us to understand more on what goes up in the air
1) There plenty of flight controllers in the market. The most popular in the market: Pixhawk. Why? Open source!
2) Community and documentation!
3) Sample diagram on how to assemble all electronic components together
4) Because it is so popular, there are many clone versions appear on the market
5) For the budget conscious, you can try your luck looking for a clone on website like Aliexpress or ebay.
Flight code is the real time, low level control code that controls the vehicle movement. (actuators and sensors)
Few open source flight codes available. APM is the most popular choice.
APM is matured, the community and support is great. APM offers for different kind of copters, planes and even ground robot
Mavlink as the main UAV comms protocol.
Regardless of physical transmission medium (serial, radio comms and wifi)
Define standardized commands
For application developers(air, ground, cloud), there are APIs available to get you started
Functions to send Mavlink commands
Mobile: Android, IOS coming soon
Desktop, laptop: Python
Cloud: currently not available
Further example of dronekit air unit app: Add visual recognition to drones
Pick a companion computer, recommended Raspberry Pi, since it easy to get started and the support is readily available
Coupled with a simple camera, example Raspicam
OpenCV: a library of programming functions mainly aimed at real-time computer vision, which is also open source.
Connect the companion computer to the flight controller through serial interface (UART)
On the other end, we have ground control station that commands the UAVs.
Plan mission path for autonomous flights
Telemetry, drones status
Mission planner is the most complete
APM Planner 2 in many platforms
Tower app on mobile devices (developed on dronekit android)
Code testing, in controlled environment without risking the real UAVs.
Hardware. Connect drones to PC
Software. Simulate real drones, can fly drones around
Advanced: camera and sensors
Flight controller
Flight Code
GCS
Companion Computer for advanced controls