52 Commits

Author SHA1 Message Date
Dennis Mannhart
29fb5089bd FlightTasks: construct all tasks in constructor 2018-07-20 09:26:18 +02:00
Dennis Mannhart
b1530d1a81 FlightTasks: create struct that contains FlightTask and FlightTaskIndex 2018-07-20 09:26:18 +02:00
Dennis Mannhart
b2af9c3f58 FlightTasks: error to char string message 2018-07-20 09:26:18 +02:00
Dennis Mannhart
1099dd8c7d FlightTaskOffboard: first commit similar in logic to legacy code
FlightTaskOffboard: ensure supported offboard setpoints
2018-07-20 09:26:18 +02:00
Dennis Mannhart
dca378fbfd FollowMe: legacy implementation. NOTE: FOLLOW-ME is already broken on legacy code. 2018-07-20 09:26:18 +02:00
Dennis Mannhart
51d4c1f305 FlightTasks: add getter method for constraints 2018-07-20 09:26:18 +02:00
Dennis Mannhart
fbe8a558b2 FlightTaskIndex: add AutoLine 2018-07-20 09:26:18 +02:00
Dennis Mannhart
6e62beb560 FlightTaskAuto: abstract class for mapping triplets to quadruple
FlightTaskAuto: add type that corresponds to triplet type

FligthTaskAuto: set all setpoints if invalid in xy

FlightTaskAuto: cast triplet type to WaypointType

FlightTaskAutoLine: class for px4 legacy auto

FlightTaskAutoLine: methods prototype

FlightTaskAuto: change sp to wp (=Waypoint)
add params

