Commit Graph

1536 Commits

Author SHA1 Message Date
Alessandro Simovic de1fa11e96 New follow-me flight task
rename follow_me_status to follow_target_status

enable follow_target_estimator on skynode

implement the responsiveness parameter:
The responsiveness parameter should behave similarly to the previous
follow-me implementation in navigator. The difference here is that
there are now two separate gains for position and velocity fusion.
The previous implemenation in navigator had no velocity fusion.

Allow follow-me to be flown without RC

SITL tests for follow-me flight task

This includes:
- Testing the setting for the follow-me angle
- Testing that streaming position only or position
  and velocity measurements both work
- Testing that RC override works

Most of these tests are done with a simulated model
of a point object that moves on a straight line. So
nothing too spectacular. But it makes the test checks
much easier.

Since the estimator for the target actually checks new
measurements and compares them to old ones, I also added
random gausian noise to the measurements with a fixed seed
for deterministic randomness. So repeated runs produce
exactly the same results over and over.

Half of the angles are still missing in MAVSDK. Need to create
an upstream PR to add center left/right and rear left/right options.
These and the corresponding SITL tests need to be implemented
later.

sitl: Increase position tolerance during follow-me

Astro seems to barely exceed the current tolerance (4.3 !< 4.0)
causing CI to fail. The point of the CI test is not to check
the accuracy of the flight behaviour, but only the fact that the
drone is doing the expected thing. So the exact value of this
tolerance is not really important.

follow-me: gimbal control in follow-me

follow-me: create sub-routines in flight task class

follow-me: use ground-dist for emergency ascent

dist_bottom is only defined when a ground facing distance sensor exist.
It's therefore better to use dist_ground instead, which has the distance
to the home altitude if no distance sensor is available.

As a consequence it will only be possible to use follow-me in a valley
when the drone has a distance sensor.

follow-me: point gimbal to the ground in 2D mode

follow-me: another fuzzy msg handling for the estimator

follow-me: bugfix in acceleration saturation limit

follow-me: parameter for filter delay compensation

mantis: dont use flow for terrain estimation

follow-me: default responsiveness 0.5 -> 0.1

0.5 is way too jerky in real and simulated tests.

flight_task: clarify comments for bottom distance

follow-me: minor comment improvement

follow-me: [debug] log emergency_ascent

follow-me: [debug] log gimbal pitch

follow-me: [debug] status values for follow-me estimator

follow-me: setting for gimbal tracking mode

follow-me: release gimbal control at destruction

