Beat Küng
00c2086dd6
mc_pos_control: simplify weathervane logic
2018-11-13 09:30:18 +01:00
Beat Küng
1946f043f1
mc_pos_control: print active flight task for 'mc_pos_control status' cmd
2018-11-13 09:30:18 +01:00
Beat Küng
e7e06dfe38
fix mc_pos_control: disable flight tasks if none of them should be running
...
Previously when switching e.g. from stabilized from acro, the stabilized
flight task kept running and publishing setpoints.
Luckily it caused no problems, but the log showed arbitrary attitude
setpoints.
2018-11-13 09:30:18 +01:00
bresch
066d1f50c4
Auto traj - Add dedicated parameter to enable trajectory smoothing in auto mode only
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
0209fa00bf
Auto Smooth Vel - Add AutoMapper2 and AutoLineSmoothVel flight tasks
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
Beat Küng
d8cb6bb834
mc_pos_control_params: update jerk params (limits + defaults + description)
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
50724bce86
mc_pos_control: support VTOL transitions again
...
Signed-off-by: Roman <bapstroman@gmail.com >
2018-11-07 00:13:43 +08:00
Dennis Mannhart
3b92d49b64
replace + with &&
2018-11-05 21:54:19 +01:00
Dennis Mannhart
6a0a9c92fb
PositionControl:
...
- set integral states and setpoint of reference state to 0
- set thrust to NAN if it will be computed from position and velocity control
2018-11-05 21:54:19 +01:00
Thunder
662c206ceb
fix ControlMath.cpp mathematical derivation error ( #10796 )
2018-11-01 10:13:59 -04:00
Mara Bos
10c20b38ad
Fix many format strings.
...
Fixes these invalid format strings:
- A `%d` for a pointer (replaced it by `%p`)
- A 0x%08x (and a 0x%0x8!) for a pointer (replaced by %p)
- 2 cases of `%d` for a `ssize_t` (replaced it by `%zi`)
- 1 case of a %u for an `int` (replaced by %i)
- 3 cases of %d for a `long` (replaced by %ld)
- 19 cases of `%d`, `%i`, `%u` or `%lu` for a `size_t` (replaced it by `%zu`)
- An unused formatting argument (removed it)
- A missing `%d` (added it)
- A missing `%s` (added it)
- 2 cases of `%llu` for a `uint64_t` (replaced it by `"%" PRIu64`)
- 6 cases of giving a string directly as format string (replaced it by `("%s", string)`)
- 2 cases of %*-s, which should probably have been %-*s.
(Looks like NuttX accepts (the invalid) %*-s, but other platforms don't.)
- A %04x for a `uint32_t` (replaced by "%04" PRIx32)
2018-10-27 12:44:51 +02:00
Dennis Mannhart
304e00f158
ALTITUDE_THRESHOLD lower to 0.3 meters
2018-10-16 11:13:00 -04:00
Dennis Mannhart
511563d4ac
mc_pos_control: enable control in xy during smooth-takeoff from ground but limit tilt
2018-10-16 11:13:00 -04:00
Dennis Mannhart
3329d69d05
mc_pos_control: replace const with constexpr
2018-10-16 11:13:00 -04:00
Dennis Mannhart
4627d5d6e4
mc_pos_control_main smooth takeoff: enable position-xy/yaw control once above 0.5m from takeoff reference
2018-10-16 11:13:00 -04:00
Dennis Mannhart
345d3278d1
mc_pos_control smooth takeoff: if velocity is valid, the control velocity in xy during takeoff
2018-10-16 11:13:00 -04:00
Dennis Mannhart
4b70584cf4
mc_pos_control takeoff: control velocity if velocity estimation is available, otherwise
...
just keep thrust vector pointing upward
2018-10-16 11:13:00 -04:00
Dennis Mannhart
dbd1e1432a
mc_pos_control: for sanity distinguish between velocity and position setpoint during
...
smooth-takeoff. This is only required if someone writes a FlightTask where both position
and velocity setpoints are finite
2018-10-16 11:13:00 -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
1f0d559d65
PositionControl: check and set _skip_controller flag at the end of the setpoint update
2018-10-10 10:29:46 -04:00
Dennis Mannhart
2f833a26d1
mc_pos_control: check if position-control setpoint update succeeded.
...
refactor use_obstacle_avoidance method
2018-10-10 10:29:46 -04:00
Beat Küng
431bcbe642
MPC_THR_HOVER: reduce minimum from 20% to 10%
2018-10-09 12:09:07 +02: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
eb30b5b73e
mc_pos_control_params: remove unused MPC_MANTHR_MAX params
2018-10-04 15:09:02 +02:00
Martina
e73c50ad9c
mc_pos_control_main: enable continuos update of vehicle_trajectory_waypoint
...
desired such that it's possible to use it in manual modes
2018-10-02 09:45:48 -04:00
Matthias Grob
bee6a6b8b0
Refactor: Use new matrix::Vector2f constructor
2018-10-01 08:10:21 -04:00
Beat Küng
079a43238f
mc_pos_control: print Failsafe message only once when entering failsafe
2018-09-28 08:59:22 +02:00
Beat Küng
720b3307d8
mc_pos_control: limit flight task init failure printf's
...
There were cases where the console was continuously spammed with activation
failure messages.
2018-09-28 08:59:22 +02:00
Beat Küng
ff69158836
mc_pos_control: add missing orb_unsubscribe
2018-09-28 08:59:22 +02:00
Beat Küng
f7b65c577b
mc_pos_control: refactor to use ModuleBase
2018-09-28 08:59:22 +02:00
Roman
ad88ef14e1
weathervane: use a single parameter to enable
...
- in auto mode we always run weather vane
- in manual model we just use it in position control mode
Signed-off-by: Roman <bapstroman@gmail.com >
2018-09-19 08:27:07 +02:00
Roman
96f3feb088
weathervane: get rid of passive strategy
...
Signed-off-by: Roman <bapstroman@gmail.com >
2018-09-19 08:27:07 +02:00
Roman
0e835cb498
Weathervane: pass quaterionon as constant reference
...
Signed-off-by: Roman <bapstroman@gmail.com >
2018-09-19 08:27:07 +02:00
Roman
ccaeb58708
WeatherVane lib: address review comments
2018-09-19 08:27:07 +02:00
Roman
ce7272a39c
WeatherVane: calculate rotation matrix directly when updating
...
Signed-off-by: Roman <bapstroman@gmail.com >
2018-09-19 08:27:07 +02:00
Roman
d6b6a1d0b3
addressed comments from review
...
Signed-off-by: Roman <bapstroman@gmail.com >
2018-09-19 08:27:07 +02:00
Roman
4ad11484ca
mc_pos_control: moded weathervane parameters to weathervane lib
...
Signed-off-by: Roman <bapstroman@gmail.com >
2018-09-19 08:27:07 +02:00
Roman
8abcf2defa
mc_pos_control: use weathervane library to make vehicle turn into relative wind
...
Signed-off-by: Roman <bapstroman@gmail.com >
2018-09-19 08:27:07 +02:00
Martina Rivizzigno
21f6ca4a1f
mc_pos_control: fix desired trajectory waypoint. ( #10372 )
...
- The first waypoint contains the vehicle current position and the desired velocity setpoint
2018-08-31 17:28:15 -04:00
Daniel Agar
223dacee64
multicopter position controller use const references
2018-08-31 14:37:49 -04:00
Daniel Agar
d131fea899
vehicle trajectory limit unnecessary updates and reduce logging ( #10347 )
...
- fixes #10345
2018-08-30 09:21:13 -04:00
Dennis Mannhart
e2e8d6d135
mc_pos_control_main: fix comment and remove line that is not used
2018-08-30 09:27:48 +02:00
Dennis Mannhart
72f1fca55c
mc_pos_control: lower LOITER_TIME_BEFORE_DESCEND from 1 second to 0.2
2018-08-30 09:27:48 +02:00
Dennis Mannhart
81c5025ad8
mc_pos_control: enter FlighttaskFailsafe if Flighttask wants to be started, but all of
...
the Flighttask fail. A failure of the Flighttask can occur if the demanded Flighttask does
not have the required data.
2018-08-30 09:27:48 +02:00
Dennis Mannhart
06c10f61c1
mc_pos_control: go into Failsafe only after 1 second flighttask.update() continous to fail
2018-08-30 09:27:48 +02:00