20715 Commits

Author SHA1 Message Date
Daniel Agar
5fcd7932e9
mavlink: replace MavlinkOrbSubscription with uORB::Subscription
* uORB orb_stat() and update(uint64_t *time, void *dst) are now obsolete and have been deleted
 * mavlink messages add more advertised checks in streams get_size() check to improve data rate calculation across different scenarios
2020-03-14 12:52:46 -04:00
Lorenz Meier
35ed5607b4 Mission feasibility checker: Prevent zero-length trajectories
The mission logic depends in a number of locations on being able to calculate the direction from one waypoint to another. Missions that have waypoints that are in the same physical location do not make sense and need to be rejected (the GCS / SDK generating them needs to be fixed). By enforcing this we can work with a reasonable and simpler state machine while executing the mission.
2020-03-14 17:50:40 +01:00
Lorenz Meier
76d20be29d Mission block: Gate math cleanup and checks
This change simplifies the gate calculation.
2020-03-14 17:50:40 +01:00
Lorenz Meier
4876e7bd6b Navigator: Improve documentation of mission block
The default for the gate check condition is to pass and this needed to be explicitly documented
2020-03-14 17:50:40 +01:00
Lorenz Meier
5e7ff47aac Navigator: Improve code readibility
This diff does not contain any functional changes but just makes the code more readable and adds comments.
2020-03-14 17:50:40 +01:00
Lorenz Meier
417d172a72 Navigator: Warn only for non-zero missions
Previously a zero-length mission that failed checks
(e.g. because a mandatory element was not present) would lead to a
warning.
2020-03-14 17:50:40 +01:00
Lorenz Meier
027e52d402 Camera trigger: Improve code readability
This helps to trace the code, no functional changes.
2020-03-14 17:50:40 +01:00
Lorenz Meier
f1f185d209 Mission feasibility checker: Handle mission with zero elements silently
A mission with zero elements is invalid but should not lead to a warning. Previously a fixed wing aircraft without a mission did emit warnings about a missing land item.
2020-03-14 17:50:40 +01:00
Lorenz Meier
09595f88fc Mission block: Style improvement
Boolean logic improvement to avoid double assignment of true
2020-03-14 17:50:40 +01:00
Lorenz Meier
5936844595 Update to latest mission API 2020-03-14 17:50:40 +01:00
Lorenz Meier
b405c7e9bd Navigator: Add ability to wait for a position gate with executing the mission
This enables the navigator to wait for a specific gate coordinate to pass orthogonally to the current trajectory. This is particularly helpful for payload / camera handling in missions and avoids a dependency of payload handling on navigation waypoints.
2020-03-14 17:50:40 +01:00
Lorenz Meier
ed8cb1c5a7 MAVLink: Add support for new gate command
This enables the vehicle to be able to wait with executing the next item until a position has been passed.
2020-03-14 17:50:40 +01:00
Lorenz Meier
8842977d80 Camera trigger: Handle trigger distance handling better 2020-03-14 17:50:40 +01:00
BazookaJoe1900
5e343b104e
logger: using ModuleParams (#14316)
and some cleanups on main()
2020-03-13 11:31:43 +01:00
Daniel Agar
0eca583ecf sensors: move baro aggregation to new sensors/vehicle_air_data 2020-03-12 19:06:34 -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
PX4 BuildBot
2da38ae81c Update submodule matrix to latest Thu Mar 12 00:38:40 UTC 2020
- matrix in PX4/Firmware (db0c95ed5620e8ffad3dd3281b511cf5f9ee7848): 649c837b6b
    - matrix current upstream: 4873dc1c1e
    - Changes: 649c837b6b...4873dc1c1e

    4873dc1 2020-03-04 kritz - Analytic inverse implementation (#122)
2020-03-12 00:01:38 -04:00
Daniel Agar
a89b69b0ea
vehicle_global_position: remove velocity fields (duplicates of local vx, vy, vz)
* attitude_estimator_q: get velocity from local position (if available)
2020-03-11 23:57:43 -04:00
Daniel Agar
5d33b9e999
delete Outback Challenge (OBC) AUTO_RTGS (datalink loss) and AUTO_RCRECOVER (rc loss) 2020-03-11 22:45:55 -04:00
Daniel Agar
f9794e99f8
move hover_thrust_estimator to new module (mc_hover_thrust_estimator)
* MC_HTE: unitialize with hover_thrust parameter
* MC_HTE: constrain hover thrust setter between 0.1 and 0.9
* MC_HTE: integrate with land detector and velocity controller
* MCHoverThrustEstimator: Always publish an estimate even when not fusing measurements. This is required as the land detector and the position controller need to receive a hover thrust value.

* MC_HTE: use altitude agl threshold to start the estimator
local_position.z is relative to the origin of the EKF while dist_bottom
is above ground

Co-authored-by: bresch <brescianimathieu@gmail.com>
2020-03-11 21:20:54 -04:00
David Sidrane
4b9e6964f4 uavcan:Support runtime setting of CAN interfaces 2020-03-11 20:36:58 -04:00
Daniel Agar
9cd8bb4f88
sensors: move to WQ
Running the sensors module out of the same WQ thread as the estimator, position, and attitude controllers is a bit safer and prevents potential priority and starvation issues. There is a very small increase in latency (~50 us) between sensors and ekf2 execution (on average). This also saves a little bit of memory (~ 3 kB) and cpu (~1-1.5% depending on the board).
2020-03-11 11:34:04 -04:00
Daniel Agar
9585055e9e
uORB: add bitset for faster orb_exists check and remove uORB::Subscription lazy subscribe hack/optimization
- add PX4 bitset and atomic_bitset with testing
 - add uORB::Subscription constructor to take ORB_ID enum
 - move orb test messages into msg/
2020-03-11 09:06:33 -04:00
Beat Küng
a2b2605443 param: fix param_get_cplusplus type check 2020-03-10 10:11:43 -04:00
Beat Küng
b54e5a1c23 param: automatically update calibration ID params on import
This avoids the need for recalibration, and also cleans up other driver
ID's (merge separate accel/gyro).

The SPI address was previously set to a board-specific (arbitrary) value,
and is now set to 0. This will allow extending for multiple sensors of the
same type on the same bus.
2020-03-10 10:11:43 -04:00
Beat Küng
1851665fab boards: add new spi+i2c config
Chip-select and SPI initialization uses the new config, whereas the drivers
still use the existing defines.

The configuration in board_config.h can be removed after all drivers are
updated.
2020-03-10 10:11:43 -04:00
TSC21
2568d9ae20 mavlink: timesync: readd timesync_status uORB to report Mavlink timesync 2020-03-10 12:15:18 +00:00
TSC21
170835f3f8 microRTPS: add timesync for the agent side 2020-03-10 12:15:18 +00:00
Roman Dvořák
152427ecdc
Ability to disable airspeed scaling (#14334) 2020-03-10 12:57:36 +01:00
RomanBapst
4ddf0f9dc1 ekf2_main.cpp: fixed bug in the calculation of the mag bias calibration time
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-03-10 08:54:04 +01:00
Roman Dvořák
e43aa4e287
logger: add RPM sensor messages 2020-03-09 18:34:06 -04:00
Alexey Matveev
baf3cd5c30 Up stack for frsky_telemetry 2020-03-09 17:02:54 -04:00
Beat Küng
3fef401e81 uorb callbacks: fix unregister ordering to avoid race conditions
The order should be: first unregister, then remove the item from the
runnable queue.
2020-03-09 08:06:00 -04:00
Julian Kent
36c307a39e Provide a dummy avoidance for flash constrained boards
Part of this: move ObstacleAvoidance to a library
2020-03-09 09:51:49 +01:00
Julian Kent
5169cfcc45 Add bezier trajectory tracking in obstacle avoidance 2020-03-09 09:51:49 +01:00
Julian Kent
d2507e831e Add mavlink parsing for bezier message 2020-03-09 09:51:49 +01:00
Julian Kent
5b8aa20c2f Bezier trajectory functions to get position, velocity, accel on trajectory 2020-03-09 09:51:49 +01:00
Matej Frančeškin
b8970673c6 Fixed Mavlink FTP tests 2020-03-08 21:43:54 +01:00
Matej Frančeškin
ef865a091f Added FileNotFound error code according to new Mavlink FTP specification 2020-03-08 21:43:54 +01:00
bazooka joe
887d846f7a remove one space from string sent with the logger filename
now the full file name is sent, and not missing the last seconds digit
2020-03-08 12:07:51 +01:00
Dusan Zivkovic
d7a9b123e6 logger: fix thread deadlock 2020-03-06 13:37:34 +01:00
Daniel Agar
4698a09b98 delete unmaintained outback challenge (OBC) bottle drop example 2020-03-05 14:09:31 -05:00
Silvan Fuhrer
b9fab04adb tiltrotor: improve comments and renaming of one variable
This is to point out that also rear motor can be used in FW flight and not only the front motors

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-03-05 11:49:42 +03:00
bresch
2d009e2e7a ecl: update submodule
- reduce CPU load
- fix earth rate gyro compensation
- make test with clang
- use switch statements in controlHeightFusion

Diff:
3fa5f501ae..230c865fa9
2020-03-04 23:59:24 +01:00
CarlOlsson
8de1f5229b EKF2: use fixed time constant for GPS blending
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2020-03-04 16:46:20 +01:00
CarlOlsson
357700aa8d EKF2 GPS blending: fall out of blending if one module lose 3D fix
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2020-03-04 16:46:20 +01:00
CarlOlsson
a10a228092 EKF2 GPS blending: reset relative position offsets if blending not feasible
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2020-03-04 16:46:20 +01:00
Julian Oes
2b087a92c2 commander: increment is 1 for int params 2020-03-04 09:35:14 +01:00
Julian Oes
874c6f385b commander: unify offboard timeouts
The implementation before this change had two timeouts, a hard-coded
timeout of 0.5 seconds as well as a by param configurable timeout with
certain failsafe actions set.

This change aims to fix two problems:
1. The hard-coded offboard timeout can be triggered easily with sped up
   lockstep simulation. Since i t is hard-coded it can't be adapted to
   the speed factor.
2. The offboard signal can time out but no action will be taken just
   yet. This means we end up in an in-between stage where no warning or
   failsafe action has happened yet, even though certain flags are set
   to a timeout state.

This patch aims to fix this by unifying the two timeouts to the existing
configurable param. The convoluted double timeout logic is replaced by a
simple hysteresis.

For anyone that has previously not changed the default timeout param (0),
the param will now be changed to 0.5 seconds which reflects the
previously hardcoded time. For anyone with a specific timeout
configured, the behaviour should remain the same.

Also, going forward, timeouts lower than 0.5 seconds should be possible.
2020-03-04 09:35:14 +01:00
Julian Oes
581b92dd3f attitude_estimator_q: enable lockstep without LPE
When lockstep is enabled and LPE is not running, the
attitude_estimator_q needs to publish ekf2_timestamps in order to signal
to the simulator module that it has fully run.

This essentially fixes flying in lockstep when SYS_MC_EST_GROUP is 3.
2020-03-03 09:31:52 +01:00