-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update message definitions Wed Nov 15 14:04:18 UTC 2023
- Loading branch information
1 parent
5d713f8
commit 0b28268
Showing
12 changed files
with
157 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
uint64 timestamp # time since system start (microseconds) | ||
|
||
uint8 request_id | ||
uint8 registration_id | ||
|
||
uint8 HEALTH_COMPONENT_INDEX_NONE = 0 | ||
uint8 HEALTH_COMPONENT_INDEX_AVOIDANCE = 19 | ||
|
||
uint8 health_component_index # HEALTH_COMPONENT_INDEX_* | ||
bool health_component_is_present | ||
bool health_component_warning | ||
bool health_component_error | ||
|
||
bool can_arm_and_run # whether arming is possible, and if it's a navigation mode, if it can run | ||
|
||
uint8 num_events | ||
|
||
Event[5] events | ||
|
||
# Mode requirements | ||
bool mode_req_angular_velocity | ||
bool mode_req_attitude | ||
bool mode_req_local_alt | ||
bool mode_req_local_position | ||
bool mode_req_local_position_relaxed | ||
bool mode_req_global_position | ||
bool mode_req_mission | ||
bool mode_req_home_position | ||
bool mode_req_prevent_arming | ||
bool mode_req_manual_control | ||
|
||
|
||
uint8 ORB_QUEUE_LENGTH = 4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
uint64 timestamp # time since system start (microseconds) | ||
|
||
# broadcast message to request all registered arming checks to be reported | ||
|
||
uint8 request_id | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Configurable overrides by (external) modes or mode executors | ||
uint64 timestamp # time since system start (microseconds) | ||
|
||
bool disable_auto_disarm # Prevent the drone from automatically disarming after landing (if configured) | ||
|
||
bool defer_failsafes # Defer all failsafes that can be deferred (until the flag is cleared) | ||
int16 defer_failsafes_timeout_s # Maximum time a failsafe can be deferred. 0 = system default, -1 = no timeout | ||
|
||
|
||
int8 SOURCE_TYPE_MODE = 0 | ||
int8 SOURCE_TYPE_MODE_EXECUTOR = 1 | ||
int8 source_type | ||
|
||
uint8 source_id # ID depending on source_type | ||
|
||
uint8 ORB_QUEUE_LENGTH = 4 | ||
|
||
# TOPICS config_overrides config_overrides_request | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
uint64 timestamp # time since system start (microseconds) | ||
|
||
# Request to PX4 to get the hash of a message, to check for message compatibility | ||
|
||
uint16 LATEST_PROTOCOL_VERSION = 1 # Current version of this protocol. Increase this whenever the MessageFormatRequest or MessageFormatResponse changes. | ||
|
||
uint16 protocol_version # Must be set to LATEST_PROTOCOL_VERSION. Do not change this field, it must be the first field after the timestamp | ||
|
||
char[50] topic_name # E.g. /fmu/in/vehicle_command | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
uint64 timestamp # time since system start (microseconds) | ||
|
||
# Response from PX4 with the format of a message | ||
|
||
uint16 protocol_version # Must be set to LATEST_PROTOCOL_VERSION. Do not change this field, it must be the first field after the timestamp | ||
|
||
char[50] topic_name # E.g. /fmu/in/vehicle_command | ||
|
||
bool success | ||
uint32 message_hash # hash over all message fields | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
uint64 timestamp # time since system start (microseconds) | ||
|
||
uint64 request_id # ID from the request | ||
char[25] name # name from the request | ||
|
||
uint16 px4_ros2_api_version | ||
|
||
bool success | ||
int8 arming_check_id # arming check registration ID (-1 if invalid) | ||
int8 mode_id # assigned mode ID (-1 if invalid) | ||
int8 mode_executor_id # assigned mode executor ID (-1 if invalid) | ||
|
||
uint8 ORB_QUEUE_LENGTH = 2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Request to register an external component | ||
uint64 timestamp # time since system start (microseconds) | ||
|
||
uint64 request_id # ID, set this to a random value | ||
char[25] name # either the requested mode name, or component name | ||
|
||
uint16 LATEST_PX4_ROS2_API_VERSION = 1 # API version compatibility. Increase this on a breaking semantic change. Changes to any message field are detected separately and do not require an API version change. | ||
|
||
uint16 px4_ros2_api_version # Set to LATEST_PX4_ROS2_API_VERSION | ||
|
||
# Components to be registered | ||
bool register_arming_check | ||
bool register_mode # registering a mode also requires arming_check to be set | ||
bool register_mode_executor # registering an executor also requires a mode to be registered (which is the owned mode by the executor) | ||
|
||
bool enable_replace_internal_mode # set to true if an internal mode should be replaced | ||
uint8 replace_internal_mode # vehicle_status::NAVIGATION_STATE_* | ||
bool activate_mode_immediately # switch to the registered mode (can only be set in combination with an executor) | ||
|
||
|
||
uint8 ORB_QUEUE_LENGTH = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
uint64 timestamp # time since system start (microseconds) | ||
|
||
char[25] name # either the mode name, or component name | ||
|
||
int8 arming_check_id # arming check registration ID (-1 if not registered) | ||
int8 mode_id # assigned mode ID (-1 if not registered) | ||
int8 mode_executor_id # assigned mode executor ID (-1 if not registered) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters