Commit Graph

541 Commits

Author SHA1 Message Date
Julian Oes
b812763a5a mavlink: no gimbal messages on constrained flash 2021-02-17 13:54:34 -05:00
Julian Oes
7633b119f7 gimbal: merge fixes 2021-02-17 13:54: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 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
Beat Küng
1f8e7de824 mavlink: implement COMPONENT_INFORMATION
- implement COMP_METADATA_TYPE_VERSION & add component_version.json.gz to
  ROMFS for all targets.
- implement COMP_METADATA_TYPE_PARAMETER (only enabled for SITL currently)
2021-02-09 09:44:50 +01:00
Daniel Agar
5097d531bf mavlink: send LINK_NODE_STATUS 2021-01-31 15:02:30 +01:00
Daniel Agar
d1dfa26903 consume all available queued vehicle_commands 2021-01-26 12:00:18 -05:00
ArthurLamberticus
82d32c7f3f mavlink: add ACTUATOR_OUTPUT_STATUS stream
Co-authored-by: Lise Prunier <lise.prunier@aerialcoboticus.com>
2021-01-21 09:30:43 -05:00
CUAVcaijie
bed77c2988 add notes 2021-01-19 20:42:58 +01:00
CUAVcaijie
297a428cc0 Fix the case where the flight controller is connected to the battery (charge 100), QGC shows no battery 2021-01-19 20:42:58 +01:00
David Jablonski
2ed48f041c mavlink: Templated SCALED_IMU mavlink stream 2021-01-17 12:32:51 -05:00
Daniel Agar
adb98d5702 mavlink: move HIL_ACTUATOR_CONTROLS to separate streams header 2020-12-28 11:09:46 +01:00
Daniel Agar
3b20310e9c mavlink: move POSITION_TARGET_GLOBAL_INT to separate streams header 2020-12-28 11:09:46 +01:00
Daniel Agar
672a1c90aa mavlink: move POSITION_TARGET_LOCAL_NED to separate streams header
- position type_mask
2020-12-28 11:09:46 +01:00
Daniel Agar
6b1d02feb7 mavlink: move RC_CHANNELS to separate streams header 2020-12-28 11:09:46 +01:00
Daniel Agar
48be6962d1 mavlink: move MANUAL_CONTROL to separate streams header 2020-12-28 11:09:46 +01:00
Daniel Agar
629d03b684 mavlink: move TRAJECTORY_REPRESENTATION_WAYPOINTS to separate streams header 2020-12-28 11:09:46 +01:00
Daniel Agar
5762c3b356 mavlink: move NAV_CONTROLLER_OUTPUT to separate streams header 2020-12-28 11:09:46 +01:00
Daniel Agar
9f57df75e8 remove rotation 41 (ROLL_270_YAW_180)
- duplicate of 31 (ROLL_90_PITCH_180)
2020-12-28 11:07:08 +01:00
bazooka joe
8d5813994f format smart battery serial number as string on mavlink
according to change on mavlink protocol message
formatted as 'dd/mm/yy-123456'
2020-12-28 11:04:54 +01:00
Daniel Agar
ceadcd74d0 mavlink: CAMERA_TRIGGER stream check free tx buf before send 2020-12-28 11:03:53 +01:00
Daniel Agar
ae706537b8 mavlink: CAMERA_IMAGE_CAPTURED stream check free tx buf before send 2020-12-28 11:03:53 +01:00
Daniel Agar
27b631e827 mavlink: ADSB_VEHICLE stream check free tx buf before send 2020-12-28 11:03:53 +01:00
Daniel Agar
dcb897307d mavlink: HEARTBEAT stream check free tx buf before send 2020-12-28 11:03:53 +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
Antonio Sanjurjo Cortés
aa80167b47 mavlink: rename OPTICAL_FLOW header and defines to OPTICAL_FLOW_RAD
Signed-off-by: Antonio Sanjurjo Cortés <74329840+antonio-sc66@users.noreply.github.com>
2020-11-29 20:26:07 -05:00
Antonio Sanjurjo Cortés
7dde298664 mavlink: move COLLISION to streams hpp
Signed-off-by: Antonio Sanjurjo Cortés <74329840+antonio-sc66@users.noreply.github.com>
2020-11-29 20:26:07 -05:00
Antonio Sanjurjo Cortés
2243931abd mavlink: move ATTITUDE_TARGET to streams hpp
Signed-off-by: Antonio Sanjurjo Cortés <74329840+antonio-sc66@users.noreply.github.com>
2020-11-29 20:26:07 -05:00
Antonio Sanjurjo Cortés
ce28aa089b mavlink: move ATTITUDE_QUATERNION to streams hpp
Signed-off-by: Antonio Sanjurjo Cortés <74329840+antonio-sc66@users.noreply.github.com>
2020-11-29 20:26:07 -05:00
Antonio Sanjurjo Cortés
8ac2ada0e6 mavlink: move ATTITUDE to streams hpp
Signed-off-by: Antonio Sanjurjo Cortés <74329840+antonio-sc66@users.noreply.github.com>
2020-11-29 20:26:07 -05:00
Antonio Sanjurjo Cortés
0bf622e211 mavlink: move OPTICAL_FLOW to streams hpp
Signed-off-by: Antonio Sanjurjo Cortés <74329840+antonio-sc66@users.noreply.github.com>
2020-11-29 20:26:07 -05:00
Matthias Grob
0ca63120eb mavlink_messages: add GPS_GLOBAL_ORIGIN
sending out local position reference.
Only send as anser to a request message command or
when the origin was changed from externally to verify.
2020-11-19 19:00:37 +01:00
Daniel Agar
ed8a30d73e mavlink: STATUSTEXT directly use mavlink_log subscription
- ORB_ID(mavlink_log) increase queue depth now that mavlink ringbuffer is gone
2020-11-17 19:47:06 -05:00
Daniel Agar
29658961ef mavlink: move DISTANCE_SENSOR to streams header 2020-11-13 10:05:22 -05:00
Daniel Agar
860a7fd1db mavlink: move ALTITUDE to streams header 2020-11-13 10:05:22 -05:00
Daniel Agar
a8f0987028 mavlink: move WIND_COV to streams header 2020-11-13 10:05:22 -05:00
Daniel Agar
4a9f293596 mavlink: move MOUNT_ORIENTATION to streams header 2020-11-13 10:05:22 -05:00
Daniel Agar
4a6c90b8ea mavlink: STATUSTEXT check TX buffer before sending
- Note the TX buffer size check is lazily ignoring the possibility of messages that span multiple Mavlink STATUSTEXT. This at least accommodates the calibration use case and it's no worse than before for longer messages.
2020-11-13 09:52:05 -05:00
Daniel Agar
0f411d6820 Multi-EKF support (ekf2)
- ekf2 can now run in multi-instance mode (currently up to 9 instances)
    - in multi mode all estimates are published to alternate topics (eg estimator_attitude instead of vehicle_attitude)
 - new ekf2 selector runs in multi-instance mode to monitor and compare all instances, selecting a primary (eg N x estimator_attitude => vehicle_attitude)
 - sensors module accel & gyro inconsistency checks are now relative to the mean of all instances, rather than the current primary (when active ekf2 selector is responsible for choosing primary accel & gyro)
 - existing consumers of estimator_status must check estimator_selector_status to select current primary instance status
 - ekf2 single instance mode is still fully supported and the default

