bresch
6df1600357
Auto - Update velocity setpoint generator to avoid overshoot at high cruise speed.
...
The linear mapping from position error to cruise velocity is changed by
a combination of that linear mapping and a nonlinear function containing
the maximum acceleration and jerk to avoid overshoots at waypoints due to
overoptimistic breaking distance.
2019-07-09 09:46:45 +02:00
Mathieu Bresciani
e54075abe8
MC pos control - Force cruise and manual speeds below max speed. ( #12404 )
...
- Force hover thrust between min and max thrust
2019-07-05 15:40:28 -04:00
Mathieu Bresciani
c5deba53a2
mc_pos_control: Explicitly convert tilt variables to radians during check and assignments
2019-06-27 11:38:21 -04:00
bresch
83d90410ff
Jerk-limited auto mode - use MPC_ACC_HOR instead of MPC_ACC_HOR_MAX
...
as written in the parameter desctiption
2019-06-14 09:56:56 +02:00
bresch
ac4458460d
FailureDetector - update hysteresis to comply with new interface
2019-06-05 16:53:08 +02:00
bresch
57c2085ce4
IO driver - Recover flight termination state from IO after FMU reboot in air
2019-06-05 16:53:08 +02:00
bresch
c75f71abc2
IO failsafe - apply failsafe values to outputs when in failsafe.
...
This is required because otherwise, IO would output disarmed values if
FMU goes into a disarmed state.
2019-06-05 16:53:08 +02:00
bresch
96da46d1aa
Failsafe - cosmetic changes
2019-06-05 16:53:08 +02:00
bresch
776b1a28de
IO mixer - cleanup FMU timeout check (comments and indentation)
2019-06-05 16:53:08 +02:00
bresch
c576c57d7b
protocol.h - comment style update
2019-06-05 16:53:08 +02:00
bresch
4b8febf558
Flight termination IO - reword flight termination flag description
2019-06-05 16:53:08 +02:00
bresch
158463d0a0
Flight termination - Rename "flightterm" variables and defines to "flighttermination".
2019-06-05 16:53:08 +02:00
bresch
5becc24a1f
Failure detector - in failure detector preflight check, get
...
vehicle_status as const type. Also use FAILURE_NONE enum to check for a
failure
2019-06-05 16:53:08 +02:00
bresch
33a94c8191
Failure detector - change snake_case function names to camelCase
2019-06-05 16:53:08 +02:00
bresch
ee1f8f457b
px4io - rename safety_param_val to circuit_breaker_io_enabled and change its type to bool since circuit_breaker_enabled returns a boolean
2019-06-05 16:53:08 +02:00
bresch
03ad4ffd47
FailureDetector - Add is_failure() function to simplify the interface; the user does not need to check the bitmask
2019-06-05 16:53:08 +02:00
bresch
d3c9436f84
flight termination - rename in_flight_termination to flight_termination_triggered
2019-06-05 16:53:08 +02:00
bresch
e8705f08c4
quad_x_main - rename parachute output to failsafe output
2019-06-05 16:53:08 +02:00
bresch
4eaf6e77be
Flight termination - Always send flag to IO without checking the circuit breaker. The circuit breaker is used inside IO to decide if it has to go into failsafe if FMU dies and also controls is the FailureDetector sets the force_failsafe flag. The other sources of flight termination (rc loss, geo fence, ...) are not disabled by the circuit breaker
2019-06-05 16:53:08 +02:00
bresch
59265f6663
Failure detector - Add flight termination comments, make format
2019-06-05 16:53:08 +02:00
bresch
0655f7603b
FailureDetector - Increase min value of FD_FAIL_P/R to 60 degrees
2019-06-05 16:53:08 +02:00
bresch
d19614a94f
MC Lnd detector - Remove double include
2019-06-05 16:53:08 +02:00
bresch
38345be41a
FailureDetector - Add roll and pitch failures hysteresis
2019-06-05 16:53:08 +02:00
bresch
a72de95c94
Failure detector - Disable flight termination by default. Modify FD_FAIL parameters description
2019-06-05 16:53:08 +02:00
bresch
81bb7888de
Failure Detector - Add Failure Detector check to preflight checks
2019-06-05 16:53:08 +02:00
bresch
c73875cbf8
quad x mixer - Add null mixer for parachute triggering
2019-06-05 16:53:08 +02:00
bresch
34fca5a552
PWM - Remove unused MIXERADDSIMPLE
2019-06-05 16:53:08 +02:00
bresch
7b531bcaef
Failure Detector - Play TONE_PARACHUTE_RELEASE_TUNE when force failsafe is set
2019-06-05 16:53:08 +02:00
bresch
d655c33faa
IO mixer - Change default mixer to DISARMED and allow to set outputs to failsafe if FMU does not respond and if flight termination circuit breaker is not set
2019-06-05 16:53:08 +02:00
bresch
6fb1b4886c
IO - Send flight termination circuit breaker state to IO through PX4IO_P_SETUP_ENABLE_FLIGHTTERM
2019-06-05 16:53:08 +02:00
bresch
796631db20
PX4IO driver - use "curcuit_breaker_enabled" function instead of manually checking its value
2019-06-05 16:53:08 +02:00
bresch
19bf080313
PX4ioFirmware - Clean should_arm, should_arm_nothrottle and should_always_enable_pwm indentation for better understanding
2019-06-05 16:53:08 +02:00
bresch
ba93f9b983
FailureDetector - Update failure detector logic in commander.
2019-06-05 16:53:08 +02:00
bresch
664fff4a24
Px4io Driver - Remove unimplemented prototype
2019-06-05 16:53:08 +02:00
bresch
b64a2a884b
Circuit Breaker - Disable flight termination circuit breaker by default (reverts ab40008) -> Allow flight termination
2019-06-05 16:53:08 +02:00
bresch
50d75dc7a6
IOFirmware - Properly clear the alarm flags
2019-06-05 16:53:08 +02:00
bresch
d5298fccbd
PWM_REV - Clarify use case. The user shoul not be tempted to use that
...
parameter to reverse the direction of a rotor.
2019-06-05 09:10:06 +02:00
bresch
2307c7c390
Geofence - Rename _warning_action_on to _geofence_warning_action_on
...
since it is only set by the geofence logic. Simplify conditions in IF
statements.
2019-06-04 08:35:56 +02:00
bresch
f8f967f073
Geofence - Change from "re-engage geofence failsafe every 10s when
...
outside the fence" to "engage geofence failsafe on transition". This
way, the pilot is not stucked in the non flight zone and can switch to
a manual mode and fly back or trigger RTL.
2019-06-04 08:35:56 +02:00
bresch
427b2e6636
Geofence - Do not trigger geofence failsafe while in low battery
...
failsafe action.
Also move geofence flags from static variables declared into the if
statement to private members of the class.
2019-06-04 08:35:56 +02:00
bresch
d13dfdcd24
AutoLineSmoothVel - Remove duplicate of _yaw_sp_prev update. This is done in the Auto FlightTask, _limit_yaw_rate
2019-05-30 11:14:44 +02:00
bresch
a7cf981c8c
AutoLineSmoothVel - Reduce jerk if acceleration, velocity and desired velocity are small to help the optimizer to converge towards zero
2019-05-30 11:14:44 +02:00
bresch
3499b6ff89
AutoLineSmoothVel - Do not generate heading from trajectory if the velocity vector is smaller than 10cm/s
...
This is done to avoid generating large yaw changes when the velocity
vector is small; for example when switching into loiter or reaching the
last waypoint.
2019-05-30 11:14:44 +02:00
bresch
bb055fdaf3
AutoSmoothVel - Override checkTakeoff with task-specific logic and reactivate z axis with downward velocity to takeoff smoothly
2019-05-22 22:05:38 +02:00
bresch
feefbb444b
ManualSmoothVel - Remove unused _param_mpc_jerk_min declaration
2019-05-17 14:15:29 +02:00
Mathieu Bresciani and Matthias Grob
4b2d01dea1
MPC parameters - Update from Matthias' comments
...
Co-Authored-By: Matthias Grob <maetugr@gmail.com >
2019-05-17 14:15:29 +02:00
bresch
b726d8df0d
Add jerk parameter for auto mode MPC_JERK_AUTO. Specify when a parameter is only used in a certain manual or auto mode
2019-05-17 14:15:29 +02:00
bresch
02f0533ee9
Commander - Remove old code that overrides state_machine_helper logic
2019-05-07 17:45:28 +02:00
bresch
6d8d8e3c88
MC gyro cutoffs - Reduce IMU_GYRO_CUTOFF to 30Hz and disable MC_DTERM_CUTOFF.
...
A low gyro cutoff is needed for most medium/large size drones as the structural natural and blade-pass frequencies are low.
A higher value is still desirable for small platforms surch as racers
or well isolated autopilots and should be tuned by the user.
Specific values for config files are untouched.
The cutoff filter for the D term is disabled here as the required
cutoff frequency for the default D term of the rate controller is higher
than the gyro cutoff. In that case, enabling the D term cutoff would
just add some undesired phase lag to the derivative.
2019-05-07 12:15:51 +02:00
bresch
881d0f4143
UAVCAN - update ROMFS_FW_PATH to /etc/uavcan/fw. to match documentation
2019-05-02 16:22:33 -05:00
bresch
89bc68e12b
Auto - Rename MC_YAWRAUTO_MAX -> MPC_YAWRAUTO_MAX
2019-04-26 12:43:26 +02:00
bresch
581d25f77f
Auto mode traj - limit yaw setpoint rate of change when generated in the flight task instead of clamping the yaw rate in the controller
...
Move yaw setpoint slew rate from AutoLineSmoothVel to Auto. The slew rate is now applied consistently to all the auto FlightTasks
2019-04-26 12:43:26 +02:00
bresch
903deb7579
RTL - Skip descend state if no delay is set between descend and land
2019-04-25 18:24:04 +02:00
bresch
93d52581ef
Auto - Fix cruise speed. Tested with and without SDK. Before that commit, the drone files at max speed instead of cruise speed if not precised by the SDK
2019-04-15 16:32:26 +02:00
bresch
dec96b0a3a
revert FlightTasks: fix mission DO_CHANGE_SPEED
2019-04-03 18:08:24 +02:00
bresch
20adce5077
Add new line at the end of FlightTaskFailsafe.cpp and FlightTaskAutoLine.cpp
2019-04-03 15:38:50 +02:00
bresch
986c1a37d1
Parameter update - Rename variables in modules/ekf2
...
using parameter_update.py followed by a make format
2019-04-03 15:38:50 +02:00
bresch
da2deaa0b2
Parameter update - Rename variables in modules/mavlink
...
using parameter_update.py script
2019-04-03 15:38:50 +02:00
bresch
f3990c84fc
Parameter update - Rename variables in modules/navigator
...
using parameter_update.py script
2019-04-03 15:38:50 +02:00
bresch
e575f032e4
Parameter update - Rename variables in modules/mc_att_control
...
using parameter_update.py script
2019-04-03 15:38:50 +02:00
bresch
2197ac883d
Parameter update - Rename variables in modules/wind_estimator
...
using parameter_update.py script
2019-04-03 15:38:50 +02:00
bresch
6c823903bc
Parameter update - Rename variables in modules/simulator
...
using parameter_update.py script
2019-04-03 15:38:50 +02:00
bresch
f08c00f324
Parameter update - Rename variables in modules/fw_pos_control
...
using parameter_update.py script
2019-04-03 15:38:50 +02:00
bresch
ecacf4de46
Parameter update - Rename variables in modules/load_mon
...
using parameter_update.py script
2019-04-03 15:38:50 +02:00
bresch
10ba0801d2
Parameter update - Rename variables in modules/fw_pos_control
...
using parameter_update.py script
2019-04-03 15:38:50 +02:00
bresch
ece49247b6
Parameter update - Rename variables in modules/mc_pos_control
...
using parameter_update.py script
2019-04-03 15:38:50 +02:00
bresch
c6e7c0fa5d
Parameter update - Rename variables in modules/events
...
using parameter_update.py script
2019-04-03 15:38:50 +02:00
bresch
2ca8ddd8af
Parameter update - Rename variables in modules/commander
...
using parameter_update.py script
2019-04-03 15:38:50 +02:00
bresch
2255ab21be
Parameter update - Rename variables in templates
...
using parameter_update.py script
2019-04-03 15:38:50 +02:00
bresch
b14446f0e5
Parameter update - Rename variables in lib
...
using paramter_update.py script
2019-04-03 15:38:50 +02:00
bresch
ec5da55107
Parameter update - Rename variables in drivers
...
using parameter_update.py script
2019-04-03 15:38:50 +02:00
bresch
aa8edbc2ba
Parameter update - add -tcpp flag in rg to check C++ files only
2019-04-03 15:38:50 +02:00
bresch
06ab8570ab
Parameter update - Add parameter_update.py script used to rename the BlockParam variables with the new strict naming convention
2019-04-03 15:38:50 +02:00
bresch
99fb88ce83
AltitudeSmoothVel - Create new altitude flight task that uses the
...
velocity smoothing library to create a jerk-limited trajectory along the
Z axis. This FlightTask is used when MPC_POS_MODE = 3.
2019-04-03 10:43:31 +02:00
bresch
a08b1682e3
[Position|AutoLine]SmoothVel - Update position and velocity states of the trajectories in case of EKF reset. Until now, only the position reset on XY axis was properly handled. Now, xy, vxy, z and vz are handled
2019-03-20 14:35:26 -04:00
bresch
0813f30723
AutoLineSmoothVel - change function contrain_one_side(..) from snake_case to camelCase
2019-03-20 14:35:26 -04:00
bresch
aecf8fce58
ManualPositionSmoothVel - Force velocity and acceleration setpoints to zero if the velocity setpoint is smaller than 1mm/s and that the acceleration setpoint is null
2019-03-18 08:33:11 +01:00
bresch
1fefa76e5d
ManualSmoothVel - Set jerk to 1.0 during position hold to help the optimizer to converge towards 0 vel and acc
2019-03-18 08:33:11 +01:00
bresch
06f683bdda
VelocitySmoothing - Add simple test script
2019-03-18 08:33:11 +01:00
bresch
b9cf4dfb6c
VelocitySmoothing - Get rid of math.h, math.cpp and px4_defines dependencies
2019-03-18 08:33:11 +01:00
bresch
ddab0ccdf1
VelocitySmoothing - Protect against division by zero and sqrt of a negative number
2019-03-18 08:33:11 +01:00
bresch
c5706f6283
FlightTaskAuto - Recover position control after local position reset ( #11636 )
...
* FlightTaskAuto - Explicitly check is _triplet_target is finite to decide if the target has to be updated or not. If the _target is NAN, always try to update it to get a valid setpoint.
2019-03-15 00:42:24 -04:00
bresch
684e2974ac
mc_pos_control_main - Re-add updateVelocityControllerIO for glitch-free position unlock
2019-02-28 21:26:13 +01:00
bresch
f229444722
ManualSmoothVel - Split position lock condition and flag action
2019-02-25 21:41:04 +01:00
bresch
8f584a1496
smooth takeoff - Support smooth takeoff triggered by jerk setpoint
2019-02-25 08:07:33 +01:00
bresch
197ddd3e46
mc_pos_control - Publish trajectory setpoint directly after the FlightTask update
2019-02-13 20:56:57 +01:00
bresch
c0dab47554
mc_pos_control - reduce smooth_velocity_takeoff default threshold, set initial takeoff speed to 0 and remove useless else
2019-02-13 20:56:57 +01:00
bresch
e0c48d1d76
PositionControl - use dynamic constraints to saturate velocity controller for now as it is needed for the current smooth takeoff logic. Will be reverted after smooth takeoff refactor
2019-02-13 20:56:57 +01:00
bresch
106f0769fd
mc_pos_control - add takeoff_ramp_time zero division guard
2019-02-13 20:56:57 +01:00
bresch
70ddb8049a
Traj Smoothing - make format
2019-02-13 20:56:57 +01:00
bresch
3543071eb9
Position Controller - Saturate the controllers using static parameters. Handle saturations in the flight tasks only
2019-02-13 20:56:57 +01:00
bresch
4cace1bbe9
Manual vel smooth - use speed_up and speed_down constraints to limit velocity target of the trajectory generator
2019-02-13 20:56:57 +01:00
bresch
b7c2464cce
Manual vel smooth - Use MPC_JERK_MAX only
2019-02-13 20:56:57 +01:00
bresch
1730cd3a69
Velocity Smoothing - Various improvements, cleanup and corner cases fixes
2019-02-13 20:56:57 +01:00
bresch
f1262cbe84
Manual Traj - Avoid velocity jumps due to a modification of the constraints
2019-02-13 20:56:57 +01:00
bresch
57eef6b170
Manual Trajectory - Add Z position lock logic and log complete trajectory
2019-02-13 20:56:57 +01:00
bresch
5229882470
Camera Capture - Use falling edge only
2019-02-10 18:07:44 -05:00
bresch
7906bff914
Camera Capture - add "status" to camera_capture usage help message
2019-02-10 18:07:44 -05:00
bresch
faa8b6fe6d
Camera Capture - enable capture at startup
2019-02-10 18:07:44 -05:00
bresch
df58e161d1
Trajectory auto - Handle EKF xy reset
2019-01-22 17:23:16 +01:00