789 Commits

Author SHA1 Message Date
Silvan
b916a96e00 Remove uorb topics exclusively used for avoidance
- TrajectoryBezier.msg
- TrajectoryWaypoint.msg
- VehicleTrajectoryBezier.msg
- VehicleTrajectoryWaypoint.msg

Additionally remove TRAJECTORY_REPRESENTATION_WAYPOINTS mavlink stream.

Signed-off-by: Silvan <silvan@auterion.com>
2025-02-18 14:33:16 +01:00
Balduin
1eb9434b8c stream ATTITUDE_QUATERNION in low bandwidth mode 2025-01-17 11:20:12 +01:00
Matthias Grob
6241db74db mavlink: stream RAW_RPM message for ONBOAR_LOW_BANDWIDTH 2024-12-19 07:30:25 +01:00
Matthias Grob
3f83a8fa7a mavlink: remove reference to COLLISION message I had missed
Should have been part of
b5d18c613181f0935890aef91cbc1da4d06e00c3
2024-11-20 13:02:59 -05:00
Hamish Willee
b390d5876a
AUTOPILOT.capabilities includes gimbal manager protocol bit (#23692)
* AUTOPILOT.capabilities includes gimbal manager protocol bit

Sets MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER bit in AUTOPILOT.capabilities

* mavlink: update submodule

* mavlink: only set gimbal flag if gimbal param set

We should probably only set the flag if the gimbal manager is actually
set up using the MNT_MODE_IN parameter.

* mavlink: make param optional

If the gimbal module is not built in we don't have the MNT_MODE_IN
param, so we need to deal with that.

* gazebo-classic: update submodule

---------

Co-authored-by: Julian Oes <julian@oes.ch>
2024-10-17 08:41:38 +11:00
Julian Oes
04ea4f9b3a uavcan: add OpenDroneID ArmStatus, operator ID
In order to have operator ID be sent by QGC, we need to forward
ArmStatus from the remote ID module (here on DroneCAN) to MAVLink.
2024-09-02 16:20:10 +12:00
Nuno Marques
450ae033e4 modules: mavlink: only include FUEL_STATUS stream if the dialect includes it 2024-06-17 12:58:46 -07:00
Nuno Marques
a8cb5a7715 Add fuel tank status report support
* Adds support to DroneCAN FuelTankStatus messages
* Adds fuel_tank_status uORB message
* Adds FUEL_STATUS MAVLink stream
* Adds parameter to define max fuel tank capacity
2024-06-17 12:58:46 -07:00
Julian Oes
0932f50d79 mavlink: enable gimbal controls in QGC over USB 2024-06-10 21:56:37 +12:00
Matthias Grob
68769ea0ec mavlink: use reference instead of pointer to access the MAVLink instance from protocol classes 2024-06-05 16:13:52 +02:00
Matthias Grob
dfee9ca4c6 MAVLink: remove never used _mavlink_link_termination_allowed 2024-05-28 10:41:00 +02:00
Jacob Dahl
70304fe715
[mavlink] Parameter to always start on USB (#22234)
* usb: Added parameter to enable always starting mavlink on USB.

    Refactored cdcacm_init into a module and added a paramter to allow always starting mavlink on
    USB, also added a paramter to choose the mode. The current default behavior is to wait and listen
    for data on USB and auto-detect the protocol (mavlink, nsh, ublox). This results in the mavlink
    stream not starting until something else on the mavlink network sends a packet first. The new
    default behavior is to always start mavlink.

    Added parameters
    MAV_USB_ENABLE -- default 1 (always start mavlink on USB)
    MAV_USE_MODE -- default 3 (onboard)

* added 3 retries for opening serial port in mavlink, removed sleep before sercon

* added DRIVERS_CDCACM_AUTOSTART to ark-v6x default.px4board

* added CONFIG_DRIVERS_CDCACM_AUTOSTART=y to default.px4board for boards with CONFIG_CDCACM in their nsh/defconfig

* format

* remove PGA460 from COMMON_DISTANCE_SENSOR to save flash

* remove LIS2MDL from COMMON_MAGNETOMETER to save flash

* disable CONFIG_DRIVERS_CDCACM_AUTOSTART for fmu-v5 protected.px4board

* moved and renamed parameters, removed mode logic in mavlink

* changed parameter names, added mode none

* remove parameters from mavlink
2024-05-20 12:35:29 -06:00
Beat Küng
9e6dcb1f60 fix mavlink: cmd_logging_{start,stop}_acknowledgement flags were not reset
Regression from https://github.com/PX4/PX4-Autopilot/pull/23043

Also avoids a race condition by making sure the command ack is handled
before sending out the mavlink message (in case an external component
reacts immediately to the mavlink message).
2024-05-03 06:59:55 +02:00
oravla5
9d6ac0b87a mavlink: Added MAV_{i}_HL_FREQ parameter 2024-04-26 09:42:06 +02:00
oravla5
2b2e1c9521 mavlink: Added parsing of CLI option to configure HL frequency 2024-04-26 09:42:06 +02:00
oravla5
98b23e41f7 mavlink: fixed compilation error after var renaming 2024-04-25 08:23:32 +02:00
oravla5
bf1266af11 mavlink: added back gimbal v1 protocol command 2024-04-25 08:23:32 +02:00
Igor Mišić
5be0adc779 mavlink: don't send command ACK for internal commands over Iridium 2024-04-25 08:23:32 +02:00
Igor Mišić
208909d471 mavlink: use high_latency_data_link_lost as backup to normal data_link 2024-04-25 08:23:32 +02:00
Igor Mišić
d3b853a7f9 mavlink: fix handling of transmission enable/disable
Co-authored-by: RomanBapst <bapstroman@gmail.com>
2024-04-25 08:23:32 +02:00
asimopunov
f95a2021cd
adsb: warnings fixes & remove UTM_GLOBAL_POSITION (#21663)
- warn about full traffic conflict buffer at 1/60hz.
- add conflict expiry for buffer.
- use only events for buffer full warning. mavlink_log_critical no longer needed.
- use icao address for conflict warnings id, stop using uas_id. UTM_GLOBAL_POSITION assumed deprecated.
- stop spamming when buffer is full
- fix warning wording if buffer is full.
- remove UTM_GLOBAL_POSITION

Fixes failing unit test:
* [adsbTest] Reduce conflict timestamps - not enough time has passed in ci
- failed ci output - (passes locally with make tests TESTFILTER=AdsbConflict)
- Timestamp: 6000000000
- Time now: 457720038
- Time since timestamp: 0
- Old Conflict warning expired: 0
- --------------------
- adsb_conflict._traffic_state 0
- ../../src/lib/adsb/AdsbConflictTest.cpp:244: Failure
- Value of: adsb_conflict._traffic_state == TRAFFIC_STATE::REMIND_CONFLICT
-   Actual: false
- Expected: true
2024-04-22 10:14:39 +02:00
Eric Katzfey
57df7e35b2
uORB: make queue size (ORB_QUEUE_LENGTH) completely static (#22815)
Previously uORB queue size was an awkward mix of runtime configurable (at advertise or IOCTL before allocate), but effectively static with all queue size settings (outside of test code) actually coming from the topic declaration (presently ORB_QUEUE_LENGTH in the .msg). This change finally resolves the inconsistency making the queue size fully static.

Additionally there were some corner cases that the muorb and orb communicator implementation were not correctly handling. This PR provides fixes for those issues. Also correctly sets remote queue lengths now based on the topic definitions.

* Made setting of uORB topic queue size in based on topic definition only
* Fixes to the ModalAI muorb implementation
* Removed libfc sensor from format checks
* msg/TransponderReport.msg ORB_QUEUE_LENGTH 8->16 (was set to higher in AdsbConflict.h

---------

Co-authored-by: Eric Katzfey <eric.katzfey@modalai.com>
Co-authored-by: Daniel Agar <daniel@agar.ca>
2024-03-08 16:28:24 -05:00
muramura
959cb41e3a mavlink: Add a second barometric sensor message 2024-01-04 11:19:41 -05:00
Matthias Grob
d8d2213cab mavlink streams: add SYSTEM_TIME to onboard low bandwidth
It's required with 2Hz by some MAVLink enabled payloads.
2023-12-01 11:02:37 -05:00
Matthias Grob
9184a8f4ef mavlink streams: add CAMERA_IMAGE_CAPTURED to onboard low bandwidth 2023-12-01 11:02:37 -05:00
Matthias Grob
3ceb932b7c mavlink streams: increase RC_CHANNELS rate for onboard low bandwidth
There are MAVLink enabled gimbals that directly consume RC channel data.
The gimbal controls stutter with this profile when the rate is too low.
2023-12-01 11:02:37 -05:00
Matthias Grob
938be68c69 mavlink streams: add gimbal orientation feedback to normal stream
It only publishes when the information is available on uORB
and is useful for the groundstation to show the gimbal's status.
2023-12-01 11:02:37 -05:00
Beat Küng
bb900264e0 commander+mavlink: implement MAVLink standard modes 2023-11-15 13:18:58 +01:00
Beat Küng
fbbccf6997 commander: implement external modes and mode executors 2023-11-15 13:18:58 +01:00
Claudio Micheli
457d261278 Add mavlink support for GIMBAL_DEVICE_INFORMATION
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2023-11-08 17:01:32 +01:00
Konrad
1089079a32 Figure_of_eight: Make configuration dependent on defined mavlink_message_id. 2023-10-31 15:57:59 -04:00
Konrad
8edd7ce2c1 kconfig: Add option to enable figure of eight support 2023-10-31 15:57:59 -04:00
Konrad
e5e66370e7 FixedwingPositionControl: Add support for figure 8 loitering.
The command is sent by a dedicated mavlink command and forwarded to the fixed wing position controller.

The pattern is defined by the radius of the major axis, the radius of the minor axis and the orientation. The pattern is then defined by:
The upper part of the pattern consist of a clockwise circle with radius defined by the minor axis. The center of the circle is defined by the major axis minus the minor axis away from the pattern center.
The lower part of the pattern consist of a counter-clockwise circle with the same definitions as above.
In between, the circles are connected with straight lines in a cross configuration. The lines are always tangetial to the circles.
The orientation rotates the major axis around the NED down axis.

The loitering logic is defined inside its own class used by the fixed wing position control module. It defines which segment (one of the circles or lines) is active and uses the path controller (npfg or l1-control) to determine the desired roll angle.

A feedback mavlink message is send with the executed pattern parameters.
2023-10-31 15:57:59 -04:00
Julian Oes
fefdad83bf mavlink: fix MAVLink message forwarding
This switches from the horribly intertwined ringbuffer implementation to
the new VariableLengthRingbuffer implementation.

By ditching the previous implementation, we fix MAVLink message
forwarding, which didn't work reliably. The reason it didn't work is
that multiple mavlink messages could be added but only one of them was
sent out because the buffer didn't keep track of the messages properly
and only read the first one.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-10-18 12:26:47 -04:00
Niklas Hauser
f45b960eee [mavlink] Use separate mutex for event buffer
This prevents the mavlink transmit loop from waiting on the module mutex
thus not stopping transmissions when the mutex is already taken.

This can happen when calling `mavlink status` from the mavlink shell,
where `Mavlink::get_status_all_instances()` takes the mutex and then
prints the status via pipes to the mavlink transmit buffer.
If that pipe cannot be emptied a deadlock happens.

Since the MavlinkReceiver thread also waits on the module mutex, both
reception and transmission of Mavlink packets are then prevented thus
disabling communications entirely.
2023-10-17 10:05:46 -04:00
vlad-serbanica
af84c2ca7f mavlink_main: increase raw gps latency 2023-10-11 09:53:59 -04:00
Martina Rivizzigno
7f78ae449a
update submodule mavlink to latest Thu Jul 6 10:14:36 2023
* remove MAV_PROTOCOL_CAPABILITY_SET_ACTUATOR_TARGET because removed from message def Auterion/mavlink@1c9949e
2023-07-18 11:37:32 -04:00
Silvan Fuhrer
27658354da MavlinkReceiver: remove support for SET_ACTUATOR_CONTROL_TARGET
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-03-16 11:55:45 +01:00
DanielePettenuzzo
539f874325 mavlink main - enable gps global origin stream also on mavlink low bw mode and change all rates to 1Hz 2023-03-01 08:52:41 -05:00
Knut Hjorth
db539d15bd mavlink: fix bug when opening /dev/null as default stdin/stdout/stderr
Prior commit added opening of /dev/null as 0, 1 and/or 2 file
descriptors, if they where not present. However, if the temporary
file descriptor used to open /dev/null matched the target file
descriptor, it would be immediately closed again. This commit fixes that,
and does not duplicate and close the temporary file descriptor if it is
already at the correct number.
2023-02-14 08:18:01 +01:00
Knut Hjorth
99cf1cfdfe mavlink: use /dev/null as default stdin, stdout and stderr
If 0, 1 and/or 2 file descriptors are not open when mavlink module
starts (as might be the case for USB auto-start), use default /dev/null
so that these numbers are not used by other other files.
2023-02-08 10:38:20 +01:00
Julian Oes
b1fc0ca0d0 mavlink: always forward messages to/from USB
Previously, it was not possible to enable forwarding of messages to/from
teh USB instance because it does not have a param for it, like the
serial instances have.

With this commit, we change the default to always set forwarding on for
the USB instance as that is likely desired.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-01-30 10:46:14 -05:00
Julian Oes
0446292c75 mavlink: always use public method
Signed-off-by: Julian Oes <julian@oes.ch>
2023-01-30 10:46:14 -05:00
Julian Oes
7b8cf4913e mavlink: show forwarding status
Signed-off-by: Julian Oes <julian@oes.ch>
2023-01-30 10:46:14 -05:00
Julian Oes
243caac44a mavlink: filter command_acks by target
When we receive a command_long or command_int message to
answer, it arrives with a source sysid/compid, so this means we can send
the command_ack back on the appropriate MAVLink instances instead of all
of them.

This commit filters outgoing command_ack messages, so they are only sent
on the MAVLink instances where the sysid/compid has been seen in the
past.

This means that a command_ack is likely still sent on multiple links for
a setup with redundant links.

This should also prevent command_acks from being blasted on Iridium links
when it's not required.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-01-07 10:39:08 -05:00
Daniel Agar
4d318ebd30 mavlink: add initial mavlink OPEN_DRONE_ID_SYSTEM stream 2022-12-13 19:39:27 -05:00
Alex Mikhalev
cce3b43b4f mavlink: Fix setting MAV_SIK_RADIO_ID
The AT commands were formatted incorrectly
2022-11-21 08:12:40 +01:00
TSC21
9c0e09c3df mavlink_main: report in AUTOPILOT_VERSION.capabilities that FLIGHT_TERMINATION is supported 2022-11-16 16:51:47 +01:00
Igor Mišić
1c5750b292 mavlink: add support for uAvionix transmitters 2022-10-24 11:56:17 +02:00
Daniel Agar
0d6766d14d limit vehicle_command subscription updates per cycle
- this is a precaution to eliminate the possibility of getting stuck in
a loop trying to keep up with a high rate publication that could be
coming from a higher priority task
2022-10-17 16:10:51 -04:00