Co-authored-by: Paul Riseborough <gncsolns@gmail.com>
2020-10-27 10:56:11 -04:00
Daniel Agar
16119f0e8c mavlink debug messages disable on CONSTRAINED_FLASH boards
- mavlink messages DEBUG/DEBUG_FLOAT_ARRAY/DEBUG_VECT/NAMED_VALUE_FLOAT move to separate stream headers and don't include if CONSTRAINED_FLASH
 - mavlink receiver DEBUG/DEBUG_FLOAT_ARRAY/DEBUG_VECT/NAMED_VALUE_FLOAT handling excluded if CONSTRAINED_FLASH
 - msg: skip debug_array.msg, debug_key_value.msg, debug_value.msg, debug_vect.msg if CONSTRAINED_FLASH
2020-10-20 11:05:47 -04:00
Oleg Kalachev
c302514a08 mavlink: expose kill switch status 2020-10-19 10:49:52 -04:00
mcsauder
047531b924 Add MavlinkStreamGPSStatus status class stream via GPS_STATUS.hpp and add PRN code to satellite_info.msg. 2020-10-14 08:26:42 +02:00
Daniel Agar
5fa1e8e8ba mavlink: stream rename GROUND_TRUTH -> HIL_STATE_QUATERNION 2020-10-10 19:49:41 -04:00
Daniel Agar
cb4d974977 mavlink: move GROUND_TRUTH stream to separate file 2020-10-10 19:49:41 -04:00
Daniel Agar
283264603a mavlink: move PING stream to separate file 2020-10-10 19:49:41 -04:00
Daniel Agar
97dc988f86 mavlink: move ORBIT_EXECUTION_STATUS stream to separate file 2020-10-10 19:49:41 -04:00
Daniel Agar
826dfa1941 mavlink: move OBSTACLE_DISTANCE stream to separate file 2020-10-10 19:49:41 -04:00
Daniel Agar
f26d4f2b6b mavlink: stop unnecessarily passing around time 2020-10-09 10:30:30 -04:00
Daniel Agar
97cf714c7a mavlink: move HIGH_LATENCY2 stream to streams folder in a single header 2020-10-09 10:30:30 -04:00