Skip to content

Input Topics

Introduction

These topics are used to control the Flight Controller of the Vertex One.

Supervisor Commands

Topic: /robot/send/supervisor_command

Description: Send Flight Controller supervisor command (e.g. take-off, land etc.). The following table explains the available supervisor commands:

Command Description
Arm Start spinning the motors
Disarm Stop spinning the motors when in the 'armed' state
Takeoff Initiate take-off, Vertex One ascents to the pre-defined take-off height
Land Initiate landing, Vertex One descents for soft landing
Abort Land Abort landing procedure, resume last position setpoint
Emergency Land Trigger emergency landing, can not be aborted.
Kill switch Kill motors instantly

Data Frequency: once

ROS Message Type: SupervisorCommand.msg (See below):

# Define a command request for the flight controller supervisor.

uint8 VERTEX_COMMAND_NONE           = 0
uint8 VERTEX_COMMAND_ARM            = 1
uint8 VERTEX_COMMAND_DISARM         = 2

uint8 VERTEX_COMMAND_TAKEOFF        = 10
uint8 VERTEX_COMMAND_LAND           = 11
uint8 VERTEX_COMMAND_ABORT_LAND     = 12

uint8 VERTEX_COMMAND_EMERGENCY_LAND = 100
uint8 VERTEX_COMMAND_KILLSWITCH     = 254

uint8 command

Example: ros2 topic pub --once /robot/send/supervisor_command avular_mavros_msgs/msg/SupervisorCommand "{command: 10}"

Requirements for Allowing Supervisor Commands

As a safety measure, the following requirements are set in Flight Controller for allowing acting on external commands:

  1. Remote Controller (RC) must be connected throughout the flight
  2. External position mode must be enabled via the RC
  3. First reference send after take-off in external mode must be within 0.5 m of the current estimate in each direction so diff_x_max = diff_y_max = diff_z_max = 0.5 m

Control Mode

Topic: /robot/set_control_mode

Description: Set the control mode of the Flight Controller.

Data Frequency: once

ROS Message Type: SetControlMode.srv (See below):

# Used to set a certain control mode for state references
# control mode to be used

avular_mavros_msgs/ControlMode control_mode
---
# Status indicating if the control mode was set successfully
uint32 status

# Confirmation or error message
string message "Unexpected Error. Response message not set."

ROS Message Type: ControlMode.msg (See below):

# ControlMode message

std_msgs/Header header

# Type of control mode used.
uint8 CONTROL_MODE_NONE = 0
uint8 CONTROL_MODE_POSITION = 1        # position control (position, velocity, acceleration)
uint8 CONTROL_MODE_VELOCITY = 2        # velocity control (velocity, acceleration)
uint8 CONTROL_MODE_ACCELERATION = 3    # acceleration control (acceleration)
uint8 CONTROL_MODE_ATTITUDE_THRUST = 4 # attitude control (attitude, thrust)
uint8 CONTROL_MODE_WAYPOINT = 5        # waypoint control (waypoint)

uint8 control_mode

# Type of heading control mode used.
uint8 HEADING_MODE_NONE = 20
uint8 HEADING_MODE_ANGLE = 21
uint8 HEADING_MODE_RATE = 22

uint8 heading_mode

Note

The modes attitude-thrust and rate are not available yet in this release.

State Reference

Topic: /robot/send/state_reference

Description: Send Flight Controller a state reference. The state reference is used to control the Flight Controller in different modes (e.g. position, velocity, acceleration, etc.).

Data Frequency: once

ROS Message Type: StateReference.msg (See below):

# State reference for the robot to track. References are expressed in the frame_id that is specified in the header.
# The mode of the state reference can be independent for orientation and translation (e.g. position reference with yaw-rate).

uint8 MODE_UNKNOWN = 0

uint8 ORIENTATION_MODE_ATTITUDE = 1
uint8 ORIENTATION_MODE_VELOCITY = 2
uint8 ORIENTATION_MODE_ACCELERATION = 3

uint8 TRANSLATION_MODE_POSITION = 101
uint8 TRANSLATION_MODE_VELOCITY = 102
uint8 TRANSLATION_MODE_ACCELERATION = 103

# Header containing a timestamp and frame id.
std_msgs/Header header

# Modes of the state reference.
uint8 translation_mode
uint8 orientation_mode

# Pose reference containing position and orientation.
geometry_msgs/Pose pose

# Velocity reference, both linear and angular.
geometry_msgs/Twist velocity

# Acceleration reference, both linear and angular.
geometry_msgs/Twist acceleration