These assignments were temporary for correct logging of the input
setpoint which now properly also comes out of the controller again.
This is reverting the hotfix from:
dee8d200d8bb42cd964065f9a6506e3c4a901f10
Removing the skip_controller and interfaceMapping
concept and replacing it with a single method checking
if the position control update was successful and
return the result in the PositionControl.update().
This restores original horizontal thrust setpoint execution
that I intentionally broke three commits ago. It's necessary
for correct stick to tilt mapping of FlightTaskManualAltitude.
This commit temporarily breaks direct horizontal thrust setpoint execution
which is used by FlightTaskManualAltitude. This is necessary to allow for
PositionControl cleanup namely calculating the whole velocity PID in one
Vector3f formula.
Having this in a separate commit is useful since it reduces indentation
of a bigger code block.
I've added a queue depth of 4 for sensor_accel and sensor_gyro. This is initially added because it's not always possible for the `vehicle_acceleration` to keep up with every publication of the primary accelerator as it runs in the same thread as ekf2, various controllers, etc.
Later this mechanism will be used in a few areas
- rate limit `vehicle_angular_velocity` and `vehicle_acceleration` without missing any raw data
- move IMU integration to `vehicle_imu` and out of the actual driver threads, eliminating the need for sensor_accel_integrated and sensor_gyro_integrated
- integrate raw gyro synchronized with optical flow measurements
Prior this fix VTOL missions get rejected if they have a DO_LAND_START marker, but then do
not end with a LAND waypoint but a VTOL transition and land.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
- introduces parameter IMU_DGYRO_CUTOFF to configure the angular acceleration low pass filter
- the angular acceleration is computed by differentiating angular velocity after the notch filter (IMU_GYRO_NF_FREQ & IMU_GYRO_NF_BW) is applied
Co-authored-by: Julien Lecoeur <jlecoeur@users.noreply.github.com>
- gyro filtering (low-pass and notch) only performed on primary gyro in `sensors/vehicle_angular_velocity` instead of every gyro in `PX4Gyroscope`
- sample rate is calculated from actual updates (the fixed value was slightly wrong in many cases, and very wrong in a few)
- In the FIFO case the array is now averaged and published in `sensor_gyro` for filtering downstream. I'll update this in the future to use the full FIFO array (if available), but right now it should be fine.
Regression from 6dec451babf1b4c6394fbf8678585d66932adefb, leading to
preflight failures not being reported at all. Only after a failed arming
attempt the messages would be sent. And for GPS check failures, in case
they are set to optional (default), arming would be possible, but switching
to position would be rejected w/o error.
We need to run the preflight checks periodically, but this at least restores
the previous behavior.
This was inverted, i.e. set to false in most cases, whereas it should be
true.
As a consequence, both powerCheck and airspeed.confidence checks were not
executed.
orb_copy() just returns if data==nullptr.
Fixes lockstep for ekf2. estimator_status.time_slip now stays constant
after startup, even with high speedup factor and high system load.
The previous forwarding rules exclude another onboard MAVLink node to
send messages to a specific target.
E.g. a message from a companion computer with sysid 1 (same as
autopilot) with target sysid 190 (for the ground station) was not
forwarded.
With the new rules, anything that is not specifically addressed to the
autopilot's sysid and compid is forwarded.
This avoids premature state machine execution, most notably for missions.
In particular this fixes these issues:
- when landed, and the vehicle has a valid mission: switching to mission
would execute the first item.
- after executing a mission with a land waypoint, the mission is reset
and the first item is executed.
In case the first waypoint is a takeoff, it would print a user message:
"Takeoff to x meters above home.". If it was a vehicle command, it would
execute that.
Note that because the vehicle is disarmed, the vehicle would not actually
do anything (except for commands that are accepted while disarmed).
This will allow navigator to not output any setpoints while disarmed.
Otherwise the position controller outputs warnings in the form of:
Auto activation failed with error: Activation Failed
The risk here is that it could hide problems, where navigator sends invalid
triplets when it should not.