Commit Graph

1118 Commits

Author SHA1 Message Date
Daniel Agar 4e6f366ead WIP: parameter uORB access 2021-04-07 21:41:33 -04: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
Daniel Agar f61d8539cb fw_pos_control_l1: add takeoff minimum pitch parameter
- remove mavlink mechanism for setting minimum pitch
2021-02-12 13:57:15 -05:00
Daniel Agar ce64951578 parameter_update.msg: add basic status info 2021-02-12 08:27:47 -05:00
Daniel Agar 6633ff5089 commander: vehicle_status_flags add attitude and angular velocity 2021-02-05 20:11:13 +01:00
Matthias Grob 26d74bf57d Commander: enable failsafe delay for position and mission mode
Instead of directly doing the link loss reaction which by default is RTL a delay
can be configured such that the drone first switches to hold and waits
for the link to be regained.
2021-02-04 10:54:52 +01:00
Antonio Sanjurjo Cortés fa45eacea3 Fix and unify the maximum allowed PDOP references 2021-02-04 10:20:22 +01:00
Gerald 88c68914a9 update uorb_rtps_message_ids.yaml for id: 30
For some usecases like starting video recording on a companion computer or triggering a ROS based (offboard control) mission control execution the status of RC channel is needed in ROS(2). This allows the user to start/stop such functionalities from the RC transmitter.

Therefore InputRc to be changed accordingly.
add 'Set send: true' for id: 30
2021-02-03 08:52:44 -05:00
TSC21 10d94e5981 update uorb_rtps_message_ids.yaml 2021-02-02 13:55:42 +01:00
TSC21 701a585a81 RTPS: add check for IDs on multi-topics/alias messages as well 2021-02-02 13:55:42 +01:00
Daniel Agar 5097d531bf mavlink: send LINK_NODE_STATUS 2021-01-31 15:02:30 +01:00
Daniel Agar 4cbbd0ebf3 mavlink: receiver estimate total lost messages 2021-01-31 15:02:30 +01:00
Daniel Agar 0c58d12216 mavlink: receiver estimate total lost messages 2021-01-31 11:41:56 +01:00
Matthias Grob fbd64fbdd8 FlightModeManager: publish takeoff status 2021-01-31 11:37:00 +01:00
Claudio Micheli c2a68debd9 add jamming_state to gps sensor module
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-01-30 11:26:42 +01:00
Claudio Micheli 5eb4ab6d73 vehicle_gps_position: add jamming_state
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-01-30 11:26:42 +01:00
JacobCrabill 85796fbd84 Drivers: Distance Sensors: Add proper device IDs
Add new DeviceBusType_SERIAL to Device::DeviceId union
Add DRV_DIST_DEVTYPE's for all distance sensors
Change distance_sensor_s.id to distance_sensor_s.device_id
Modify all distance_sensor drivers to apply 'proper' device_id
2021-01-27 17:02:20 -05:00
Daniel Agar d5c7e243a9 vehicle_command: increase queue depth 4 -> 8
- prevent slower modules from missing commands
2021-01-26 12:00:18 -05:00
Silvan Fuhrer 92f2043d8b TECS: add EAS_sp to tecs_status.msg and rename other airspeeds to TAS
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-23 09:34:34 -05:00
David Sidrane 1414c02471 msg:led_control Extend to support 8 LEDS 2021-01-23 09:30:59 -05:00