Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
PX4 in STEM education: How we taught a thousand
students how to program drones
WEB PAGE
C O P T E R E X P R E S S . C O MOrigins (2013)
WEB PAGE
C O P T E R E X P R E S S . C O MPizza delivery in Syktyvkar (2014)
WEB PAGE
C O P T E R E X P R E S S . C O MPizza delivery in Syktyvkar (2014)
WEB PAGE
C O P T E R E X P R E S S . C O MAutonomous delivery in Samara (2016)
WEB PAGE
C O P T E R E X P R E S S . C O MAutonomous delivery in Samara (2016)
WEB PAGE
C O P T E R E X P R E S S . C O M
WEB PAGE
C O P T E R E X P R E S S . C O M
Video of charging station
Autonomous monitoring UAS
WEB PAGE
C O P T E R E X P R E S S . C O MDrones in education
WEB PAGE
C O P T E R E X P R E S S . C O MApproaches to educational drones
• RTF drones
• modular drones
• kits of common parts
WEB PAGE
C O P T E R E X P R E S S . C O MProblems of robotics education
Robotics is a young field. It makes it so interesting, but for the same reason it's hard to learn.
Alternatives:
• make something simple
• hide complexity
• make awesome documentation
WEB PAGE
C O P T E R E X P R E S S . C O M
vue.js docs ROS docs
WEB PAGE
C O P T E R E X P R E S S . C O MHow to teach robotics?
Alternatives:
• make something simple
• hide complexity
• make awesome documentation
WEB PAGE
C O P T E R E X P R E S S . C O MOur drone kit
WEB PAGE
C O P T E R E X P R E S S . C O MWhy “CLEVER”?
Клевер /ˈklʲevʲir/ – clover
WEB PAGE
C O P T E R E X P R E S S . C O MCLEVER 4 kit
WEB PAGE
C O P T E R E X P R E S S . C O MHardware & software
Speed controller ESC 4 pcs.
Power distributionboard with BEC
Flight controller
Single-boardcomputer
Machine vision camera
Electric motor 4 pcs.
Frame kit
Propellerprotection
AssemblySet
Charger
Light-emittingdiode strip
Assembly manual,Training Materials
Propellers (couple) 4 pcs.
Batteries 2 pcs.
Remote Control
Assemblykit
Trainingsimulator
Laserrangefinder
WEB PAGE
C O P T E R E X P R E S S . C O MWhy PX4?
Autopilot software requirements: • flexibility • necessary features (low-level control, indoor
flights) • not just firmware, but the full stack (ground
control, log analysing) • simplicity • stability • community
WEB PAGE
C O P T E R E X P R E S S . C O MDocumentationclever.copterexpress.com/en
WEB PAGE
C O P T E R E X P R E S S . C O MAdoption
WEB PAGE
C O P T E R E X P R E S S . C O MPath of student
WEB PAGE
C O P T E R E X P R E S S . C O MSchool
• school camps
• physics: maybe
• design & engineering: yes
• computer science: YES PLEASE WE WANNA CODE THE DRONE
WEB PAGE
C O P T E R E X P R E S S . C O MSchool: benefits with drones
WEB PAGE
C O P T E R E X P R E S S . C O MCollege«UAS Operating» educational standard for colleges
WEB PAGE
C O P T E R E X P R E S S . C O MCollege: contests & competitions
WEB PAGE
C O P T E R E X P R E S S . C O MUniversity:science & labs
Drone as:
• a tool for education
• a platform for research
Subjects:
• estimation theory
• control theory
• computer vision, SLAM, ML…
WEB PAGE
C O P T E R E X P R E S S . C O MIROS 2019
WEB PAGE
C O P T E R E X P R E S S . C O MIROS 2019
WEB PAGE
C O P T E R E X P R E S S . C O MCommunity
WEB PAGE
C O P T E R E X P R E S S . C O MTeam
WEB PAGE
C O P T E R E X P R E S S . C O MCourses for teachers in Russia
WEB PAGE
C O P T E R E X P R E S S . C O MCourses for teachers in China
WEB PAGE
C O P T E R E X P R E S S . C O MSales
2016 2017 2018
kits214 kits
967 kits1243
AMOUNT SOLD
YEAR2019
kits2 0 0 0
CLEVER 1
CLEVER 2
CLEVER 3
CLEVER 4
WEB PAGE
C O P T E R E X P R E S S . C O M
How does open sourceimpact business?
WEB PAGE
C O P T E R E X P R E S S . C O MRussian market of educational drones
COEX Clever 4
Geoscan Pioneer
copter.space Zhu-Zha
MAI Filin
Edcom EdDrone
Droneshub Alfa
55 %
26 %
10 %
5 %
3 %
1 %
WEB PAGE
C O P T E R E X P R E S S . C O M
Software framework goals
WEB PAGE
C O P T E R E X P R E S S . C O MArchitecturalApproach
Library based (DroneKit) IPC based (ROS/MAVROS)
• Easier to understand • Install with simple pip install
• Introspection & Debugging • Visualization • Logging • Multiple nodes can access the same
data • User program doesn’t start the entire
system • Different programming languages • Transparently distributed
WEB PAGE
C O P T E R E X P R E S S . C O MPositioning system
• GPS
• Motion Capture • Onboard camera based
WEB PAGE
C O P T E R E X P R E S S . C O MOnboard camera based navigation
Fiducial markers (ArUco) Optical flow
WEB PAGE
C O P T E R E X P R E S S . C O M
Flying in OFFBOARD
WEB PAGE
C O P T E R E X P R E S S . C O MRaw MAVROSimport rospy from geometry_msgs.msg import PoseStamped from mavros_msgs.srv import CommandBool, SetMode
rospy.init_node('flight')
arming = rospy.ServiceProxy('/mavros/cmd/arming', CommandBool) set_mode = rospy.ServiceProxy('/mavros/set_mode', SetMode) pos_sp_pub = rospy.Publisher('mavros/setpoint_position/local', PoseStamped, queue_size=1)
lpos = None
def pose_callback(msg): global lpos lpos = msg
rospy.Subscriber('/mavros/local_position/pose', PoseStamped, pose_callback)
pos_sp = PoseStamped() pos_sp.header.frame_id = 'map' pos_sp.pose.orientation.w = 1
def publish_setpoint(event): pos_sp.header.stamp = rospy.get_rostime() pos_sp_pub.publish(pos_sp)
rospy.Timer(rospy.Duration(0.1), publish_setpoint)
# wait for local position while lpos is None: rospy.sleep(0.1)
# take off to 3 meters pos_sp.pose = lpos.pose pos_sp.pose.position.z += 3
rospy.sleep(1)
set_mode(base_mode=0, custom_mode='OFFBOARD') rospy.sleep(1)
arming(True)
rospy.spin()
WEB PAGE
C O P T E R E X P R E S S . C O M
simple_offboard
WEB PAGE
C O P T E R E X P R E S S . C O MProject template
import rospy from clever import srv from std_srvs.srv import Trigger
rospy.init_node('flight')
get_telemetry = rospy.ServiceProxy('get_telemetry', srv.GetTelemetry) navigate = rospy.ServiceProxy('navigate', srv.Navigate) navigate_global = rospy.ServiceProxy('navigate_global', srv.NavigateGlobal) set_position = rospy.ServiceProxy('set_position', srv.SetPosition) set_velocity = rospy.ServiceProxy('set_velocity', srv.SetVelocity) set_attitude = rospy.ServiceProxy('set_attitude', srv.SetAttitude) set_rates = rospy.ServiceProxy('set_rates', srv.SetRates) land = rospy.ServiceProxy('land', Trigger)
WEB PAGE
C O P T E R E X P R E S S . C O MTake Off
navigate(x=0, y=0, z=1, speed=0.5, frame_id='body', auto_arm=True)
WEB PAGE
C O P T E R E X P R E S S . C O MBody Frame
WEB PAGE
C O P T E R E X P R E S S . C O MUsage from Bash
WEB PAGE
C O P T E R E X P R E S S . C O M
navigate(x=0, y=2, z=0, speed=0.5, frame_id='body')
WEB PAGE
C O P T E R E X P R E S S . C O M
navigate(x=0, y=-2, z=0, speed=0.5, frame_id='body')
WEB PAGE
C O P T E R E X P R E S S . C O M
land()
WEB PAGE
C O P T E R E X P R E S S . C O M
for i in range(2): navigate(x=0, y=0, z=0.8, speed=1, auto_arm=True, frame_id='body') rospy.sleep(4)
navigate(x=0, y=2, z=0, speed=2, frame_id='body') rospy.sleep(4)
navigate(x=0, y=0, z=1, speed=2, frame_id='body') rospy.sleep(4)
navigate(x=0, y=-2, z=0, speed=2, frame_id='body') rospy.sleep(4)
navigate(x=0, y=0, z=-1, speed=2, frame_id='body') rospy.sleep(4)
WEB PAGE
C O P T E R E X P R E S S . C O M
navigate(x=0, y=0, z=1, frame_id='aruco_107')
WEB PAGE
C O P T E R E X P R E S S . C O M
navigate(x=0, y=0, z=1, frame_id='aruco_225')
WEB PAGE
C O P T E R E X P R E S S . C O M
VPEVision Position Estimation
WEB PAGE
C O P T E R E X P R E S S . C O M
navigate(x=0, y=0, z=1.5, speed=1, auto_arm=True, frame_id='body') rospy.sleep(8)
navigate(x=0, y=2.56, z=1.5, speed=3, yaw=0, frame_id='aruco_map') rospy.sleep(8)
navigate(x=0, y=1.28, z=1.5, speed=1, yaw=0, frame_id='aruco_map') rospy.sleep(8)
land()
WEB PAGE
C O P T E R E X P R E S S . C O M
def vertical_circle(): RADIUS = 0.75 # m SPEED = 0.5 # rad / s
start = get_telemetry(frame_id='aruco_map') start_stamp = rospy.get_rostime()
r = rospy.Rate(10)
while not rospy.is_shutdown(): angle = (rospy.get_rostime() - start_stamp).to_sec() * SPEED y = start.y + math.sin(angle) * RADIUS z = start.z + math.cos(angle) * RADIUS set_position(x=0, y=y, z=z, frame_id='aruco_map') if angle > math.radians(720): break
r.sleep()
WEB PAGE
C O P T E R E X P R E S S . C O M/get_telemetry
• connected • armed • mode • x, y, z • lat, lon • vx, vy, vz • pitch • roll • yaw • pitch_rate • roll_rate • yaw_rate • voltage • cell_voltage
Input Output• frame_id
WEB PAGE
C O P T E R E X P R E S S . C O M
WEB PAGE
C O P T E R E X P R E S S . C O MLower level control
• /set_velocity • /set_attitude • /set_rates
WEB PAGE
C O P T E R E X P R E S S . C O MFlip
def flip(): start = get_telemetry() # memorize starting position set_rates(thrust=1) # bump up rospy.sleep(0.2)
set_rates(roll_rate=30, thrust=0.2) while True: telem = get_telemetry()
if -math.pi < telem.roll < -0.2: break
set_position(x=start.x, y=start.y, z=start.z, yaw=start.yaw) # finish flip
WEB PAGE
C O P T E R E X P R E S S . C O MFlip
WEB PAGE
C O P T E R E X P R E S S . C O M
Raspberry Pi Image
WEB PAGE
C O P T E R E X P R E S S . C O MBuilding image
•QEMU based builder •Configured network •ROS Kinetic •OpenCV •Periphery drivers •CLEVER software package •Additional software •Tests
WEB PAGE
C O P T E R E X P R E S S . C O MWeb interface
WEB PAGE
C O P T E R E X P R E S S . C O MButterfly
WEB PAGE
C O P T E R E X P R E S S . C O MWeb Video Server
WEB PAGE
C O P T E R E X P R E S S . C O MCI
WEB PAGE
C O P T E R E X P R E S S . C O M
https://github.com/CopterExpress/clever
WEB PAGE
C O P T E R E X P R E S S . C O MProjects
WEB PAGE
C O P T E R E X P R E S S . C O MDrone show
WEB PAGE
C O P T E R E X P R E S S . C O MDrone show
WEB PAGE
C O P T E R E X P R E S S . C O MWarehouse inspection
WEB PAGE
C O P T E R E X P R E S S . C O MSpherical protection
WEB PAGE
C O P T E R E X P R E S S . C O MSpherical protection
WEB PAGE
C O P T E R E X P R E S S . C O MSpherical protection
WEB PAGE
C O P T E R E X P R E S S . C O MSpherical protection
WEB PAGE
C O P T E R E X P R E S S . C O MDrone wars
WEB PAGE
C O P T E R E X P R E S S . C O MCopterHack
WEB PAGE
C O P T E R E X P R E S S . C O MHow we taught a thousand students how to program drones
WEB PAGE
C O P T E R E X P R E S S . C O M
Andrei Korigodskii
CTO
Alexey Shlykov
COO
Oleg Kalachev
Lead Developer