24 Commits

Author SHA1 Message Date
Daniel Agar
6135bb384b cleanup module callback registration failed errors 2022-03-23 20:44:50 -04:00
Beat Küng
a81f11acdd mc_rate_control: don't publish thrust + torque sp if vtol 2021-12-24 20:06:13 -05:00
Beat Küng
4ba84d56c9 logger: introduce optional topics
The current practice of adding topics to the default set isn't scalable,
as it affects all setups.
By making sure topics are advertised on init, logger can just discard
topics that don't exist. This does not work for all topics, so topics are
specifically marked as optional. It can be extended to more topics later
on though.

This reduces the list of topics by ~35 on a pixracer configured as quad,
and reduces RAM usage by ~1KB.
2021-11-15 09:02:03 -05:00
bresch
d47f9f155a MC mixer: replace multirotor_motor_limits by control_allocator_status
CA: fix saturation computation
Since the CA matrix is normalized, the same scale applied to be used when using the effectiveness matrix

MCRateControl: use control_allocator_status to get saturation info
2021-11-09 10:35:10 -05:00
Matthias Grob
fabf865411 Use backwards compatible manual_control_setpoint instead of manual_control_input 2021-11-09 16:05:25 +01:00
Matthias Grob
21739c6937 MulticopterRateControl: Add event for landing gear retraction when landed 2021-11-09 16:05:25 +01:00
Matthias Grob
820ba07d4b Fix landing gear processing 2021-11-09 16:05:25 +01:00
Julian Oes
42af44700b mc_rate_control: always allow landing gear control
Except of course when landed and we try to put it up.
2021-11-09 16:05:25 +01:00
Julian Oes
6a6b8d49fc msg: re-use manual_control_input in setpoint
This way we avoid duplication between manual_control_input and
manual_control_setpoint.
2021-11-09 16:05:25 +01:00
Julian Oes
97d01f200e commander: move manual_control and switches out
This moves the remaining handling of the manual control stuff out
of commander. All communication between manual control now goes through
vehicle commands, and the landing gear topic.
2021-11-09 16:05:25 +01:00
bresch
927c0c4296 McRateControl: publish torque and thrust setpoint for control allocator 2021-10-08 09:35:40 +02:00
bresch
d504b49695 mc_rate: compute control energy and publish to status msg 2021-10-02 18:12:05 -04:00
Matthias Grob
b824f33ae9 battery: publish measured values also when battery not connected 2021-07-01 14:24:38 +02:00
Daniel Agar
cc3c6f63e5 mc_rate_control: simplify manual_control_setpoint update 2021-03-09 10:47:00 -05:00
Daniel Agar
bb12fce66c delete RATTITUDE flight mode 2021-03-09 10:47:00 -05:00
Daniel Agar
d0c9a5fc93
OFFBOARD mode architecture overhaul (#16739)
- handle SET_POSITION_TARGET_LOCAL_NED and SET_POSITION_TARGET_GLOBAL_INT with ORB_ID(trajectory_setpoint)
 - FlightTaskOffboard not needed at all
 - bypass position_setpoint_triplet entirely (start removing extraneous fields)
 - simplify offboard_control_mode to map to supported control modes
2021-03-05 09:39:46 -05:00
Lorenz Meier
cc11fb2818 Multicopter rate controller: Protect for full throttle scaling
PX4 supports -1 to 1 as input and this module was not protected against the input range.
2021-02-14 11:17:28 +01:00
Daniel Agar
ef6209ba03
new manual_control_switches msg (split out of manual_control_setpoint) (#16270)
- split out switches from manual_control_setpoint into new message manual_control_switches
 - manual_control_switches published at minimal rate (~ 1 Hz) or immediately on change
 - simple switch debounce in rc_update (2 consecutive identical decodes required)
 - manual_control_switches logged at full rate rather than sampled at (5-10% of messages logged)
 - manual_control_setpoint publish at minimal rate unless changing
 - commander handle landing gear switch for manual modes
 - processing of mode_slot and mode_switch is now split so we only do one or the other (not both)
     - a future step will be to finally drop mode_switch and accompanying switches entirely

Co-authored-by: Matthias Grob <maetugr@gmail.com>
2020-12-11 12:11:35 -05:00
Daniel Agar
c5eb084236 mc_rate_control: use angular velocity timestamp for dt 2020-08-10 10:51:52 -04:00
Matthias Grob
e9eae1bd76 Refactor: Name manual_control_setpoint the same way everywhere 2020-06-22 12:06:27 -04:00
Daniel Agar
093e9ba1ce
mc_rate_control: use vehicle_angular_acceleration topic instead of differentiating
* mc_rate_control: use vehicle_angular_acceleration topic
* IMU_DGYRO_CUTOFF change default to 30 Hz
* improve IMU_DGYRO_CUTOFF param documentation (updated from MC_DTERM_CUTOFF)
2020-03-12 15:07:03 -04:00
Daniel Agar
22a005c9f4
delete module's redundant print_status()
- we can already get the running status from ModuleBase and the other misc information is already available through perf or uORB
2019-11-30 18:22:19 -05:00
Daniel Agar
0cc250194d
VTOL: explicitly start all FW & MC controllers in VTOL mode 2019-11-30 12:58:36 -05:00
Daniel Agar
84fe64b1c2
create new multicopter rate controller module (mc_rate_control) split out of mc_att_control 2019-11-19 17:03:11 -05:00