mavsdk: cosmetics 💄
2022-06-16 16:14:57 -04:00
Matthias Grob c59809b14a Commander: remove system_sensors_initialized
and system_hotplug_timeout. They're not in use for over 2 years.
Instead control LED with preflight checks.
2022-06-15 14:02:00 -04:00
Matthias Grob 44c4b8fa85 Style refactoring related to safety button 2022-06-08 05:12:05 -04:00
abarcis 4fc2640ee3
vehicle_command.msg: unneeded comment closings removed (#19759)
They cause problems with building px4_msgs in ROS2 Humble Hawksbill and removing them fixes the issue.

Co-authored-by: Agata Barcis <agata.barcis@tii.ae>
2022-06-03 07:25:05 +02:00
Daniel Agar 3889b79342 ekf2: yaw estimator add yaw_composite_valid boolean 2022-06-01 13:16:06 -04:00
Igor Mišić 25488da944 px4io: replace safety_off state with safety button event (#19558)
internal PX4IO safety_off state is removed and replaced with a normal safety button event. From this 'commit' commander is taking care of the PX4IO safety.
2022-06-01 13:15:13 -04:00
Igor Misic 554283655c Revert "px4io: replace safety_off state with safety button event (#19558)"
This reverts commit 12a81979a8.
2022-05-26 10:06:32 -04:00
Daniel Agar 58ea6235fe ekf2: estimator aid source status (range height) 2022-05-25 09:25:12 -04:00
Daniel Agar 1e25aee6fa ekf2: estimator aid source status (baro height) 2022-05-25 09:25:12 -04:00
Daniel Agar 639222dd65 ekf2: estimator aid source status (GPS pos, GPS vel) 2022-05-23 16:21:49 -04:00
Daniel Agar 1ae467e9cd ekf2: estimator aid source status (starting with fake position) 2022-05-23 16:21:49 -04:00
Igor Misic 12a81979a8 px4io: replace safety_off state with safety button event (#19558)
internal PX4IO safety_off state is removed and replaced with a normal safety button event. From this 'commit' commander is taking care of the PX4IO safety.
2022-05-23 06:54:37 +02:00
Igor Misic 08dcc72e1f commander/safety: replace safety.msg with Safety class (#19558) 2022-05-23 06:54:37 +02:00
Matthias Grob 47532ca07b ArmStateMachine: replace state name array with method 2022-05-20 13:51:51 +02:00
mcsauder e8da98fd14 Add gyro clipping to mirror accel clipping monitoring instances. 2022-05-18 21:16:05 -04:00
Silvan Fuhrer 7c5f0121a5 VTOL: remove some unsued variables
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-05-18 10:01:04 +02:00
Silvan Fuhrer 2b7efeacca vtol_vehicle_status: replace several status bools by single vehicle_vtol_state
Replace vtol_in_rw_mode, vtol_in_trans_mode, in_transition_to_fw by vehicle_vtol_state.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-05-18 10:01:04 +02:00
Silvan Fuhrer 635f64a2e5 Commander: remove permanent stabilization option for fixed-wing flight
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-05-18 10:01:04 +02:00
Matthias Grob 57a0289627 trajectory_setpoint: correct comment typo "kinematically"
Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
2022-05-12 17:19:48 +02:00
Matthias Grob 4017f4bb0b vehicle_local_position_setpoint: reorder fields for clarity 2022-05-12 17:19:48 +02:00
Matthias Grob 8ca28f3796 Separate message for trajectory setpoint 2022-05-12 17:19:48 +02:00
Alessandro Simovic 20ccfbb719 control_allocator: remove failed motor from effectiveness
- limit to handling only 1 motor failure
- Log which motor failures are handled
- Remove motor from effectiveness matrix without
  recomputing the scale / normalization
2022-05-12 07:58:56 +02:00
Alessandro Simovic fb71e7587c failure_detector: add motor/ESC failure detection 2022-05-12 07:58:56 +02:00
Beat Küng dfd934fbdb esc_report: add actuator_function 2022-05-12 07:58:56 +02:00
Beat Küng 32402f31df control_allocator: increase max num motors to 12 2022-05-10 08:57:39 +02:00
Silvan Fuhrer 5d6c8c986d Commander: high wind speed handling updates
- add logic for detecting high wind speed in Commander,
and handle it toghether with wind speed warning
- trigger and enforce RTL if COM_WIND_MAX is breached

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-05-09 19:09:40 +02:00
Silvan Fuhrer 21a2892f47 use actuator_controls[8] for collective tilt for tiltrotor VTOL, instead of [4]
[4] is reserved for Flaps, so also having the tilt on it was preventing us from
using flaps on tiltrotors, and other ripple effects.
By using [8] the tilt is separated from all other channels - it requires to increase the size of
actuator_controls by 1 to 9.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-05-03 15:11:21 +02:00
Beat Küng efdf5b8fce vehicle_{thrust,torque}_setpoint.msg: fix comment 2022-04-28 19:51:28 -04:00
Daniel Agar d1d15a6f6d differential pressure remove filters from drivers and average in sensors/airspeed 2022-04-26 08:39:19 -04:00
Alex Mikhalev 45dff7f71a commander: Add prearm check for flight termination 2022-04-25 11:57:37 -04:00
Daniel Agar d2f1349d1a sensors/vehicle_imu: replace coning metric with actual integrator coning correction (averaged)
- this saves a relatively expensive higih rate cross product and gives
better visibility into what's actually happening internally
2022-04-13 10:36:45 -04:00
bresch d903613c9c ekf: add logging for rng kinematic consistency check 2022-04-13 11:41:48 +02:00
bresch 8693ad15a7 ekf: add logging of range finder consistency check 2022-04-13 11:41:48 +02:00
Matthias Grob 6ce3e88f9d vehicle_command: specify what SPEED_TYPEs are for 2022-04-13 12:23:27 +03:00
RomanBapst b335710655 vehicle_command: added enum for speed types
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-04-13 12:23:27 +03:00
Junwoo Hwang 35613df210 uORB : Don't automatically include message name as default topic name in uORBTopics source files, to handle case where user doesn't use default messgae name for multi topic definition in .msg file 2022-04-13 09:08:51 +02:00
Daniel Agar bb2ea574aa ekf2: properly reset IMU biases on calibration change (non-multi-EKF)
- this was working in the multi-EKF case using vehicle_imu, but missing
in sensor_combined
2022-04-11 12:23:55 -04:00
Igor Misic 80aef942cd safety and safety button: refactoring #19413 2022-04-05 07:57:37 +02:00
Hovergames 457130fb69 Support for NXP UWB position sensor
uwb_sr150 driver for the sensor, and some
modifications in precision landing to allow
landing on a platform using the UWB system.
2022-04-04 17:26:52 +02:00
Daniel Agar 84e796c385 drives/gps: add new sensor_gnsss_relative msg
- for ublox this corresponds to NAV_RELPOSNED
2022-03-29 07:59:41 +02:00
Daniel Agar 0c31f63896 sensors: add baro calibration and cleanup
- sensor_baro.msg use SI (pressure in Pascals)
 - update all barometer drivers to publish directly and remove PX4Barometer helper
 - introduce baro cal (offset) mainly as a mechanism to adjust
relative priority
 - commander: add simple baro cal that sets baro offsets to align with
GPS altitude (if available)
 - create new sensors_status.msg to generalize sensor reporting
2022-03-26 16:08:41 -04:00
Silvan Fuhrer a7ddaf08c4 vehicle_status_flags.msg: remove condition_ prefix to reduce message size
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-03-23 10:37:51 -04:00
Silvan Fuhrer c30f2b9493 vehicle_status_flags.msg: remove unused condition_system_returned_to_home
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-03-23 10:37:51 -04:00
Daniel Mesham 06a9be74fa microdds: add xrce client 2022-03-22 09:01:05 +01:00
JunwooHWANG 04f8453f4a
Reduce Beeepr Default volume : 40 -> 20, since it's too loud for TAP_ESC devices from Yuneec (#19311) 2022-03-11 10:27:57 +01:00
Beat Küng 9b629a9e95 hitl,sitl,sih: use separate actuator_outputs_sim for SYS_CTRL_ALLOC==1
- removes the need to do type-specific rescaling of pwm to normalized values
- allows to run physical output drivers alongside HIL/SIH
2022-02-25 08:30:58 +01:00
Daniel Agar 1d7791dad6 commander: monitor GPS validity and EKF2 dead reckoning
- ekf2: expose dead reckoning as control status flags
 - commander:
    - add GPS validity check
    - in AUTO MISSION if dependent on GPS then a loss of GPS will
2022-02-22 09:46:21 -05:00
Daniel Agar 591b7b6934 ekf2: add new estimator_gps_status.msg
- includes the estimator status check fail bits broken out as descriptive booleans
 - absorbs ekf_gps_drift.msg
2022-02-21 08:58:59 -05:00
Daniel Agar e0a8d217fc mavlink increase HEARTBEAT timeout 1.5->2.5s
- tolerate missing one HEARTBEAT + jitter
2022-02-18 10:16:20 -05:00
Roman Bapst 6de5d24e00
Added VTOL Takeoff navigation mode (#19027)
* Commander: added support for MAIN_STATE_AUTO_VTOL_TAKEOFF
* navigator: added support for vtol_takeoff navigation mode
2022-02-15 14:56:57 +01:00
bresch 5818974f0f ekf: add range finder "faulty" status
When delclared faulty, the range finder cannot be used anymore
2022-02-11 10:57:45 -05:00
Julian Oes 39f0e97245 vmount: refactor for v2 auto input, test command
This is a bigger refactor of vmount to clean it up and plug some holes
in functionality.

The changes include:
- Fixing/simplifying the test command.
- Changing the dependencies of the input and output classes to just the
  parameter list.
- Adding a separate topic to publish gimbal v1 commands to avoid
  polluting the vehicle_command topic.
- Removing outdated comments and author lists.
- Extracting the gimbal v2 "in control" notion outside into control_data
  rather than only the v2 input.
2022-02-07 19:21:15 -05:00
Julian Oes f2216dff55 mavlink: don't send gimbal_device_attitude_status
If we receive gimbal_device_attitude_status by mavlink we should not
re-send it as we are already supposed to be forwarding mavlink traffic
from the gimbal to the ground station.
2022-02-07 19:21:15 -05:00
Daniel Agar f3e2a197ad
move vehicle at rest detection ekf2 -> land_detector
- move vehicle at reset detection ekf2 -> land_detector
 - ekf_unit: reduce init period
   - Fake fusion is when at rest is quite strong and makes the variance reduce rapidly. Reduce the amount of time we wait before checking if the variances are still large enough.
 - ekf_unit: reduce minimum vel/pos variance required after init
   - Fake pos fusion has a low observation noise, making the vel/pos variances reduce quickly.

Co-authored-by:: bresch <brescianimathieu@gmail.com>
2022-02-01 17:50:19 -05:00
mcsauder e554f0174d Format whitespace and group checkall() methods together in geofence class. 2022-01-31 21:01:03 -05:00
Daniel Agar 90358f078f add odometry reset counter (ekf2, mavlink, etc) 2022-01-31 09:19:36 -05:00
CUAVmengxiao 425d03d909 msg: Add full_charge_capacity_wh 2022-01-26 13:44:48 -05:00
Roman Dvořák c8349811d1
Enable logging of mavlink tunnel messages
Co-authored-by: Vit Hanousek <vithanousek@seznam.cz>
2022-01-26 11:10:43 -05:00
Thomas Stastny 3b6c9448aa npfg: fix format CMakeLists 2022-01-14 22:05:53 +01:00
Thomas Stastny 082e320191 integrate optional NPFG library for wind-aware fixed-wing guidance 2022-01-14 22:05:53 +01:00
Claudio Micheli 8a01135a93 Commander: more changes to use events with escs and battery failures
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2022-01-13 08:40:34 +01:00
Claudio Micheli d122513197 extend support for Battery status message
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2022-01-13 08:40:34 +01:00
Julian Oes 9fe7a40673 manual_control: enable sending camera commands 2022-01-10 23:04:10 -05:00
Julian Oes 860b23dd17 tunes: add tune to power off
This is used by the ATL Mantis EDU to help the user realize when the
drone is powered off.
2022-01-10 23:04:10 -05:00
Daniel Agar e731fcdbc0
sensors (accel/gyro/mag) determine if external with device id 2022-01-10 10:31:07 -05:00
Matthias Grob bbb04ab4b8 Remove relaying of maximum altitude through land detector 2022-01-05 14:54:59 +01:00
honglang b60e59d9be msg: new sensor_hygrometer msg 2021-12-27 12:13:09 -05:00
Beat Küng 4c80adfaf1 control_allocator: implement trim + slew rate limits configuration 2021-12-24 20:06:13 -05:00
Beat Küng 1901edf13c actuator_motors.msg: add reversible flags & implement in mixer_module 2021-12-24 20:06:13 -05:00
Matthias Grob f68ae39840 Commander: avoid RC actions during calibration 2021-12-22 09:08:23 -05:00
marcojob 2cfe08b3b1 small typo in vehicle_local_position msg 2021-12-17 15:45:07 +01:00
Michael Schaeuble 5ad8b84dec Fix PPS based UTC timestamp in camera trigger and capture messages
The existing implementation has about 100ms difference to a reference clock. With the changes this error less than 25us.
- Use sensor_gps messages with hrt timestamps as RTC reference and not the system realtime clock. The PPS interrupt can then be aligned with the GPS clock system.
- Keep fallback based on system RTC when no PPS pulse was captured
2021-12-17 07:56:08 +01:00
Michael Schaeuble ebb657bcf4 Fix camera trigger via MAVLink when camera capture feedback is enabled
- camera_trigger module always publishes the camera_trigger msg (independent of the camera feedback)
- Use camera_trigger msg and set the feedback flag
- Subscribing modules determine if the message is relevant based on the feedback message
2021-12-17 07:56:08 +01:00
Igor Mišić 72b1db4a63 pps_capture: implementation of pulse per second capture driver 2021-12-17 07:56:08 +01:00
Thomas Debrunner eb69f15d3a health-flags: Increase health flags to 64 bit bit field to support extended sys status mavlink message
Add SYS_STATUS flag for parachute
2021-12-14 09:41:12 -05:00
Beat Küng f76086ffa1 microRTPS_agent_CMakeLists.txt.em: add install section 2021-12-10 09:03:08 -05:00
Matthias Grob ddc6b6bc9c battery: move MAVLink specific handling out of battery class 2021-12-07 21:06:51 +01:00
Daniel Agar 8fbf79527f magnetometer allow setting initial calibration from bias if available and stable 2021-12-01 20:24:56 -05:00
alexklimaj bfd5a90a5d UAVCAN Moving Baseline Working
Set uavcan publisher priorities

Switch to ardupilot rtcm message and add heading accuracy
2021-11-30 15:59:08 -05:00
Matthias Grob c522a8b15a Compute RTL time and react if lower than flight time
- Compute RTL time also during RTL
- Calculate correct altitude when finding destination
2021-11-24 14:10:24 +01:00
Beat Küng a0e43bca96 msg: remove unused vehicle_actuator_setpoint topic 2021-11-23 12:40:22 -05:00
Beat Küng 21699935e8 vehicle_command: add VEHICLE_CMD_ACTUATOR_TEST and VEHICLE_CMD_CONFIGURE_ACTUATOR 2021-11-23 12:40:22 -05:00
Beat Küng 6fdcc43ea8 mixer_module: add testing for SYS_CTRL_ALLOC=1 with actuator_test cmd+uorb msg 2021-11-23 12:40:22 -05:00
Matthias Grob 3193b554ca Add optional preflight check for healthy MAVLink parachute system 2021-11-19 17:15:04 +01:00
Matthias Grob 43c529f294 Add MAVLink parachute system heartbeat detection 2021-11-19 17:15:04 +01:00
bresch f751dd2242 FlightTask: set yaw_setpoint to NAN when yaw should not be controlled 2021-11-16 18:09:37 -05:00
Matthias Grob 91c48606ee battery_status: clearly define and handle zero remaining flight time 2021-11-15 15:44:02 +01:00
Matthias Grob 54f2e91775 battery_status: report remaining flight time in seconds
This allows more accurate reporting and is compliant with the
MAVLink interface.
2021-11-15 15:44:02 +01:00
Matthias Grob 7ec8dd9d23 vehicle_constraints: remove deprecated speed_xy constraint 2021-11-09 21:47:06 -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 a593a51f05 Commander: fix mode initialization with RC 2021-11-09 16:05:25 +01:00
Matthias Grob af54ac7cdb ManualControl: remove unused variables and renaming 2021-11-09 16:05:25 +01:00
Matthias Grob a349dae760 Use action_request to command RC VTOL transitions 2021-11-09 16:05:25 +01:00
Matthias Grob 956997eb1e Replace arm_request and mode_request with combined action_request
Which saves flash space, log size and is extensible to handle e.g.
the VTOL transition and future actions.
2021-11-09 16:05:25 +01:00
Matthias Grob 052e29267d Use mode_request for RC mode switching 2021-11-09 16:05:25 +01:00
Matthias Grob f8e4846851 Use arm_request for manual killing 2021-11-09 16:05:25 +01:00
Matthias Grob af607e3040 Use separate arm_request instead of vehicle_command for RC arming 2021-11-09 16:05:25 +01:00
Matthias Grob 7a2ef4a917 Commander: don't publish RC_IN_MODE to vehicle_status
This just contains the content of the parameter which
is redundant and results in multiple sources of truth.
2021-11-09 16:05:25 +01:00
Matthias Grob 93bed7f670 vehicle_command: shorten arming action/origin enum names 2021-11-09 16:05:25 +01:00
Julian Oes b3a5072de5 commander/manual_control: use msg enum for params
Instead of using a private enum class we should define the enum in the
vehicle_command message and then use it consistently.
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 baf81abbab msg: whitespace only 2021-11-09 16:05:25 +01:00
Julian Oes bd0c1014d9 manual_control: support arming button
The arming button required some refactoring in order to support to
toggle arm/disarm using the vehicle_command. Otherwise manual_control
would have to subscribe to the arming topic and we would spread out the
logic again, and risk race conditions.
2021-11-09 16:05:25 +01:00
Julian Oes e49b596edc commander: add desired main state
This is an intermediate solution to carry forward the initial state of
the mode slot. Basically, it allows that we start up in Stabilized but
switch to POSCTL as soon we have the required GPS.
2021-11-09 16:05:25 +01:00
Julian Oes cda6524421 manual_control: move override detection
This also removes the option to ignore throttle for the override
detection as it's not really required anymore.
2021-11-09 16:05:25 +01:00
Julian Oes 723db8bf2a manual_control: add selector class [WIP]
This adds a selector class with unit tests.
The idea is to have a valid flag in manual_control_septoint and set that
according to the selection and/or timeout of manual_control_inputs.
2021-11-09 16:05:25 +01:00
Daniel Agar 2d816e0b3e [WIP] manual_control selector hacks 2021-11-09 16:05:25 +01:00
Daniel Agar e18cf3da3e sensors/vehicle_imu: use WelfordMean for online mean and variance 2021-11-09 15:19:35 +01:00
JaeyoungLim cda7c6ceaa
Enable offboard actuator setpoints 2021-11-07 15:38:42 -05:00
Daniel Agar 68026eadeb
save significant IMU bias changes learned by the EKF
* ekf2: make publishing of learned accel biases more robust
* ekf2: reset accel bias if calibration updated
* msg: add separate accel and gyro calibration counters
* ekf2: use separate accel and gyro calibration counters
* ekf2: rework logic to reset biases when calibration counters increment
* sensors: add saving of learned accel biases
* ekf2: generalized saving accel/gyro/mag in flight sensor calibration
* boards: holybro kakutef7 disable systemcmds/perf and systemcmds/top to save flash

Co-authored-by: Paul Riseborough <gncsolns@gmail.com>
2021-11-07 15:34:27 -05:00
bresch 1e94512719 FD: use flags union instead of bitmask 2021-11-05 09:45:52 -04:00
bresch 3f1025fb1e FD: add dedicated topic to log more internal states
log imbalanced propeller check metric

add failure_detector_status message
2021-11-05 09:45:52 -04:00
bresch 5dfb8e594a FD: add imbalanced propeller check 2021-11-05 09:45:52 -04:00
bresch bf2fb70d67 vehicleIMU: compute and log accel variance 2021-11-05 09:45:52 -04:00
Silvan Fuhrer f02786d112 Navigator/Commander: make GPS failsafe consitent: switch to Descend also for FW and VTOL
- remove GPS failsafe mode
- for VTOL: transition to hover in Descend (unless NAV_FORCE_VT is not set)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-11-05 12:09:39 +03:00
Silvan Fuhrer cad7851774 AirspeedSelector: add _CAS_scale_validated to airspeed_wind for logging
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
Silvan Fuhrer 625f556b0e AirspeedSelector: airspeed scale estimation improvements and robustification
- run airspeed scale estimation always, not in dedicated mode
- add option to apply scale automatically, with extra feasibility check
- add airspeed scale for all 3 possible airspeed instances
- clean up parameters
- add check for data stuck (non-changing airspeed data)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
Beat Küng 8a2b310b83 topic_listener: avoid code generation, use existing metadata at runtime
This reduces flash size for v5 by ~110KB, the topic listener now only adds
about 1.2KB.
2021-10-20 08:10:05 +02:00
Beat Küng 4c73ac3805 uorb: use single byte for internal types in o_fields metadata
Reduces flash usage by ~9KB.
2021-10-20 08:10:05 +02:00
mcsauder 21163d859e Whitespace cleanup. 2021-10-19 13:29:26 -04:00
Beat Küng a65533b469 mixer_module: add output functions for servos, landing gear, parachute, RC passthrough & gimbal 2021-10-18 18:45:19 -04:00
Beat Küng 5103f00de3 vehicle_command.msg: add VEHICLE_CMD_DO_SET_ACTUATOR 2021-10-18 18:45:19 -04:00
Beat Küng 38fa65a47e control_allocator: remove direct mixer, add actuator_{motors,servos} instead 2021-10-18 18:45:19 -04:00
bresch ec178c8745 create new mag_bias_estimator module
Co-authored-by: Daniel Agar <daniel@agar.ca>
2021-10-02 21:25:21 -04:00
bresch 5874b1f87c mc atune: add module to all targets
- adjust flash constrianed targets to fit
2021-10-02 18:12:05 -04:00
bresch 0498ee92d0 mc atune: add multicopter attitude auto-tuner module 2021-10-02 18:12:05 -04:00
bresch d504b49695 mc_rate: compute control energy and publish to status msg 2021-10-02 18:12:05 -04:00
Nicolas Martin b24e5fc0af clean remaining offboard_control_signal_found_once
offboard_control_signal_found_once is not used any more
2021-09-28 09:25:04 -04:00
Daniel Agar 089c962d92 px4io: moving mixing to FMU side
Using mixers on the IO side had a remote benefit of being able to
override all control surfaces with a radio remote on a fixed wing.
This ended up not being used that much and since the original design
10 years ago (2011) we have been able to convince ourselves that the
overall system stability is at a level where this marginal benefit,
which is not present on multicopters, is not worth the hazzle.

Co-authored-by: Beat Küng <beat-kueng@gmx.net>
Co-authored-by: Daniel Agar <daniel@agar.ca>
2021-09-25 19:15:05 -04:00
Igor Mišić 3a148bc777 camera_trigger: remove camera trigger secondary
camera_trigger: publish trigger when capture feedback is not enabled
2021-09-23 09:21:56 +02:00
Hamish Willee f41e5985e8 vehicle_local_position: clarify origin of system 2021-09-22 10:14:23 +02:00
Matthias Grob d1f1e02afb Refactor mode button changes 2021-09-14 09:52:32 +02:00
Claudio Micheli c50daae4a3 rc_update: introduce support for toggle buttons via RC channels
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-09-14 09:52:32 +02:00
Claudio Micheli fa4fc5f347 esc_report: change esc_temperature field to allow negative values
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-09-11 15:14:49 -04:00
Beat Küng 00d939995b fix micrortps_transport: set poll fd when baudrate is 0 2021-08-22 10:42:13 -04:00
Christian Llanes c0efbe1f9c change PublicationMulti-> Publication as a temporary fix 2021-08-20 19:56:56 +01:00
Christian Llanes 6423ea50e6 add sensor_combined to urtps_bridge_topics.yaml 2021-08-18 23:52:45 +01:00
Hamish Willee 8aecc64a73 generate uorb - support multiline descriptions 2021-08-16 08:29:44 +02:00
Hamish Willee 9c081ed24b ekf2_timestamps.msg - make first line a complete sentence
Fixes the docs.
2021-08-16 08:29:44 +02:00
Hamish Willee 51fa834ac6 generate_msg_docs: generate better page title 2021-08-16 08:29:44 +02:00
Daniel Agar ff39e27e2d sensor calibration: save temperature at calibration time for monitoring 2021-08-15 11:19:24 -04:00
Daniel Agar f2bae02f87 msg: purge unused qshell 2021-08-14 12:54:01 -04:00
TSC21 21953daa3b microRTPS: transport: fix UART configuration 2021-08-12 08:44:53 +02:00
TSC21 4b6646c5f3 microRTPS: transport: normalize configs with mavlink/mavlink-router 2021-08-12 08:44:53 +02:00
TSC21 af8a6117fa microRTPS: agent: add missing 'g' option 2021-08-12 08:44:53 +02:00
TSC21 2a368b4db1 uorb_to_ros_urtps_topics: minor cleanup 2021-08-12 08:44:53 +02:00
TSC21 74557c9071 uorb_to_ros_msgs: minor cleanup 2021-08-12 08:44:53 +02:00
TSC21 8762dce762 microRTPS: transport: small format fix 2021-08-12 08:44:53 +02:00
TSC21 fae1627d92 microRTPS: client: cleanup and make arguments consistent 2021-08-12 08:44:53 +02:00
TSC21 109b031156 microRTPS: agent: cleanup and make arguments consistent 2021-08-12 08:44:53 +02:00
TSC21 e83a3a6cf7 microRTPS: update RTPS message list naming from 'ids' to 'msgs' 2021-08-12 08:44:53 +02:00
TSC21 0b23679f98 msg: templates: update empy contexts, required fields and license header years 2021-08-12 08:44:53 +02:00
TSC21 ffa70ac0fd microRTPS: generate_microRTPS_bridge: run fastrtsgen only once for all files
Reducing the generation time to a 4th of the time (!!)
2021-08-12 08:44:53 +02:00
TSC21 a8a56a03a4 microRTPS: rename uorb_to_ros_rtps_ids to uorb_to_ros_urtps_topics and remove the 'id' references on it 2021-08-12 08:44:53 +02:00
TSC21 4609949bbb microRTPS: generate_microRTPS_bridge: only run the generator for the topics that are actually marked to be used 2021-08-12 08:44:53 +02:00
TSC21 695e1fa574 uorb_to_ros_rtps_ids: add an header with a notice regarding the autogneration of the 'px4_ros_com' urtps_bridge_topics.yaml file
Although it can be modified manually, we are going to recommend the developer to generate it from the PX4-Autopilot side instead
2021-08-12 08:44:53 +02:00
TSC21 c478e2985a microRTPS: simplify the attribution of the RTPS IDs by makiing it automatic
1. The RTPS IDs are now automatically assigned to the topics
2. Only the topics that get defined to be sent or received in the urtps_bridge_topics.yaml (renamed, since now it doesn't contain IDs) receive the IDs
3. Any addition or removal on the urtps_bridge_topics.yaml file might update the topic IDs - this will require that the agent and the client ID list has to be in sync. This will further require a robustification of the way we check the IDs and the message definitions when starting the bridge.
2021-08-12 08:44:53 +02:00
TSC21 ba3dbbd38d microRTPS: send the system ID with the RTPS packet header and remove the need for extra id fields in uORB
This allows that all messages (not only timesync messages) that get received on the same system that sent them do not get parsed. As the microRTPS agent is built currently, this will only happen right now if someone sets the same UDP port to send and receive data, or by manually changing the agent topics (which were always autogenerated).
2021-08-12 08:44:53 +02:00
TSC21 a10dab516c timesync: remove system ID field from the timesync message 2021-08-12 08:44:53 +02:00
TSC21 25dbffe1aa microRTPS: agent: split FMU input from output topics in Pubs/Subs 2021-08-12 08:44:53 +02:00
TSC21 d31b7feb31 microRTPS: agent: publish timesync status 2021-08-12 08:44:53 +02:00
TSC21 a324e5465a timesync: extend timesync_status message with protocol source field and enum 2021-08-12 08:44:53 +02:00
TSC21 6d4f65a47a microRTPS: allow timesync using ROS time 2021-08-12 08:44:53 +02:00
Julian Oes 0c9fefce32 urtps: rectify comment 2021-08-12 08:44:53 +02:00
Julian Oes 31b1241de8 uorb_microcdr: collect all messages
Without this we are potentially too slow to collect them all which can
lead to the buffer in protocol_splitter to overflow and be reset.
2021-08-12 08:44:53 +02:00
bresch 01d0b8800e commander: report GNSS yaw fault to user 2021-08-05 11:10:02 +02:00
Beat Küng 86dc35022a generate_msg_docs.py: simplify logic a bit 2021-08-03 07:54:41 +02:00
Hamish Willee bf59fd84ba Add simple comment parser 2021-08-03 07:54:41 +02:00
Beat Küng da6275e43a msg: add script structure to generate docs from .msg files 2021-08-03 07:54:41 +02:00
Daniel Agar 93aa6e3f78 ekf2: baro bias publish minor cleanup
- naming consistency (estimator prefix as "namespace")
 - only publish if baro is available and bias is changing as a small logging optimization
 - avoid unnecessary copying (get const reference to status directly)
 - trivial code style fixes
2021-08-02 13:59:38 -04:00
Igor Mišić af2247bd94
mavlink: use dynamic camera comp id instead of hardcoded value 2021-07-31 12:41:49 -04:00
Dima Ponomarev d08d0443bc
Add internal combustion engine status uavcan bridge and mavlink EFI_STATUS stream 2021-07-30 22:31:43 -04:00
Daniel Agar 713a1d08a3 sensors: add accel/gyro current priority to sensors_status_imu
- later the sensor priorities (user configurable) can be factored into the estimator selection criteria
2021-07-30 21:20:01 -04:00
TSC21 205d4400eb add baro_bias_estimate to RTPS list 2021-07-20 04:56:33 -07:00
Oleg 8fbbf56c4d microRTPS: fix setting UART communication flags
bitwise not should be used instead of logical not
2021-07-20 12:34:58 +02:00
bresch 54c7e74de3 EKF: add baro bias estimator using GNSS altitude 2021-07-19 16:53:45 -04:00
TSC21 e39e3b3418 events interface: chance uORB 'sequence' to 'event_sequence'
The reason is that sequence is an IDL reserved keyword, which results on failure when parsing with FastRTPSGen.
2021-07-09 13:24:13 +02:00
Beat Küng e3972d563a cmake: ensure generated source files exist before extracting events
Only needed for Makefile-based builds:
gmake[3]: *** No rule to make target 'src/modules/flight_mode_manager/FlightTasks_generated.hpp', needed by 'events/px4.json'.  Stop.
2021-07-07 21:38:09 -04:00
Beat Küng 38f3b8d356 mavlink & system: add events interface
- sending protocol
- uorb event message & template methods for argument packing
- libevents submodule to send common events and handle json files
- cmake maintains a list of all (PX4) source files for the current build
  (PX4 modules + libs), which is used to extract event metadata and
  generate a json file
2021-07-07 21:38:09 -04:00
Daniel Agar 1b5e65df04
gyro_fft: change default length 1024 -> 512 to decrease latency
- change default FFT length (1024 -> 512)
      - this doubles the update rate because half the number of samples are required for each
 - decrease number of peaks (4 -> 3)
      - so far 3 seems to be sufficient on most vehicles
 - increase median filter window (3 -> 5)
 - decrease SNR requirement (likely needs to be configurable)
2021-07-06 21:54:18 -04:00
Daniel Agar a5ee28883a gyro_fft: track FFT peaks and median filter frequency 2021-07-06 12:32:25 -04:00
Matthias Grob b824f33ae9 battery: publish measured values also when battery not connected 2021-07-01 14:24:38 +02:00
Matthias Grob 9c0c85c9e2 battery_status: naming consistency current_filtered_a -> current_average_a 2021-07-01 14:24:38 +02:00
TSC21 4741ec25ce microRTPS: increase base message ID space to 179 2021-06-25 13:05:24 +02:00
TSC21 0c5f2d3b8c microRTPS: add missing header for PRIu32 and PRIu16 macros
Co-authored-by: squizz617 <seulbae@gatech.edu>
2021-06-21 16:36:44 +02:00
TSC21 084a992572 microRTPS: agent: only allow to whitelist the localhost when using FastDDS as the rmw 2021-06-21 16:36:44 +02:00
TSC21 79f7986715 apply ROS2 default memory management and publish mode QoS policies; make sure that SharedMemory is only used with FastDDS as the rmw 2021-06-21 16:36:44 +02:00
TSC21 d3a23cee40 microRTPS: agent: fix double free memory problem on SIGINT
It fixes also some minor issues when exiting the agent, including the printed stats
2021-06-21 16:36:44 +02:00
TSC21 6d5f12d2a2 microRTPS: client: add TX rate limiter 2021-06-21 16:36:44 +02:00
TSC21 ac2b38603c microRTPS: client: add missing "-p" option for the UART poll timeout and use microsecs for the send/rcv thread sleeps 2021-06-21 16:36:44 +02:00
TSC21 0cc79f3e48 microRTPS: client: show diagnostic of current bandwidth usage on the 'status' option 2021-06-21 16:36:44 +02:00
TSC21 d6ee15596d microRTPS: client: show diagnostic of average bandwidth usage on the 'status' option 2021-06-21 16:36:44 +02:00
TSC21 40462bfc1f microRTPS: client: reduce name set by pthread_setname_np since Linux requires names (with NUL) to fit in 16 chars, otherwise returns ERANGE (34) 2021-06-21 16:36:44 +02:00
TSC21 773d81f208 microRTPS: client: fix send per allocated topic 2021-06-21 16:36:44 +02:00
TSC21 f2fad6d966 microRTPS: by default, when FastDDS >= 2.0, enable Shared Memory transport for the agent participants when the localhost network is enabled 2021-06-21 16:36:44 +02:00
TSC21 320b414511 microRTPS: client: match the code style from the PX4 Firmware 2021-06-21 16:36:44 +02:00
TSC21 63571b3e3f microRTPS: agent: match the code style from the PX4 Firmware 2021-06-21 16:36:44 +02:00
TSC21 323ce797f8 microRTPS: allow communications only in the localhost network when ROS_LOCALHOST_ONLY env variable is set 2021-06-21 16:36:44 +02:00
TSC21 578e426e9e microRTPS: set trajectory_waypoint to be sent only, as this is outgoing data with vehicle_trajectory_waypoint_desired 2021-06-21 16:36:44 +02:00
David Sidrane 026d36dee8 microRTPS:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane 64db89ab20 px_generate_uorb_topic_helper: Use inttypes 2021-06-16 17:07:47 +02:00
Julian Oes e828ba4288
commander: send parachute command on termination (#17564)
* commander: send parachute command on termination

This sends the DO_PARACHUTE command to parachute component.

* commander: fix lying comments and printf

* commander: use one flag for termination triggered

This merges the duplicate flags _flight_termination_triggered and
_flight_flight_termination_printed.

* commander: correct variable name

* commander: always send tune with parachute

* commander: fix target_component for parachute cmd

The previous changes were wrong in that all commands were now sent to
the parachute component which doesn't make any sense. Of course only the
parachute command should be sent there.
2021-06-15 11:50:30 +02:00
bresch 514845592b en-/disable mc position controller using explicit control mode flag 2021-06-09 18:10:22 +02:00
RomanBapst b06b46b224 log raw airspeed derivative, pitch setpoint and airspeed innovation for TECS
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-05-31 23:56:23 +02:00
Daniel Agar 2a792ca201 gyro_fft: add simple SNR requirement and reduce number of peaks 2021-05-31 10:26:45 -04:00
Nuno Marques f9fe0e3746
ROS2/microRTPS: Add support for ROS2 Galactic and ROS2 Rolling (#17664)
microRTPS: generate_microRTPS_bridge: add support for ROS2 versions
* Galactic
* Rolling
2021-05-27 09:32:16 -07:00
Damien SIX e4f235001b fix timesync for timestamp sample (including SFINAE detection) 2021-05-16 13:15:37 -04:00
RomanBapst 3b27864e53 vehicle_status: added field for geofence violation
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-05-10 10:46:49 +03:00
RomanBapst 269ce07cb5 land detector: log more states in order to facilitate debugging ground contact state
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-05-04 16:43:33 +02:00
Thomas ab10e68a40 update Quadchute trigger from mavlink PR 1569 2021-05-03 21:44:27 +03:00
Thomas bf9758247b add VEHICLE_VTOL_STATE_QC and remove hardcoding 2021-05-03 21:44:27 +03:00
Julian Oes 71bd35fcaa mavlink: keep track of seq for any component
Instead of only keeping track of the sequence ID of specific "supported"
components, we now keep track of any sysid/compid of an incoming
message. Before this change, unknown components (such as jMAVSim) would
completely screw up the mavlink message stats and create confusion (at
least in my case).

With this change we currently keep track of up to 8 other components.
Once we reach the limit, we will print a warning.
2021-05-02 13:45:39 -04:00
Claudio Micheli 371fa98579 Commander/preflight checks: Add monitoring to ESC failures
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-04-22 13:46:08 +02:00
Matthias Grob 29e07b1e52 MulticopterPositionControl: publish stricter tilt limit during takeoff 2021-04-20 18:18:21 +02:00
mcsauder 3b72f3b641 Create publish_status() method in the heater driver, add a status field to indicate if the temperature setpoint has been met within 2.5C, breakout update_params() method from the Heater::Run() method and simplify logic. 2021-04-16 08:09:51 -04:00
Barcis, Michal 7053919a9f fixed micrortps_agent usage description 2021-04-13 21:28:27 +02:00
CUAVmengxiao 45b9e18195
UAVCANv0: add CUAV smart battery support 2021-04-11 21:27:31 -04:00
Daniel Agar 39c96a8884 gps add device_id 2021-04-08 08:27:07 +02:00
Julian Kent 5c5ec1a0ea Receive telemetry_status, send vehicle_trajectory_waypoint_desired 2021-03-31 13:26:00 +02:00
Julian Kent b5a64f957e Update RTPS messages to match what is needed for PX4/Avoidance 2021-03-31 13:26:00 +02:00
Julian Kent c1cb964c2a RTPS timesync don't use MONOTONIC_RAW 2021-03-31 13:25:27 +02:00
Julian Kent 1011382098 Clamp RTPS -> uorb timestamps to system time 2021-03-31 13:25:27 +02:00
RomanBapst 5b08362ba3
position_controller_status message: added comments regarding NAN
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-03-31 11:23:33 +02:00
Daniel Agar 18be1bacdc state_machine_helper: automatically initialize to assist mode if using mavlink manual control 2021-03-30 17:56:28 +02:00
Michael Schaeuble f9af1bbe2d PreFlightCheck: Check if SD card is present only once and store the result
statfs accesses the file-system and can be blocking for an extended period. Since the SD card check is part of the preflight checks in the main thread of commander, it could block its execution and cause various issues. The SD card is only mounted in rcS during boot so the state will not change after the first check.
2021-03-30 08:20:49 +02:00
Daniel Agar e57aaaaa5e
rotate accel/gyro FIFO before publish and fix angular velocity filter resets
- rotates accel & gyro FIFO data before publication both to simplify downstream usage (including log review) and fix other issues
     - to best handle int16_t data rotations are now either performed with swaps if possible, otherwise promoted to float, rotated using the full rotation matrix, then rounded back to int16_t
 - fix sensors/vehicle_angular_velocity filter reset both with proper rotation and new calibration uncorrect helper
      - in FIFO case filtering is done before calibration is applied, but we need to handle a possible reset from a completely different sensor (vehicle body angular velocity -> sensor frame uncorrected data)
2021-03-22 12:01:12 -04:00
Daniel Agar c1c0a62be5 drivers/gps: log automatic gain control (AGC) monitor 2021-03-17 15:11:43 -04:00
Daniel Agar 4092f87390 paw3902: fixes and improvements
- fully respect datasheet quality and shutter metrics for mode changes
 - use MOTION pin for scheduling if available
 - log light mode
 - refactor common enable LED code
 - respect read and write time delays
2021-03-16 15:52:03 -04:00
Daniel Agar 20d8de2dca gyro_fft: reduce run frequency (still consuming all queued data) 2021-03-15 09:42:35 -04:00
Daniel Agar af3573e464 gyro_fft: log peak frequency magnitudes 2021-03-15 09:42:08 +01:00
mohamed.moustafa 6914ebef4e added messages required by offboard_control example 2021-03-10 08:42:33 -05:00
Daniel Agar bb12fce66c delete RATTITUDE flight mode 2021-03-09 10:47:00 -05:00
Daniel Agar d37510a43d
update UUV and rover controllers to use trajectory_setpoint and cleanup unused position_setpoint fields 2021-03-09 10:36:34 -05:00
Paul Riseborough 4465c4fbf6
ekf2: Publish and log EKF warning and information events (NEW msg estimator_event_flags)
* msg: Add estinator information and warning events message (estimator_event_flags)
 * ekf2: publish information and warning events
 * logger: log estimator_event_flags
 * update ecl submodule to latest

Co-authored-by: Daniel Agar <daniel@agar.ca>
2021-03-07 16:16:48 -05:00
Daniel Agar 263b00b65f
ekf2 support SET_GPS_GLOBAL_ORIGIN and remove globallocalconverter usage
- vehicle_command cmd extended from uint16 to support PX4 internal commands that don't map to mavlink
2021-03-05 18:25:14 -05:00
Daniel Agar 00b3b3678b sensors/vehicle_angular_velocity: gyro dynamic notch filters updated from onboard FFT 2021-03-05 10:56:54 -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
Daniel Agar 266ea377da move takeoff state machine flight_mode_manager -> mc_pos_control 2021-03-03 18:53:56 +01:00
Daniel Agar 6482120d9a
sensors/vehicle_angular_velocity: use full raw FIFO data (sensor_gyro_fifo) if available 2021-02-25 10:06:17 -05:00
Daniel Agar 5f3e883f2c
sensors/vehicle_imu: vehicle_imu_status include accel/gyro full raw FIFO sample rate 2021-02-24 08:13:53 -05:00
Silvan Fuhrer 0ea8104344
select single system-wide wind estimate message (current best)
- publish wind estimate only from EKF, and wind speeds from airspeed selector to new separate topic (airspeed_wind)
 - rename message wind_estimate to wind
 - publish wind from currently used ekf instance (ekf2selector)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-02-20 13:15:01 -05:00
jciberlin 64342f568d Ghost protocol
ghst: add ghost protocol
2021-02-20 11:29:57 +01:00
Daniel Agar cff7a01d5e
ekf2: estimator_status log reset counts 2021-02-17 21:16:34 -05:00
Julian Oes b0d7d19bab vmount/mavlink: update gimbal information message
We should be using gimbal_manager_information and not
gimbal_device_information. Plus, this updates the fields and flags
according to the MAVLink changes.
2021-02-17 13:54:34 -05:00
Julian Kent a3e0e2e84f Fix RTPS builds 2021-02-17 13:54:34 -05:00
Julian Oes e6b1775bb6 vmount/navigator/mavlink: gimbal v2 changes
This is a collection of commits all having to do with changes in the
Mavlink gimbal v2 protocol as described in:
https://mavlink.io/en/services/gimbal_v2.html
2021-02-17 13:54:34 -05:00
Martina Rivizzigno 48b00ff678 Support for gimbal v2 protocol
- add command to request a message
- add gimbal attitude message

mavlink_receiver handle GIMBAL_MANAGER_SET_ATTITUDE

first implementation of new vmount input MavlinkGimbalV2
- setup class
- decode gimbal_manager_set_attitude in ControlData

add gimbal information message

add gimbal manager information and vehicle command ack

mavlink messages: add stream for GIMBAL_MANAGER_INFORMATION

mavlink_receiver: handle GIMBAL_DEVICE_INFORMATION

remove mavlink cmd handling from vmount input MavlinkGimbalV2

complete gimbal manager:
- send out fake gimbal_device_information for dummy gimbals
- complete ROI handling with nudging

small fixes

fix typos

cleanup
- gimbal device information
- flags lock
- check sanity of string

add support for CMD_DO_GIMBAL_MANAGER_ATTITUDE

stream GimbalDeviceAttitudeStatus for dummy gimbals
- add uROB gimbal_attitude_status
- fill status in vmount output_rc for dummy gimbals not able to send the
status themselves
- stream mavlink GimbalDeviceAttitudeStatus

better handle the request for gimbal infomation request

clean up

bring gimbal information back on vmount init

add new gimbal message to mavlink normal stream

fix publication of gimbal device information

rename gimbal_attitude_status to gimbal_device_attitude_status

stream gimbal_manager_status at 5Hz

mavlink: send information only on request

Sending the information message once on request should now work and we
don't need to keep publishing it.

mavlink: debug output for now

make sure to copy over control data

mavlink: add missing copyright header, pragma once

mavlink: address review comments

mavlink: handle stream not updated

Our answer does not just depend on whether the stream was found but
whether we actually were able to send out an update.

mavlink: remove outdated comment

vmount: add option for yaw stabilization only

The stabilize flag is used for gimbals which do not have an internal IMU
and need the autopilot's attitude in order to do stabilization. These
gimbals are probably quite rare by now but it makes sense to keep the
functionality given it can e.g. be used by simple servo gimbals for
sensors other than highres cameras.

The stabilize flag can also be re-used for gimbals which are capable of
stabilizing pitch and roll but not absolute yaw (e.g. locked to North).
For such gimbals we can now set the param MNT_DO_STAB to 2.

We still support configuring which axes are stabilized by the
MAVLink command DO_MOUNT_CONFIGURE, however, this is generally not
recommended anymore.

vmount: fix incorrect check for bit flag

mavlink_messages: remove debug message

Signed-off-by: Claudio Micheli <claudio@auterion.com>

use device id

remove debug print

gimbal attitude fix mistake

clang tidy fix

split:
- gimbal_attitude -> gimbal_device_set_attitude, gimbal_manager_set_attitude
- gimbal_information -> gimbal_device_informatio, gimbal_manager_information

add gimbal protocol messages to rtps msg ids

support set attitude for gimbal directly speaking mavlink

clean up gimbal urob messages

vmount: address a few small review comments

vmount: split output into v1 and v2 protocol

This way we can continue to support the MAVLink v1 protocol. Also, we
don't send the old vehicle commands when actually using the new v2
protocol.

vmount: config via ctor instead of duplicate param

vmount: use loop to poll all topics

Otherwise we might give up too soon and miss some data, or run too fast
based on commands that have nothing to do with the gimbal.

typhoon_h480: use gimbal v2 protocol, use yaw stab

Let's by default use the v2 protocol with typhoon_h480 and enable yaw
lock mode by stabilizing yaw.
2021-02-17 13:54:34 -05:00
Ildar Sadykov 51dd141c86 RTPS: adjust timestamp_sample in urtps_agent 2021-02-17 13:19:05 +01:00
Daniel Agar a416731656 drivers/heater: add logging and minor improvements
- new heater_status logging message
 - run continously at low rate until configured sensor is found
 - fix px4io fd bugs (fd open/close/ioctl must be same thread)
2021-02-16 15:16:19 -05:00