16533 Commits

Author SHA1 Message Date
Beat Küng
b0fdbf5136 FlightTask: inherit from Block instead of SuperBlock
I think this is more how it's meant to be
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
8a4d51c630 FlightTasks: replaced all hrt_elapsed() calls and unneeded hrt_ calls to safe performance 2018-04-05 07:30:12 +02:00
Matthias Grob
9fdb3ace0c FlightTask: added setter for yawspeed and removed newlines in comments 2018-04-05 07:30:12 +02:00
Matthias Grob
dd53d1df5f FlightTask: use copyToRaw matrix method in setpoint setters 2018-04-05 07:30:12 +02:00
Matthias Grob
2dd61f71d1 FlightTask: fix doxygen comment /**< instead of /*< 2018-04-05 07:30:12 +02:00
Matthias Grob
c1056d307c FlightTask: move setter back into header and switched argument to reference to have them inlined by the compiler 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
e193240e98 FlightTask: fix CI: static field requiring definition in cpp file, errors with clang linker (CI) but not with GCC 2018-04-05 07:30:12 +02:00
Matthias Grob
23fe822955 FlightTasks: private variables follow underscore name convention, member description comments doxygen style 2018-04-05 07:30:12 +02:00
Matthias Grob
92acbfde3e FlightTasks: FlightTask definition to cpp, fix include chain, fix cmake 2018-04-05 07:30:12 +02:00
Matthias Grob
c211c807ad FlightTasks: move method definitions of existing tasks into cpp files, it's not a header library 2018-04-05 07:30:12 +02:00
Matthias Grob
3450ccb2b2 FlightTaskOrbit: Fix zero vector resulting in NaN output and ignored setpoint 2018-04-05 07:30:12 +02:00
Matthias Grob
a570390dfb FlightTasks: enable usage of yaw setpoint through position controller 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
0aeea44780 FlightTask: fixed time initialization issues 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
edd5ed1349 FlightTaskManual: remove unnecessary subscription which is deprecated anyways 2018-04-05 07:30:12 +02:00
Matthias Grob
76a0b9f736 FlightTaskManual: Smooth flight integration: refactored and checked get_acceleration_z 2018-04-05 07:30:12 +02:00
Matthias Grob
6fb4c79234 FlightTaskManual: Smooth flight integration: refactored and checked second half of get_acceleration_xy executing the intention 2018-04-05 07:30:12 +02:00
Matthias Grob
42708ea456 FlightTaskManual: Smooth flight integration: refactored and checked first half of get_acceleration_xy determining the xy user intention 2018-04-05 07:30:12 +02:00
Matthias Grob
56b54d7b85 FlightTaskManual: Smooth flight integration: prepare interface of acceleartion methods for xy and z 2018-04-05 07:30:12 +02:00
Matthias Grob
634a67d058 FlightTaskManual: Smooth flight integration: slewrate now works, set to 0.2m/s^2 in all dimensions for testing 2018-04-05 07:30:12 +02:00
Matthias Grob
0d8d24e36d FlightTaskManual: Smooth flight integration: replace all "dt"s with the local _deltatime 2018-04-05 07:30:12 +02:00
Matthias Grob
1f65717292 FlightTaskManual: Smooth flight integration: Make vel_sp_slewrate without any refactoring compile
analyzing detailed semantic and external uses of the variables still necessary
2018-04-05 07:30:12 +02:00
Matthias Grob
1b858f5e56 FlightTaskManual: Smooth flight integration: Copy over vel_sp_slewrate without any changes 2018-04-05 07:30:12 +02:00
Matthias Grob
5854fa06e9 FlightTaskManual: Smooth flight integration: Make set_manual_acceleration_z without any refactoring compile
analyzing detailed semantic and external uses of the variables still necessary
2018-04-05 07:30:12 +02:00
Matthias Grob
316e85f7ef FlightTaskManual: Smooth flight integration: Copy over set_manual_acceleration_z without any changes 2018-04-05 07:30:12 +02:00
Matthias Grob
cb096861d9 FlightTaskManual: Smooth flight integration: Make set_manual_acceleration_xy without any refactoring compile
analyzing detailed semantic and external uses of the variables still necessary
2018-04-05 07:30:12 +02:00
Matthias Grob
e6442c7a7c FlightTaskManual: Smooth flight integration: Copy over set_manual_acceleration_xy without any changes 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
018581faca FlightTaaskManual: finalized full acceleration manual controlled position flight to work properly 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
9437326b01 FlightTaskOrbit: altered initialisation and limiting of parameters for demonstration 2018-04-05 07:30:12 +02:00
Matthias Grob
01383a0eeb FlightTaskManual: Basic manual position controlled flight with position and altitude hold works 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
73f633dfd2 FlightTasks: added possibility to set velocity setpoint, switched Orbit to feedback velocity algorithm 2018-04-05 07:30:12 +02:00
Matthias Grob
e51e5f3e01 FlightTaskOrbit: added constraints for parameters & defined linear velocity instead of angular 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
37cb8c1a59 FlightTasks: added access to prepared velocity state for every task 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
f3357aeca4 FlightTasks: make the orbit example actually orbit 2018-04-05 07:30:12 +02:00