This repository has been archived by the owner on Oct 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added some constants that are commonly changed to flightconfig.py.
- Loading branch information
1 parent
e7a5108
commit 228ff0c
Showing
5 changed files
with
35 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
from ..drone.drone_controller import DroneController | ||
from .. import constants as c | ||
from ... import flightconfig as f | ||
|
||
HOVERTASK_DURATION = 10 | ||
|
||
controller = DroneController(c.Drones.LEONARDO_SIM) | ||
|
||
controller.add_takeoff_task(c.DEFAULT_ALTITUDE) | ||
controller.add_takeoff_task(f.DEFAULT_ALTITUDE) | ||
controller.add_hover_task( | ||
c.DEFAULT_ALTITUDE, HOVERTASK_DURATION, c.Priorities.MEDIUM) | ||
f.DEFAULT_ALTITUDE, HOVERTASK_DURATION, c.Priorities.MEDIUM) | ||
controller.add_land_task(c.Priorities.MEDIUM) | ||
|
||
controller.run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Set to true for more detailed error messages and backtraces | ||
DEBUG = True | ||
|
||
# How high in meters the drone will default flight | ||
DEFAULT_ALTITUDE = 1 | ||
|
||
# How fast (in meters/s) to move by default | ||
DEFAULT_SPEED = 0.50 | ||
|
||
# Maximum speed (in meters/s) before being considered unsafe | ||
SPEED_THRESHOLD = 1 | ||
|
||
# Maximum altitude (in meters) before being considered unsafe | ||
MAXIMUM_ALLOWED_ALTITUDE = 1.5 | ||
|
||
# Consider takeoff complete after reaching this percent of target takeoff | ||
# altitude | ||
PERCENT_TARGET_ALTITUDE = 0.3 | ||
|
||
# Expands or contracts time calculations (divide 1 by your average real-time | ||
# factor in Gazebo simulator) | ||
SIMULATION_MULTIPLIER = 1 | ||
|
||
# Thrust level during takeoff | ||
DEFAULT_TAKEOFF_THRUST = 0.7 |