35366 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
20bc924668 boards: disable vmount for fmu-v2 2021-02-17 13:54:34 -05:00
Julian Oes
a2d419c91a vmount: use copyTo to copy quaternions 2021-02-17 13:54:34 -05:00
Julian Oes
f39216b9c3 vmount: use math functions instead of macros 2021-02-17 13:54:34 -05:00
Julian Oes
6672be040a mavlink: limit mavlink channels based on memory 2021-02-17 13:54:34 -05:00
Julian Oes
10add72b00 sitl_gazebo: update submodule
This includes the new gimbal controller which implements the MAVLink
gimbal v2 device protocol.
2021-02-17 13:54:34 -05:00
Julian Oes
7633b119f7 gimbal: merge fixes 2021-02-17 13:54:34 -05:00
Julian Oes
fecd96dc28 ROMFS: add remote port for gimbal mavlink instance
Previously, we did not set a remote port which meant that the default
remote port 14550 was used. This meant that the mavlink instance
talking to the gimbal was interfering with the connection to the ground
station (on 14550).
2021-02-17 13:54:34 -05:00
Julian Oes
3a2e4db309 vmount: mute gimbal manager ignoring messages 2021-02-17 13:54:34 -05:00
Julian Oes
db09a1386f vmount: fix regression around stabilize flags
We use the stabilize param to set the input. Like this the input flags
can be changed using the configure message later, and then eventually
used in the output.
2021-02-17 13:54:34 -05:00
Julian Oes
086c45d406 vmount: fix POI for gimbal v2
This includes several changes to fix POI when used with MAVLink gimbal
v2 input:
- Correctly set capability flag that POI is supported.
- Keep lat/lon and calculate attitude on each cycle, instead of only
  once on init.
- Always publish gimbal manager information, with or withoug gimbal v2
  device.
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
cb3ad39406 vmount: add comment about possible NAN values 2021-02-17 13:54:34 -05:00
Julian Oes
cd0509d2ef vmount: fix AUX gimbal output for v2 mavlink input
This should fix the case where AUX gimbals don't work anymore when
gimbal input is mavlink gimbal v2.

The fix is mostly to take care against NAN inputs.
2021-02-17 13:54:34 -05:00
Julian Oes
17dce18b32 mavlink: reduce GIMBAL_MANAGER_STATUS message rate
This was way too fast.
2021-02-17 13:54:34 -05:00
Julian Oes
6561b07caf vmount: support legacy gimbal v1 mission commands
This is a hotfix to restore gimbal functionality for SITL set-ups that
are set to MNT_MODE_IN 4 (gimbal protocol v2) but still need to accept
gimbal v1 commands that might be part of a mission, e.g. uploaded by
MAVSDK.
2021-02-17 13:54:34 -05:00
Julian Kent
a3e0e2e84f Fix RTPS builds 2021-02-17 13:54:34 -05:00
Julian Oes
6f56797f3d mavlink: hack to forward messages from gimbal
This is a hack to make sure the messages from the gimbal arrive at other
links (e.g. the ground station). It means that the gimbal does not get
flooded with all other messages that would get forwarded but messages
from the gimbal will still make it through.
2021-02-17 13:54:34 -05:00
Julian Oes
b8ad7092dc mavlink: use Mavlink 2 by default 2021-02-17 13:54:34 -05:00
Julian Oes
8da3a490af ROMFS: use gimbal v2 protocol with typhoon_h480 2021-02-17 13:54:34 -05:00
Julian Oes
642adbead8 if750a: use MAVLink gimbal v2 device 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
Julian Oes
422bac4bfd mavlink: add gimbal mode to talk to gimbal device 2021-02-17 13:54:34 -05:00
Julian Oes
2a0ddf9f44 mavlink: enable 6 instead of 4 instance 2021-02-17 13:54:34 -05:00
Julian Oes
a16939f47e ROMFS: start mavlink instance for gimbal 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
Julian Oes
46e75ebddb mavsdk_tests: remove leftover debug line 2021-02-17 18:13:14 +01:00
Julian Oes
2703a34900 mavsdk_tests: add link back to github action 2021-02-17 18:13:14 +01:00
Daniel Agar
ab0d0fd0be
uORB move to PX4 platform layer 2021-02-17 11:25:56 -05:00
TSC21
6bbb2faf8a CI: fix colcon build 2021-02-17 15:03:47 +01:00
Ildar Sadykov
51dd141c86 RTPS: adjust timestamp_sample in urtps_agent 2021-02-17 13:19:05 +01:00
Daniel Agar
e48a869160 boards: mRo pixracer pro disable USART6 (conflicts with SPI6) 2021-02-16 22:28:13 -05:00
Daniel Agar
2702306849 boards: mRo pixracer pro fix incorrect SPI2 sck 2021-02-16 22:28:13 -05:00
PX4 BuildBot
0edee1e2e9 Update submodule ecl to latest Wed Feb 17 00:39:16 UTC 2021
- ecl in PX4/Firmware (a5a1d4caa0d04cb79ba29e98ba0af04e20c53de9): d4258cc66d
    - ecl current upstream: 310f415175
    - Changes: d4258cc66d...310f415175

    310f415 2021-02-16 Daniel Agar - EKF add const state reset status access