FlightTaskAutoLine: follow waypoints along line based on flight state
2018-07-20 09:26:18 +02:00
Beat Küng
0eaa6222a2 flight tasks: refactor BlockParam -> Param and handle param updates 2018-04-11 07:47:06 +02:00
Matthias Grob
309237c4a2 FlightTasks: replace setpoint setters with members
I realized that instead of using the setpoint setters inline
in real world tasks everyone started to have its own setpoint
member variable and only call the setter in the end for all the
privatly generate setpoints. This makes the setter useless and
therefore I switched to member setpoints in the architecture.
They bring more felxibility which is obviously needed but also
less structure which is the price to pay.
2018-04-05 07:30:12 +02:00
Matthias Grob
8b4471d842 FlightTasks: comment out mavlink command processing
because upstream there needs to be a
common mavlink command definition first
and then it can be easily reenabled again
2018-04-05 07:30:12 +02:00
Matthias Grob
e8cc93ec23 FlightTasks: create enumeration type for the task index while still offering integer index with checks 2018-04-05 07:30:12 +02:00
Dennis Mannhart
13eb79ffb8 FlightTasks: fix class name 2018-04-05 07:30:12 +02:00
Dennis Mannhart
ac6ed74063 Add FlightTaskManualPositionSmooth 2018-04-05 07:30:12 +02:00
Dennis Mannhart
39c77546d3 FlightTaskManualAltitudeSmooth: create taks 2018-04-05 07:30:12 +02:00
Dennis Mannhart
3b4870b2c2 FlightTaskManual: define as abstract class 2018-04-05 07:30:12 +02:00
Dennis Mannhart
dcdf4d50a0 FlightTasks: add stabilized and fix switchTask for Altitude and Position 2018-04-05 07:30:12 +02:00
Dennis Mannhart
26a5eae7b1 FlightTasks: add FlighttaskManualPosition 2018-04-05 07:30:12 +02:00
Dennis Mannhart
ea61af3164 FlightTaskManualAltitude: added to lib 2018-04-05 07:30:12 +02:00
Matthias Grob
a00c3e4024 FlightTaskSport: created a simple child class of FlightTaskManual that can scale the velocity to a much higher value 2018-04-05 07:30:12 +02:00
Matthias Grob
6070d72308 FlightTasks: Various review refactoring 2018-04-05 07:30:12 +02:00
Matthias Grob
fd93e55527 FlightTaks: prevent running a new task with default parameters because they got rejected 2018-04-05 07:30:12 +02:00
Matthias Grob
d9c7e6321f FlightTasks: Introduce the empty setpoint to reset the setpoint for every loop iteration and return it in case of no task running 2018-04-05 07:30:12 +02:00
Matthias Grob
c500221894 FlightTasks: move methods of the class header into the cpp 2018-04-05 07:30:12 +02:00
Matthias Grob
efd240904f FlightTasks: added possibility to apply task parameters from the vehicle command 2018-04-05 07:30:12 +02:00
Matthias Grob
b1f24da05e FlightTasks: enable mavlink command handling for switching tasks including acknowledgement 2018-04-05 07:30:12 +02:00
Matthias Grob
e5d237088c FlightTasks: refactoring for CamelCase naming convention, small comment and declaration order renicements 2018-04-05 07:30:12 +02:00
Matthias Grob
888a63c001 FlightTasks: bool return values for clarity & introduce updateInitialize() to have input data fetching separated from the update() 2018-04-05 07:30:12 +02:00
Matthias Grob
1906b5b635 FlightTasks: remove all remaining unnecessary semicolons 2018-04-05 07:30:12 +02:00
Matthias Grob
5efb298ed9 FlightTasks: use forced update just after initialization 2018-04-05 07:30:12 +02:00
Beat Küng
737f7df6b8 Subscription & SubscriptionArray: add forcedUpdate() methods
Can be used to immediately get & use the data, as needed for the flight
tasks.
2018-04-05 07:30:12 +02:00
Matthias Grob
071b09c65d FlightTasks: initialize task state based on subscriptions after the SubscriptionArray was initialized 2018-04-05 07:30:12 +02:00
Beat Küng
9b571abb47 FlightTasks: add SubscriptionArray class that contains all subscriptions
This is to avoid dynamic (re-)allocations on task switching, due to
orb_{un,}subscribe calls.
2018-04-05 07:30:12 +02:00
Beat Küng
b5ecf9824d flight tasks: use placement new to reduce memory overhead and the need for dynamic allocations
In addition, we will need some shared data structure for the uorb
subscriptions.
2018-04-05 07:30:12 +02:00
Matthias Grob
99eb051c0f FlightTasks: adapt POSIX convention to return negative values on error 2018-04-05 07:30:12 +02:00
Matthias Grob
e597a9c0a1 FlightTasks: fix review comments 2018-04-05 07:30:12 +02:00
Matthias Grob
e49f80eaa8 FlightTasks: switched output setpoint to reference getter, FlightTask holds it's data 2018-04-05 07:30:12 +02:00
Matthias Grob
d48ba8be72 FlightTask: move position and stick data subscription into tasks, Orbit introduce variable center position 2018-04-05 07:30:12 +02:00
Matthias Grob
582990c0af FlightTasks: revised task switching algorithm to catch errors during activation of a new task and make it more readable 2018-04-05 07:30:12 +02:00
Matthias Grob
6c0e7654ed FlightTasks: added handling for switching to the already active task and success feedback
removed and added comments
2018-04-05 07:30:12 +02:00
Matthias Grob
4d05193ad7 FlightTasks: switched to a block hierarchy with parameter names like TSK_ORB_RADIUS in mind 2018-04-05 07:30:12 +02:00
Matthias Grob
f2250c1952 FlightTasks: made a FlightTask inherit from SuperBlock to have Block::Subscription s
FlightTask Manual: subscription made setpoint conversion according to vehicle attitude work
2018-04-05 07:30:12 +02:00
Matthias Grob
a8a2b4b6f3 FlightTasks: switched output position setpoint to be pointer based
changed "NULL"-pointers to "nullptr" for better compliance
2018-04-05 07:30:12 +02:00
Matthias Grob
28f4d18062 FlightTasks: added FlightTaskManual as replacement for the current stick based position controlled flight
it's a draft and only works for velocity setpoints oriented in NED frame yet

# Conflicts:
#	src/lib/FlightTasks/tasks/FlightTaskOrbit.cpp
2018-04-05 07:30:12 +02:00
Matthias Grob
a9d0990bb8 FlightTasks: added a temporary hardware switch for task switch testing 2018-04-05 07:30:12 +02:00
Matthias Grob
88bf40e3cb FlightTasks: added simple task switching with possibility do disable FlightTasks completely 2018-04-05 07:30:12 +02:00
Matthias Grob
8da1d3b16e FlightTasks: give every FlightTask access to prepared stick input and position state 2018-04-05 07:30:12 +02:00
Matthias Grob
225f99af16 FlightTasks: created an array for all tasks and a method to set the general input pointers for all of them 2018-04-05 07:30:12 +02:00
Matthias Grob
32a1ff733d FlightTasks: switch input from pointers in parameters passed on every run to private pointers of the base class with safety getter and setter 2018-04-05 07:30:12 +02:00
Matthias Grob
b52f541492 FlightTasks: added timer in base class that counts from activation on including possibility to reset in subclass 2018-04-05 07:30:12 +02:00