55 Commits

Author SHA1 Message Date
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
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
9fe7a40673 manual_control: enable sending camera commands 2022-01-10 23:04:10 -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
Matthias Grob
af607e3040 Use separate arm_request instead of vehicle_command for RC arming 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
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
Beat Küng
5103f00de3 vehicle_command.msg: add VEHICLE_CMD_DO_SET_ACTUATOR 2021-10-18 18:45:19 -04: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
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
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
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
Daniel Agar
d5c7e243a9 vehicle_command: increase queue depth 4 -> 8
- prevent slower modules from missing commands
2021-01-26 12:00:18 -05:00
Igor Campos
c316af6ec7 update to match new feature as a new mavlink command Oblique Survey 260 2020-12-09 17:54:53 +01:00
FengShun
d19b54481a fix: uORB topics lost messages when publications overflow 2020-10-19 08:52:55 +02:00
Julian Oes
53b14233a2 mavlink: handle failure injection commands
This adds handling of MAVLink failure injection commands. An
additional parameter is added as a guard to prevent triggering any
failures by accident.
2020-09-16 12:51:56 -04:00
Daniel Agar
ca9b6bc137
commander: quick mag cal with fixed heading use MAV_CMD_FIXED_MAG_CAL_YAW message
- use proper Mavlink MAV_CMD_FIXED_MAG_CAL_YAW command for initiating magnetometer quick cal
 - MAV_CMD_FIXED_MAG_CAL_YAW allows specifying the yaw and optionally latitude and longitude if the vehicle doesn't have GPS
2020-09-06 19:25:11 -04:00
David Jablonski
6bd191a24e Mavlink: Implemented SET_CAMERA_ZOOM 2020-03-30 17:10:36 +02:00
Lorenz Meier
cb63fcdcc4 Vehicle command: Add mission item to gate mission execution on line orthogonal to current trajectory 2020-03-14 17:50:40 +01:00
Beat Küng
285ae608a5 commander: add support for DO_MOTOR_TEST
- add an optional timeout to test_motor
- enforce a timeout when receiving DO_MOTOR_TEST
- limitation: DO_MOTOR_TEST can only control the MAIN outputs
2019-10-24 09:27:29 +02:00
TSC21
86baa6a90a beautify some identation 2018-08-09 13:40:48 +02:00
TSC21
e932030d88 add timestamp field to uORB msgs; sync timestamp whenever possible 2018-08-09 13:40:48 +02:00
MaEtUgR
5dae404fb2 vehicle_commands: add VEHICLE_CMD_DO_ORBIT 2018-07-24 15:03:53 +02:00
acfloria
17a157b9da Adopt high latency switching to new MAV_CMD design 2018-04-11 15:15:28 +02:00
acfloria
631f314e89 En-/disable transmitting from a mavlink instance using a uORB message
Allow enabling/disabling transmitting data from all mavlink instances
with a specific mode/type. When disabled the instance can still receive
data. The uORB message used is the vehicle_command and uses the following
parameter:
param1: Specifies the mode/type of the instances to enable/disable transmitting
param2: Boolean to indicate if transmitting should be enabled or disabled
2018-04-11 15:15:28 +02:00
DonLakeFlyer
342509b3ab New ROI commands implementation 2018-01-25 15:27:55 +01:00
Nicolas de Palezieux
8c0542bdb8 msgs : add support for precision landing 2018-01-15 10:27:23 +01:00
Daniel Agar
3c18be387c ROI - move handling to navigator (#7939) 2017-09-26 12:25:02 -04:00
Daniel Agar
e15afcca7a vehicle_command commands are uint16, not uint32 2017-09-08 09:06:30 +02:00
José Roberto de Souza
dddac6c85a msg: Add arm authorization request command id 2017-08-28 08:28:57 +02:00
José Roberto de Souza
b7c705e790 msg: Add missing value of MAV_RESULT 2017-08-19 09:04:52 +02:00
José Roberto de Souza
7c268f4fa1 mavlink: Safely avoid send the same vehicle_command and vehicle_command_ack back
The previous approach was checking system id and component id but it
will not work in 100% of cases as external devices can send MAVLink
message with the right system id but with broadcast component id.
2017-08-08 21:46:30 +02:00
José Roberto de Souza
a8cfd6f36a msg: Use the correctly data types on vehicle_command
Lets save a few bytes using the right data types.
2017-08-08 21:46:30 +02:00
Daniel Agar
8d5c955af4 remove partial CMD_OVERRIDE_GOTO implementation (#7356)
- closes #7326
2017-06-08 22:03:50 -04:00
Mohammed Kabir
ad5fe5f44a Add support for SET_CAMERA_MODE command; Not used yet. 2017-05-12 22:11:17 +02:00
Mohammed Kabir
2e92a3946d camera_trigger : completely refactor state handling 2017-05-12 22:11:17 +02:00
Don Gagne
96458d3184 Support for RTL and Delay mission commands 2017-04-18 08:56:01 +02:00
Beat Küng
21f5219bbc vehicle_command.msg: add PREFLIGHT_CALIBRATION_TEMPERATURE_CALIBRATION 2017-02-17 23:01:25 +01:00
David Sidrane
dc8c6ea5e5 White space fixes 2016-12-21 08:34:21 +01:00
Daniel Agar
c17c8884d1 implement MAV_CMD_DO_LAND_START 2016-11-19 15:48:10 +01:00
Beat Küng
f29a50df31 logger: add support for mavlink backend in Logger class, handle start/stop 2016-10-19 13:13:47 +02:00
Beat Küng
be4db3c5df vehicle_command topic: use uorb queuing with length 3
Just to make sure we don't lose any messages.
2016-09-07 18:47:12 +02:00
Leon
faebdeedcf vmount: add mount and ROI implementation
MavLink spec implementation

implemented vehicle_roi topic

rename old gimbal to rc_gimbal

little changes

corrected RC Gimbal group

Starting ROI implementation in commander

implementation done, needs to be tested

uhm..

add todo

Change to float32 for x,y and z

remove mission topic again, not needed

change roi coordinates to lat, lon and alt

adjust to float64

starting mount implementation

correcting small mistakes, compiles now

add todos

further progress

implementing parameters

adjust default parameters

started implementation of mavlink

fix typo

change to lat, lon and alt

fix typo :D

change to double (to represent float64)

add global_position_

add mount topic

commander mount implementation done

cleanup

almost finished

little fix

codestyle fixes

leave pitch at 0 degrees

added pitch calculation

codestyle changes

Undo vehicle_mount, react to updated parameters, parsing of CMD_DO_MOUNT_* in mount.cpp

start implementing mode override

forgot a semikolon.

add debug

Finish implementation of mount override and manual control.

fix codestyle

correct cleanup

rename to vmount

works now

fix rebase error

fix polling

refactoring and custom airframe for gimbal

couple changes

remove warnx

almost done

finally

What is going on?

change back to actuator_controls_2

working

bump parameter version number and some clarification

fix submodules
2016-09-06 11:33:18 +02:00
Daniel Agar
2a15578f8d FW implement MAV_CMD_DO_GO_AROUND 2016-08-06 20:56:53 +02:00
sander
a713fd4197 Implemented VTOL_TAKEOFF and VTOL_LAND commands 2016-04-02 21:29:25 +01:00
Lorenz Meier
c161248e71 Fix reposition vehicle command 2016-02-27 11:55:20 +01:00
Lorenz Meier
e9d778fd24 Vehicle command: Add reposition 2016-02-27 11:22:57 +01:00