Commit Graph

414 Commits

Author SHA1 Message Date
Matthias Grob 94d4f0391a FlightTaskAuto: fix newline at end of file 2018-11-30 09:30:00 -05:00
Dennis Mannhart be4900f61d FlightTaskAutoMapper2: remove speed_at_target 2018-11-30 09:30:00 -05:00
Dennis Mannhart b3cde5ac44 FlightTaskAutoLine: replace NAV_ACC_RAD with _target_acceptance_radius 2018-11-30 09:30:00 -05:00
Dennis Mannhart c97b2a3071 FlightTaskAuto: move method getVelocityFromAngle to FlightTaskAutoLine 2018-11-30 09:30:00 -05:00
Dennis Mannhart 370371767f FlightTaskAutoLine: ensure that desired speed along track does not exceed maximum speed at threshold to target 2018-11-29 12:32:56 +01:00
baumanta 053494c535 use only one parameter and enable parameter change in flight. clean up code 2018-11-20 14:11:33 +01:00
baumanta dd45fa6541 change feature name from CollisionAvoidance to CollisionPrevention 2018-11-20 14:11:33 +01:00
Matthias Grob 81ec6c5b1e ColisionAvoidance: move instantiation to FlightTask 2018-11-20 14:11:33 +01:00
baumanta db514fe441 Add a collision avoidance library which uses range data 2018-11-20 14:11:33 +01:00
Beat Küng 330941c1fc FlightTaskManualAltitude: initialze yaw setpoint with NAN
Also update some comments.

In case we activate the task and don't have a locked yaw, we should
initialize the yaw setpoint with NAN to avoid any abrupt changes.
2018-11-13 09:30:18 +01:00
Beat Küng 2b7d3bd088 flight tasks: move weather vane yaw handler from Altitude to Position task 2018-11-13 09:30:18 +01:00
Beat Küng 36ee0297ee FlightTask.hpp: minor code cleanup 2018-11-13 09:30:18 +01:00
Beat Küng ca7acae904 mc stabilized mode: move from mc_pos_control to mc_att_control
- better in terms of dependencies:
  - the position controller code depended on position topics for yaw
  - mc_pos_control does not have to be run for Stabilized mode
- the code path is much simpler, and thus less error prone. This is
  especially important since Stabilized is often used as a fail-safe flight
  mode.