0c5291d 2021-02-16 isidroas - Heading reset to magnetometer from GPS or EV (#969)
2021-02-16 22:00:12 -05: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
Daniel Agar
5abf29d93c
commander: auto TAKEOFF to LOITER/MISSION minor fix to avoid failsafe confusion
- base on nav_state rather than main_state
2021-02-16 13:02:14 -05:00
Julian Oes
64d0ce43b6 mavsdk_tests: upload to logs.px4.io in test_runner
By doing the upload directly inside the mavsdk_test_runner.py we have
more context such as the model, case, etc.
2021-02-16 17:07:21 +01:00
Julian Oes
18281eee29 workflows: more meta information to log upload
This adds a little bit more information but still lacks the one to one
mapping between test and uploaded file.
2021-02-16 17:07:21 +01:00
Julian Oes
2315618b85 mavsdk_tests: use autopilot timestamps to sleep
This way we should be able to avoid some of the timeouts happening on
the PX4 side if MAVSDK doesn't send setpoints in time.
2021-02-16 17:07:21 +01:00
Julian Oes
6c26387e85 mavsdk_tests: try to prevent auto-disarm
We should not spend too much time sending RC init messages because if it
takes too long, we might auto-disarm in the meantime.
2021-02-16 17:07:21 +01:00
Julian Oes
c1de27acf7 mavsdk_tests: use more conservative speed_factor 2021-02-16 17:07:21 +01:00
Julian Oes
0ebb8c6981 mavsdk_tests: use microseconds to avoid sleep(0) 2021-02-16 17:07:21 +01:00
Julian Oes
b6b9ce5f11 mavsdk_tests: robustify test by climbing longer 2021-02-16 17:07:21 +01:00
Julian Oes
b79553862e mavsdk_tests: remove timeout for mission upload
Just use what is MAVSDK internal.
2021-02-16 17:07:21 +01:00
PX4 BuildBot
cf2ffb1086 Update submodule ecl to latest Tue Feb 16 12:39:08 UTC 2021
- ecl in PX4/Firmware (4de4b8012999a53b3401701fe63fafb4056fa58f): ffab483504
    - ecl current upstream: d4258cc66d
    - Changes: ffab483504...d4258cc66d

    d4258cc 2021-02-15 Mathieu Bresciani - yaw emergency: check angle between vel observation and estimate (#975)
2021-02-16 08:34:02 -05:00
Daniel Agar
44df0fb7a2 Analog Devices ADIS16448 rewrite
- new IMU driver structure with state machine (no sleeps in bus thread)
 - verify all configured registers and trigger reset on failure
 - detect if DIO1 or DIO2 are actually connected for data ready interrupt usage
 - don't use CRC-16 on burst transfers except for verified lots
2021-02-16 10:29:07 +01:00
mcsauder
59b31e3c5b Minor cleanup/error checking, static_casts, print_status() additions, and formatting in the heater driver. 2021-02-16 08:20:14 +01:00
Ramon Roche
15392f8e53 silent success and log failures
Co-authored-by: Nuno Marques <n.marques21@hotmail.com>
2021-02-15 20:28:19 +01:00
CAI Dongcai
2ad1cb24cc fix empty log file "micrortps_bridge.log" 2021-02-15 20:28:19 +01:00
Tim
540e4f9464
Uuv position control extension (#16688)
* Commit for the Integration of a position controller for the a Underwater vehicle.
This module is an extension of the uuv_att_control to control an Underwater vehicle to any position, given by the SET_POSITION_TARGET_LOCAL_NED which includes x y z yaw.
Since the position control is designed for a 6DOF Robot, the roll and pitch angle are controlled to be 0.
Additionally there is a stabilization control, which holds the robot at a defined depth, and not move in any direction.

In general the idea is to have this position module to control the position of the uuv. The position module reseives the desired position of the uuv and sends appropriate attitude setpoints to the uuv_attitude_control module.

Additionally the mixer file is adapted, to include the 6 different inputs(x y z roll pitch yaw).

* Commit for the Integration of a position controller for the a Underwater vehicle.
This module is an extension of the uuv_att_control to control an Underwater vehicle to any position, given by the SET_POSITION_TARGET_LOCAL_NED which includes x y z yaw.
Since the position control is designed for a 6DOF Robot, the roll and pitch angle are controlled to be 0.
Additionally there is a stabilization control, which holds the robot at a defined depth, and not move in any direction.

In general the idea is to have this position module to control the position of the uuv. The position module receives the desired position of the uuv and sends appropriate attitude setpoints to the uuv_attitude_control module.

Additionally the mixer file is adapted, to include the 6 different inputs(x y z roll pitch yaw).

Currently not solved/missing:
 - Problem with gazebo model(propeller moving chaotically).
 - Mixer correct gazebo vs real life (has to be tested in the future)
 - correct integration in uuv.apps (when choose which module)
 - very basic controller chosen (could be improved a lot in the future)

* Remove error caused by unused variables and a different build error

* added better description of the parameter. Additionally the group is changed.

* added better description of the parameter. Additionally the group is changed.
Fixed bug about parameter

* Added EOF to the files.

* Removed parameter for direct position control for safety reasons.

* small bugfix
2021-02-15 18:40:28 +01:00