CoDrone Control


By Prof. Seungchul Lee
http://iai.postech.ac.kr/
Industrial AI Lab at POSTECH

  • Please submit the following files after today's class.
    • ipynb files
    • Demonstration videos of your drone
  • TA's E-mail : juwonna7@postech.ac.kr
    • The title of your mail should be "[MECH199-01][Drone & RC Car] (Group Name) WEEK3"

Table of Contents

1. Multiple Direction¶

1.1. Roll & Pitch¶

  • You can also set multiple directions at once. It makes your CoDrone to fly to the right and backwards at the same time.
InĀ [1]:
from CoDrone.codrone import *

drone = CoDrone()
drone.pair('3218')
drone.takeoff()

# -100 to 100 that sets the pitch variable.
# Drone goes diagonally for 1 second with 50 power
drone.set_roll(50)
drone.set_pitch(-65)
drone.move(1)
drone.land()

1.2. Tips¶

  • If you do not want to continue moving in that direction, you must set the movement value back to zero. So in the second movement, the throttle was set back to zero so that it wouldn't continue to fly
InĀ [2]:
drone.takeoff()

# -100 to 100 that sets the throttle variable.
# Drone goes up for 1 second with 50 power
drone.set_throttle(100)
drone.move(1)
drone.set_throttle(0)
drone.land()
InĀ [3]:
drone.takeoff()

# -100 to 100 that sets the pitch and roll variable.
# Drone goes forward for 1 second with 50 power and goes right for 1 second with 50 power 
drone.set_pitch(50)
drone.move(1)
drone.set_pitch(0)
drone.set_roll(50)
drone.move(1)
drone.land()

2. Make Episode¶

[1] ė‹¤ģ–‘ķ•œ ģ„¼ģ„œģ™€ Movement ėŖ…ė ¹ ģ½”ė“œė„¼ ģ”°ķ•©ķ•˜ģ—¬ ģ•„ėž˜ģ²˜ėŸ¼ ė‹¤ģ–‘ķ•œ Episode 넼 ė§Œė“¤ģ–“ė³“ģ„øģš”

  • ė†’ģ“ ģ „ģ§„ķ•˜ė‹¤ź°€ ģ±…ģƒ ģœ„ģ—ģ„œ ģ°©ė„™ķ•˜źø°
  • 계단 ėŖØģ–‘ėŒ€ė”œ ķšŒģ „ķ•˜ė©° 낓려가기

ģµœģ†Œ 3개 ģ“ģƒģ˜ ģ„¼ģ„œģ™€ 4ģ¢…ė„˜ ģ“ģƒģ˜ ģ“ė™ ꓀련 ķ•Øģˆ˜ ģ‚¬ģš©ķ•˜źø°!

2.1 Episode 1¶

InĀ [4]:
# fill your code

2.2 Episode 2¶

InĀ [5]:
# fill your code

3. Remote Controller¶

3.1. Assemble¶

3.2. Wiring¶


3.3. Connect¶


Drone ON → Drone Calibration → Controller ON

3.4. Control¶

Check How to Land First!


InĀ [6]:
%%javascript

$.getScript('https://kmahelona.github.io/ipython_notebook_goodies/ipython_notebook_toc.js')