2018-11-13 09:30:18 +01:00
Daniel Agar 4e2bf27da6 FlightTaskAuto set WaypointType from position setpoint types 2018-11-11 10:21:41 -05:00
bresch 90cee2d5ea Manual Smoth Vel - Override reActivate to not reset Z axis (prevented takeoff) 2018-11-06 22:17:00 +01:00
bresch c3a4fff0cd Auto traj - generate heading from trajectory velocity vector if possible 2018-11-06 22:17:00 +01:00
bresch 7205e8f359 Auto traj - Add Trajectory logging
- move the update after the integration: a new computed jerk has an impact at the next epoch only
- add jerk reduction in case of too large integration time: when a jerk of "min_jerk" during dt is too much
- add jerk reduction if the integration time is larger than the predicted one and that integrating that jerk would lead to an acceleration overshoot
- rename some variables
2018-11-06 22:17:00 +01:00
bresch 2847ce20b8 Auto traj - Add parameter for gain of trajectory controller 2018-11-06 22:17:00 +01:00
bresch 2c63388fb7 Auto Traj - Disable reActivate "reset" function for AutoLineSmoothVel Flight Task 2018-11-06 22:17:00 +01:00
bresch 0209fa00bf Auto Smooth Vel - Add AutoMapper2 and AutoLineSmoothVel flight tasks 2018-11-06 22:17:00 +01:00
bresch 67c0846068 Vel smooth - Improve position lock/unlock detection 2018-11-06 22:17:00 +01:00
bresch d9edcfdc06 Trajectory - format style 2018-11-06 22:17:00 +01:00
bresch aa586ca327 Trajectory - Overload integrate function to allow for custom integration period 2018-11-06 22:17:00 +01:00
bresch 7073187a48 Trajectory - Add getters for current position and velocity. Move some getters to public section 2018-11-06 22:17:00 +01:00
bresch 6a7ce651bc Trajectory - Add position lock-unlock logic and proper initialization from controller feedback 2018-11-06 22:17:00 +01:00
bresch 84665672ad Vel smooth - Change jerk scheduling strategy 2018-11-06 22:17:00 +01:00
bresch ab7e4436b3 Vel smooth - Add Z trajectory 2018-11-06 22:17:00 +01:00
Beat Küng 787d82c9e6 VelocitySmoothing: simplify the API & fix style 2018-11-06 22:17:00 +01:00
Beat Küng d8cb6bb834 mc_pos_control_params: update jerk params (limits + defaults + description) 2018-11-06 22:17:00 +01:00
bresch 22780efcd0 Trajectory - Add time synchronization between trajectories. Split update(...) function into updateDurations(...) and integrate(...) to be able to insert time synchronization in between. 2018-11-06 22:17:00 +01:00
Beat Küng 86463e4ec7 Flight Tasks: add new trajectory smoothing flight task & library
Derivation by Mathieu Bresciani:
https://github.com/Auterion/trajectory_generator
2018-11-06 22:17:00 +01:00
James Goppert c642025339 vehicle_attitude only based yaw control fix (#10803)
* Add attitude sub to mc_pos_control for yaw usage.

* Initialize pos control _states struct.

* Remove unnecessary init for struct in mc pos ctrl.

* Only use att topic for yaw setting in FlightTask.
2018-11-06 12:03:13 -05:00
Roman 40884a9238 FlightTaskTransition: added missing override
Signed-off-by: Roman <bapstroman@gmail.com>
2018-11-07 00:13:43 +08:00
Roman fea309b606 added a flighttask for automatic vtol transitions
Signed-off-by: Roman <bapstroman@gmail.com>
2018-11-07 00:13:43 +08:00
Dennis Mannhart e7e49d5b3c FlightTask don't require vehicle-local-positiion topic 2018-10-16 17:06:12 +02:00
Dennis Mannhart ff45ee67b4 FlightTasks: remove empty line 2018-10-10 10:30:48 -04:00
Dennis Mannhart c3ba2687ac FlightTask: if not in air, reActivate the task which will set the setpoints to current
vehicle state.
2018-10-10 10:30:48 -04:00
Dennis Mannhart 6212e9c752 FlightTaskManualAltitude: use stick inputs for the brake check 2018-10-09 12:05:52 -04:00
Martina 280cb34a77 FlightTaskAuto: replace NAV_ACC_RAD with acceptance radius from triplet 2018-10-09 12:01:45 -04:00
Beat Küng 48f5f8faa5 mc pos control: add MPC_THR_CURVE param
The hover thrust param also changed the thrust scaling in Stabilized mode.
However if the hover thrust is very low (e.g. below 20%), the throttle
stick input becomes very distorted.
2018-10-09 12:09:07 +02:00
Beat Küng dae7c56109 ManualSmoothing{XY,Z}: remove unused include 2018-10-04 15:09:02 +02:00
Beat Küng e23382c6da FlightTaskManualAltitude: call FlightTaskManualStabilized::_updateHeadingSetpoints() directly
Instead of calling _updateSetpoints(), that also sets the thrust setpoint,
which is then overwritten again.
2018-10-04 15:09:02 +02:00
Beat Küng 206baa7432 Flight tasks: avoid using *= for scalar to vector assignment
It's confusing and there is a corner case where the result is incorrect:
*= 0 will not set the variable to 0 if it's already NAN.
2018-10-04 15:09:02 +02:00
Beat Küng bb756e0e12 FlightTaskAuto: remove unnecessary brackets in switch case statements 2018-10-04 15:09:02 +02:00
Matthias Grob bee6a6b8b0 Refactor: Use new matrix::Vector2f constructor 2018-10-01 08:10:21 -04:00
Beat Küng eac8f8813a flight tasks: minor cleanup (avoid using *= for assignment) 2018-09-24 13:57:37 +02:00
Beat Küng afada8ddb5 FlightTaskManualStabilized: allow attitude control with 0 throttle
With minimum throttle set to 0, it was not possible to control the attitude
anymore at 0 throttle, the vehicle would just stay level.
2018-09-24 13:57:37 +02:00
Martina 5b8ae9fb29 rename position_controller_status field from altitude_acceptance_radius
to altitude_acceptance
2018-09-24 11:23:01 +02:00
Martina 40650ee2c7 FlightTaskAuto: check avoidance progress only for multicopter 2018-09-24 11:23:01 +02:00
Martina 07eb0b697e FlightTaskAuto: don't create vectors from pointers 2018-09-24 11:23:01 +02:00