Skip to content
Commits on Source (2)
Subproject commit 7871841272503dc8d05a583956b92cb152378a7f
Subproject commit b9612f7d1905e98d4d22fa2367f144c6cd5c0ad0
cf_lib_dir:
file.directory:
- name: /opt/crazyflie-lib-python
- user: rna
- group: rna
- recurse:
- user
- group
cf_lib_repro:
file.recurse:
- name: /opt/crazyflie-lib-python
- source: salt://drone/crazyflie-lib-python
- clean: True
- user: rna
- group: rna
- file_mode: keep
cf_lib_build:
cmd.run:
- name: python3 setup.py install
- cwd: /opt/crazyflie-lib-python
- watch:
- file: cf_lib_repro
- require:
- file: cf_lib_repro
include:
- prrt.python
- drone.python-libs
- drone.crazyflie-lib
- drone.scripts
python3-serial:
pkg.installed
python3-setuptools:
pkg.installed
cf_lib_dir:
file.directory:
- name: /opt/crazyflie-lib-python
- user: rna
- group: rna
- recurse:
- user
- group
cf_lib_repro:
file.recurse:
- name: /opt/crazyflie-lib-python
- source: salt://drone/crazyflie-lib-python
- clean: True
- user: rna
- group: rna
- file_mode: keep
cf_lib_build:
cmd.run:
- name: python3 setup.py install
- cwd: /opt/crazyflie-lib-python
- watch:
- file: cf_lib_repro
- require:
- file: cf_lib_repro
python3-serial:
pkg.installed
python3-setuptools:
pkg.installed
python3-pandas:
pkg.installed
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
"""
This script shows a simple scripted flight path using the MotionCommander class.
Simple example that connects to the crazyflie at `URI` and runs a
sequence. Change the URI variable to your Crazyflie configuration.
"""
import logging
import time
import cflib.crtp
from cflib.crazyflie.syncCrazyflie import SyncCrazyflie
from cflib.positioning.motion_commander import MotionCommander
URI = 'serial://pi'
# Only output errors from the logging framework
logging.basicConfig(level=logging.ERROR)
if __name__ == '__main__':
# Initialize the low-level drivers (don't list the debug drivers)
cflib.crtp.init_drivers(enable_debug_driver=False)
with SyncCrazyflie(URI) as scf:
# We take off when the commander is created
with MotionCommander(scf) as mc:
print('Taking off!')
time.sleep(0.1)
# We land when the MotionCommander goes out of scope
print('Landing!')
Subproject commit c2c6cef3cb226f26e72e165652fe76b69fd675ea
Subproject commit f463a13086665594e6c103b03c9d98fce1e4424d