From f2907758cf31f96174b6c77d5a2e9cadc0ee7395 Mon Sep 17 00:00:00 2001 From: Vladimir Ermakov Date: Fri, 7 Aug 2026 14:16:16 +0200 Subject: [PATCH 01/12] param: make timeouts configurable via parameters Replace the hardcoded PARAM_TIMEOUT/LIST_TIMEOUT/RETRIES_COUNT constants with node-declared parameters (param_set_timeout, param_list_timeout, param_retries) so the timeout/retry behavior can be tuned and tested. Recreate the retry wall-timer when param_set_timeout changes. Also zero-initialize the mavlink_param_union_t in to_param_set() to avoid undefined-behaviour padding bytes leaking into the PARAM_SET payload. Signed-off-by: Vladimir Ermakov --- mavros/src/plugins/param.cpp | 61 ++++++++++++++++++++++++++---------- 1 file changed, 45 insertions(+), 16 deletions(-) diff --git a/mavros/src/plugins/param.cpp b/mavros/src/plugins/param.cpp index a7f463478..7f1141ca3 100644 --- a/mavros/src/plugins/param.cpp +++ b/mavros/src/plugins/param.cpp @@ -225,7 +225,7 @@ class Parameter //! Make PARAM_SET message. Set target ids manually! PARAM_SET to_param_set() const { - mavlink::mavlink_param_union_t uv; + mavlink::mavlink_param_union_t uv{}; PARAM_SET ret{}; mavlink::set_string(ret.param_id, param_id); @@ -414,6 +414,9 @@ class ParamSetOpt /** * @brief Parameter manipulation plugin * @plugin param + * + * Implements the + * [MAVLink Parameter Protocol](https://mavlink.io/en/services/parameter.html). */ class ParamPlugin : public plugin::Plugin { @@ -422,12 +425,12 @@ class ParamPlugin : public plugin::Plugin : Plugin(uas_, "param", rclcpp::NodeOptions().start_parameter_services( false).start_parameter_event_publisher(false)), BOOTUP_TIME(10s), - LIST_TIMEOUT(30s), - PARAM_TIMEOUT(1s), - RETRIES_COUNT(3), + param_set_timeout(1s), + param_list_timeout(30s), + param_retries_count(3), param_count(-1), param_state(PR::IDLE), - param_rx_retries(RETRIES_COUNT), + param_rx_retries(param_retries_count), is_timedout(false) { auto event_qos = rclcpp::ParameterEventsQoS(); @@ -476,12 +479,36 @@ class ParamPlugin : public plugin::Plugin PSN::list_parameters, std::bind(&ParamPlugin::list_parameters_cb, this, _1, _2), qos, srv_cg); + enable_node_watch_parameters(); + + node_declare_and_watch_parameter( + "param_set_timeout", param_set_timeout.seconds(), [this](const rclcpp::Parameter & p) { + param_set_timeout = rclcpp::Duration::from_seconds(p.as_double()); + // Recreate the retry timer so the new period takes effect for tests. + timeout_timer.reset(); + timeout_timer = + node->create_wall_timer( + param_set_timeout.to_chrono(), + std::bind(&ParamPlugin::timeout_cb, this)); + timeout_timer->cancel(); + }); + node_declare_and_watch_parameter( + "param_list_timeout", param_list_timeout.seconds(), [&](const rclcpp::Parameter & p) { + param_list_timeout = rclcpp::Duration::from_seconds(p.as_double()); + }); + node_declare_and_watch_parameter( + "param_retries", param_retries_count, [&](const rclcpp::Parameter & p) { + param_retries_count = p.as_int(); + }); + schedule_timer = node->create_wall_timer(BOOTUP_TIME, std::bind(&ParamPlugin::schedule_cb, this)); schedule_timer->cancel(); timeout_timer = - node->create_wall_timer(PARAM_TIMEOUT, std::bind(&ParamPlugin::timeout_cb, this)); + node->create_wall_timer( + param_set_timeout.to_chrono(), + std::bind(&ParamPlugin::timeout_cb, this)); timeout_timer->cancel(); enable_connection_cb(); @@ -522,9 +549,9 @@ class ParamPlugin : public plugin::Plugin rclcpp::TimerBase::SharedPtr timeout_timer; //!< for timeout resend const std::chrono::nanoseconds BOOTUP_TIME; - const std::chrono::nanoseconds LIST_TIMEOUT; - const std::chrono::nanoseconds PARAM_TIMEOUT; - const int RETRIES_COUNT; + rclcpp::Duration param_set_timeout; + rclcpp::Duration param_list_timeout; + int param_retries_count; enum class PR { @@ -653,7 +680,7 @@ class ParamPlugin : public plugin::Plugin RCLCPP_DEBUG( lg, "PR: got a value of a requested param idx=%u, " "resetting retries count", pmsg.param_index); - param_rx_retries = RETRIES_COUNT; + param_rx_retries = param_retries_count; } else if (param_state == PR::RXPARAM_TIMEDOUT) { RCLCPP_INFO( lg, "PR: got an unsolicited param value idx=%u, " @@ -774,7 +801,7 @@ class ParamPlugin : public plugin::Plugin RCLCPP_DEBUG(get_logger(), "PR: start scheduled pull"); param_state = PR::RXLIST; - param_rx_retries = RETRIES_COUNT; + param_rx_retries = param_retries_count; clear_all_parameters(); restart_timeout_timer(); @@ -821,7 +848,7 @@ class ParamPlugin : public plugin::Plugin parameters_missing_idx.pop_front(); restart_timeout_timer(); if (!parameters_missing_idx.empty()) { - param_rx_retries = RETRIES_COUNT; + param_rx_retries = param_retries_count; first_miss_idx = parameters_missing_idx.front(); RCLCPP_WARN( @@ -879,7 +906,8 @@ class ParamPlugin : public plugin::Plugin { std::unique_lock lock(list_cond_mutex); - return list_receiving.wait_for(lock, LIST_TIMEOUT) == std::cv_status::no_timeout && + return list_receiving.wait_for(lock, + param_list_timeout.to_chrono()) == std::cv_status::no_timeout && !is_timedout; } @@ -887,7 +915,8 @@ class ParamPlugin : public plugin::Plugin { auto future = opt->promise.get_future(); - auto wres = future.wait_for(PARAM_TIMEOUT * (RETRIES_COUNT + 2)); + auto wres = future.wait_for(param_set_timeout.to_chrono() * + (param_retries_count + 2)); if (wres != std::future_status::ready) { return {false, opt->param}; } @@ -900,7 +929,7 @@ class ParamPlugin : public plugin::Plugin unique_lock lock(mutex); // add to waiting list - auto opt = std::make_shared(param, RETRIES_COUNT); + auto opt = std::make_shared(param, param_retries_count); set_parameters[param.param_id] = opt; param_state = PR::TXPARAM; @@ -962,7 +991,7 @@ class ParamPlugin : public plugin::Plugin } param_state = PR::RXLIST; - param_rx_retries = RETRIES_COUNT; + param_rx_retries = param_retries_count; clear_all_parameters(); schedule_timer->cancel(); From 0112406d0d818effb38631ac6d60d4c5c57b49a4 Mon Sep 17 00:00:00 2001 From: Vladimir Ermakov Date: Fri, 7 Aug 2026 14:16:24 +0200 Subject: [PATCH 02/12] mission: make timeouts configurable via parameters Replace the hardcoded WP_TIMEOUT/LIST_TIMEOUT/RETRIES_COUNT/RESCHEDULE_TIME constants in MissionBase with node-declared parameters (mission_wp_timeout, mission_list_timeout, mission_retries, mission_reschedule_time) so the timeout/retry behavior can be tuned and tested. Recreate the retry wall-timer when mission_wp_timeout changes. Signed-off-by: Vladimir Ermakov --- .../include/mavros/mission_protocol_base.hpp | 63 +++++++++++++++---- mavros/src/plugins/mission_protocol_base.cpp | 6 +- 2 files changed, 53 insertions(+), 16 deletions(-) diff --git a/mavros/include/mavros/mission_protocol_base.hpp b/mavros/include/mavros/mission_protocol_base.hpp index 071015af9..00ef5db88 100644 --- a/mavros/include/mavros/mission_protocol_base.hpp +++ b/mavros/include/mavros/mission_protocol_base.hpp @@ -285,7 +285,7 @@ class MissionBase : public plugin::Plugin wp_cur_id(0), wp_cur_active(0), wp_set_active(0), - wp_retries(RETRIES_COUNT), + wp_retries(0), is_timedout(false), reschedule_pull(false), do_pull_after_gcs(false), @@ -293,12 +293,45 @@ class MissionBase : public plugin::Plugin use_mission_item_int(false), mission_item_int_support_confirmed(false), BOOTUP_TIME(bootup_time_), - LIST_TIMEOUT(30s), - WP_TIMEOUT(1s), - RESCHEDULE_TIME(5s) + mission_list_timeout(30s), + mission_wp_timeout(1s), + mission_reschedule_time(5s), + mission_retries_count(3) { + enable_node_watch_parameters(); + + node_declare_and_watch_parameter( + "mission_wp_timeout", mission_wp_timeout.seconds(), [this](const rclcpp::Parameter & p) { + mission_wp_timeout = rclcpp::Duration::from_seconds(p.as_double()); + // Recreate the retry timer so the new period takes effect for tests. + timeout_timer.reset(); + timeout_timer = + node->create_wall_timer( + mission_wp_timeout.to_chrono(), + std::bind(&MissionBase::timeout_cb, this)); + timeout_timer->cancel(); + }); + node_declare_and_watch_parameter( + "mission_list_timeout", mission_list_timeout.seconds(), [&](const rclcpp::Parameter & p) { + mission_list_timeout = rclcpp::Duration::from_seconds(p.as_double()); + }); + node_declare_and_watch_parameter( + "mission_retries", mission_retries_count, [&](const rclcpp::Parameter & p) { + mission_retries_count = p.as_int(); + }); + node_declare_and_watch_parameter( + "mission_reschedule_time", mission_reschedule_time.seconds(), + [&](const rclcpp::Parameter & p) { + mission_reschedule_time = rclcpp::Duration::from_seconds(p.as_double()); + }); + + wp_retries = mission_retries_count; + srv_cg = node->create_callback_group(rclcpp::CallbackGroupType::MutuallyExclusive); - timeout_timer = node->create_wall_timer(WP_TIMEOUT, std::bind(&MissionBase::timeout_cb, this)); + timeout_timer = + node->create_wall_timer( + mission_wp_timeout.to_chrono(), + std::bind(&MissionBase::timeout_cb, this)); timeout_timer->cancel(); } @@ -373,11 +406,11 @@ class MissionBase : public plugin::Plugin bool use_mission_item_int; bool mission_item_int_support_confirmed; - static constexpr int RETRIES_COUNT = 3; const std::chrono::nanoseconds BOOTUP_TIME; - const std::chrono::nanoseconds LIST_TIMEOUT; - const std::chrono::nanoseconds WP_TIMEOUT; - const std::chrono::nanoseconds RESCHEDULE_TIME; + rclcpp::Duration mission_list_timeout; + rclcpp::Duration mission_wp_timeout; + rclcpp::Duration mission_reschedule_time; + int mission_retries_count; /* -*- rx handlers -*- */ @@ -517,7 +550,7 @@ class MissionBase : public plugin::Plugin if (wp_state != WP::IDLE) { /* try later */ RCLCPP_DEBUG(get_logger(), "%s: busy, reschedule pull", log_prefix); - schedule_pull(RESCHEDULE_TIME); + schedule_pull(mission_reschedule_time.to_chrono()); return; } @@ -548,7 +581,7 @@ class MissionBase : public plugin::Plugin void restart_timeout_timer(void) { - wp_retries = RETRIES_COUNT; + wp_retries = mission_retries_count; restart_timeout_timer_int(); } @@ -597,7 +630,9 @@ class MissionBase : public plugin::Plugin { std::unique_lock lock(recv_cond_mutex); - return list_receiving.wait_for(lock, LIST_TIMEOUT) == std::cv_status::no_timeout && + return list_receiving.wait_for(lock, + mission_list_timeout.to_chrono()) == + std::cv_status::no_timeout && !is_timedout; } @@ -609,7 +644,9 @@ class MissionBase : public plugin::Plugin { std::unique_lock lock(send_cond_mutex); - return list_sending.wait_for(lock, LIST_TIMEOUT) == std::cv_status::no_timeout && + return list_sending.wait_for(lock, + mission_list_timeout.to_chrono()) == + std::cv_status::no_timeout && !is_timedout; } diff --git a/mavros/src/plugins/mission_protocol_base.cpp b/mavros/src/plugins/mission_protocol_base.cpp index 23aa91341..5e1dd5bf1 100644 --- a/mavros/src/plugins/mission_protocol_base.cpp +++ b/mavros/src/plugins/mission_protocol_base.cpp @@ -63,7 +63,7 @@ void MissionBase::handle_mission_item( wp_state)); if (do_pull_after_gcs && reschedule_pull) { RCLCPP_DEBUG(get_logger(), "%s: reschedule pull", log_prefix); - schedule_pull(WP_TIMEOUT); + schedule_pull(mission_wp_timeout.to_chrono()); } } } @@ -103,7 +103,7 @@ void MissionBase::handle_mission_item_int( wp_state)); if (do_pull_after_gcs && reschedule_pull) { RCLCPP_DEBUG(get_logger(), "%s: reschedule pull", log_prefix); - schedule_pull(WP_TIMEOUT); + schedule_pull(mission_wp_timeout.to_chrono()); } } } @@ -237,7 +237,7 @@ void MissionBase::handle_mission_count( if (do_pull_after_gcs) { RCLCPP_INFO(get_logger(), "%s: scheduling pull after GCS is done", log_prefix); reschedule_pull = true; - schedule_pull(RESCHEDULE_TIME); + schedule_pull(mission_reschedule_time.to_chrono()); } } } From 7de65b257fffb585362af95f5b6bc5758eafc0da Mon Sep 17 00:00:00 2001 From: Vladimir Ermakov Date: Fri, 7 Aug 2026 14:16:32 +0200 Subject: [PATCH 03/12] mavros: add service-based plugin tests for command, param, mission Add gmock/gtest suites that exercise the exposed ROS API of the command, param and waypoint (mission) plugins over real ROS interfaces, using a shared TestUAS fixture that captures outbound MAVLink from mavlink_sink and injects inbound messages via plugin_route. - command (mavros-plugin-command): each ~/cmd service, COMMAND_LONG/INT payload, ACK result, ACK timeout, broadcast/non-ACK paths. - param (mavros-plugin-param): set/pull/get flows, Parameter conversion, set/pull timeouts, excluded/unknown-parameter rejections. - mission (mavros-plugin-mission): pull/push/clear/set_current handshakes, item retry, push/pull timeouts, partial-push rejection. The plugin .cpp files are compiled into the test TUs to keep the approach refactor-free where the classes are otherwise internal. Signed-off-by: Vladimir Ermakov --- mavros/CMakeLists.txt | 18 ++ mavros/test/test_command.cpp | 431 ++++++++++++++++++++++++++++ mavros/test/test_mission_flow.cpp | 351 ++++++++++++++++++++++ mavros/test/test_param.cpp | 390 +++++++++++++++++++++++++ mavros/test/test_plugin_helpers.hpp | 224 +++++++++++++++ 5 files changed, 1414 insertions(+) create mode 100644 mavros/test/test_command.cpp create mode 100644 mavros/test/test_mission_flow.cpp create mode 100644 mavros/test/test_param.cpp create mode 100644 mavros/test/test_plugin_helpers.hpp diff --git a/mavros/CMakeLists.txt b/mavros/CMakeLists.txt index 71a26fa8d..8e69fa094 100644 --- a/mavros/CMakeLists.txt +++ b/mavros/CMakeLists.txt @@ -318,6 +318,24 @@ if(BUILD_TESTING) ${mavros_msgs_TARGETS} ) + ament_add_gtest(mavros-plugin-mission test/test_mission_flow.cpp) + target_link_libraries(mavros-plugin-mission + mavros + ${mavros_msgs_TARGETS} + ) + + ament_add_gtest(mavros-plugin-param test/test_param.cpp) + target_link_libraries(mavros-plugin-param + mavros + ${mavros_msgs_TARGETS} + ) + + ament_add_gtest(mavros-plugin-command test/test_command.cpp) + target_link_libraries(mavros-plugin-command + mavros + ${mavros_msgs_TARGETS} + ) + ament_add_pytest_test(mavros_py_test test/mavros_py PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}" APPEND_ENV PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR} diff --git a/mavros/test/test_command.cpp b/mavros/test/test_command.cpp new file mode 100644 index 000000000..922ba32d4 --- /dev/null +++ b/mavros/test/test_command.cpp @@ -0,0 +1,431 @@ +// +// mavros +// Copyright 2026 Vladimir Ermakov, All rights reserved. +// +// This file is part of the mavros package and subject to the license terms +// in the top-level LICENSE file of the mavros repository. +// https://github.com/mavlink/mavros/tree/master/LICENSE.md +// + +/** + * Service-based tests for the command plugin ROS API. + * + * The plugin is compiled into this TU by including its source. Each exposed + * service is exercised over a real ROS client, the outbound COMMAND_LONG/INT is + * verified, and a simulated FCU answers with COMMAND_ACK so the response is + * checked. Error paths (ACK timeout, non-ACK/broadcast) are also covered. + */ + +#include + +#include +#include +#include +#include + +#include "test_plugin_helpers.hpp" +#include "../src/plugins/command.cpp" // NOLINT(build/include) + +using namespace std::chrono_literals; // NOLINT + +using mavros::utils::enum_value; +using mavlink::common::MAV_CMD; +using mavlink::common::MAV_RESULT; +using mavlink::common::msg::COMMAND_ACK; +using mavlink::common::msg::COMMAND_INT; +using mavlink::common::msg::COMMAND_LONG; +using mavros_msgs::srv::CommandBool; +using mavros_msgs::srv::CommandHome; +using mavros_msgs::srv::CommandInt; +using mavros_msgs::srv::CommandLong; +using mavros_msgs::srv::CommandTOL; +using mavros_msgs::srv::CommandTOLLocal; +using mavros_msgs::srv::CommandTriggerControl; +using mavros_msgs::srv::CommandTriggerInterval; +using mavros_msgs::srv::CommandVtolTransition; + +namespace mavros +{ +namespace uas +{ + +class CommandFlowTest : public TestUAS +{ +public: + UAS::SharedPtr uas; + std::shared_ptr plugin; + std::shared_ptr> out; + rclcpp::Node::SharedPtr client; + + void SetUp() override + { + uas = create_uas(); + uas->set_tgt(1, 1); + + plugin = std::make_shared(uas.get()); + register_plugin(uas, plugin); + + // Keep ACK timeout short for the timeout test. + plugin->get_node()->set_parameter(rclcpp::Parameter("command_ack_timeout", 1.0)); + + add_node(uas); + add_node(plugin->get_node()); + client = make_client_node("command_client"); + out = capture_sink(uas); + start_spin(); + } + + void TearDown() override + { + stop_spin(); + } + + void inject(const mavlink::mavlink_message_t & mmsg) + { + route(uas, &mmsg, mavconn::Framing::ok); + std::this_thread::sleep_for(10ms); + } + + mavlink::mavlink_message_t fcu_command_ack(uint16_t command, uint8_t result, uint8_t sysid = 1) + { + COMMAND_ACK ack{}; + ack.command = command; + ack.result = result; + auto mmsg = convert_message(ack); + mmsg.sysid = sysid; + mmsg.compid = 1; + mmsg.msgid = COMMAND_ACK::MSG_ID; + return mmsg; + } + + template + M decode(const mavros_msgs::msg::Mavlink & rmsg) + { + auto m = TestUAS::to_mavlink(rmsg); + M out{}; + mavlink::MsgMap map(m); + out.deserialize(map); + return out; + } +}; + +#define EXPECT_COMMAND_LONG(msg, expected_command) \ + do { \ + auto cl = wait_msgid(*out, COMMAND_LONG::MSG_ID); \ + ASSERT_EQ(cl.msgid, COMMAND_LONG::MSG_ID); \ + auto d = decode(cl); \ + EXPECT_EQ(d.command, expected_command); \ + EXPECT_EQ(d.target_system, 1); \ + EXPECT_EQ(d.target_component, 1); \ + (void)(msg); \ + } while (0) + +TEST_F(CommandFlowTest, arming_success) +{ + auto c = client->create_client("/test_mavros_uas/cmd/arming"); + ASSERT_TRUE(c->wait_for_service(5s)); + + auto req = std::make_shared(); + req->value = true; + std::promise prom; + std::thread svc([&]() {prom.set_value(call_service(c, req, 10s));}); + + EXPECT_COMMAND_LONG(req, enum_value(MAV_CMD::COMPONENT_ARM_DISARM)); + inject(fcu_command_ack(enum_value(MAV_CMD::COMPONENT_ARM_DISARM), + enum_value(MAV_RESULT::ACCEPTED))); + + auto res = prom.get_future().get(); + svc.join(); + ASSERT_NE(res, nullptr); + EXPECT_TRUE(res->success); +} + +TEST_F(CommandFlowTest, set_home_success) +{ + auto c = client->create_client("/test_mavros_uas/cmd/set_home"); + ASSERT_TRUE(c->wait_for_service(5s)); + + auto req = std::make_shared(); + req->current_gps = false; + req->yaw = 90.0f; + req->latitude = 47.0f; + req->longitude = 11.0f; + req->altitude = 500.0f; + std::promise prom; + std::thread svc([&]() {prom.set_value(call_service(c, req, 10s));}); + + auto cl = wait_msgid(*out, COMMAND_LONG::MSG_ID); + ASSERT_EQ(cl.msgid, COMMAND_LONG::MSG_ID); + auto d = decode(cl); + EXPECT_EQ(d.command, enum_value(MAV_CMD::DO_SET_HOME)); + EXPECT_EQ(d.param1, 0.0f); + EXPECT_EQ(d.param4, 90.0f); + EXPECT_EQ(d.param5, 47.0f); + EXPECT_EQ(d.param6, 11.0f); + EXPECT_EQ(d.param7, 500.0f); + + inject(fcu_command_ack(enum_value(MAV_CMD::DO_SET_HOME), enum_value(MAV_RESULT::ACCEPTED))); + auto res = prom.get_future().get(); + svc.join(); + ASSERT_NE(res, nullptr); + EXPECT_TRUE(res->success); +} + +TEST_F(CommandFlowTest, takeoff_success) +{ + auto c = client->create_client("/test_mavros_uas/cmd/takeoff"); + ASSERT_TRUE(c->wait_for_service(5s)); + + auto req = std::make_shared(); + req->min_pitch = 10.0f; + req->yaw = 45.0f; + req->latitude = 47.0f; + req->longitude = 11.0f; + req->altitude = 100.0f; + std::promise prom; + std::thread svc([&]() {prom.set_value(call_service(c, req, 10s));}); + + auto cl = wait_msgid(*out, COMMAND_LONG::MSG_ID); + ASSERT_EQ(cl.msgid, COMMAND_LONG::MSG_ID); + auto d = decode(cl); + EXPECT_EQ(d.command, enum_value(MAV_CMD::NAV_TAKEOFF)); + EXPECT_EQ(d.param1, 10.0f); + EXPECT_EQ(d.param4, 45.0f); + EXPECT_EQ(d.param5, 47.0f); + EXPECT_EQ(d.param6, 11.0f); + EXPECT_EQ(d.param7, 100.0f); + + inject(fcu_command_ack(enum_value(MAV_CMD::NAV_TAKEOFF), enum_value(MAV_RESULT::ACCEPTED))); + auto res = prom.get_future().get(); + svc.join(); + ASSERT_NE(res, nullptr); + EXPECT_TRUE(res->success); +} + +TEST_F(CommandFlowTest, land_local_success) +{ + auto c = client->create_client("/test_mavros_uas/cmd/land_local"); + ASSERT_TRUE(c->wait_for_service(5s)); + + auto req = std::make_shared(); + req->offset = 5.0f; + req->rate = 2.0f; + req->yaw = 30.0f; + req->position.x = 1.0f; + req->position.y = 2.0f; + req->position.z = 3.0f; + std::promise prom; + std::thread svc([&]() {prom.set_value(call_service(c, req, 10s));}); + + auto cl = wait_msgid(*out, COMMAND_LONG::MSG_ID); + ASSERT_EQ(cl.msgid, COMMAND_LONG::MSG_ID); + auto d = decode(cl); + EXPECT_EQ(d.command, enum_value(MAV_CMD::NAV_LAND_LOCAL)); + EXPECT_EQ(d.param2, 5.0f); + EXPECT_EQ(d.param3, 2.0f); + EXPECT_EQ(d.param4, 30.0f); + EXPECT_EQ(d.param5, 2.0f); // position.y + EXPECT_EQ(d.param6, 1.0f); // position.x + EXPECT_EQ(d.param7, 3.0f); // position.z + + inject(fcu_command_ack(enum_value(MAV_CMD::NAV_LAND_LOCAL), enum_value(MAV_RESULT::ACCEPTED))); + auto res = prom.get_future().get(); + svc.join(); + ASSERT_NE(res, nullptr); + EXPECT_TRUE(res->success); +} + +TEST_F(CommandFlowTest, trigger_control_success) +{ + auto c = client->create_client("/test_mavros_uas/cmd/trigger_control"); + ASSERT_TRUE(c->wait_for_service(5s)); + + auto req = std::make_shared(); + req->trigger_enable = true; + req->sequence_reset = true; + req->trigger_pause = false; + std::promise prom; + std::thread svc([&]() {prom.set_value(call_service(c, req, 10s));}); + + EXPECT_COMMAND_LONG(req, enum_value(MAV_CMD::DO_TRIGGER_CONTROL)); + inject(fcu_command_ack(enum_value(MAV_CMD::DO_TRIGGER_CONTROL), + enum_value(MAV_RESULT::ACCEPTED))); + auto res = prom.get_future().get(); + svc.join(); + ASSERT_NE(res, nullptr); + EXPECT_TRUE(res->success); +} + +TEST_F(CommandFlowTest, trigger_interval_success) +{ + auto c = client->create_client("/test_mavros_uas/cmd/trigger_interval"); + ASSERT_TRUE(c->wait_for_service(5s)); + + auto req = std::make_shared(); + req->cycle_time = 1.5f; + req->integration_time = 0.5f; + std::promise prom; + std::thread svc([&]() {prom.set_value(call_service(c, req, 10s));}); + + auto cl = wait_msgid(*out, COMMAND_LONG::MSG_ID); + ASSERT_EQ(cl.msgid, COMMAND_LONG::MSG_ID); + auto d = decode(cl); + EXPECT_EQ(d.command, enum_value(MAV_CMD::DO_SET_CAM_TRIGG_INTERVAL)); + EXPECT_EQ(d.param1, 1.5f); + EXPECT_EQ(d.param2, 0.5f); + + inject(fcu_command_ack(enum_value(MAV_CMD::DO_SET_CAM_TRIGG_INTERVAL), + enum_value(MAV_RESULT::ACCEPTED))); + auto res = prom.get_future().get(); + svc.join(); + ASSERT_NE(res, nullptr); + EXPECT_TRUE(res->success); +} + +// vtol_transition uses confirmation=false, so it does not wait for an ACK. +TEST_F(CommandFlowTest, vtol_transition_no_ack) +{ + auto c = client->create_client("/test_mavros_uas/cmd/vtol_transition"); + ASSERT_TRUE(c->wait_for_service(5s)); + + auto req = std::make_shared(); + req->state = 1; + auto res = call_service(c, req, 5s); + + ASSERT_NE(res, nullptr); + EXPECT_TRUE(res->success); + EXPECT_EQ(wait_msgid(*out, COMMAND_LONG::MSG_ID).msgid, COMMAND_LONG::MSG_ID); +} + +// Generic CommandLong with arbitrary command/params. +TEST_F(CommandFlowTest, command_long_success) +{ + auto c = client->create_client("/test_mavros_uas/cmd/command"); + ASSERT_TRUE(c->wait_for_service(5s)); + + auto req = std::make_shared(); + req->command = enum_value(MAV_CMD::COMPONENT_ARM_DISARM); + req->confirmation = 1; + req->param1 = 1.0f; + req->param2 = 2.0f; + req->param3 = 3.0f; + req->param4 = 4.0f; + req->param5 = 5.0f; + req->param6 = 6.0f; + req->param7 = 7.0f; + std::promise prom; + std::thread svc([&]() {prom.set_value(call_service(c, req, 10s));}); + + auto cl = wait_msgid(*out, COMMAND_LONG::MSG_ID); + ASSERT_EQ(cl.msgid, COMMAND_LONG::MSG_ID); + auto d = decode(cl); + EXPECT_EQ(d.command, req->command); + EXPECT_EQ(d.param1, 1.0f); + EXPECT_EQ(d.param7, 7.0f); + + inject(fcu_command_ack(req->command, enum_value(MAV_RESULT::ACCEPTED))); + auto res = prom.get_future().get(); + svc.join(); + ASSERT_NE(res, nullptr); + EXPECT_TRUE(res->success); + EXPECT_EQ(res->result, enum_value(MAV_RESULT::ACCEPTED)); +} + +// Generic CommandInt produces COMMAND_INT (not COMMAND_LONG). +TEST_F(CommandFlowTest, command_int_success) +{ + auto c = client->create_client("/test_mavros_uas/cmd/command_int"); + ASSERT_TRUE(c->wait_for_service(5s)); + + auto req = std::make_shared(); + req->command = enum_value(MAV_CMD::COMPONENT_ARM_DISARM); + req->frame = enum_value(mavlink::common::MAV_FRAME::BODY_NED); + req->autocontinue = 1; + req->x = 100; + req->y = 200; + req->z = 3.0f; + auto res = call_service(c, req, 5s); + + ASSERT_NE(res, nullptr); + EXPECT_TRUE(res->success); + auto ci = wait_msgid(*out, COMMAND_INT::MSG_ID); + ASSERT_EQ(ci.msgid, COMMAND_INT::MSG_ID); + auto d = decode(ci); + EXPECT_EQ(d.command, req->command); + EXPECT_EQ(d.x, 100); + EXPECT_EQ(d.y, 200); + EXPECT_EQ(d.z, 3.0f); +} + +// ACK timeout: no COMMAND_ACK sent, report failure. +TEST_F(CommandFlowTest, ack_timeout) +{ + plugin->get_node()->set_parameter(rclcpp::Parameter("command_ack_timeout", 0.2)); + + auto c = client->create_client("/test_mavros_uas/cmd/arming"); + ASSERT_TRUE(c->wait_for_service(5s)); + + auto req = std::make_shared(); + req->value = true; + std::promise prom; + std::thread svc([&]() {prom.set_value(call_service(c, req, 10s));}); + + EXPECT_COMMAND_LONG(req, enum_value(MAV_CMD::COMPONENT_ARM_DISARM)); + + auto res = prom.get_future().get(); + svc.join(); + ASSERT_NE(res, nullptr); + EXPECT_FALSE(res->success); +} + +// Broadcast command skips the ACK wait entirely. +TEST_F(CommandFlowTest, broadcast_no_ack) +{ + auto c = client->create_client("/test_mavros_uas/cmd/command"); + ASSERT_TRUE(c->wait_for_service(5s)); + + auto req = std::make_shared(); + req->command = enum_value(MAV_CMD::COMPONENT_ARM_DISARM); + req->broadcast = true; + req->confirmation = 1; + auto res = call_service(c, req, 5s); + + ASSERT_NE(res, nullptr); + EXPECT_TRUE(res->success); + auto cl = wait_msgid(*out, COMMAND_LONG::MSG_ID); + ASSERT_EQ(cl.msgid, COMMAND_LONG::MSG_ID); + auto d = decode(cl); + EXPECT_EQ(d.target_system, 0); // broadcast target + EXPECT_EQ(d.target_component, 0); +} + +// Failed ACK result is surfaced in the response. +TEST_F(CommandFlowTest, ack_failed_result) +{ + auto c = client->create_client("/test_mavros_uas/cmd/arming"); + ASSERT_TRUE(c->wait_for_service(5s)); + + auto req = std::make_shared(); + req->value = true; + std::promise prom; + std::thread svc([&]() {prom.set_value(call_service(c, req, 10s));}); + + EXPECT_COMMAND_LONG(req, enum_value(MAV_CMD::COMPONENT_ARM_DISARM)); + inject(fcu_command_ack(enum_value(MAV_CMD::COMPONENT_ARM_DISARM), + enum_value(MAV_RESULT::FAILED))); + + auto res = prom.get_future().get(); + svc.join(); + ASSERT_NE(res, nullptr); + EXPECT_FALSE(res->success); + EXPECT_EQ(res->result, enum_value(MAV_RESULT::FAILED)); +} + +} // namespace uas +} // namespace mavros + +int main(int argc, char ** argv) +{ + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/mavros/test/test_mission_flow.cpp b/mavros/test/test_mission_flow.cpp new file mode 100644 index 000000000..c4ef6f611 --- /dev/null +++ b/mavros/test/test_mission_flow.cpp @@ -0,0 +1,351 @@ +// +// mavros +// Copyright 2026 Vladimir Ermakov, All rights reserved. +// +// This file is part of the mavros package and subject to the license terms +// in the top-level LICENSE file of the mavros repository. +// https://github.com/mavlink/mavros/tree/master/LICENSE.md +// + +/** + * Service-based tests for the waypoint (mission) plugin ROS API. + * + * The plugin under test is compiled into this TU by including its source + * (plus the MissionBase implementation), so the full service/publisher surface + * is exercised over real ROS interfaces with a simulated FCU that answers the + * mission protocol handshake. + */ + +#include + +#include +#include +#include +#include + +#include "test_plugin_helpers.hpp" +#include "../src/plugins/mission_protocol_base.cpp" // NOLINT(build/include) +#include "../src/plugins/waypoint.cpp" // NOLINT(build/include) + +using namespace std::chrono_literals; // NOLINT + +using mavros::utils::enum_value; +using mavlink::common::MAV_CMD; +using mavlink::common::MAV_MISSION_RESULT; +using mavlink::common::MAV_MISSION_TYPE; +using mavlink::common::msg::MISSION_ACK; +using mavlink::common::msg::MISSION_COUNT; +using mavlink::common::msg::MISSION_ITEM_INT; +using mavlink::common::msg::MISSION_REQUEST_INT; +using mavlink::common::msg::MISSION_REQUEST_LIST; +using mavros_msgs::msg::Waypoint; +using mavros_msgs::srv::WaypointClear; +using mavros_msgs::srv::WaypointPull; +using mavros_msgs::srv::WaypointPush; +using mavros_msgs::srv::WaypointSetCurrent; + +namespace mavros +{ +namespace uas +{ + +class MissionFlowTest : public TestUAS +{ +public: + UAS::SharedPtr uas; + std::shared_ptr plugin; + std::shared_ptr> out; + rclcpp::Node::SharedPtr client; + + void SetUp() override + { + uas = create_uas(); + uas->set_tgt(1, 1); + + plugin = std::make_shared(uas.get()); + register_plugin(uas, plugin); + + // Deterministic fast timeouts so failure paths do not hang. + auto pn = plugin->get_node(); + pn->set_parameter(rclcpp::Parameter("mission_wp_timeout", 0.2)); + pn->set_parameter(rclcpp::Parameter("mission_list_timeout", 1.0)); + pn->set_parameter(rclcpp::Parameter("mission_retries", 1)); + pn->set_parameter(rclcpp::Parameter("use_mission_item_int", true)); + pn->set_parameter(rclcpp::Parameter("enable_partial_push", true)); + + add_node(uas); + add_node(plugin->get_node()); + client = make_client_node("mission_client"); + out = capture_sink(uas); + start_spin(); + } + + void TearDown() override + { + stop_spin(); + } + + /* -*- FCU-side message builders -*- */ + + void inject(const mavlink::mavlink_message_t & mmsg) + { + route(uas, &mmsg, mavconn::Framing::ok); + std::this_thread::sleep_for(10ms); + } + + mavlink::mavlink_message_t fcu_count(uint16_t count, uint8_t sysid = 1) + { + MISSION_COUNT m{}; + m.mission_type = enum_value(MAV_MISSION_TYPE::MISSION); + m.count = count; + m.target_system = sysid; + m.target_component = 1; + auto mmsg = convert_message(m); + mmsg.sysid = sysid; + mmsg.compid = 1; + mmsg.msgid = MISSION_COUNT::MSG_ID; + return mmsg; + } + + mavlink::mavlink_message_t fcu_item_int(uint16_t seq, uint8_t sysid = 1) + { + MISSION_ITEM_INT m{}; + m.mission_type = enum_value(MAV_MISSION_TYPE::MISSION); + m.seq = seq; + m.frame = enum_value(mavlink::common::MAV_FRAME::GLOBAL_RELATIVE_ALT_INT); + m.command = enum_value(MAV_CMD::NAV_WAYPOINT); + m.x = 10000000 * seq; + m.y = 20000000; + m.z = 10.0f; + m.target_system = sysid; + m.target_component = 1; + auto mmsg = convert_message(m); + mmsg.sysid = sysid; + mmsg.compid = 1; + mmsg.msgid = MISSION_ITEM_INT::MSG_ID; + return mmsg; + } + + mavlink::mavlink_message_t fcu_request_int(uint16_t seq, uint8_t sysid = 1) + { + MISSION_REQUEST_INT m{}; + m.mission_type = enum_value(MAV_MISSION_TYPE::MISSION); + m.seq = seq; + m.target_system = sysid; + m.target_component = 1; + auto mmsg = convert_message(m); + mmsg.sysid = sysid; + mmsg.compid = 1; + mmsg.msgid = MISSION_REQUEST_INT::MSG_ID; + return mmsg; + } + + mavlink::mavlink_message_t fcu_ack( + MAV_MISSION_RESULT type, uint8_t sysid = 1) + { + MISSION_ACK m{}; + m.mission_type = enum_value(MAV_MISSION_TYPE::MISSION); + m.type = enum_value(type); + m.target_system = sysid; + m.target_component = 1; + auto mmsg = convert_message(m); + mmsg.sysid = sysid; + mmsg.compid = 1; + mmsg.msgid = MISSION_ACK::MSG_ID; + return mmsg; + } + + Waypoint make_wp(uint16_t command, float x = 0, float y = 0, float z = 0) + { + Waypoint wp{}; + wp.frame = enum_value(mavlink::common::MAV_FRAME::GLOBAL_RELATIVE_ALT_INT); + wp.command = command; + wp.is_current = false; + wp.autocontinue = true; + wp.x_lat = x; + wp.y_long = y; + wp.z_alt = z; + return wp; + } +}; + +// Full pull handshake: FCU answers with a count and all items, plugin publishes +// the waypoint list and reports success with the received count. +TEST_F(MissionFlowTest, pull_success) +{ + auto pull_client = client->create_client("/test_mavros_uas/mission/pull"); + ASSERT_TRUE(pull_client->wait_for_service(5s)); + + auto req = std::make_shared(); + std::promise prom; + std::thread svc([&]() {prom.set_value(call_service(pull_client, req, 10s));}); + + auto rl = wait_msgid(*out, MISSION_REQUEST_LIST::MSG_ID); + EXPECT_EQ(rl.msgid, MISSION_REQUEST_LIST::MSG_ID); + + inject(fcu_count(2)); + inject(fcu_item_int(0)); + inject(fcu_item_int(1)); + + auto res = prom.get_future().get(); + svc.join(); + + ASSERT_NE(res, nullptr); + EXPECT_TRUE(res->success); + EXPECT_EQ(res->wp_received, 2u); +} + +// Full push handshake: plugin sends count then items in response to requests, +// FCU ack finishes the transfer. +TEST_F(MissionFlowTest, push_success) +{ + auto push_client = client->create_client("/test_mavros_uas/mission/push"); + ASSERT_TRUE(push_client->wait_for_service(5s)); + + auto req = std::make_shared(); + req->start_index = 0; + req->waypoints.push_back(make_wp(enum_value(MAV_CMD::NAV_WAYPOINT), 1, 2, 3)); + req->waypoints.push_back(make_wp(enum_value(MAV_CMD::NAV_WAYPOINT), 4, 5, 6)); + + std::promise prom; + std::thread svc([&]() {prom.set_value(call_service(push_client, req, 10s));}); + + auto cnt = wait_msgid(*out, MISSION_COUNT::MSG_ID); + EXPECT_EQ(cnt.msgid, MISSION_COUNT::MSG_ID); + + inject(fcu_request_int(0)); + auto item0 = wait_msgid(*out, MISSION_ITEM_INT::MSG_ID); + EXPECT_EQ(item0.msgid, MISSION_ITEM_INT::MSG_ID); + + inject(fcu_request_int(1)); + // wait for a second MISSION_ITEM_INT + EXPECT_NE(wait_msgid(*out, MISSION_ITEM_INT::MSG_ID), mavros_msgs::msg::Mavlink{}); + + inject(fcu_ack(MAV_MISSION_RESULT::ACCEPTED)); + + auto res = prom.get_future().get(); + svc.join(); + + ASSERT_NE(res, nullptr); + EXPECT_TRUE(res->success); + EXPECT_EQ(res->wp_transfered, 2u); +} + +TEST_F(MissionFlowTest, clear_success) +{ + auto clear_client = client->create_client("/test_mavros_uas/mission/clear"); + ASSERT_TRUE(clear_client->wait_for_service(5s)); + + auto req = std::make_shared(); + std::promise prom; + std::thread svc([&]() {prom.set_value(call_service(clear_client, req, 10s));}); + + EXPECT_EQ( + wait_msgid(*out, mavlink::common::msg::MISSION_CLEAR_ALL::MSG_ID).msgid, + mavlink::common::msg::MISSION_CLEAR_ALL::MSG_ID); + + inject(fcu_ack(MAV_MISSION_RESULT::ACCEPTED)); + + auto res = prom.get_future().get(); + svc.join(); + + ASSERT_NE(res, nullptr); + EXPECT_TRUE(res->success); +} + +TEST_F(MissionFlowTest, set_current_success) +{ + auto set_client = + client->create_client("/test_mavros_uas/mission/set_current"); + ASSERT_TRUE(set_client->wait_for_service(5s)); + + auto req = std::make_shared(); + req->wp_seq = 3; + std::promise prom; + std::thread svc([&]() {prom.set_value(call_service(set_client, req, 10s));}); + + EXPECT_NE( + wait_msgid(*out, mavlink::common::msg::MISSION_SET_CURRENT::MSG_ID), + mavros_msgs::msg::Mavlink{}); + + mavlink::common::msg::MISSION_CURRENT mc{}; + mc.seq = 3; + auto mmsg = convert_message(mc); + mmsg.sysid = 1; + mmsg.compid = 1; + mmsg.msgid = mavlink::common::msg::MISSION_CURRENT::MSG_ID; + inject(mmsg); + + auto res = prom.get_future().get(); + svc.join(); + + ASSERT_NE(res, nullptr); + EXPECT_TRUE(res->success); +} + +// Pull timeout: FCU never responds to MISSION_REQUEST_LIST. +TEST_F(MissionFlowTest, pull_timeout) +{ + auto pull_client = client->create_client("/test_mavros_uas/mission/pull"); + ASSERT_TRUE(pull_client->wait_for_service(5s)); + + auto req = std::make_shared(); + std::promise prom; + std::thread svc([&]() {prom.set_value(call_service(pull_client, req, 10s));}); + + EXPECT_EQ( + wait_msgid(*out, MISSION_REQUEST_LIST::MSG_ID).msgid, MISSION_REQUEST_LIST::MSG_ID); + + auto res = prom.get_future().get(); + svc.join(); + + ASSERT_NE(res, nullptr); + EXPECT_FALSE(res->success); +} + +// Push timeout: FCU requests nothing after the count. +TEST_F(MissionFlowTest, push_timeout) +{ + auto push_client = client->create_client("/test_mavros_uas/mission/push"); + ASSERT_TRUE(push_client->wait_for_service(5s)); + + auto req = std::make_shared(); + req->waypoints.push_back(make_wp(enum_value(MAV_CMD::NAV_WAYPOINT))); + + std::promise prom; + std::thread svc([&]() {prom.set_value(call_service(push_client, req, 10s));}); + + EXPECT_EQ(wait_msgid(*out, MISSION_COUNT::MSG_ID).msgid, MISSION_COUNT::MSG_ID); + + auto res = prom.get_future().get(); + svc.join(); + + ASSERT_NE(res, nullptr); + EXPECT_FALSE(res->success); +} + +// Partial push out-of-range is rejected without touching the FCU. +TEST_F(MissionFlowTest, partial_push_out_of_range) +{ + auto push_client = client->create_client("/test_mavros_uas/mission/push"); + ASSERT_TRUE(push_client->wait_for_service(5s)); + + auto req = std::make_shared(); + req->start_index = 10; + req->waypoints.push_back(make_wp(enum_value(MAV_CMD::NAV_WAYPOINT))); + + auto res = call_service(push_client, req, 5s); + + ASSERT_NE(res, nullptr); + EXPECT_FALSE(res->success); + EXPECT_EQ(res->wp_transfered, 0u); +} + +} // namespace uas +} // namespace mavros + +int main(int argc, char ** argv) +{ + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/mavros/test/test_param.cpp b/mavros/test/test_param.cpp new file mode 100644 index 000000000..e80675375 --- /dev/null +++ b/mavros/test/test_param.cpp @@ -0,0 +1,390 @@ +// +// mavros +// Copyright 2026 Vladimir Ermakov, All rights reserved. +// +// This file is part of the mavros package and subject to the license terms +// in the top-level LICENSE file of the mavros repository. +// https://github.com/mavlink/mavros/tree/master/LICENSE.md +// + +/** + * Tests for the parameter plugin ROS API (set/get/pull) plus the pure + * `Parameter` MAVLink <-> rclcpp conversion logic. + * + * The plugin is compiled into this TU by including its source, so both the + * private `Parameter` class and the full service surface are available. + */ + +#include + +#include +#include +#include +#include + +#include "test_plugin_helpers.hpp" +#include "../src/plugins/param.cpp" // NOLINT(build/include) + +using namespace std::chrono_literals; // NOLINT + +using mavros::utils::enum_value; +using mavlink::common::MAV_PARAM_TYPE; +using mavlink::common::msg::PARAM_REQUEST_LIST; +using mavlink::common::msg::PARAM_SET; +using mavlink::common::msg::PARAM_VALUE; +using mavros_msgs::srv::ParamPull; +using mavros_msgs::srv::ParamSetV2; + +namespace mavros +{ +namespace uas +{ + +class ParamFlowTest : public TestUAS +{ +public: + UAS::SharedPtr uas; + std::shared_ptr plugin; + std::shared_ptr> out; + rclcpp::Node::SharedPtr client; + + void SetUp() override + { + uas = create_uas(); + uas->set_tgt(1, 1); + + plugin = std::make_shared(uas.get()); + register_plugin(uas, plugin); + + // Deterministic fast timeouts so failure paths do not hang. + auto pn = plugin->get_node(); + pn->set_parameter(rclcpp::Parameter("param_set_timeout", 0.1)); + pn->set_parameter(rclcpp::Parameter("param_list_timeout", 0.5)); + pn->set_parameter(rclcpp::Parameter("param_retries", 1)); + + add_node(uas); + add_node(plugin->get_node()); + client = make_client_node("param_client"); + out = capture_sink(uas); + start_spin(); + } + + void TearDown() override + { + stop_spin(); + } + + void inject(const mavlink::mavlink_message_t & mmsg) + { + route(uas, &mmsg, mavconn::Framing::ok); + std::this_thread::sleep_for(10ms); + } + + mavlink::mavlink_message_t fcu_param_value( + const std::string & id, int type, float value, uint16_t index, uint16_t count, + uint8_t sysid = 1) + { + PARAM_VALUE pv{}; + mavlink::set_string(pv.param_id, id.c_str()); + pv.param_type = type; + pv.param_value = value; + pv.param_index = index; + pv.param_count = count; + auto mmsg = convert_message(pv); + mmsg.sysid = sysid; + mmsg.compid = 1; + mmsg.msgid = PARAM_VALUE::MSG_ID; + return mmsg; + } + + template + M decode(const mavros_msgs::msg::Mavlink & rmsg) + { + auto m = TestUAS::to_mavlink(rmsg); + M out{}; + mavlink::MsgMap map(m); + out.deserialize(map); + return out; + } + + // Encode an integer into the MAVLink param union (which is carried in the + // float `param_value` field). + static float union_float_from_int(int type, int64_t v) + { + mavlink::mavlink_param_union_t uv{}; + switch (type) { + case enum_value(MAV_PARAM_TYPE::INT8): uv.param_int8 = static_cast(v); break; + case enum_value(MAV_PARAM_TYPE::UINT8): uv.param_uint8 = static_cast(v); break; + case enum_value(MAV_PARAM_TYPE::INT16): uv.param_int16 = static_cast(v); break; + case enum_value(MAV_PARAM_TYPE::UINT16): uv.param_uint16 = static_cast(v); break; + case enum_value(MAV_PARAM_TYPE::INT32): uv.param_int32 = static_cast(v); break; + case enum_value(MAV_PARAM_TYPE::UINT32): uv.param_uint32 = static_cast(v); break; + default: uv.param_float = static_cast(v); break; + } + return uv.param_float; + } + + size_t count_msgid(uint32_t msgid) const + { + size_t n = 0; + for (const auto & m : *out) { + if (m.msgid == msgid) { + n++; + } + } + return n; + } +}; + +// Pure conversion: MAVLink PARAM_VALUE -> rclcpp value for every type. +TEST_F(ParamFlowTest, parameter_set_value_types) +{ + mavros::std_plugins::Parameter p("TEST"); + + auto check = [&](int mtype, int64_t raw, rclcpp::ParameterType rtype, int64_t expected) { + PARAM_VALUE pv{}; + pv.param_type = mtype; + pv.param_value = union_float_from_int(mtype, raw); + p.set_value(pv); + EXPECT_EQ(p.param_value.get_type(), rtype); + EXPECT_EQ(p.param_value.get(), expected); + }; + + check(enum_value(MAV_PARAM_TYPE::INT8), -5, rclcpp::PARAMETER_INTEGER, -5); + check(enum_value(MAV_PARAM_TYPE::UINT8), 200, rclcpp::PARAMETER_INTEGER, 200); + check(enum_value(MAV_PARAM_TYPE::INT16), -1000, rclcpp::PARAMETER_INTEGER, -1000); + check(enum_value(MAV_PARAM_TYPE::UINT16), 40000, rclcpp::PARAMETER_INTEGER, 40000); + check(enum_value(MAV_PARAM_TYPE::INT32), 123456, rclcpp::PARAMETER_INTEGER, 123456); + check(enum_value(MAV_PARAM_TYPE::UINT32), 2000000000, rclcpp::PARAMETER_INTEGER, 2000000000); + + // real32 + PARAM_VALUE pf{}; + pf.param_type = enum_value(MAV_PARAM_TYPE::REAL32); + pf.param_value = 3.5f; + p.set_value(pf); + EXPECT_EQ(p.param_value.get_type(), rclcpp::PARAMETER_DOUBLE); + EXPECT_DOUBLE_EQ(p.param_value.get(), 3.5); + + // unsupported + PARAM_VALUE pu{}; + pu.param_type = 99; + p.set_value(pu); + EXPECT_EQ(p.param_value.get_type(), rclcpp::PARAMETER_NOT_SET); +} + +// Pure conversion: rclcpp value -> PARAM_SET. +TEST_F(ParamFlowTest, parameter_to_param_set) +{ + auto check = [](const rclcpp::ParameterValue & v, int expected_type, float expected_union) { + mavros::std_plugins::Parameter p("TEST", 0, 0, v); + auto ps = p.to_param_set(); + EXPECT_EQ(mavlink::to_string(ps.param_id), "TEST"); + EXPECT_EQ(ps.param_type, expected_type); + EXPECT_EQ(ps.param_value, expected_union); + }; + + check( + rclcpp::ParameterValue(true), enum_value(MAV_PARAM_TYPE::UINT8), + union_float_from_int(enum_value(MAV_PARAM_TYPE::UINT8), 1)); + check( + rclcpp::ParameterValue(42), enum_value(MAV_PARAM_TYPE::INT32), + union_float_from_int(enum_value(MAV_PARAM_TYPE::INT32), 42)); + check(rclcpp::ParameterValue(3.5), enum_value(MAV_PARAM_TYPE::REAL32), 3.5f); +} + +// Pure conversion: excluded parameter ids. +TEST_F(ParamFlowTest, parameter_exclude_ids) +{ + EXPECT_TRUE(mavros::std_plugins::Parameter::check_exclude_param_id("CMD_TOTAL")); + EXPECT_TRUE(mavros::std_plugins::Parameter::check_exclude_param_id("_HASH_CHECK")); + EXPECT_FALSE(mavros::std_plugins::Parameter::check_exclude_param_id("MY_PARAM")); +} + +// Set flow: force-set an integer param, FCU echoes the value. +TEST_F(ParamFlowTest, set_success_int) +{ + auto set_client = client->create_client("/test_mavros_uas/param/set"); + ASSERT_TRUE(set_client->wait_for_service(5s)); + + auto req = std::make_shared(); + req->param_id = "TEST_I"; + req->force_set = true; + req->value.type = rcl_interfaces::msg::ParameterType::PARAMETER_INTEGER; + req->value.integer_value = 42; + + std::promise prom; + std::thread svc([&]() {prom.set_value(call_service(set_client, req, 10s));}); + + auto ps = wait_msgid(*out, PARAM_SET::MSG_ID); + ASSERT_EQ(ps.msgid, PARAM_SET::MSG_ID); + auto pset = decode(ps); + EXPECT_EQ(mavlink::to_string(pset.param_id), "TEST_I"); + EXPECT_EQ(pset.param_type, enum_value(MAV_PARAM_TYPE::INT32)); + EXPECT_EQ(pset.param_value, union_float_from_int(enum_value(MAV_PARAM_TYPE::INT32), 42)); + EXPECT_EQ(pset.target_system, 1); + + inject( + fcu_param_value( + "TEST_I", enum_value(MAV_PARAM_TYPE::INT32), + union_float_from_int(enum_value(MAV_PARAM_TYPE::INT32), 42), 0, 1)); + + auto res = prom.get_future().get(); + svc.join(); + + ASSERT_NE(res, nullptr); + EXPECT_TRUE(res->success); + EXPECT_EQ(res->value.integer_value, 42); +} + +// Set flow: force-set a double param, FCU echoes the value. +TEST_F(ParamFlowTest, set_success_double) +{ + auto set_client = client->create_client("/test_mavros_uas/param/set"); + ASSERT_TRUE(set_client->wait_for_service(5s)); + + auto req = std::make_shared(); + req->param_id = "TEST_F"; + req->force_set = true; + req->value.type = rcl_interfaces::msg::ParameterType::PARAMETER_DOUBLE; + req->value.double_value = 3.5; + + std::promise prom; + std::thread svc([&]() {prom.set_value(call_service(set_client, req, 10s));}); + + EXPECT_EQ(wait_msgid(*out, PARAM_SET::MSG_ID).msgid, PARAM_SET::MSG_ID); + + inject(fcu_param_value("TEST_F", enum_value(MAV_PARAM_TYPE::REAL32), 3.5f, 0, 1)); + + auto res = prom.get_future().get(); + svc.join(); + + ASSERT_NE(res, nullptr); + EXPECT_TRUE(res->success); + EXPECT_DOUBLE_EQ(res->value.double_value, 3.5); +} + +// Pull flow: FCU streams N params, pull reports them; get_parameters serves cache. +TEST_F(ParamFlowTest, pull_and_get) +{ + auto pull_client = client->create_client("/test_mavros_uas/param/pull"); + ASSERT_TRUE(pull_client->wait_for_service(5s)); + + auto req = std::make_shared(); + std::promise prom; + std::thread svc([&]() {prom.set_value(call_service(pull_client, req, 10s));}); + + EXPECT_EQ(wait_msgid(*out, PARAM_REQUEST_LIST::MSG_ID).msgid, PARAM_REQUEST_LIST::MSG_ID); + + inject(fcu_param_value("A_0", enum_value(MAV_PARAM_TYPE::INT32), + union_float_from_int(enum_value(MAV_PARAM_TYPE::INT32), 10), 0, 2)); + inject(fcu_param_value("A_1", enum_value(MAV_PARAM_TYPE::INT32), + union_float_from_int(enum_value(MAV_PARAM_TYPE::INT32), 20), 1, 2)); + + auto res = prom.get_future().get(); + svc.join(); + + ASSERT_NE(res, nullptr); + EXPECT_TRUE(res->success); + EXPECT_EQ(res->param_received, 2u); + + // get_parameters serves the cached values + auto get_parameters = client->create_client( + "/test_mavros_uas/param/get_parameters"); + ASSERT_TRUE(get_parameters->wait_for_service(5s)); + auto greq = std::make_shared(); + greq->names = {"A_0", "A_1", "MISSING"}; + auto gres = call_service(get_parameters, greq, 5s); + ASSERT_NE(gres, nullptr); + ASSERT_EQ(gres->values.size(), 3u); + EXPECT_EQ(gres->values[0].integer_value, 10); + EXPECT_EQ(gres->values[1].integer_value, 20); + EXPECT_EQ(gres->values[2].type, rcl_interfaces::msg::ParameterType::PARAMETER_NOT_SET); +} + +// Set timeout: no FCU echo, retries exhausted, report failure. +TEST_F(ParamFlowTest, set_timeout) +{ + auto set_client = client->create_client("/test_mavros_uas/param/set"); + ASSERT_TRUE(set_client->wait_for_service(5s)); + + auto req = std::make_shared(); + req->param_id = "TEST_I"; + req->force_set = true; + req->value.type = rcl_interfaces::msg::ParameterType::PARAMETER_INTEGER; + req->value.integer_value = 7; + + std::promise prom; + std::thread svc([&]() {prom.set_value(call_service(set_client, req, 10s));}); + + EXPECT_EQ(wait_msgid(*out, PARAM_SET::MSG_ID).msgid, PARAM_SET::MSG_ID); + + auto res = prom.get_future().get(); + svc.join(); + + ASSERT_NE(res, nullptr); + EXPECT_FALSE(res->success); + // initial send + param_retries(1) resend + EXPECT_GE(count_msgid(PARAM_SET::MSG_ID), 2u); +} + +// Pull timeout: FCU never responds. +TEST_F(ParamFlowTest, pull_timeout) +{ + auto pull_client = client->create_client("/test_mavros_uas/param/pull"); + ASSERT_TRUE(pull_client->wait_for_service(5s)); + + auto req = std::make_shared(); + std::promise prom; + std::thread svc([&]() {prom.set_value(call_service(pull_client, req, 10s));}); + + EXPECT_EQ(wait_msgid(*out, PARAM_REQUEST_LIST::MSG_ID).msgid, PARAM_REQUEST_LIST::MSG_ID); + + auto res = prom.get_future().get(); + svc.join(); + + ASSERT_NE(res, nullptr); + EXPECT_FALSE(res->success); +} + +// Excluded parameter rejected without force_set. +TEST_F(ParamFlowTest, set_excluded_param) +{ + auto set_client = client->create_client("/test_mavros_uas/param/set"); + ASSERT_TRUE(set_client->wait_for_service(5s)); + + auto req = std::make_shared(); + req->param_id = "CMD_TOTAL"; + req->force_set = false; + req->value.type = rcl_interfaces::msg::ParameterType::PARAMETER_INTEGER; + req->value.integer_value = 1; + + auto res = call_service(set_client, req, 5s); + ASSERT_NE(res, nullptr); + EXPECT_FALSE(res->success); +} + +// Unknown parameter rejected without force_set. +TEST_F(ParamFlowTest, set_unknown_param) +{ + auto set_client = client->create_client("/test_mavros_uas/param/set"); + ASSERT_TRUE(set_client->wait_for_service(5s)); + + auto req = std::make_shared(); + req->param_id = "NOT_KNOWN"; + req->force_set = false; + req->value.type = rcl_interfaces::msg::ParameterType::PARAMETER_INTEGER; + req->value.integer_value = 1; + + auto res = call_service(set_client, req, 5s); + ASSERT_NE(res, nullptr); + EXPECT_FALSE(res->success); +} + +} // namespace uas +} // namespace mavros + +int main(int argc, char ** argv) +{ + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/mavros/test/test_plugin_helpers.hpp b/mavros/test/test_plugin_helpers.hpp new file mode 100644 index 000000000..4675ae865 --- /dev/null +++ b/mavros/test/test_plugin_helpers.hpp @@ -0,0 +1,224 @@ +// +// mavros +// Copyright 2026 Vladimir Ermakov, All rights reserved. +// +// This file is part of the mavros package and subject to the license terms +// in the top-level LICENSE file of the mavros repository. +// https://github.com/mavlink/mavros/tree/master/LICENSE.md +// + +/** + * Shared helpers for service-based plugin tests. + * + * The fixture class is named `TestUAS` because `mavros::uas::UAS` declares + * `friend class TestUAS;` (see mavros_uas.hpp), which gives it access to the + * private plugin routing/sink internals needed to drive a plugin. + * + * Each test TU includes its own plugin `.cpp`, so this header is shared and + * type-agnostic. The plugin is registered directly into the UAS routing tables + * (bypassing the class-loader / startup timer) and outbound MAVLink is captured + * from the `mavlink_sink` publisher. + */ + +#pragma once + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "rclcpp/executors.hpp" +#include "rclcpp/rclcpp.hpp" + +#include "mavconn/interface.hpp" +#include "mavros/mavros_uas.hpp" +#include "mavros/plugin.hpp" +#include "mavros_msgs/msg/mavlink.hpp" + +using namespace std::chrono_literals; // NOLINT + +namespace mavros +{ +namespace uas +{ + +class TestUAS : public ::testing::Test +{ +public: + TestUAS() + { + rclcpp::init(0, nullptr); + } + + ~TestUAS() override + { + stop_spin(); + exec_.reset(); + nodes_.clear(); + sink_subs_.clear(); + rclcpp::shutdown(); + } + + //! Real UAS node with the outbound sink created and the startup timer stopped + // (so no plugins are auto-loaded and no internal executor starts). + UAS::SharedPtr create_uas(const std::string & name = "test_mavros_uas") + { + auto uas = std::make_shared(name); + uas->startup_delay_timer->cancel(); + + // Mirror connect_to_router(): create the sink so send_message() publishes + // outbound MAVLink to a topic we can capture. + uas->sink = uas->create_publisher( + "/" + name + "/mavlink_sink", rclcpp::QoS(1000).best_effort().durability_volatile()); + + return uas; + } + + //! Register a plugin's subscriptions and instance into the UAS routing tables. + template + void register_plugin(UAS::SharedPtr & uas, const std::shared_ptr & plugin) + { + for (auto & info : plugin->get_subscriptions()) { + auto msgid = std::get<0>(info); + auto it = uas->plugin_subscriptions.find(msgid); + if (it == uas->plugin_subscriptions.end()) { + uas->plugin_subscriptions[msgid] = plugin::Plugin::Subscriptions{{info}}; + } else { + it->second.push_back(info); + } + } + uas->loaded_plugins.push_back(plugin); + } + + //! Route an inbound MAVLink message to the registered plugin handlers. + void route( + UAS::SharedPtr & uas, const mavlink::mavlink_message_t * mmsg, + const mavconn::Framing framing) + { + uas->plugin_route(mmsg, framing); + } + + //! Serialize a mavlink message into a mavlink_message_t. + mavlink::mavlink_message_t convert_message(const mavlink::Message & msg) + { + mavlink::mavlink_message_t ret; + mavlink::MsgMap map(ret); + msg.serialize(map); + return ret; + } + + //! Subscribe to the UAS outbound sink and return a shared capture buffer. + std::shared_ptr> capture_sink( + const UAS::SharedPtr & uas, const std::string & name = "test_mavros_uas") + { + auto buf = std::make_shared>(); + auto mtx = std::make_shared(); + sink_subs_.push_back( + uas->create_subscription( + "/" + name + "/mavlink_sink", rclcpp::QoS(1000).best_effort(), + [buf, mtx](const mavros_msgs::msg::Mavlink::SharedPtr m) { + std::lock_guard lk(*mtx); + (void)lk; + buf->push_back(*m); + })); + return buf; + } + + //! Convert a captured Mavlink ROS message back to a mavlink_message_t. + static mavlink::mavlink_message_t to_mavlink(const mavros_msgs::msg::Mavlink & rmsg) + { + mavlink::mavlink_message_t msg; + mavros_msgs::mavlink::convert(rmsg, msg); + return msg; + } + + //! Start a MultiThreadedExecutor spinning the given nodes on a background thread. + void start_spin() + { + if (spinning_) { + return; + } + spinning_ = true; + exec_ = std::make_shared(); + for (auto & n : nodes_) { + exec_->add_node(n); + } + spin_thread_ = std::thread([this]() {exec_->spin();}); + } + + //! Add a node to the set spun by start_spin(). + void add_node(rclcpp::Node::SharedPtr n) + { + nodes_.push_back(n); + } + + void stop_spin() + { + if (!spinning_) { + return; + } + spinning_ = false; + if (exec_) { + exec_->cancel(); + } + if (spin_thread_.joinable()) { + spin_thread_.join(); + } + } + + //! Create a client node and add it to the spun set. + rclcpp::Node::SharedPtr make_client_node(const std::string & name) + { + auto node = std::make_shared(name); + add_node(node); + return node; + } + + //! Synchronous service call with a timeout; returns nullptr on timeout. + template + typename Srv::Response::SharedPtr call_service( + const std::shared_ptr> & client, + const typename Srv::Request::SharedPtr & req, + const std::chrono::seconds timeout = 5s) + { + auto future = client->async_send_request(req); + if (future.wait_for(timeout) != std::future_status::ready) { + return nullptr; + } + return future.get(); + } + + //! Wait until the captured outbound buffer contains a message with msgid. + // Returns the captured ROS message (first match) or nullptr on timeout. + static mavros_msgs::msg::Mavlink wait_msgid( + const std::vector & buf, const uint32_t msgid, + const std::chrono::milliseconds timeout = 5s) + { + const auto deadline = std::chrono::steady_clock::now() + timeout; + while (std::chrono::steady_clock::now() < deadline) { + for (const auto & m : buf) { + if (m.msgid == msgid) { + return m; + } + } + std::this_thread::sleep_for(5ms); + } + return mavros_msgs::msg::Mavlink{}; + } + +protected: + std::vector nodes_; + std::vector sink_subs_; + std::shared_ptr exec_; + std::thread spin_thread_; + bool spinning_{false}; +}; + +} // namespace uas +} // namespace mavros From deaa848c5b8506b0a13cc6adff594bbb1bfda70a Mon Sep 17 00:00:00 2001 From: Vladimir Ermakov Date: Fri, 7 Aug 2026 14:16:40 +0200 Subject: [PATCH 04/12] docs: add mavlink subprotocol references to plugin docs Add a reference to the relevant MAVLink microservice (subprotocol) page in the doxygen description of each plugin that maps to one. The references flow through the existing doc extractor/template pipeline. Signed-off-by: Vladimir Ermakov --- mavros/src/plugins/command.cpp | 3 ++- mavros/src/plugins/ftp.cpp | 3 +++ mavros/src/plugins/geofence.cpp | 3 +++ mavros/src/plugins/manual_control.cpp | 3 +++ mavros/src/plugins/rallypoint.cpp | 3 +++ mavros/src/plugins/setpoint_accel.cpp | 3 ++- mavros/src/plugins/setpoint_attitude.cpp | 3 ++- mavros/src/plugins/setpoint_position.cpp | 3 ++- mavros/src/plugins/setpoint_raw.cpp | 3 ++- mavros/src/plugins/setpoint_trajectory.cpp | 3 ++- mavros/src/plugins/setpoint_velocity.cpp | 3 ++- mavros/src/plugins/sys_status.cpp | 3 +++ mavros/src/plugins/sys_time.cpp | 3 +++ mavros/src/plugins/waypoint.cpp | 3 +++ mavros_extras/src/plugins/adsb.cpp | 3 ++- mavros_extras/src/plugins/camera.cpp | 3 ++- mavros_extras/src/plugins/gimbal_control.cpp | 2 +- mavros_extras/src/plugins/landing_target.cpp | 3 ++- mavros_extras/src/plugins/mount_control.cpp | 3 ++- mavros_extras/src/plugins/open_drone_id.cpp | 3 ++- mavros_extras/src/plugins/tunnel.cpp | 3 +++ 21 files changed, 49 insertions(+), 13 deletions(-) diff --git a/mavros/src/plugins/command.cpp b/mavros/src/plugins/command.cpp index 998e6c277..ca57bc8fc 100644 --- a/mavros/src/plugins/command.cpp +++ b/mavros/src/plugins/command.cpp @@ -62,7 +62,8 @@ class CommandTransaction * @brief Command plugin. * @plugin command * - * Send any command via COMMAND_LONG + * Send any command via COMMAND_LONG. Implements the + * [MAVLink Command Protocol](https://mavlink.io/en/services/command.html). */ class CommandPlugin : public plugin::Plugin { diff --git a/mavros/src/plugins/ftp.cpp b/mavros/src/plugins/ftp.cpp index 0c5ca3f93..ed2fe41ac 100644 --- a/mavros/src/plugins/ftp.cpp +++ b/mavros/src/plugins/ftp.cpp @@ -244,6 +244,9 @@ class FTPRequest : public mavlink::common::msg::FILE_TRANSFER_PROTOCOL /** * @brief FTP plugin. * @plugin ftp + * + * Implements the + * [MAVLink File Transfer Protocol](https://mavlink.io/en/services/ftp.html). */ class FTPPlugin : public plugin::Plugin { diff --git a/mavros/src/plugins/geofence.cpp b/mavros/src/plugins/geofence.cpp index 86888481c..b2fc06891 100644 --- a/mavros/src/plugins/geofence.cpp +++ b/mavros/src/plugins/geofence.cpp @@ -27,6 +27,9 @@ using namespace std::chrono_literals; // NOLINT /** * @brief Geofence manipulation plugin * @plugin geofence + * + * Implements the geofence part of the + * [MAVLink Mission Protocol](https://mavlink.io/en/services/mission.html). */ class GeofencePlugin : public plugin::MissionBase { diff --git a/mavros/src/plugins/manual_control.cpp b/mavros/src/plugins/manual_control.cpp index 017e3fb44..472eea361 100644 --- a/mavros/src/plugins/manual_control.cpp +++ b/mavros/src/plugins/manual_control.cpp @@ -31,6 +31,9 @@ using namespace std::placeholders; // NOLINT /** * @brief Manual Control plugin * @plugin manual_control + * + * Implements the + * [MAVLink Manual Control (Joystick) Protocol](https://mavlink.io/en/services/manual_control.html). */ class ManualControlPlugin : public plugin::Plugin { diff --git a/mavros/src/plugins/rallypoint.cpp b/mavros/src/plugins/rallypoint.cpp index 0b99fc0b6..5725e9369 100644 --- a/mavros/src/plugins/rallypoint.cpp +++ b/mavros/src/plugins/rallypoint.cpp @@ -26,6 +26,9 @@ using namespace std::chrono_literals; // NOLINT /** * @brief Rallypoint manipulation plugin * @plugin rallypoint + * + * Implements the rally point part of the + * [MAVLink Mission Protocol](https://mavlink.io/en/services/mission.html). */ class RallypointPlugin : public plugin::MissionBase { diff --git a/mavros/src/plugins/setpoint_accel.cpp b/mavros/src/plugins/setpoint_accel.cpp index 4484a11dc..a219059d9 100644 --- a/mavros/src/plugins/setpoint_accel.cpp +++ b/mavros/src/plugins/setpoint_accel.cpp @@ -35,7 +35,8 @@ using namespace std::placeholders; // NOLINT * @brief Setpoint acceleration/force plugin * @plugin setpoint_accel * - * Send setpoint accelerations/forces to FCU controller. + * Send setpoint accelerations/forces to FCU controller. Uses the + * [MAVLink Offboard Control Protocol](https://mavlink.io/en/services/offboard_control.html). */ class SetpointAccelerationPlugin : public plugin::Plugin, private plugin::SetPositionTargetLocalNEDMixin diff --git a/mavros/src/plugins/setpoint_attitude.cpp b/mavros/src/plugins/setpoint_attitude.cpp index d6a69d90b..eea4e7e83 100644 --- a/mavros/src/plugins/setpoint_attitude.cpp +++ b/mavros/src/plugins/setpoint_attitude.cpp @@ -55,7 +55,8 @@ using SyncTwistThrust = message_filters::Synchronizer; * @brief Setpoint attitude plugin * @plugin setpoint_attitude * - * Send setpoint attitude/orientation/thrust to FCU controller. + * Send setpoint attitude/orientation/thrust to FCU controller. Uses the + * [MAVLink Offboard Control Protocol](https://mavlink.io/en/services/offboard_control.html). */ class SetpointAttitudePlugin : public plugin::Plugin, private plugin::SetAttitudeTargetMixin diff --git a/mavros/src/plugins/setpoint_position.cpp b/mavros/src/plugins/setpoint_position.cpp index 57c35b754..4ab1b7319 100644 --- a/mavros/src/plugins/setpoint_position.cpp +++ b/mavros/src/plugins/setpoint_position.cpp @@ -38,7 +38,8 @@ using mavlink::common::MAV_FRAME; * @brief Setpoint position plugin * @plugin setpoint_position * - * Send setpoint positions to FCU controller. + * Send setpoint positions to FCU controller. Uses the + * [MAVLink Offboard Control Protocol](https://mavlink.io/en/services/offboard_control.html). */ class SetpointPositionPlugin : public plugin::Plugin, private plugin::SetPositionTargetLocalNEDMixin, diff --git a/mavros/src/plugins/setpoint_raw.cpp b/mavros/src/plugins/setpoint_raw.cpp index 470b718da..cda76b528 100644 --- a/mavros/src/plugins/setpoint_raw.cpp +++ b/mavros/src/plugins/setpoint_raw.cpp @@ -38,7 +38,8 @@ using namespace std::placeholders; // NOLINT * @plugin setpoint_raw * * Send position setpoints and publish current state (return loop). - * User can decide what set of filed needed for operation via IGNORE bits. + * User can decide what set of filed needed for operation via IGNORE bits. Uses the + * [MAVLink Offboard Control Protocol](https://mavlink.io/en/services/offboard_control.html). */ class SetpointRawPlugin : public plugin::Plugin, private plugin::SetPositionTargetLocalNEDMixin, diff --git a/mavros/src/plugins/setpoint_trajectory.cpp b/mavros/src/plugins/setpoint_trajectory.cpp index 732c06167..67e54b827 100644 --- a/mavros/src/plugins/setpoint_trajectory.cpp +++ b/mavros/src/plugins/setpoint_trajectory.cpp @@ -43,7 +43,8 @@ using mavlink::common::MAV_FRAME; * @brief Setpoint TRAJECTORY plugin * @plugin setpoint_trajectory * - * Receive trajectory setpoints and send setpoint_raw setpoints along the trajectory. + * Receive trajectory setpoints and send setpoint_raw setpoints along the trajectory. Uses the + * [MAVLink Offboard Control Protocol](https://mavlink.io/en/services/offboard_control.html). */ class SetpointTrajectoryPlugin : public plugin::Plugin, private plugin::SetPositionTargetLocalNEDMixin diff --git a/mavros/src/plugins/setpoint_velocity.cpp b/mavros/src/plugins/setpoint_velocity.cpp index 9f18f5e4d..e6d07a32e 100644 --- a/mavros/src/plugins/setpoint_velocity.cpp +++ b/mavros/src/plugins/setpoint_velocity.cpp @@ -37,7 +37,8 @@ using mavlink::common::MAV_FRAME; * @brief Setpoint velocity plugin * @plugin setpoint_velocity * - * Send setpoint velocities to FCU controller. + * Send setpoint velocities to FCU controller. Uses the + * [MAVLink Offboard Control Protocol](https://mavlink.io/en/services/offboard_control.html). */ class SetpointVelocityPlugin : public plugin::Plugin, private plugin::SetPositionTargetLocalNEDMixin diff --git a/mavros/src/plugins/sys_status.cpp b/mavros/src/plugins/sys_status.cpp index 55936c20c..5de810220 100644 --- a/mavros/src/plugins/sys_status.cpp +++ b/mavros/src/plugins/sys_status.cpp @@ -480,6 +480,9 @@ class HwStatus : public diagnostic_updater::DiagnosticTask * @plugin sys_status * * Required by all plugins. + * + * Implements the + * [MAVLink Heartbeat/Connection Protocol](https://mavlink.io/en/services/heartbeat.html). */ class SystemStatusPlugin : public plugin::Plugin { diff --git a/mavros/src/plugins/sys_time.cpp b/mavros/src/plugins/sys_time.cpp index 915df35f4..41a1a9dc6 100644 --- a/mavros/src/plugins/sys_time.cpp +++ b/mavros/src/plugins/sys_time.cpp @@ -141,6 +141,9 @@ class TimeSyncStatus : public diagnostic_updater::DiagnosticTask /** * @brief System time plugin * @plugin sys_time + * + * Implements the + * [MAVLink Time Synchronization](https://mavlink.io/en/services/timesync.html). */ class SystemTimePlugin : public plugin::Plugin { diff --git a/mavros/src/plugins/waypoint.cpp b/mavros/src/plugins/waypoint.cpp index 1deedc3c5..31f2f303d 100644 --- a/mavros/src/plugins/waypoint.cpp +++ b/mavros/src/plugins/waypoint.cpp @@ -29,6 +29,9 @@ using namespace std::chrono_literals; // NOLINT /** * @brief Mission manipulation plugin * @plugin waypoint + * + * Implements the + * [MAVLink Mission Protocol](https://mavlink.io/en/services/mission.html). */ class WaypointPlugin : public plugin::MissionBase { diff --git a/mavros_extras/src/plugins/adsb.cpp b/mavros_extras/src/plugins/adsb.cpp index e6dcb9e02..7a0a94878 100644 --- a/mavros_extras/src/plugins/adsb.cpp +++ b/mavros_extras/src/plugins/adsb.cpp @@ -35,7 +35,8 @@ using mavlink::common::ADSB_ALTITUDE_TYPE; * @brief ADS-B Vehicle plugin * @plugin adsb * - * Publish/subscribe Automatic dependent surveillance-broadcast data to/from a vehicle. + * Publish/subscribe Automatic dependent surveillance-broadcast data to/from a vehicle. Implements the + * [MAVLink Traffic Management (UTM/ADS-B)](https://mavlink.io/en/services/traffic_management.html). */ class ADSBPlugin : public plugin::Plugin { diff --git a/mavros_extras/src/plugins/camera.cpp b/mavros_extras/src/plugins/camera.cpp index 5a78af876..21c935551 100644 --- a/mavros_extras/src/plugins/camera.cpp +++ b/mavros_extras/src/plugins/camera.cpp @@ -35,7 +35,8 @@ using utils::enum_value; * @brief Camera plugin plugin * @plugin camera * - * Plugin for interfacing on the mavlink camera protocol + * Plugin for interfacing on the mavlink camera protocol. Implements the + * [MAVLink Camera Protocol v2](https://mavlink.io/en/services/camera.html). * @see command_cb() */ class CameraPlugin : public plugin::Plugin diff --git a/mavros_extras/src/plugins/gimbal_control.cpp b/mavros_extras/src/plugins/gimbal_control.cpp index 3897c1250..11de84fa5 100644 --- a/mavros_extras/src/plugins/gimbal_control.cpp +++ b/mavros_extras/src/plugins/gimbal_control.cpp @@ -58,7 +58,7 @@ using uas::s_shared_lock; * @brief Gimbal Control Plugin * @plugin gimbal_control * - * Adds support for Mavlink Gimbal Protocol v2. + * Implements the [MAVLink Gimbal Protocol v2](https://mavlink.io/en/services/gimbal_v2.html). * Also publishes gimbal pose to TF when parameter tf_send==true */ class GimbalControlPlugin : public plugin::Plugin diff --git a/mavros_extras/src/plugins/landing_target.cpp b/mavros_extras/src/plugins/landing_target.cpp index 4a63aad4e..d196666f5 100644 --- a/mavros_extras/src/plugins/landing_target.cpp +++ b/mavros_extras/src/plugins/landing_target.cpp @@ -42,7 +42,8 @@ using mavlink::common::LANDING_TARGET_TYPE; * @plugin landing_target * * This plugin is intended to publish the location of a landing area captured from a downward facing camera - * to the FCU and/or receive landing target tracking data coming from the FCU. + * to the FCU and/or receive landing target tracking data coming from the FCU. Implements the + * [MAVLink Landing Target Protocol](https://mavlink.io/en/services/landing_target.html). */ class LandingTargetPlugin : public plugin::Plugin, private plugin::TF2ListenerMixin diff --git a/mavros_extras/src/plugins/mount_control.cpp b/mavros_extras/src/plugins/mount_control.cpp index 52db9dd12..9febc54c7 100644 --- a/mavros_extras/src/plugins/mount_control.cpp +++ b/mavros_extras/src/plugins/mount_control.cpp @@ -182,7 +182,8 @@ class MountStatusDiag : public diagnostic_updater::DiagnosticTask * @brief Mount Control plugin * @plugin mount_control * - * Publishes Mission commands to control the camera or antenna mount. + * Publishes Mission commands to control the camera or antenna mount. Implements the + * superseded [MAVLink Gimbal Protocol v1](https://mavlink.io/en/services/gimbal.html). * @see command_cb() */ class MountControlPlugin : public plugin::Plugin diff --git a/mavros_extras/src/plugins/open_drone_id.cpp b/mavros_extras/src/plugins/open_drone_id.cpp index 65665b4b2..2ed5871f1 100644 --- a/mavros_extras/src/plugins/open_drone_id.cpp +++ b/mavros_extras/src/plugins/open_drone_id.cpp @@ -36,7 +36,8 @@ using namespace std::placeholders; // NOLINT * @brief Open Drone ID plugin * @plugin open_drone_id * - * Sends Open Drone ID data to the FCU + * Sends Open Drone ID data to the FCU. Implements the + * [MAVLink Open Drone ID Protocol](https://mavlink.io/en/services/opendroneid.html). */ class OpenDroneIDPlugin : public plugin::Plugin { diff --git a/mavros_extras/src/plugins/tunnel.cpp b/mavros_extras/src/plugins/tunnel.cpp index f6382c9ae..de2ceb28a 100644 --- a/mavros_extras/src/plugins/tunnel.cpp +++ b/mavros_extras/src/plugins/tunnel.cpp @@ -33,6 +33,9 @@ using namespace std::placeholders; // NOLINT /** * @brief Tunnel plugin * @plugin tunnel + * + * Implements the + * [MAVLink Tunnel Protocol](https://mavlink.io/en/services/tunnel.html). */ class TunnelPlugin : public plugin::Plugin { From 52036e46d092317daaa6a279ca5074121634cef6 Mon Sep 17 00:00:00 2001 From: Vladimir Ermakov Date: Fri, 7 Aug 2026 14:16:46 +0200 Subject: [PATCH 05/12] docs: regenerate plugin docs Regenerated plugin index.json and markdown docs from the updated source comments (mavlink subprotocol references). Signed-off-by: Vladimir Ermakov --- docs/plugins/extras/adsb.md | 2 +- docs/plugins/extras/camera.md | 2 +- docs/plugins/extras/gimbal_control.md | 2 +- docs/plugins/extras/index.json | 126 ++++---- docs/plugins/extras/landing_target.md | 2 +- docs/plugins/extras/mount_control.md | 2 +- docs/plugins/extras/open_drone_id.md | 2 +- docs/plugins/extras/tunnel.md | 2 + docs/plugins/std/command.md | 2 +- docs/plugins/std/ftp.md | 2 + docs/plugins/std/geofence.md | 2 + docs/plugins/std/index.json | 391 +++++++++++++----------- docs/plugins/std/manual_control.md | 2 + docs/plugins/std/param.md | 6 +- docs/plugins/std/rallypoint.md | 2 + docs/plugins/std/setpoint_accel.md | 2 +- docs/plugins/std/setpoint_attitude.md | 2 +- docs/plugins/std/setpoint_position.md | 2 +- docs/plugins/std/setpoint_raw.md | 2 +- docs/plugins/std/setpoint_trajectory.md | 2 +- docs/plugins/std/setpoint_velocity.md | 2 +- docs/plugins/std/sys_status.md | 2 +- docs/plugins/std/sys_time.md | 2 + docs/plugins/std/waypoint.md | 2 + 24 files changed, 301 insertions(+), 264 deletions(-) diff --git a/docs/plugins/extras/adsb.md b/docs/plugins/extras/adsb.md index ff9f3cd9a..aa20f7114 100644 --- a/docs/plugins/extras/adsb.md +++ b/docs/plugins/extras/adsb.md @@ -6,7 +6,7 @@ - Brief: ADS-B Vehicle plugin -Publish/subscribe Automatic dependent surveillance-broadcast data to/from a vehicle. +Publish/subscribe Automatic dependent surveillance-broadcast data to/from a vehicle. Implements the [MAVLink Traffic Management (UTM/ADS-B)](https://mavlink.io/en/services/traffic_management.html). ## Publishers - `~/vehicle` ([mavros_msgs::msg::ADSBVehicle](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/ADSBVehicle.html)) diff --git a/docs/plugins/extras/camera.md b/docs/plugins/extras/camera.md index b0521963c..57d00e866 100644 --- a/docs/plugins/extras/camera.md +++ b/docs/plugins/extras/camera.md @@ -6,7 +6,7 @@ - Brief: Camera plugin plugin -Plugin for interfacing on the mavlink camera protocol @see command_cb() +Plugin for interfacing on the mavlink camera protocol. Implements the [MAVLink Camera Protocol v2](https://mavlink.io/en/services/camera.html). @see command_cb() ## Publishers - `~/image_captured` ([mavros_msgs::msg::CameraImageCaptured](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/CameraImageCaptured.html)) diff --git a/docs/plugins/extras/gimbal_control.md b/docs/plugins/extras/gimbal_control.md index e0520f401..fe7feb750 100644 --- a/docs/plugins/extras/gimbal_control.md +++ b/docs/plugins/extras/gimbal_control.md @@ -6,7 +6,7 @@ - Brief: Gimbal Control Plugin -Adds support for Mavlink Gimbal Protocol v2. Also publishes gimbal pose to TF when parameter tf_send==true +Implements the [MAVLink Gimbal Protocol v2](https://mavlink.io/en/services/gimbal_v2.html). Also publishes gimbal pose to TF when parameter tf_send==true ## Publishers - `~/device/attitude_status` ([mavros_msgs::msg::GimbalDeviceAttitudeStatus](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GimbalDeviceAttitudeStatus.html)) diff --git a/docs/plugins/extras/index.json b/docs/plugins/extras/index.json index ea6aef020..c6643fc69 100644 --- a/docs/plugins/extras/index.json +++ b/docs/plugins/extras/index.json @@ -5,19 +5,19 @@ "class_name": "mavros::extra_plugins::ADSBPlugin", "namespace": "adsb", "brief": "ADS-B Vehicle plugin", - "description": "Publish/subscribe Automatic dependent surveillance-broadcast data to/from a vehicle.", + "description": "Publish/subscribe Automatic dependent surveillance-broadcast data to/from a vehicle. Implements the [MAVLink Traffic Management (UTM/ADS-B)](https://mavlink.io/en/services/traffic_management.html).", "publishers": [ { "name": "~/vehicle", "type_name": "mavros_msgs::msg::ADSBVehicle", - "line": 46 + "line": 47 } ], "subscribers": [ { "name": "~/send", "type_name": "mavros_msgs::msg::ADSBVehicle", - "line": 48 + "line": 49 } ], "services": [], @@ -30,7 +30,7 @@ "message_name": "ADSB_VEHICLE", "msg_id_expr": "mavlink::common::msg::ADSB_VEHICLE::MSG_ID", "dialect": "common", - "line": 56, + "line": 57, "msg_id": 246 } ], @@ -41,7 +41,7 @@ "message_name": "ADSB_VEHICLE", "msg_id_expr": "mavlink::common::msg::ADSB_VEHICLE::MSG_ID", "dialect": "common", - "line": 164, + "line": 165, "msg_id": 246 } ] @@ -83,12 +83,12 @@ "class_name": "mavros::extra_plugins::CameraPlugin", "namespace": "camera", "brief": "Camera plugin plugin", - "description": "Plugin for interfacing on the mavlink camera protocol @see command_cb()", + "description": "Plugin for interfacing on the mavlink camera protocol. Implements the [MAVLink Camera Protocol v2](https://mavlink.io/en/services/camera.html). @see command_cb()", "publishers": [ { "name": "~/image_captured", "type_name": "mavros_msgs::msg::CameraImageCaptured", - "line": 47 + "line": 48 } ], "subscribers": [], @@ -102,7 +102,7 @@ "message_name": "CAMERA_IMAGE_CAPTURED", "msg_id_expr": "mavlink::common::msg::CAMERA_IMAGE_CAPTURED::MSG_ID", "dialect": "common", - "line": 54, + "line": 55, "msg_id": 263 } ], @@ -631,7 +631,7 @@ "class_name": "mavros::extra_plugins::GimbalControlPlugin", "namespace": "gimbal_control", "brief": "Gimbal Control Plugin", - "description": "Adds support for Mavlink Gimbal Protocol v2. Also publishes gimbal pose to TF when parameter tf_send==true", + "description": "Implements the [MAVLink Gimbal Protocol v2](https://mavlink.io/en/services/gimbal_v2.html). Also publishes gimbal pose to TF when parameter tf_send==true", "publishers": [ { "name": "~/device/attitude_status", @@ -1151,29 +1151,29 @@ "class_name": "mavros::extra_plugins::LandingTargetPlugin", "namespace": "landing_target", "brief": "Landing Target plugin", - "description": "This plugin is intended to publish the location of a landing area captured from a downward facing camera to the FCU and/or receive landing target tracking data coming from the FCU.", + "description": "This plugin is intended to publish the location of a landing area captured from a downward facing camera to the FCU and/or receive landing target tracking data coming from the FCU. Implements the [MAVLink Landing Target Protocol](https://mavlink.io/en/services/landing_target.html).", "publishers": [ { "name": "~/pose_in", "type_name": "geometry_msgs::msg::PoseStamped", - "line": 184 + "line": 185 }, { "name": "~/lt_marker", "type_name": "geometry_msgs::msg::Vector3Stamped", - "line": 185 + "line": 186 } ], "subscribers": [ { "name": "~/raw", "type_name": "mavros_msgs::msg::LandingTarget", - "line": 83 + "line": 84 }, { "name": "~/pose", "type_name": "geometry_msgs::msg::PoseStamped", - "line": 189 + "line": 190 } ], "services": [], @@ -1182,103 +1182,103 @@ { "name": "frame_id", "type_name": "", - "line": 71, + "line": 72, "default_value": "\"landing_target_1\"", "description": "general params" }, { "name": "listen_lt", "type_name": "bool", - "line": 76, + "line": 77, "default_value": "false" }, { "name": "mav_frame", "type_name": "", - "line": 90, + "line": 91, "default_value": "\"LOCAL_NED\"" }, { "name": "land_target_type", "type_name": "", - "line": 97, + "line": 98, "default_value": "\"VISION_FIDUCIAL\"" }, { "name": "target_size.x", "type_name": "double", - "line": 105, + "line": 106, "default_value": "1.0", "description": "target size" }, { "name": "target_size.y", "type_name": "double", - "line": 110, + "line": 111, "default_value": "1.0" }, { "name": "image.width", "type_name": "integer", - "line": 116, + "line": 117, "default_value": "640", "description": "image size" }, { "name": "image.height", "type_name": "integer", - "line": 121, + "line": 122, "default_value": "480" }, { "name": "camera.fov_x", "type_name": "double", - "line": 127, + "line": 128, "default_value": "2.0071286398", "description": "camera field-of-view -> should be precised using the calibrated camera intrinsics" }, { "name": "camera.fov_y", "type_name": "double", - "line": 132, + "line": 133, "default_value": "2.0071286398" }, { "name": "camera.focal_length", "type_name": "double", - "line": 138, + "line": 139, "default_value": "2.8", "description": "camera focal length" }, { "name": "tf.rate_limit", "type_name": "double", - "line": 144, + "line": 145, "default_value": "50.0", "description": "tf subsection" }, { "name": "tf.send", "type_name": "bool", - "line": 151, + "line": 152, "default_value": "true" }, { "name": "tf.frame_id", "type_name": "", - "line": 156, + "line": 157, "default_value": "frame_id" }, { "name": "tf.child_frame_id", "type_name": "", - "line": 161, + "line": 162, "default_value": "\"camera_center\"" }, { "name": "tf.listen", "type_name": "bool", - "line": 166, + "line": 167, "default_value": "false" } ], @@ -1289,7 +1289,7 @@ "message_name": "LANDING_TARGET", "msg_id_expr": "mavlink::common::msg::LANDING_TARGET::MSG_ID", "dialect": "common", - "line": 197, + "line": 198, "msg_id": 149 } ], @@ -1300,7 +1300,7 @@ "message_name": "LANDING_TARGET", "msg_id_expr": "mavlink::common::msg::LANDING_TARGET::MSG_ID", "dialect": "common", - "line": 260, + "line": 261, "msg_id": 149 } ] @@ -1496,75 +1496,75 @@ "class_name": "mavros::extra_plugins::MountControlPlugin", "namespace": "mount_control", "brief": "Mount Control plugin", - "description": "Publishes Mission commands to control the camera or antenna mount. @see command_cb()", + "description": "Publishes Mission commands to control the camera or antenna mount. Implements the superseded [MAVLink Gimbal Protocol v1](https://mavlink.io/en/services/gimbal.html). @see command_cb()", "publishers": [ { "name": "~/orientation", "type_name": "geometry_msgs::msg::Quaternion", - "line": 236 + "line": 237 }, { "name": "~/status", "type_name": "geometry_msgs::msg::Vector3Stamped", - "line": 239 + "line": 240 } ], "subscribers": [ { "name": "~/command", "type_name": "mavros_msgs::msg::MountControl", - "line": 231 + "line": 232 } ], "services": [ { "name": "~/configure", "type_name": "mavros_msgs::srv::MountConfigure", - "line": 241 + "line": 242 } ], "clients": [ { "name": "cmd/command", "type_name": "mavros_msgs::srv::CommandLong", - "line": 366 + "line": 367 } ], "parameters": [ { "name": "negate_measured_roll", "type_name": "bool", - "line": 197, + "line": 198, "default_value": "false" }, { "name": "negate_measured_pitch", "type_name": "bool", - "line": 201, + "line": 202, "default_value": "false" }, { "name": "negate_measured_yaw", "type_name": "bool", - "line": 205, + "line": 206, "default_value": "false" }, { "name": "debounce_s", "type_name": "double", - "line": 210, + "line": 211, "default_value": "4.0" }, { "name": "err_threshold_deg", "type_name": "double", - "line": 215, + "line": 216, "default_value": "10.0" }, { "name": "disable_diag", "type_name": "bool", - "line": 220, + "line": 221, "default_value": "false" } ], @@ -1575,7 +1575,7 @@ "message_name": "MOUNT_ORIENTATION", "msg_id_expr": "mavlink::common::msg::MOUNT_ORIENTATION::MSG_ID", "dialect": "common", - "line": 251, + "line": 252, "msg_id": 265 }, { @@ -1584,7 +1584,7 @@ "message_name": "MOUNT_STATUS", "msg_id_expr": "mavlink::ardupilotmega::msg::MOUNT_STATUS::MSG_ID", "dialect": "ardupilotmega", - "line": 252, + "line": 253, "msg_id": 158 } ], @@ -1595,7 +1595,7 @@ "message_name": "COMMAND_LONG", "msg_id_expr": "mavlink::common::msg::COMMAND_LONG::MSG_ID", "dialect": "common", - "line": 354, + "line": 355, "msg_id": 76 } ] @@ -1783,33 +1783,33 @@ "class_name": "mavros::extra_plugins::OpenDroneIDPlugin", "namespace": "open_drone_id", "brief": "Open Drone ID plugin", - "description": "Sends Open Drone ID data to the FCU", + "description": "Sends Open Drone ID data to the FCU. Implements the [MAVLink Open Drone ID Protocol](https://mavlink.io/en/services/opendroneid.html).", "publishers": [], "subscribers": [ { "name": "~/basic_id", "type_name": "mavros_msgs::msg::OpenDroneIDBasicID", - "line": 47 + "line": 48 }, { "name": "~/operator_id", "type_name": "mavros_msgs::msg::OpenDroneIDOperatorID", - "line": 52 + "line": 53 }, { "name": "~/self_id", "type_name": "mavros_msgs::msg::OpenDroneIDSelfID", - "line": 57 + "line": 58 }, { "name": "~/system", "type_name": "mavros_msgs::msg::OpenDroneIDSystem", - "line": 62 + "line": 63 }, { "name": "~/system_update", "type_name": "mavros_msgs::msg::OpenDroneIDSystemUpdate", - "line": 67 + "line": 68 } ], "services": [], @@ -1823,7 +1823,7 @@ "message_name": "OPEN_DRONE_ID_BASIC_ID", "msg_id_expr": "mavlink::common::msg::OPEN_DRONE_ID_BASIC_ID::MSG_ID", "dialect": "common", - "line": 96, + "line": 97, "msg_id": 12900 }, { @@ -1832,7 +1832,7 @@ "message_name": "OPEN_DRONE_ID_OPERATOR_ID", "msg_id_expr": "mavlink::common::msg::OPEN_DRONE_ID_OPERATOR_ID::MSG_ID", "dialect": "common", - "line": 108, + "line": 109, "msg_id": 12905 }, { @@ -1841,7 +1841,7 @@ "message_name": "OPEN_DRONE_ID_SELF_ID", "msg_id_expr": "mavlink::common::msg::OPEN_DRONE_ID_SELF_ID::MSG_ID", "dialect": "common", - "line": 120, + "line": 121, "msg_id": 12903 }, { @@ -1850,7 +1850,7 @@ "message_name": "OPEN_DRONE_ID_SYSTEM", "msg_id_expr": "mavlink::common::msg::OPEN_DRONE_ID_SYSTEM::MSG_ID", "dialect": "common", - "line": 142, + "line": 143, "msg_id": 12904 }, { @@ -1859,7 +1859,7 @@ "message_name": "OPEN_DRONE_ID_SYSTEM_UPDATE", "msg_id_expr": "mavlink::common::msg::OPEN_DRONE_ID_SYSTEM_UPDATE::MSG_ID", "dialect": "common", - "line": 155, + "line": 156, "msg_id": 12919 } ] @@ -2355,19 +2355,19 @@ "class_name": "mavros::extra_plugins::TunnelPlugin", "namespace": "tunnel", "brief": "Tunnel plugin", - "description": "", + "description": "Implements the [MAVLink Tunnel Protocol](https://mavlink.io/en/services/tunnel.html).", "publishers": [ { "name": "~/out", "type_name": "mavros_msgs::msg::Tunnel", - "line": 47 + "line": 50 } ], "subscribers": [ { "name": "~/in", "type_name": "mavros_msgs::msg::Tunnel", - "line": 44 + "line": 47 } ], "services": [], @@ -2380,7 +2380,7 @@ "message_name": "TUNNEL", "msg_id_expr": "mavlink::common::msg::TUNNEL::MSG_ID", "dialect": "common", - "line": 53, + "line": 56, "msg_id": 385 } ], @@ -2391,7 +2391,7 @@ "message_name": "TUNNEL", "msg_id_expr": "mavlink::common::msg::TUNNEL::MSG_ID", "dialect": "common", - "line": 68, + "line": 71, "msg_id": 385 } ] diff --git a/docs/plugins/extras/landing_target.md b/docs/plugins/extras/landing_target.md index 14a9d482d..f2128a63d 100644 --- a/docs/plugins/extras/landing_target.md +++ b/docs/plugins/extras/landing_target.md @@ -6,7 +6,7 @@ - Brief: Landing Target plugin -This plugin is intended to publish the location of a landing area captured from a downward facing camera to the FCU and/or receive landing target tracking data coming from the FCU. +This plugin is intended to publish the location of a landing area captured from a downward facing camera to the FCU and/or receive landing target tracking data coming from the FCU. Implements the [MAVLink Landing Target Protocol](https://mavlink.io/en/services/landing_target.html). ## Publishers - `~/pose_in` ([geometry_msgs::msg::PoseStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseStamped.html)) diff --git a/docs/plugins/extras/mount_control.md b/docs/plugins/extras/mount_control.md index 17ac4d774..d0ec30098 100644 --- a/docs/plugins/extras/mount_control.md +++ b/docs/plugins/extras/mount_control.md @@ -6,7 +6,7 @@ - Brief: Mount Control plugin -Publishes Mission commands to control the camera or antenna mount. @see command_cb() +Publishes Mission commands to control the camera or antenna mount. Implements the superseded [MAVLink Gimbal Protocol v1](https://mavlink.io/en/services/gimbal.html). @see command_cb() ## Publishers - `~/orientation` ([geometry_msgs::msg::Quaternion](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/Quaternion.html)) diff --git a/docs/plugins/extras/open_drone_id.md b/docs/plugins/extras/open_drone_id.md index 534bb52cb..d4b81e32a 100644 --- a/docs/plugins/extras/open_drone_id.md +++ b/docs/plugins/extras/open_drone_id.md @@ -6,7 +6,7 @@ - Brief: Open Drone ID plugin -Sends Open Drone ID data to the FCU +Sends Open Drone ID data to the FCU. Implements the [MAVLink Open Drone ID Protocol](https://mavlink.io/en/services/opendroneid.html). ## Publishers - None diff --git a/docs/plugins/extras/tunnel.md b/docs/plugins/extras/tunnel.md index b1a633d8a..a3daebb6e 100644 --- a/docs/plugins/extras/tunnel.md +++ b/docs/plugins/extras/tunnel.md @@ -6,6 +6,8 @@ - Brief: Tunnel plugin +Implements the [MAVLink Tunnel Protocol](https://mavlink.io/en/services/tunnel.html). + ## Publishers - `~/out` ([mavros_msgs::msg::Tunnel](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/Tunnel.html)) diff --git a/docs/plugins/std/command.md b/docs/plugins/std/command.md index 139706793..3bd0ac82b 100644 --- a/docs/plugins/std/command.md +++ b/docs/plugins/std/command.md @@ -6,7 +6,7 @@ - Brief: Command plugin. -Send any command via COMMAND_LONG +Send any command via COMMAND_LONG. Implements the [MAVLink Command Protocol](https://mavlink.io/en/services/command.html). ## Publishers - None diff --git a/docs/plugins/std/ftp.md b/docs/plugins/std/ftp.md index c1a630a75..598aae3fa 100644 --- a/docs/plugins/std/ftp.md +++ b/docs/plugins/std/ftp.md @@ -6,6 +6,8 @@ - Brief: FTP plugin. +Implements the [MAVLink File Transfer Protocol](https://mavlink.io/en/services/ftp.html). + ## Publishers - None diff --git a/docs/plugins/std/geofence.md b/docs/plugins/std/geofence.md index c63392f01..cc8d390d7 100644 --- a/docs/plugins/std/geofence.md +++ b/docs/plugins/std/geofence.md @@ -6,6 +6,8 @@ - Brief: Geofence manipulation plugin +Implements the geofence part of the [MAVLink Mission Protocol](https://mavlink.io/en/services/mission.html). + ## Publishers - `~/fences` ([mavros_msgs::msg::WaypointList](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/WaypointList.html)) diff --git a/docs/plugins/std/index.json b/docs/plugins/std/index.json index 49fe087ea..98273d665 100644 --- a/docs/plugins/std/index.json +++ b/docs/plugins/std/index.json @@ -91,64 +91,64 @@ "class_name": "mavros::std_plugins::CommandPlugin", "namespace": "cmd", "brief": "Command plugin.", - "description": "Send any command via COMMAND_LONG", + "description": "Send any command via COMMAND_LONG. Implements the [MAVLink Command Protocol](https://mavlink.io/en/services/command.html).", "publishers": [], "subscribers": [], "services": [ { "name": "~/command", "type_name": "mavros_msgs::srv::CommandLong", - "line": 96 + "line": 97 }, { "name": "~/command_int", "type_name": "mavros_msgs::srv::CommandInt", - "line": 102 + "line": 103 }, { "name": "~/arming", "type_name": "mavros_msgs::srv::CommandBool", - "line": 108 + "line": 109 }, { "name": "~/set_home", "type_name": "mavros_msgs::srv::CommandHome", - "line": 114 + "line": 115 }, { "name": "~/takeoff", "type_name": "mavros_msgs::srv::CommandTOL", - "line": 120 + "line": 121 }, { "name": "~/takeoff_local", "type_name": "mavros_msgs::srv::CommandTOLLocal", - "line": 126 + "line": 127 }, { "name": "~/land", "type_name": "mavros_msgs::srv::CommandTOL", - "line": 132 + "line": 133 }, { "name": "~/land_local", "type_name": "mavros_msgs::srv::CommandTOLLocal", - "line": 137 + "line": 138 }, { "name": "~/trigger_control", "type_name": "mavros_msgs::srv::CommandTriggerControl", - "line": 141 + "line": 142 }, { "name": "~/trigger_interval", "type_name": "mavros_msgs::srv::CommandTriggerInterval", - "line": 145 + "line": 146 }, { "name": "~/vtol_transition", "type_name": "mavros_msgs::srv::CommandVtolTransition", - "line": 149 + "line": 150 } ], "clients": [], @@ -156,13 +156,13 @@ { "name": "command_ack_timeout", "type_name": "double", - "line": 77, + "line": 78, "default_value": "command_ack_timeout_dt.seconds()" }, { "name": "use_comp_id_system_control", "type_name": "bool", - "line": 82, + "line": 83, "default_value": "false" } ], @@ -173,7 +173,7 @@ "message_name": "COMMAND_ACK", "msg_id_expr": "mavlink::common::msg::COMMAND_ACK::MSG_ID", "dialect": "common", - "line": 158, + "line": 159, "msg_id": 77 } ], @@ -184,7 +184,7 @@ "message_name": "COMMAND_LONG", "msg_id_expr": "mavlink::common::msg::COMMAND_LONG::MSG_ID", "dialect": "common", - "line": 356, + "line": 357, "msg_id": 76 }, { @@ -193,7 +193,7 @@ "message_name": "COMMAND_INT", "msg_id_expr": "mavlink::common::msg::COMMAND_INT::MSG_ID", "dialect": "common", - "line": 383, + "line": 384, "msg_id": 75 } ] @@ -258,69 +258,69 @@ "class_name": "mavros::std_plugins::FTPPlugin", "namespace": "ftp", "brief": "FTP plugin.", - "description": "", + "description": "Implements the [MAVLink File Transfer Protocol](https://mavlink.io/en/services/ftp.html).", "publishers": [], "subscribers": [], "services": [ { "name": "~/list", "type_name": "mavros_msgs::srv::FileList", - "line": 273 + "line": 276 }, { "name": "~/open", "type_name": "mavros_msgs::srv::FileOpen", - "line": 277 + "line": 280 }, { "name": "~/close", "type_name": "mavros_msgs::srv::FileClose", - "line": 281 + "line": 284 }, { "name": "~/read", "type_name": "mavros_msgs::srv::FileRead", - "line": 285 + "line": 288 }, { "name": "~/write", "type_name": "mavros_msgs::srv::FileWrite", - "line": 289 + "line": 292 }, { "name": "~/mkdir", "type_name": "mavros_msgs::srv::FileMakeDir", - "line": 293 + "line": 296 }, { "name": "~/rmdir", "type_name": "mavros_msgs::srv::FileRemoveDir", - "line": 297 + "line": 300 }, { "name": "~/remove", "type_name": "mavros_msgs::srv::FileRemove", - "line": 301 + "line": 304 }, { "name": "~/truncate", "type_name": "mavros_msgs::srv::FileTruncate", - "line": 305 + "line": 308 }, { "name": "~/reset", "type_name": "std_srvs::srv::Empty", - "line": 309 + "line": 312 }, { "name": "~/rename", "type_name": "mavros_msgs::srv::FileRename", - "line": 313 + "line": 316 }, { "name": "~/checksum", "type_name": "mavros_msgs::srv::FileChecksum", - "line": 317 + "line": 320 } ], "clients": [], @@ -332,7 +332,7 @@ "message_name": "FILE_TRANSFER_PROTOCOL", "msg_id_expr": "mavlink::common::msg::FILE_TRANSFER_PROTOCOL::MSG_ID", "dialect": "common", - "line": 325, + "line": 328, "msg_id": 110 } ], @@ -354,12 +354,12 @@ "class_name": "mavros::std_plugins::GeofencePlugin", "namespace": "geofence", "brief": "Geofence manipulation plugin", - "description": "", + "description": "Implements the geofence part of the [MAVLink Mission Protocol](https://mavlink.io/en/services/mission.html).", "publishers": [ { "name": "~/fences", "type_name": "mavros_msgs::msg::WaypointList", - "line": 52 + "line": 55 } ], "subscribers": [], @@ -367,17 +367,17 @@ { "name": "~/pull", "type_name": "mavros_msgs::srv::WaypointPull", - "line": 61 + "line": 64 }, { "name": "~/push", "type_name": "mavros_msgs::srv::WaypointPush", - "line": 66 + "line": 69 }, { "name": "~/clear", "type_name": "mavros_msgs::srv::WaypointClear", - "line": 71 + "line": 74 } ], "clients": [], @@ -385,14 +385,14 @@ { "name": "pull_after_gcs", "type_name": "bool", - "line": 40, + "line": 43, "default_value": "true", "description": "NOTE(vooon): I'm not quite sure that this option would work with mavros router" }, { "name": "use_mission_item_int", "type_name": "bool", - "line": 45, + "line": 48, "default_value": "true" } ], @@ -403,7 +403,7 @@ "message_name": "MISSION_ITEM", "msg_id_expr": "mavlink::common::msg::MISSION_ITEM::MSG_ID", "dialect": "common", - "line": 308, + "line": 341, "msg_id": 39 }, { @@ -412,7 +412,7 @@ "message_name": "MISSION_ITEM_INT", "msg_id_expr": "mavlink::common::msg::MISSION_ITEM_INT::MSG_ID", "dialect": "common", - "line": 309, + "line": 342, "msg_id": 73 }, { @@ -421,7 +421,7 @@ "message_name": "MISSION_REQUEST", "msg_id_expr": "mavlink::common::msg::MISSION_REQUEST::MSG_ID", "dialect": "common", - "line": 310, + "line": 343, "msg_id": 40 }, { @@ -430,7 +430,7 @@ "message_name": "MISSION_REQUEST_INT", "msg_id_expr": "mavlink::common::msg::MISSION_REQUEST_INT::MSG_ID", "dialect": "common", - "line": 311, + "line": 344, "msg_id": 51 }, { @@ -439,7 +439,7 @@ "message_name": "MISSION_COUNT", "msg_id_expr": "mavlink::common::msg::MISSION_COUNT::MSG_ID", "dialect": "common", - "line": 312, + "line": 345, "msg_id": 44 }, { @@ -448,7 +448,7 @@ "message_name": "MISSION_ACK", "msg_id_expr": "mavlink::common::msg::MISSION_ACK::MSG_ID", "dialect": "common", - "line": 313, + "line": 346, "msg_id": 47 } ], @@ -1029,19 +1029,19 @@ "class_name": "mavros::std_plugins::ManualControlPlugin", "namespace": "manual_control", "brief": "Manual Control plugin", - "description": "", + "description": "Implements the [MAVLink Manual Control (Joystick) Protocol](https://mavlink.io/en/services/manual_control.html).", "publishers": [ { "name": "~/control", "type_name": "mavros_msgs::msg::ManualControl", - "line": 41 + "line": 44 } ], "subscribers": [ { "name": "~/send", "type_name": "mavros_msgs::msg::ManualControl", - "line": 43 + "line": 46 } ], "services": [], @@ -1054,7 +1054,7 @@ "message_name": "MANUAL_CONTROL", "msg_id_expr": "mavlink::common::msg::MANUAL_CONTROL::MSG_ID", "dialect": "common", - "line": 51, + "line": 54, "msg_id": 69 } ], @@ -1065,7 +1065,7 @@ "message_name": "MANUAL_CONTROL", "msg_id_expr": "mavlink::common::msg::MANUAL_CONTROL::MSG_ID", "dialect": "common", - "line": 112, + "line": 115, "msg_id": 69 } ] @@ -1107,17 +1107,17 @@ "class_name": "mavros::std_plugins::ParamPlugin", "namespace": "param", "brief": "Parameter manipulation plugin", - "description": "", + "description": "Implements the [MAVLink Parameter Protocol](https://mavlink.io/en/services/parameter.html).", "publishers": [ { "name": "~/event", "type_name": "mavros_msgs::msg::ParamEvent", - "line": 441 + "line": 444 }, { "name": "/parameter_events", "type_name": "rcl_interfaces::msg::ParameterEvent", - "line": 442 + "line": 445 } ], "subscribers": [], @@ -1125,47 +1125,66 @@ { "name": "~/pull", "type_name": "mavros_msgs::srv::ParamPull", - "line": 450 + "line": 453 }, { "name": "~/set", "type_name": "mavros_msgs::srv::ParamSetV2", - "line": 454 + "line": 457 }, { "name": "~/get_parameters", "type_name": "rcl_interfaces::srv::GetParameters", - "line": 459, + "line": 462, "description": "Standard parameter services" }, { "name": "~/get_parameter_types", "type_name": "rcl_interfaces::srv::GetParameterTypes", - "line": 462 + "line": 465 }, { "name": "~/set_parameters", "type_name": "rcl_interfaces::srv::SetParameters", - "line": 465 + "line": 468 }, { "name": "~/set_parameters_atomically", "type_name": "rcl_interfaces::srv::SetParametersAtomically", - "line": 469 + "line": 472 }, { "name": "~/describe_parameters", "type_name": "rcl_interfaces::srv::DescribeParameters", - "line": 472 + "line": 475 }, { "name": "~/list_parameters", "type_name": "rcl_interfaces::srv::ListParameters", - "line": 475 + "line": 478 } ], "clients": [], - "parameters": [], + "parameters": [ + { + "name": "param_set_timeout", + "type_name": "double", + "line": 484, + "default_value": "param_set_timeout.seconds()" + }, + { + "name": "param_list_timeout", + "type_name": "double", + "line": 495, + "default_value": "param_list_timeout.seconds()" + }, + { + "name": "param_retries", + "type_name": "", + "line": 499, + "default_value": "param_retries_count" + } + ], "mavlink_subscriptions": [ { "handler": "handle_param_value", @@ -1173,7 +1192,7 @@ "message_name": "PARAM_VALUE", "msg_id_expr": "mavlink::common::msg::PARAM_VALUE::MSG_ID", "dialect": "common", - "line": 493, + "line": 520, "msg_id": 22 } ], @@ -1184,7 +1203,7 @@ "message_name": "PARAM_REQUEST_LIST", "msg_id_expr": "mavlink::common::msg::PARAM_REQUEST_LIST::MSG_ID", "dialect": "common", - "line": 693, + "line": 720, "msg_id": 21 }, { @@ -1193,7 +1212,7 @@ "message_name": "PARAM_REQUEST_READ", "msg_id_expr": "mavlink::common::msg::PARAM_REQUEST_READ::MSG_ID", "dialect": "common", - "line": 710, + "line": 737, "msg_id": 20 }, { @@ -1202,7 +1221,7 @@ "message_name": "PARAM_SET", "msg_id_expr": "mavlink::common::msg::PARAM_SET::MSG_ID", "dialect": "common", - "line": 728, + "line": 755, "msg_id": 23 } ] @@ -1213,12 +1232,12 @@ "class_name": "mavros::std_plugins::RallypointPlugin", "namespace": "rallypoint", "brief": "Rallypoint manipulation plugin", - "description": "", + "description": "Implements the rally point part of the [MAVLink Mission Protocol](https://mavlink.io/en/services/mission.html).", "publishers": [ { "name": "~/rallypoints", "type_name": "mavros_msgs::msg::WaypointList", - "line": 51 + "line": 54 } ], "subscribers": [], @@ -1226,17 +1245,17 @@ { "name": "~/pull", "type_name": "mavros_msgs::srv::WaypointPull", - "line": 60 + "line": 63 }, { "name": "~/push", "type_name": "mavros_msgs::srv::WaypointPush", - "line": 65 + "line": 68 }, { "name": "~/clear", "type_name": "mavros_msgs::srv::WaypointClear", - "line": 70 + "line": 73 } ], "clients": [], @@ -1244,14 +1263,14 @@ { "name": "pull_after_gcs", "type_name": "bool", - "line": 39, + "line": 42, "default_value": "true", "description": "NOTE(vooon): I'm not quite sure that this option would work with mavros router" }, { "name": "use_mission_item_int", "type_name": "bool", - "line": 44, + "line": 47, "default_value": "true" } ], @@ -1262,7 +1281,7 @@ "message_name": "MISSION_ITEM", "msg_id_expr": "mavlink::common::msg::MISSION_ITEM::MSG_ID", "dialect": "common", - "line": 308, + "line": 341, "msg_id": 39 }, { @@ -1271,7 +1290,7 @@ "message_name": "MISSION_ITEM_INT", "msg_id_expr": "mavlink::common::msg::MISSION_ITEM_INT::MSG_ID", "dialect": "common", - "line": 309, + "line": 342, "msg_id": 73 }, { @@ -1280,7 +1299,7 @@ "message_name": "MISSION_REQUEST", "msg_id_expr": "mavlink::common::msg::MISSION_REQUEST::MSG_ID", "dialect": "common", - "line": 310, + "line": 343, "msg_id": 40 }, { @@ -1289,7 +1308,7 @@ "message_name": "MISSION_REQUEST_INT", "msg_id_expr": "mavlink::common::msg::MISSION_REQUEST_INT::MSG_ID", "dialect": "common", - "line": 311, + "line": 344, "msg_id": 51 }, { @@ -1298,7 +1317,7 @@ "message_name": "MISSION_COUNT", "msg_id_expr": "mavlink::common::msg::MISSION_COUNT::MSG_ID", "dialect": "common", - "line": 312, + "line": 345, "msg_id": 44 }, { @@ -1307,7 +1326,7 @@ "message_name": "MISSION_ACK", "msg_id_expr": "mavlink::common::msg::MISSION_ACK::MSG_ID", "dialect": "common", - "line": 313, + "line": 346, "msg_id": 47 } ], @@ -1481,13 +1500,13 @@ "class_name": "mavros::std_plugins::SetpointAccelerationPlugin", "namespace": "setpoint_accel", "brief": "Setpoint acceleration/force plugin", - "description": "Send setpoint accelerations/forces to FCU controller.", + "description": "Send setpoint accelerations/forces to FCU controller. Uses the [MAVLink Offboard Control Protocol](https://mavlink.io/en/services/offboard_control.html).", "publishers": [], "subscribers": [ { "name": "~/accel", "type_name": "geometry_msgs::msg::Vector3Stamped", - "line": 51 + "line": 52 } ], "services": [], @@ -1496,7 +1515,7 @@ { "name": "send_force", "type_name": "bool", - "line": 47, + "line": 48, "default_value": "false" } ], @@ -1519,24 +1538,24 @@ "class_name": "mavros::std_plugins::SetpointAttitudePlugin", "namespace": "setpoint_attitude", "brief": "Setpoint attitude plugin", - "description": "Send setpoint attitude/orientation/thrust to FCU controller.", + "description": "Send setpoint attitude/orientation/thrust to FCU controller. Uses the [MAVLink Offboard Control Protocol](https://mavlink.io/en/services/offboard_control.html).", "publishers": [], "subscribers": [ { "name": "~/attitude", "type_name": "geometry_msgs::msg::PoseStamped", - "line": 96, + "line": 97, "description": "Use message_filters to sync attitude and thrust msg coming from different topics" }, { "name": "~/cmd_vel", "type_name": "geometry_msgs::msg::TwistStamped", - "line": 102 + "line": 103 }, { "name": "~/thrust", "type_name": "mavros_msgs::msg::Thrust", - "line": 111, + "line": 112, "description": "thrust msg subscriber to sync" } ], @@ -1546,13 +1565,13 @@ { "name": "reverse_thrust", "type_name": "bool", - "line": 78, + "line": 79, "default_value": "false" }, { "name": "use_quaternion", "type_name": "bool", - "line": 83, + "line": 84, "default_value": "false" } ], @@ -1575,33 +1594,33 @@ "class_name": "mavros::std_plugins::SetpointPositionPlugin", "namespace": "setpoint_position", "brief": "Setpoint position plugin", - "description": "Send setpoint positions to FCU controller.", + "description": "Send setpoint positions to FCU controller. Uses the [MAVLink Offboard Control Protocol](https://mavlink.io/en/services/offboard_control.html).", "publishers": [], "subscribers": [ { "name": "~/local", "type_name": "geometry_msgs::msg::PoseStamped", - "line": 71 + "line": 72 }, { "name": "~/global", "type_name": "geographic_msgs::msg::GeoPoseStamped", - "line": 75 + "line": 76 }, { "name": "~/global_to_local", "type_name": "geographic_msgs::msg::GeoPoseStamped", - "line": 80 + "line": 81 }, { "name": "global_position/global", "type_name": "sensor_msgs::msg::NavSatFix", - "line": 84 + "line": 85 }, { "name": "local_position/pose", "type_name": "geometry_msgs::msg::PoseStamped", - "line": 88 + "line": 89 } ], "services": [], @@ -1610,7 +1629,7 @@ { "name": "mav_frame", "type_name": "", - "line": 55, + "line": 56, "default_value": "\"LOCAL_NED\"" } ], @@ -1642,39 +1661,39 @@ "class_name": "mavros::std_plugins::SetpointRawPlugin", "namespace": "setpoint_raw", "brief": "Setpoint RAW plugin", - "description": "Send position setpoints and publish current state (return loop). User can decide what set of filed needed for operation via IGNORE bits.", + "description": "Send position setpoints and publish current state (return loop). User can decide what set of filed needed for operation via IGNORE bits. Uses the [MAVLink Offboard Control Protocol](https://mavlink.io/en/services/offboard_control.html).", "publishers": [ { "name": "~/target_local", "type_name": "mavros_msgs::msg::PositionTarget", - "line": 76 + "line": 77 }, { "name": "~/target_global", "type_name": "mavros_msgs::msg::GlobalPositionTarget", - "line": 79 + "line": 80 }, { "name": "~/target_attitude", "type_name": "mavros_msgs::msg::AttitudeTarget", - "line": 81 + "line": 82 } ], "subscribers": [ { "name": "~/local", "type_name": "mavros_msgs::msg::PositionTarget", - "line": 62 + "line": 63 }, { "name": "~/global", "type_name": "mavros_msgs::msg::GlobalPositionTarget", - "line": 66 + "line": 67 }, { "name": "~/attitude", "type_name": "mavros_msgs::msg::AttitudeTarget", - "line": 71 + "line": 72 } ], "services": [], @@ -1683,7 +1702,7 @@ { "name": "thrust_scaling", "type_name": "", - "line": 55, + "line": 56, "default_value": "NAN" } ], @@ -1694,7 +1713,7 @@ "message_name": "POSITION_TARGET_LOCAL_NED", "msg_id_expr": "mavlink::common::msg::POSITION_TARGET_LOCAL_NED::MSG_ID", "dialect": "common", - "line": 88, + "line": 89, "msg_id": 85 }, { @@ -1703,7 +1722,7 @@ "message_name": "POSITION_TARGET_GLOBAL_INT", "msg_id_expr": "mavlink::common::msg::POSITION_TARGET_GLOBAL_INT::MSG_ID", "dialect": "common", - "line": 89, + "line": 90, "msg_id": 87 }, { @@ -1712,7 +1731,7 @@ "message_name": "ATTITUDE_TARGET", "msg_id_expr": "mavlink::common::msg::ATTITUDE_TARGET::MSG_ID", "dialect": "common", - "line": 90, + "line": 91, "msg_id": 83 } ], @@ -1752,26 +1771,26 @@ "class_name": "mavros::std_plugins::SetpointTrajectoryPlugin", "namespace": "setpoint_trajectory", "brief": "Setpoint TRAJECTORY plugin", - "description": "Receive trajectory setpoints and send setpoint_raw setpoints along the trajectory.", + "description": "Receive trajectory setpoints and send setpoint_raw setpoints along the trajectory. Uses the [MAVLink Offboard Control Protocol](https://mavlink.io/en/services/offboard_control.html).", "publishers": [ { "name": "~/desired", "type_name": "nav_msgs::msg::Path", - "line": 83 + "line": 84 } ], "subscribers": [ { "name": "~/local", "type_name": "trajectory_msgs::msg::MultiDOFJointTrajectory", - "line": 78 + "line": 79 } ], "services": [ { "name": "~/reset", "type_name": "std_srvs::srv::Trigger", - "line": 86 + "line": 87 } ], "clients": [], @@ -1779,13 +1798,13 @@ { "name": "frame_id", "type_name": "", - "line": 57, + "line": 58, "default_value": "\"map\"" }, { "name": "mav_frame", "type_name": "", - "line": 62, + "line": 63, "default_value": "\"LOCAL_NED\"" } ], @@ -1808,19 +1827,19 @@ "class_name": "mavros::std_plugins::SetpointVelocityPlugin", "namespace": "setpoint_velocity", "brief": "Setpoint velocity plugin", - "description": "Send setpoint velocities to FCU controller.", + "description": "Send setpoint velocities to FCU controller. Uses the [MAVLink Offboard Control Protocol](https://mavlink.io/en/services/offboard_control.html).", "publishers": [], "subscribers": [ { "name": "~/cmd_vel", "type_name": "geometry_msgs::msg::TwistStamped", - "line": 68, + "line": 69, "description": "cmd_vel usually is the topic used for velocity control in many controllers / planners" }, { "name": "~/cmd_vel_unstamped", "type_name": "geometry_msgs::msg::Twist", - "line": 72 + "line": 73 } ], "services": [], @@ -1829,7 +1848,7 @@ { "name": "mav_frame", "type_name": "", - "line": 51, + "line": 52, "default_value": "\"LOCAL_NED\"" } ], @@ -1852,109 +1871,109 @@ "class_name": "mavros::std_plugins::SystemStatusPlugin", "namespace": "sys", "brief": "System status plugin.", - "description": "Required by all plugins.", + "description": "Required by all plugins. Implements the [MAVLink Heartbeat/Connection Protocol](https://mavlink.io/en/services/heartbeat.html).", "publishers": [ { "name": "state", "type_name": "mavros_msgs::msg::State", - "line": 573 + "line": 576 }, { "name": "extended_state", "type_name": "mavros_msgs::msg::ExtendedState", - "line": 575 + "line": 578 }, { "name": "sys_status", "type_name": "mavros_msgs::msg::SysStatus", - "line": 577 + "line": 580 }, { "name": "estimator_status", "type_name": "mavros_msgs::msg::EstimatorStatus", - "line": 579 + "line": 582 }, { "name": "battery", "type_name": "BatteryMsg", - "line": 581 + "line": 584 }, { "name": "statustext/recv", "type_name": "mavros_msgs::msg::StatusText", - "line": 583 + "line": 586 }, { "name": "status_event", "type_name": "mavros_msgs::msg::StatusEvent", - "line": 588 + "line": 591 } ], "subscribers": [ { "name": "statustext/send", "type_name": "mavros_msgs::msg::StatusText", - "line": 585 + "line": 588 } ], "services": [ { "name": "set_mode", "type_name": "mavros_msgs::srv::SetMode", - "line": 599 + "line": 602 }, { "name": "set_stream_rate", "type_name": "mavros_msgs::srv::StreamRate", - "line": 604 + "line": 607 }, { "name": "set_message_interval", "type_name": "mavros_msgs::srv::MessageInterval", - "line": 609 + "line": 612 }, { "name": "vehicle_info_get", "type_name": "mavros_msgs::srv::VehicleInfoGet", - "line": 614 + "line": 617 } ], "clients": [ { "name": "cmd/command", "type_name": "mavros_msgs::srv::CommandLong", - "line": 1320 + "line": 1323 } ], "parameters": [ { "name": "conn_timeout", "type_name": "double", - "line": 506, + "line": 509, "default_value": "10.0" }, { "name": "min_voltage", "type_name": "", - "line": 516, + "line": 519, "default_value": "std::vector({10.0})" }, { "name": "disable_diag", "type_name": "bool", - "line": 524, + "line": 527, "default_value": "false" }, { "name": "heartbeat_mav_type", "type_name": "", - "line": 544, + "line": 547, "default_value": "utils::enum_to_name(\n conn_heartbeat_mav_type)" }, { "name": "heartbeat_rate", "type_name": "double", - "line": 550, + "line": 553, "default_value": "1.0" } ], @@ -1965,7 +1984,7 @@ "message_name": "HEARTBEAT", "msg_id_expr": "mavlink::minimal::msg::HEARTBEAT::MSG_ID", "dialect": "minimal", - "line": 633, + "line": 636, "msg_id": 0 }, { @@ -1974,7 +1993,7 @@ "message_name": "SYS_STATUS", "msg_id_expr": "mavlink::common::msg::SYS_STATUS::MSG_ID", "dialect": "common", - "line": 634, + "line": 637, "msg_id": 1 }, { @@ -1983,7 +2002,7 @@ "message_name": "STATUSTEXT", "msg_id_expr": "mavlink::common::msg::STATUSTEXT::MSG_ID", "dialect": "common", - "line": 635, + "line": 638, "msg_id": 253 }, { @@ -1992,7 +2011,7 @@ "message_name": "EVENT", "msg_id_expr": "mavlink::common::msg::EVENT::MSG_ID", "dialect": "common", - "line": 636, + "line": 639, "msg_id": 410 }, { @@ -2001,7 +2020,7 @@ "message_name": "MEMINFO", "msg_id_expr": "mavlink::ardupilotmega::msg::MEMINFO::MSG_ID", "dialect": "ardupilotmega", - "line": 637, + "line": 640, "msg_id": 152 }, { @@ -2010,7 +2029,7 @@ "message_name": "HWSTATUS", "msg_id_expr": "mavlink::ardupilotmega::msg::HWSTATUS::MSG_ID", "dialect": "ardupilotmega", - "line": 638, + "line": 641, "msg_id": 165 }, { @@ -2019,7 +2038,7 @@ "message_name": "AUTOPILOT_VERSION", "msg_id_expr": "mavlink::standard::msg::AUTOPILOT_VERSION::MSG_ID", "dialect": "standard", - "line": 639, + "line": 642, "msg_id": 148 }, { @@ -2028,7 +2047,7 @@ "message_name": "EXTENDED_SYS_STATE", "msg_id_expr": "mavlink::common::msg::EXTENDED_SYS_STATE::MSG_ID", "dialect": "common", - "line": 640, + "line": 643, "msg_id": 245 }, { @@ -2037,7 +2056,7 @@ "message_name": "BATTERY_STATUS", "msg_id_expr": "mavlink::common::msg::BATTERY_STATUS::MSG_ID", "dialect": "common", - "line": 641, + "line": 644, "msg_id": 147 }, { @@ -2046,7 +2065,7 @@ "message_name": "ESTIMATOR_STATUS", "msg_id_expr": "mavlink::common::msg::ESTIMATOR_STATUS::MSG_ID", "dialect": "common", - "line": 642, + "line": 645, "msg_id": 230 } ], @@ -2057,7 +2076,7 @@ "message_name": "HEARTBEAT", "msg_id_expr": "mavlink::minimal::msg::HEARTBEAT::MSG_ID", "dialect": "minimal", - "line": 1306, + "line": 1309, "msg_id": 0 }, { @@ -2066,7 +2085,7 @@ "message_name": "STATUSTEXT", "msg_id_expr": "mavlink::common::msg::STATUSTEXT::MSG_ID", "dialect": "common", - "line": 1412, + "line": 1415, "msg_id": 253 }, { @@ -2075,7 +2094,7 @@ "message_name": "REQUEST_DATA_STREAM", "msg_id_expr": "mavlink::common::msg::REQUEST_DATA_STREAM::MSG_ID", "dialect": "common", - "line": 1428, + "line": 1431, "msg_id": 66 }, { @@ -2084,7 +2103,7 @@ "message_name": "SET_MODE", "msg_id_expr": "mavlink::common::msg::SET_MODE::MSG_ID", "dialect": "common", - "line": 1513, + "line": 1516, "msg_id": 11 } ] @@ -2095,17 +2114,17 @@ "class_name": "mavros::std_plugins::SystemTimePlugin", "namespace": "time", "brief": "System time plugin", - "description": "", + "description": "Implements the [MAVLink Time Synchronization](https://mavlink.io/en/services/timesync.html).", "publishers": [ { "name": "time_reference", "type_name": "sensor_msgs::msg::TimeReference", - "line": 286 + "line": 289 }, { "name": "timesync_status", "type_name": "mavros_msgs::msg::TimesyncStatus", - "line": 289 + "line": 292 } ], "subscribers": [], @@ -2115,82 +2134,82 @@ { "name": "time_ref_source", "type_name": "", - "line": 163, + "line": 166, "default_value": "\"fcu\"" }, { "name": "timesync_mode", "type_name": "", - "line": 168, + "line": 171, "default_value": "\"MAVLINK\"" }, { "name": "system_time_rate", "type_name": "double", - "line": 175, + "line": 178, "default_value": "0.0" }, { "name": "timesync_rate", "type_name": "double", - "line": 194, + "line": 197, "default_value": "0.0" }, { "name": "timesync_alpha_initial", "type_name": "double", - "line": 226, + "line": 229, "default_value": "0.05", "description": "Filter gains Alpha : Used to smooth the overall clock offset estimate. Smaller values will lead to a smoother estimate, but track time drift more slowly, introducing a bias in the estimate. Larger values will cause low-amplitude oscillations. Beta : Used to smooth the clock skew estimate. Smaller values will lead to a tighter estimation of the skew (derivative), but will negatively affect how fast the filter reacts to clock skewing (e.g cause by temperature changes to the oscillator). Larger values will cause large-amplitude oscillations." }, { "name": "timesync_beta_initial", "type_name": "double", - "line": 231, + "line": 234, "default_value": "0.05" }, { "name": "timesync_alpha_final", "type_name": "double", - "line": 236, + "line": 239, "default_value": "0.003" }, { "name": "timesync_beta_final", "type_name": "double", - "line": 241, + "line": 244, "default_value": "0.003" }, { "name": "convergence_window", "type_name": "integer", - "line": 253, + "line": 256, "default_value": "500", "description": "Filter gain scheduling The filter interpolates between the initial and final gains while the number of exchanged timesync packets is less than convergence_window. A lower value will allow the timesync to converge faster, but with potentially less accurate initial offset and skew estimates." }, { "name": "max_rtt_sample", "type_name": "integer", - "line": 267, + "line": 270, "default_value": "10", "description": "Outlier rejection and filter reset Samples with round-trip time higher than max_rtt_sample are not used to update the filter. More than max_consecutive_high_rtt number of such events in a row will throw a warning but not reset the filter. Samples whose calculated clock offset is more than max_deviation_sample off from the current estimate are not used to update the filter. More than max_consecutive_high_deviation number of such events in a row will reset the filter. This usually happens only due to a time jump on the remote system." }, { "name": "max_deviation_sample", "type_name": "integer", - "line": 271, + "line": 274, "default_value": "10" }, { "name": "max_consecutive_high_rtt", "type_name": "integer", - "line": 275, + "line": 278, "default_value": "10" }, { "name": "max_consecutive_high_deviation", "type_name": "integer", - "line": 279, + "line": 282, "default_value": "10" } ], @@ -2201,7 +2220,7 @@ "message_name": "SYSTEM_TIME", "msg_id_expr": "mavlink::common::msg::SYSTEM_TIME::MSG_ID", "dialect": "common", - "line": 298, + "line": 301, "msg_id": 2 }, { @@ -2210,7 +2229,7 @@ "message_name": "TIMESYNC", "msg_id_expr": "mavlink::common::msg::TIMESYNC::MSG_ID", "dialect": "common", - "line": 299, + "line": 302, "msg_id": 111 } ], @@ -2221,7 +2240,7 @@ "message_name": "SYSTEM_TIME", "msg_id_expr": "mavlink::common::msg::SYSTEM_TIME::MSG_ID", "dialect": "common", - "line": 386, + "line": 389, "msg_id": 2 }, { @@ -2230,7 +2249,7 @@ "message_name": "TIMESYNC", "msg_id_expr": "mavlink::common::msg::TIMESYNC::MSG_ID", "dialect": "common", - "line": 413, + "line": 416, "msg_id": 111 } ] @@ -2241,17 +2260,17 @@ "class_name": "mavros::std_plugins::WaypointPlugin", "namespace": "mission", "brief": "Mission manipulation plugin", - "description": "", + "description": "Implements the [MAVLink Mission Protocol](https://mavlink.io/en/services/mission.html).", "publishers": [ { "name": "~/waypoints", "type_name": "mavros_msgs::msg::WaypointList", - "line": 80 + "line": 83 }, { "name": "~/reached", "type_name": "mavros_msgs::msg::WaypointReached", - "line": 81 + "line": 84 } ], "subscribers": [], @@ -2259,22 +2278,22 @@ { "name": "~/pull", "type_name": "mavros_msgs::srv::WaypointPull", - "line": 90 + "line": 93 }, { "name": "~/push", "type_name": "mavros_msgs::srv::WaypointPush", - "line": 95 + "line": 98 }, { "name": "~/clear", "type_name": "mavros_msgs::srv::WaypointClear", - "line": 100 + "line": 103 }, { "name": "~/set_current", "type_name": "mavros_msgs::srv::WaypointSetCurrent", - "line": 104 + "line": 107 } ], "clients": [], @@ -2282,20 +2301,20 @@ { "name": "pull_after_gcs", "type_name": "bool", - "line": 48, + "line": 51, "default_value": "true", "description": "NOTE(vooon): I'm not quite sure that this option would work with mavros router" }, { "name": "use_mission_item_int", "type_name": "bool", - "line": 53, + "line": 56, "default_value": "true" }, { "name": "enable_partial_push", "type_name": "integer", - "line": 58, + "line": 61, "default_value": "2" } ], @@ -2306,7 +2325,7 @@ "message_name": "MISSION_ITEM", "msg_id_expr": "mavlink::common::msg::MISSION_ITEM::MSG_ID", "dialect": "common", - "line": 308, + "line": 341, "msg_id": 39 }, { @@ -2315,7 +2334,7 @@ "message_name": "MISSION_ITEM_INT", "msg_id_expr": "mavlink::common::msg::MISSION_ITEM_INT::MSG_ID", "dialect": "common", - "line": 309, + "line": 342, "msg_id": 73 }, { @@ -2324,7 +2343,7 @@ "message_name": "MISSION_REQUEST", "msg_id_expr": "mavlink::common::msg::MISSION_REQUEST::MSG_ID", "dialect": "common", - "line": 310, + "line": 343, "msg_id": 40 }, { @@ -2333,7 +2352,7 @@ "message_name": "MISSION_REQUEST_INT", "msg_id_expr": "mavlink::common::msg::MISSION_REQUEST_INT::MSG_ID", "dialect": "common", - "line": 311, + "line": 344, "msg_id": 51 }, { @@ -2342,7 +2361,7 @@ "message_name": "MISSION_COUNT", "msg_id_expr": "mavlink::common::msg::MISSION_COUNT::MSG_ID", "dialect": "common", - "line": 312, + "line": 345, "msg_id": 44 }, { @@ -2351,7 +2370,7 @@ "message_name": "MISSION_ACK", "msg_id_expr": "mavlink::common::msg::MISSION_ACK::MSG_ID", "dialect": "common", - "line": 313, + "line": 346, "msg_id": 47 }, { @@ -2360,7 +2379,7 @@ "message_name": "MISSION_CURRENT", "msg_id_expr": "mavlink::common::msg::MISSION_CURRENT::MSG_ID", "dialect": "common", - "line": 318, + "line": 351, "msg_id": 42 }, { @@ -2369,7 +2388,7 @@ "message_name": "MISSION_ITEM_REACHED", "msg_id_expr": "mavlink::common::msg::MISSION_ITEM_REACHED::MSG_ID", "dialect": "common", - "line": 319, + "line": 352, "msg_id": 46 } ], diff --git a/docs/plugins/std/manual_control.md b/docs/plugins/std/manual_control.md index b5cf09dc9..97af64724 100644 --- a/docs/plugins/std/manual_control.md +++ b/docs/plugins/std/manual_control.md @@ -6,6 +6,8 @@ - Brief: Manual Control plugin +Implements the [MAVLink Manual Control (Joystick) Protocol](https://mavlink.io/en/services/manual_control.html). + ## Publishers - `~/control` ([mavros_msgs::msg::ManualControl](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/ManualControl.html)) diff --git a/docs/plugins/std/param.md b/docs/plugins/std/param.md index 2dafe3400..5bcda1512 100644 --- a/docs/plugins/std/param.md +++ b/docs/plugins/std/param.md @@ -6,6 +6,8 @@ - Brief: Parameter manipulation plugin +Implements the [MAVLink Parameter Protocol](https://mavlink.io/en/services/parameter.html). + ## Publishers - `~/event` ([mavros_msgs::msg::ParamEvent](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/ParamEvent.html)) - `/parameter_events` ([rcl_interfaces::msg::ParameterEvent](https://docs.ros.org/en/rolling/p/rcl_interfaces/msg/ParameterEvent.html)) @@ -31,7 +33,9 @@ ## Parameters -- None +- `param_set_timeout` [type: double, default: `param_set_timeout.seconds()`] +- `param_list_timeout` [type: double, default: `param_list_timeout.seconds()`] +- `param_retries` [default: `param_retries_count`] ## MAVLink Subscriptions diff --git a/docs/plugins/std/rallypoint.md b/docs/plugins/std/rallypoint.md index 4c2b85f00..b968f0e96 100644 --- a/docs/plugins/std/rallypoint.md +++ b/docs/plugins/std/rallypoint.md @@ -6,6 +6,8 @@ - Brief: Rallypoint manipulation plugin +Implements the rally point part of the [MAVLink Mission Protocol](https://mavlink.io/en/services/mission.html). + ## Publishers - `~/rallypoints` ([mavros_msgs::msg::WaypointList](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/WaypointList.html)) diff --git a/docs/plugins/std/setpoint_accel.md b/docs/plugins/std/setpoint_accel.md index 7ac328c9c..375360844 100644 --- a/docs/plugins/std/setpoint_accel.md +++ b/docs/plugins/std/setpoint_accel.md @@ -6,7 +6,7 @@ - Brief: Setpoint acceleration/force plugin -Send setpoint accelerations/forces to FCU controller. +Send setpoint accelerations/forces to FCU controller. Uses the [MAVLink Offboard Control Protocol](https://mavlink.io/en/services/offboard_control.html). ## Publishers - None diff --git a/docs/plugins/std/setpoint_attitude.md b/docs/plugins/std/setpoint_attitude.md index ae6a2b0e8..becaf6c3a 100644 --- a/docs/plugins/std/setpoint_attitude.md +++ b/docs/plugins/std/setpoint_attitude.md @@ -6,7 +6,7 @@ - Brief: Setpoint attitude plugin -Send setpoint attitude/orientation/thrust to FCU controller. +Send setpoint attitude/orientation/thrust to FCU controller. Uses the [MAVLink Offboard Control Protocol](https://mavlink.io/en/services/offboard_control.html). ## Publishers - None diff --git a/docs/plugins/std/setpoint_position.md b/docs/plugins/std/setpoint_position.md index f8f6d02e4..3a1866114 100644 --- a/docs/plugins/std/setpoint_position.md +++ b/docs/plugins/std/setpoint_position.md @@ -6,7 +6,7 @@ - Brief: Setpoint position plugin -Send setpoint positions to FCU controller. +Send setpoint positions to FCU controller. Uses the [MAVLink Offboard Control Protocol](https://mavlink.io/en/services/offboard_control.html). ## Publishers - None diff --git a/docs/plugins/std/setpoint_raw.md b/docs/plugins/std/setpoint_raw.md index 93371959f..3f4f5432b 100644 --- a/docs/plugins/std/setpoint_raw.md +++ b/docs/plugins/std/setpoint_raw.md @@ -6,7 +6,7 @@ - Brief: Setpoint RAW plugin -Send position setpoints and publish current state (return loop). User can decide what set of filed needed for operation via IGNORE bits. +Send position setpoints and publish current state (return loop). User can decide what set of filed needed for operation via IGNORE bits. Uses the [MAVLink Offboard Control Protocol](https://mavlink.io/en/services/offboard_control.html). ## Publishers - `~/target_local` ([mavros_msgs::msg::PositionTarget](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/PositionTarget.html)) diff --git a/docs/plugins/std/setpoint_trajectory.md b/docs/plugins/std/setpoint_trajectory.md index 36d9bb42c..fb338fc15 100644 --- a/docs/plugins/std/setpoint_trajectory.md +++ b/docs/plugins/std/setpoint_trajectory.md @@ -6,7 +6,7 @@ - Brief: Setpoint TRAJECTORY plugin -Receive trajectory setpoints and send setpoint_raw setpoints along the trajectory. +Receive trajectory setpoints and send setpoint_raw setpoints along the trajectory. Uses the [MAVLink Offboard Control Protocol](https://mavlink.io/en/services/offboard_control.html). ## Publishers - `~/desired` ([nav_msgs::msg::Path](https://docs.ros.org/en/rolling/p/nav_msgs/msg/Path.html)) diff --git a/docs/plugins/std/setpoint_velocity.md b/docs/plugins/std/setpoint_velocity.md index 7a5493524..8a0b7a60f 100644 --- a/docs/plugins/std/setpoint_velocity.md +++ b/docs/plugins/std/setpoint_velocity.md @@ -6,7 +6,7 @@ - Brief: Setpoint velocity plugin -Send setpoint velocities to FCU controller. +Send setpoint velocities to FCU controller. Uses the [MAVLink Offboard Control Protocol](https://mavlink.io/en/services/offboard_control.html). ## Publishers - None diff --git a/docs/plugins/std/sys_status.md b/docs/plugins/std/sys_status.md index 9254053c9..d5e40d56b 100644 --- a/docs/plugins/std/sys_status.md +++ b/docs/plugins/std/sys_status.md @@ -6,7 +6,7 @@ - Brief: System status plugin. -Required by all plugins. +Required by all plugins. Implements the [MAVLink Heartbeat/Connection Protocol](https://mavlink.io/en/services/heartbeat.html). ## Publishers - `state` ([mavros_msgs::msg::State](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/State.html)) diff --git a/docs/plugins/std/sys_time.md b/docs/plugins/std/sys_time.md index b2592fbbb..0517ed395 100644 --- a/docs/plugins/std/sys_time.md +++ b/docs/plugins/std/sys_time.md @@ -6,6 +6,8 @@ - Brief: System time plugin +Implements the [MAVLink Time Synchronization](https://mavlink.io/en/services/timesync.html). + ## Publishers - `time_reference` ([sensor_msgs::msg::TimeReference](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/TimeReference.html)) - `timesync_status` ([mavros_msgs::msg::TimesyncStatus](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/TimesyncStatus.html)) diff --git a/docs/plugins/std/waypoint.md b/docs/plugins/std/waypoint.md index fd4ced8d9..ab38a2175 100644 --- a/docs/plugins/std/waypoint.md +++ b/docs/plugins/std/waypoint.md @@ -6,6 +6,8 @@ - Brief: Mission manipulation plugin +Implements the [MAVLink Mission Protocol](https://mavlink.io/en/services/mission.html). + ## Publishers - `~/waypoints` ([mavros_msgs::msg::WaypointList](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/WaypointList.html)) - `~/reached` ([mavros_msgs::msg::WaypointReached](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/WaypointReached.html)) From c96f75627c110a21e3dbbe4d9f4b1c598226bb36 Mon Sep 17 00:00:00 2001 From: Vladimir Ermakov Date: Fri, 7 Aug 2026 14:46:25 +0200 Subject: [PATCH 06/12] docs: add plugin index page and link docs from README Generate a combined plugin index (docs/plugins/index.md) listing every mavros and mavros_extras plugin with its ROS API surface (publishers, subscribers, services, clients, MAVLink sub/pub) and links to the full per-plugin reference. The index is produced by plugin_doc_gen --plugin-index and wired into gendoc.sh. Add a Documentation link to the readthedocs site and the plugin index from the top-level README. Remove the obsolete docs/mavlink-e2e-tests-plan.md (pymavlink E2E coverage is landed and the router is covered by benchmarks). Signed-off-by: Vladimir Ermakov --- README.md | 4 + docs/mavlink-e2e-tests-plan.md | 138 --------------------------------- docs/plugins/index.md | 78 +++++++++++++++++++ tools/gendoc.sh | 8 ++ tools/plugin_doc_gen.py | 78 ++++++++++++++++++- 5 files changed, 165 insertions(+), 141 deletions(-) delete mode 100644 docs/mavlink-e2e-tests-plan.md create mode 100644 docs/plugins/index.md diff --git a/README.md b/README.md index 002f25c13..b4b215a76 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,9 @@ MAVROS MAVLink extendable communication node for ROS. +- Full documentation: [https://mavros.readthedocs.io/][rtd] +- Plugin reference (all ROS API): [Plugin index](docs/plugins/index.md) + - Since 2014-08-11 this repository contains several packages. - Since 2014-11-02 hydro support separated from master to hydro-devel branch. - Since 2015-03-04 all packages also dual licensed under terms of BSD license. @@ -78,6 +81,7 @@ CI Statuses [mrrm]: https://github.com/mavlink/mavros/blob/ros2/mavros/README.md +[rtd]: https://mavros.readthedocs.io/en/latest/ [exrm]: https://github.com/mavlink/mavros/blob/ros2/mavros_extras/README.md [libmc]: https://github.com/mavlink/mavros/blob/ros2/libmavconn/README.md [test]: https://github.com/mavlink/mavros/blob/ros2/test_mavros/README.md diff --git a/docs/mavlink-e2e-tests-plan.md b/docs/mavlink-e2e-tests-plan.md deleted file mode 100644 index 6f9f0b463..000000000 --- a/docs/mavlink-e2e-tests-plan.md +++ /dev/null @@ -1,138 +0,0 @@ -# MAVLink byte-stream e2e tests (pymavlink-referenced) - -**Status:** Tier 1 = **implemented** (libmavconn TX/RX + signing e2e, all green in container). -Tier 2 = postponed, scope confirmed. - -**Goal:** Verify libmavconn serializes/deserializes MAVLink byte streams correctly, using -pymavlink as the reference implementation. Later, verify the MAVLink router end-to-end in -all modes. - -**Design constraints (from maintainer):** - -- `test_depend` on a pip package (`python3-pymavlink-pip`) is acceptable. -- Minimize owned surface area: no shared Python framework, no CI/pip automation, tests must - skip cleanly when pymavlink is absent so there is nothing to babysit. -- Deterministic, low-flake tests preferred. - -**Environment:** Container `ros2-lyrical` (podman), workspace at `/ws`, repo mounted at -`/ws/src/mavros`. pymavlink installed via `pip install --break-system-packages pymavlink` -(one-time, manual — not automated anywhere). - ---- - -## Tier 1 — libmavconn byte-stream e2e (IMPLEMENT NOW) - -### Files - -1. **`libmavconn/test/e2e/mavconn_e2e_shim.cpp`** (new; built only under `BUILD_TESTING`) - - Thin C-ABI wrapper over `MAVConnUDP` for `ctypes`. Glue only, no abstractions. - - API: - - `mavconn_udp_create(sysid, compid, bind_port, remote_host, remote_port) -> void*` - (receive callback pushes decoded `(msgid, sysid, compid, seq, len, framing, payload[])` - to a thread-safe queue) - - `mavconn_poll_rx(handle, out*, timeout_ms) -> int` - - `mavconn_send_heartbeat(handle, ...) -> int` - (serialize `common::msg::HEARTBEAT`, `send_message()`) - - `mavconn_send_raw_bytes(handle, bytes, len) -> int` (`send_bytes()`) - - `mavconn_setup_signing(handle, key[32], sign_outgoing, link_id, init_ts)` - - `mavconn_destroy(handle)` - -2. **`libmavconn/test/e2e/test_libmavconn_e2e.py`** (new, pytest) - - Loads shim via `ctypes` (path from `MAVCONN_E2E_SHIM` env var set by CMake). - - pymavlink packing/parsing inlined directly — no shared helper module. - - Every test guarded by `pytest.importorskip("pymavlink")` → skips in CI/buildfarm - without pip (verified: whole module skips when pymavlink is absent). - - Tests (all passing in `ros2-lyrical`): - - `test_tx_heartbeat_matches_pymavlink` — libmavconn HEARTBEAT byte-for-byte equal to - pymavlink reference frame. - - `test_rx_heartbeat_from_pymavlink` — pymavlink HEARTBEAT → libmavconn decodes - msgid/ids/seq/payload exactly. - - `test_rx_sys_status_from_pymavlink` — extension-field message payload round-trips. - - `test_tx_signed_heartbeat_verified_by_pymavlink` — signed TX verified by pymavlink - (SIGNED incompat flag set, `badsig_count == 0`). - - `test_rx_signed_heartbeat_from_pymavlink` — signed RX accepted with `Framing::ok`. - - `test_rx_bad_signature_rejected` — wrong key → `Framing::bad_signature`. - - **Gotcha captured:** pymavlink message constructors take fields in *declaration* order, - not wire order — always construct reference frames with keyword args (a positional - mix-up here initially produced a false wire mismatch). - -3. **`libmavconn/CMakeLists.txt`** (edit) - - In `if(BUILD_TESTING)`: `find_package(ament_cmake_pytest REQUIRED)`; build shim as - `SHARED` lib linked to `mavconn`; `ament_add_pytest_test(libmavconn_pymavlink_e2e …)` - passing shim path via `ENV MAVCONN_E2E_SHIM` and shim dir via - `APPEND_ENV LD_LIBRARY_PATH`. Also points flake8 at the new `setup.cfg`. - -4. **`libmavconn/package.xml`** (edit) - - Add `ament_cmake_pytest` and - `python3-pymavlink-pip`. - -5. **`libmavconn/setup.cfg`** (new) - - flake8 config mirroring `mavros/setup.cfg` (double quotes allowed, google import - order), so the new Python test matches the project's actual style. libmavconn had no - flake8 config before, so it previously used ament's stricter default. - -### Build / run (container) - - podman exec ros2-lyrical bash -lc 'source /opt/ros/lyrical/setup.bash && \ - colcon build --base-paths /ws/src/mavros --packages-select libmavconn' - podman exec ros2-lyrical bash -lc 'source /ws/install/setup.bash && \ - cd /ws/build/libmavconn && ctest --output-on-failure -R pymavlink' - -**Est. tokens:** ~70–120k (deterministic, in-process, no ROS runtime → low flake). - ---- - -## Tier 2 — router wire e2e (POSTPONED, scope confirmed) - -**Confirmed requirement:** router must be verified functioning correctly in **all modes** -(FCU↔GCS, FCU↔UAS, GCS↔UAS routing; broadcast + targeted). Postponed until after Tier 1 -lands. - -**Endpoint mapping (verified from code):** - -- `fcu_urls` / `gcs_urls` → `MAVConnEndpoint` (real UDP/TCP wire links). -- `uas_urls` → `ROSEndpoint` (ROS topics `/mavlink_source` FCU→UAS, - `/mavlink_sink` UAS→FCU; QoS best_effort + volatile). - -**Planned topology:** pymavlink peer (FCU over UDP) → `MAVConnEndpoint` → Router → -`ROSEndpoint` ↔ test's rclpy node on `/uas1/mavlink_{source,sink}`. Optionally add a -`gcs_urls` UDP link for wire→wire broadcast coverage. - -**Test cases (all asserted against pymavlink reference):** - -- FCU→UAS (wire→ROS topic): pymavlink packs HEARTBEAT + targeted msg into FCU link; rclpy - asserts `mavros_msgs::msg::Mavlink` fields (msgid/sysid/compid/payload64/len/framing_status) - match. -- UAS→FCU (ROS topic→wire): rclpy publishes `Mavlink` (from pymavlink-packed msg) to sink; - pymavlink peer asserts emitted wire bytes parse and match (msgid, payload, ids, CRC). -- Targeted routing: `target_system`/`target_component` reaches only matching endpoint. -- All-modes matrix: verify each FCU/GCS/UAS pairing per routing rules in - `Router::route_message`. -- Signing through router: **blocked** — `MAVConnEndpoint::open()` has - `// TODO(vooon): message signing?` and does not wire signing. Deferred until router - signing is implemented. - -**Files (planned):** - -- `mavros/test/router_e2e/test_router_wire_e2e.py` (rclpy + pymavlink; `importorskip` - guard; inline pymavlink helpers, no shared module). -- `mavros/CMakeLists.txt` — `ament_add_pytest_test(mavros_router_wire_e2e …)`. -- `mavros/package.xml` — `python3-pymavlink-pip`. - -**Risk note:** Tier 2 introduces rclpy + DDS + running component + timing → highest -flake/maintenance potential. Time-box when implemented; if router launch/timing flakes in -the container, cut scope rather than nurse it. Existing `test_router.cpp` already -unit-tests the routing table with mocks — Tier 2 targets the **wire path + -`mavros_msgs::mavlink::convert` round-trip**, which is the real gap. - -**Est. tokens:** ~70–130k (2–4 debug iterations likely). - ---- - -## Model / execution notes - -- Implementation: mid-tier agentic coding model is sufficient; escalate only router-launch - debugging to a flagship if it drags >2 iterations. -- Recommendation (cost control): land Tier 1 as its own PR; Tier 2 as a follow-up PR - rebased on it. diff --git a/docs/plugins/index.md b/docs/plugins/index.md new file mode 100644 index 000000000..f2123e510 --- /dev/null +++ b/docs/plugins/index.md @@ -0,0 +1,78 @@ +# MAVROS plugins + +MAVROS is split into the core plugins shipped in `mavros` and the optional plugins shipped in `mavros_extras`. Each plugin page documents its ROS API (publishers, subscribers, services, clients, parameters) and the MAVLink messages it subscribes to and publishes. + +## Standard plugins (`mavros`) + +| Plugin | Brief | Pub | Sub | Srv | Client | MAVLink sub/pub | +|--------|-------|-----|-----|-----|--------|-----------------| +| [`actuator_control`](std/actuator_control.md) | ActuatorControl plugin | 1 | 1 | — | — | 1/1 | +| [`altitude`](std/altitude.md) | Altitude plugin. | 1 | — | — | — | 1/0 | +| [`command`](std/command.md) | Command plugin. | — | — | 11 | — | 1/2 | +| [`dummy`](std/dummy.md) | Dummy plugin. | — | — | — | — | 4/0 | +| [`ftp`](std/ftp.md) | FTP plugin. | — | — | 12 | — | 1/1 | +| [`geofence`](std/geofence.md) | Geofence manipulation plugin | 1 | — | 3 | — | 6/10 | +| [`global_position`](std/global_position.md) | Global position plugin. | 9 | 2 | — | — | 4/1 | +| [`home_position`](std/home_position.md) | home position plugin. | 1 | 1 | 1 | 1 | 1/1 | +| [`imu`](std/imu.md) | IMU and attitude data publication plugin | 7 | — | — | — | 6/0 | +| [`local_position`](std/local_position.md) | Local position plugin. | 7 | — | — | — | 2/0 | +| [`manual_control`](std/manual_control.md) | Manual Control plugin | 1 | 1 | — | — | 1/1 | +| [`nav_controller_output`](std/nav_controller_output.md) | nav controller output plugin. | 1 | — | — | — | 1/0 | +| [`param`](std/param.md) | Parameter manipulation plugin | 2 | — | 8 | — | 1/3 | +| [`rallypoint`](std/rallypoint.md) | Rallypoint manipulation plugin | 1 | — | 3 | — | 6/10 | +| [`rc_io`](std/rc_io.md) | RC IO plugin | 2 | 1 | — | — | 3/1 | +| [`setpoint_accel`](std/setpoint_accel.md) | Setpoint acceleration/force plugin | — | 1 | — | — | 0/1 | +| [`setpoint_attitude`](std/setpoint_attitude.md) | Setpoint attitude plugin | — | 3 | — | — | 0/1 | +| [`setpoint_position`](std/setpoint_position.md) | Setpoint position plugin | — | 5 | — | — | 0/2 | +| [`setpoint_raw`](std/setpoint_raw.md) | Setpoint RAW plugin | 3 | 3 | — | — | 3/3 | +| [`setpoint_trajectory`](std/setpoint_trajectory.md) | Setpoint TRAJECTORY plugin | 1 | 1 | 1 | — | 0/1 | +| [`setpoint_velocity`](std/setpoint_velocity.md) | Setpoint velocity plugin | — | 2 | — | — | 0/1 | +| [`sys_status`](std/sys_status.md) | System status plugin. | 7 | 1 | 4 | 1 | 10/4 | +| [`sys_time`](std/sys_time.md) | System time plugin | 2 | — | — | — | 2/2 | +| [`waypoint`](std/waypoint.md) | Mission manipulation plugin | 2 | — | 4 | — | 8/10 | +| [`wind_estimation`](std/wind_estimation.md) | Wind estimation plugin. | 1 | — | — | — | 2/0 | + +## Extra plugins (`mavros_extras`) + +| Plugin | Brief | Pub | Sub | Srv | Client | MAVLink sub/pub | +|--------|-------|-----|-----|-----|--------|-----------------| +| [`adsb`](extras/adsb.md) | ADS-B Vehicle plugin | 1 | 1 | — | — | 1/1 | +| [`cam_imu_sync`](extras/cam_imu_sync.md) | Camera IMU synchronisation plugin | 1 | — | — | — | 1/0 | +| [`camera`](extras/camera.md) | Camera plugin plugin | 1 | — | — | — | 1/0 | +| [`cellular_status`](extras/cellular_status.md) | Cellular status plugin. | — | 1 | — | — | 0/1 | +| [`companion_process_status`](extras/companion_process_status.md) | Obstacle companion process status plugin | — | 1 | — | — | 0/1 | +| [`debug_value`](extras/debug_value.md) | Plugin for Debug msgs from MAVLink API | 5 | 1 | — | — | 5/5 | +| [`distance_sensor`](extras/distance_sensor.md) | Distance sensor plugin | 1 | 1 | — | — | 1/1 | +| [`esc_status`](extras/esc_status.md) | ESC status plugin | 2 | — | — | — | 2/0 | +| [`esc_telemetry`](extras/esc_telemetry.md) | ESC telemetry plugin | 1 | — | — | — | 3/0 | +| [`fake_gps`](extras/fake_gps.md) | Fake GPS plugin. | — | 4 | — | — | 0/2 | +| [`gimbal_control`](extras/gimbal_control.md) | Gimbal Control Plugin | 4 | 4 | 6 | 1 | 4/4 | +| [`gps_input`](extras/gps_input.md) | GPS_INPUT GPS plugin. | — | 1 | — | — | 0/1 | +| [`gps_rtk`](extras/gps_rtk.md) | GPS RTK plugin | 1 | 1 | — | — | 1/2 | +| [`gps_status`](extras/gps_status.md) | Mavlink GPS status plugin. | 4 | — | — | — | 4/0 | +| [`guided_target`](extras/guided_target.md) | guided target plugin | 1 | 1 | — | — | 1/0 | +| [`hil`](extras/hil.md) | Hil plugin | 2 | 5 | — | — | 2/5 | +| [`landing_target`](extras/landing_target.md) | Landing Target plugin | 2 | 2 | — | — | 1/1 | +| [`log_transfer`](extras/log_transfer.md) | Log Transfer plugin | 2 | — | 4 | — | 2/4 | +| [`mag_calibration_status`](extras/mag_calibration_status.md) | MagCalStatus plugin. | 2 | — | — | — | 2/0 | +| [`mocap_pose_estimate`](extras/mocap_pose_estimate.md) | MocapPoseEstimate plugin | — | 2 | — | — | 0/1 | +| [`mount_control`](extras/mount_control.md) | Mount Control plugin | 2 | 1 | 1 | 1 | 2/1 | +| [`obstacle_distance`](extras/obstacle_distance.md) | Obstacle distance plugin | — | 1 | — | — | 0/1 | +| [`obstacle_distance_3d`](extras/obstacle_distance_3d.md) | Plugin to handle sending OBSTACLE_DISTANCE_3D MAVLink messages. | — | 1 | — | — | 0/1 | +| [`odometry`](extras/odom.md) | Odometry plugin | 1 | 1 | — | — | 1/1 | +| [`onboard_computer_status`](extras/onboard_computer_status.md) | Onboard Computer Status plugin | — | 1 | — | — | 0/1 | +| [`open_drone_id`](extras/open_drone_id.md) | Open Drone ID plugin | — | 5 | — | — | 0/5 | +| [`optical_flow`](extras/optical_flow.md) | Optical Flow custom plugin | 2 | 1 | — | — | 1/1 | +| [`play_tune`](extras/play_tune.md) | Play Tune service | — | 1 | — | — | 0/1 | +| [`px4flow`](extras/px4flow.md) | PX4 Optical Flow plugin | 3 | 1 | — | — | 1/1 | +| [`rangefinder`](extras/rangefinder.md) | Ardupilot Rangefinder plugin. | 1 | — | — | — | 1/0 | +| [`sim_state`](extras/sim_state.md) | SIM_STATE plugin. | 5 | — | — | — | 1/0 | +| [`tdr_radio`](extras/3dr_radio.md) | 3DR Radio plugin. | 1 | — | — | — | 2/0 | +| [`terrain`](extras/terrain.md) | Terrain plugin. | 2 | 1 | — | 1 | 3/2 | +| [`trajectory`](extras/trajectory.md) | Trajectory plugin to receive planned path from the FCU and | 1 | 2 | — | — | 1/3 | +| [`tunnel`](extras/tunnel.md) | Tunnel plugin | 1 | 1 | — | — | 1/1 | +| [`vfr_hud`](extras/vfr_hud.md) | VFR HUD plugin. | 1 | — | — | — | 1/0 | +| [`vibration`](extras/vibration.md) | Vibration plugin | 1 | — | — | — | 1/0 | +| [`vision_pose`](extras/vision_pose_estimate.md) | Vision pose estimate plugin | — | 2 | — | — | 0/1 | +| [`vision_speed`](extras/vision_speed_estimate.md) | Vision speed estimate plugin | — | 3 | — | — | 0/1 | +| [`wheel_odometry`](extras/wheel_odometry.md) | Wheel odometry plugin. | 4 | — | — | — | 2/0 | diff --git a/tools/gendoc.sh b/tools/gendoc.sh index 31feb279e..feb168eaa 100755 --- a/tools/gendoc.sh +++ b/tools/gendoc.sh @@ -35,6 +35,7 @@ STD_INDEX="${MAVROS_REPO}/docs/plugins/std/index.json" EXTRAS_INDEX="${MAVROS_REPO}/docs/plugins/extras/index.json" STD_MD_DIR="${MAVROS_REPO}/docs/plugins/std" EXTRAS_MD_DIR="${MAVROS_REPO}/docs/plugins/extras" +PLUGINS_INDEX="${MAVROS_REPO}/docs/plugins/index.md" ensure_cpp_bin() { if [[ ! -x "${CPP_BIN}" ]]; then @@ -79,6 +80,11 @@ run_markdown() { --template "${TEMPLATE}" \ --input-json "${EXTRAS_INDEX}" \ --output-dir "${EXTRAS_MD_DIR}" + + uv run mr-plugin-doc-gen \ + --plugin-index "${PLUGINS_INDEX}" \ + --input-json "${STD_INDEX}" \ + --input-json "${EXTRAS_INDEX}" } pushd "${TOOLS_DIR}" >/dev/null @@ -106,3 +112,5 @@ echo " ${EXTRAS_INDEX}" echo "Markdown dirs:" echo " ${STD_MD_DIR}" echo " ${EXTRAS_MD_DIR}" +echo "Plugin index:" +echo " ${PLUGINS_INDEX}" diff --git a/tools/plugin_doc_gen.py b/tools/plugin_doc_gen.py index 8fc54c906..86e2a4e63 100644 --- a/tools/plugin_doc_gen.py +++ b/tools/plugin_doc_gen.py @@ -305,6 +305,54 @@ def _render_api_section(title: str, entries: list[ApiEntry]) -> list[str]: return lines +def render_plugin_index( + std_plugins: list[PluginApi], extras_plugins: list[PluginApi] +) -> str: + """Render a combined index page of all plugins and their ROS API surface.""" + lines = [ + "# MAVROS plugins", + "", + "MAVROS is split into the core plugins shipped in `mavros` and the optional " + "plugins shipped in `mavros_extras`. Each plugin page documents its ROS API " + "(publishers, subscribers, services, clients, parameters) and the MAVLink " + "messages it subscribes to and publishes.", + "", + ] + + def api_count(plugin: PluginApi, kind: str) -> int | str: + if kind == "publishers": + return len(plugin.publishers) or "—" + if kind == "subscribers": + return len(plugin.subscribers) or "—" + if kind == "services": + return len(plugin.services) or "—" + if kind == "clients": + return len(plugin.clients) or "—" + if kind == "mavlink": + return f"{len(plugin.mavlink_subscriptions)}/{len(plugin.mavlink_publications)}" + return "" + + def render_group(title: str, subdir: str, plugins: list[PluginApi]) -> None: + lines.append(f"## {title}") + lines.append("") + lines.append("| Plugin | Brief | Pub | Sub | Srv | Client | MAVLink sub/pub |") + lines.append("|--------|-------|-----|-----|-----|--------|-----------------|") + for p in sorted(plugins, key=lambda x: x.plugin): + stem = pathlib.Path(p.path).stem + link = f"[`{p.plugin}`]({subdir}/{stem}.md)" + brief = (p.brief or "").replace("|", "\\|").replace("\n", " ") + lines.append( + f"| {link} | {brief} | {api_count(p, 'publishers')} | " + f"{api_count(p, 'subscribers')} | {api_count(p, 'services')} | " + f"{api_count(p, 'clients')} | {api_count(p, 'mavlink')} |" + ) + lines.append("") + + render_group("Standard plugins (`mavros`)", "std", std_plugins) + render_group("Extra plugins (`mavros_extras`)", "extras", extras_plugins) + return "\n".join(lines).rstrip() + "\n" + + def render_markdown(plugins: list[PluginApi]) -> str: repo_root = detect_repo_root() lines = [ @@ -489,7 +537,13 @@ def parse_args(argv: list[str]) -> argparse.Namespace: ) parser.add_argument( "--input-json", - help="Skip collection and render from pre-collected JSON file.", + action="append", + default=[], + help="Skip collection and render from pre-collected JSON file(s). May be repeated.", + ) + parser.add_argument( + "--plugin-index", + help="Write a combined plugin index page (from collected/index JSON files).", ) parser.add_argument( "--format", @@ -547,8 +601,10 @@ def main(argv: list[str] | None = None) -> int: ) if args.input_json: - payload = json.loads(pathlib.Path(args.input_json).read_text(encoding="utf-8")) - plugins = [plugin_from_dict(item) for item in payload] + plugins = [] + for input_path in args.input_json: + payload = json.loads(pathlib.Path(input_path).read_text(encoding="utf-8")) + plugins.extend(plugin_from_dict(item) for item in payload) log_event("info", "Loaded input JSON", phase="render", plugins=len(plugins)) else: wanted_plugins = set(args.plugin) if args.plugin else None @@ -570,6 +626,22 @@ def main(argv: list[str] | None = None) -> int: plugins=len(plugins), ) + if args.plugin_index: + std_plugins = [p for p in plugins if "mavros_extras" not in p.path.as_posix()] + extras_plugins = [p for p in plugins if "mavros_extras" in p.path.as_posix()] + idx = pathlib.Path(args.plugin_index) + idx.parent.mkdir(parents=True, exist_ok=True) + idx.write_text(render_plugin_index(std_plugins, extras_plugins), encoding="utf-8") + log_event( + "info", + "Wrote plugin index", + phase="render", + std=len(std_plugins), + extras=len(extras_plugins), + path=str(idx), + ) + return 0 + if args.format == "json": body = render_json(plugins) if args.output: From fc16ec11e8abcae6b9fece50e18e4e922fc20685 Mon Sep 17 00:00:00 2001 From: Vladimir Ermakov Date: Fri, 7 Aug 2026 15:10:16 +0200 Subject: [PATCH 07/12] tools: attribute comments above assignment prefix lines When scanning for a description comment above a create_publisher/service declaration, skip a single assignment-prefix line (e.g. "foo_pub =") so a //! comment placed above the whole statement is attributed to the created entity. This matches the standard multi-line declaration style used across the plugins. Signed-off-by: Vladimir Ermakov --- tools/plugin_doc_extract.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/plugin_doc_extract.cpp b/tools/plugin_doc_extract.cpp index f78fa9833..1b8a48c0e 100644 --- a/tools/plugin_doc_extract.cpp +++ b/tools/plugin_doc_extract.cpp @@ -147,6 +147,8 @@ static const std::regex kAutoTemplateMavlinkDeclRe( R"((?:const\s+)?auto\s+([A-Za-z_][A-Za-z0-9_]*)\s*=\s*[A-Za-z_][A-Za-z0-9_]*\s*<[\s\S]{0,200}?,\s*(mavlink::[a-zA-Z0-9_]+::msg::[A-Za-z0-9_]+)\s*>\s*\()"); static const std::regex kIdentifierRe( R"([A-Za-z_][A-Za-z0-9_]*)"); +static const std::regex kAssignmentPrefixRe( + R"([A-Za-z_][A-Za-z0-9_:]*\s*=\s*)"); std::string trim(std::string s) { @@ -293,6 +295,12 @@ std::string extract_entry_comment(const std::vector & lines, int li continue; } + // Skip an assignment prefix line (e.g. "raw_fix_pub =") so a comment above + // it is attributed to the create_() call on the following line. + if (std::regex_match(t, kAssignmentPrefixRe)) { + continue; + } + // Keep extraction strict: only contiguous // comments above declarations. break; } From 73a454692d74a3f60733fbb861d75f9e884cdd13 Mon Sep 17 00:00:00 2001 From: Vladimir Ermakov Date: Fri, 7 Aug 2026 15:10:24 +0200 Subject: [PATCH 08/12] docs: add ROS API descriptions to all plugins and regenerate docs Add one-line //! descriptions for every exposed publisher, subscriber, service, client and parameter across all mavros and mavros_extras plugins, so the generated per-plugin docs describe what each ROS entity does. Regenerate the plugin docs and index, and add a readthedocs Documentation badge to the README. Signed-off-by: Vladimir Ermakov --- README.md | 4 +- docs/plugins/extras/3dr_radio.md | 4 +- docs/plugins/extras/adsb.md | 4 +- docs/plugins/extras/cam_imu_sync.md | 2 +- docs/plugins/extras/camera.md | 2 +- docs/plugins/extras/cellular_status.md | 2 +- .../extras/companion_process_status.md | 2 +- docs/plugins/extras/debug_value.md | 12 +- docs/plugins/extras/distance_sensor.md | 8 +- docs/plugins/extras/esc_status.md | 4 +- docs/plugins/extras/esc_telemetry.md | 2 +- docs/plugins/extras/fake_gps.md | 42 +- docs/plugins/extras/gimbal_control.md | 36 +- docs/plugins/extras/gps_input.md | 4 +- docs/plugins/extras/gps_rtk.md | 4 +- docs/plugins/extras/gps_status.md | 8 +- docs/plugins/extras/guided_target.md | 6 +- docs/plugins/extras/hil.md | 14 +- docs/plugins/extras/index.json | 916 ++++++++++-------- docs/plugins/extras/landing_target.md | 40 +- docs/plugins/extras/log_transfer.md | 12 +- docs/plugins/extras/mag_calibration_status.md | 4 +- docs/plugins/extras/mocap_pose_estimate.md | 4 +- docs/plugins/extras/mount_control.md | 20 +- docs/plugins/extras/obstacle_distance.md | 4 +- docs/plugins/extras/obstacle_distance_3d.md | 4 +- docs/plugins/extras/odom.md | 10 +- .../plugins/extras/onboard_computer_status.md | 2 +- docs/plugins/extras/open_drone_id.md | 10 +- docs/plugins/extras/optical_flow.md | 14 +- docs/plugins/extras/play_tune.md | 2 +- docs/plugins/extras/px4flow.md | 16 +- docs/plugins/extras/rangefinder.md | 2 +- docs/plugins/extras/sim_state.md | 10 +- docs/plugins/extras/terrain.md | 8 +- docs/plugins/extras/trajectory.md | 6 +- docs/plugins/extras/tunnel.md | 4 +- docs/plugins/extras/vfr_hud.md | 2 +- docs/plugins/extras/vibration.md | 4 +- docs/plugins/extras/vision_pose_estimate.md | 12 +- docs/plugins/extras/vision_speed_estimate.md | 6 +- docs/plugins/extras/wheel_odometry.md | 28 +- docs/plugins/std/actuator_control.md | 4 +- docs/plugins/std/altitude.md | 4 +- docs/plugins/std/command.md | 22 +- docs/plugins/std/ftp.md | 24 +- docs/plugins/std/geofence.md | 12 +- docs/plugins/std/global_position.md | 40 +- docs/plugins/std/home_position.md | 8 +- docs/plugins/std/imu.md | 24 +- docs/plugins/std/index.json | 741 ++++++++------ docs/plugins/std/local_position.md | 22 +- docs/plugins/std/manual_control.md | 4 +- docs/plugins/std/nav_controller_output.md | 2 +- docs/plugins/std/param.md | 26 +- docs/plugins/std/rallypoint.md | 12 +- docs/plugins/std/rc_io.md | 6 +- docs/plugins/std/setpoint_accel.md | 2 +- docs/plugins/std/setpoint_attitude.md | 6 +- docs/plugins/std/setpoint_position.md | 10 +- docs/plugins/std/setpoint_raw.md | 14 +- docs/plugins/std/setpoint_trajectory.md | 10 +- docs/plugins/std/setpoint_velocity.md | 6 +- docs/plugins/std/sys_status.md | 34 +- docs/plugins/std/sys_time.md | 12 +- docs/plugins/std/waypoint.md | 18 +- docs/plugins/std/wind_estimation.md | 2 +- .../include/mavros/mission_protocol_base.hpp | 4 + mavros/src/plugins/actuator_control.cpp | 2 + mavros/src/plugins/altitude.cpp | 2 + mavros/src/plugins/command.cpp | 11 + mavros/src/plugins/ftp.cpp | 12 + mavros/src/plugins/geofence.cpp | 6 + mavros/src/plugins/global_position.cpp | 20 + mavros/src/plugins/home_position.cpp | 4 + mavros/src/plugins/imu.cpp | 12 + mavros/src/plugins/local_position.cpp | 11 + mavros/src/plugins/manual_control.cpp | 2 + mavros/src/plugins/nav_controller_output.cpp | 1 + mavros/src/plugins/param.cpp | 13 + mavros/src/plugins/rallypoint.cpp | 6 + mavros/src/plugins/rc_io.cpp | 3 + mavros/src/plugins/setpoint_accel.cpp | 1 + mavros/src/plugins/setpoint_attitude.cpp | 4 + mavros/src/plugins/setpoint_position.cpp | 5 + mavros/src/plugins/setpoint_raw.cpp | 7 + mavros/src/plugins/setpoint_trajectory.cpp | 5 + mavros/src/plugins/setpoint_velocity.cpp | 4 + mavros/src/plugins/sys_status.cpp | 17 + mavros/src/plugins/sys_time.cpp | 6 + mavros/src/plugins/waypoint.cpp | 10 +- mavros/src/plugins/wind_estimation.cpp | 1 + mavros_extras/src/plugins/3dr_radio.cpp | 2 + mavros_extras/src/plugins/adsb.cpp | 2 + mavros_extras/src/plugins/cam_imu_sync.cpp | 1 + mavros_extras/src/plugins/camera.cpp | 1 + mavros_extras/src/plugins/cellular_status.cpp | 1 + .../src/plugins/companion_process_status.cpp | 1 + mavros_extras/src/plugins/debug_value.cpp | 6 + mavros_extras/src/plugins/distance_sensor.cpp | 4 + mavros_extras/src/plugins/esc_status.cpp | 2 + mavros_extras/src/plugins/esc_telemetry.cpp | 1 + mavros_extras/src/plugins/fake_gps.cpp | 25 + mavros_extras/src/plugins/gimbal_control.cpp | 18 + mavros_extras/src/plugins/gps_input.cpp | 2 + mavros_extras/src/plugins/gps_rtk.cpp | 2 + mavros_extras/src/plugins/gps_status.cpp | 4 + mavros_extras/src/plugins/guided_target.cpp | 3 + mavros_extras/src/plugins/hil.cpp | 7 + mavros_extras/src/plugins/landing_target.cpp | 20 + mavros_extras/src/plugins/log_transfer.cpp | 6 + .../src/plugins/mag_calibration_status.cpp | 2 + .../src/plugins/mocap_pose_estimate.cpp | 2 + mavros_extras/src/plugins/mount_control.cpp | 10 + .../src/plugins/obstacle_distance.cpp | 2 + .../src/plugins/obstacle_distance_3d.cpp | 2 + mavros_extras/src/plugins/odom.cpp | 5 + .../src/plugins/onboard_computer_status.cpp | 1 + mavros_extras/src/plugins/open_drone_id.cpp | 5 + mavros_extras/src/plugins/optical_flow.cpp | 7 + mavros_extras/src/plugins/play_tune.cpp | 1 + mavros_extras/src/plugins/px4flow.cpp | 8 + mavros_extras/src/plugins/rangefinder.cpp | 1 + mavros_extras/src/plugins/sim_state.cpp | 5 + mavros_extras/src/plugins/terrain.cpp | 4 + mavros_extras/src/plugins/trajectory.cpp | 3 + mavros_extras/src/plugins/tunnel.cpp | 2 + mavros_extras/src/plugins/vfr_hud.cpp | 1 + mavros_extras/src/plugins/vibration.cpp | 2 + .../src/plugins/vision_pose_estimate.cpp | 6 + .../src/plugins/vision_speed_estimate.cpp | 3 + mavros_extras/src/plugins/wheel_odometry.cpp | 16 + 132 files changed, 1696 insertions(+), 1034 deletions(-) diff --git a/README.md b/README.md index b4b215a76..2f730fd21 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ MAVROS -====== -[![GitHub release (latest by date)](https://img.shields.io/github/v/release/mavlink/mavros)](https://github.com/mavlink/mavros/releases) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mavlink/mavros?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![CI](https://github.com/mavlink/mavros/actions/workflows/main.yml/badge.svg)](https://github.com/mavlink/mavros/actions/workflows/main.yml) +===== +[![GitHub release (latest by date)](https://img.shields.io/github/v/release/mavlink/mavros)](https://github.com/mavlink/mavros/releases) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mavlink/mavros?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![CI](https://github.com/mavlink/mavros/actions/workflows/main.yml/badge.svg)](https://github.com/mavlink/mavros/actions/workflows/main.yml) [![Documentation](https://readthedocs.org/projects/mavros/badge/?version=latest)](https://mavros.readthedocs.io/en/latest/) MAVLink extendable communication node for ROS. diff --git a/docs/plugins/extras/3dr_radio.md b/docs/plugins/extras/3dr_radio.md index 967457e4e..8fb491828 100644 --- a/docs/plugins/extras/3dr_radio.md +++ b/docs/plugins/extras/3dr_radio.md @@ -7,7 +7,7 @@ ## Publishers -- `radio_status` ([mavros_msgs::msg::RadioStatus](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/RadioStatus.html)) +- `radio_status` ([mavros_msgs::msg::RadioStatus](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/RadioStatus.html)) - Publish radio status from MAVLink RADIO_STATUS/RADIO. ## Subscribers @@ -23,7 +23,7 @@ ## Parameters -- `low_rssi` [type: integer, default: `40`] +- `low_rssi` [type: integer, default: `40`] - Low RSSI threshold for diagnostics [dB]. ## MAVLink Subscriptions diff --git a/docs/plugins/extras/adsb.md b/docs/plugins/extras/adsb.md index aa20f7114..dd7f67b6a 100644 --- a/docs/plugins/extras/adsb.md +++ b/docs/plugins/extras/adsb.md @@ -9,11 +9,11 @@ Publish/subscribe Automatic dependent surveillance-broadcast data to/from a vehicle. Implements the [MAVLink Traffic Management (UTM/ADS-B)](https://mavlink.io/en/services/traffic_management.html). ## Publishers -- `~/vehicle` ([mavros_msgs::msg::ADSBVehicle](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/ADSBVehicle.html)) +- `~/vehicle` ([mavros_msgs::msg::ADSBVehicle](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/ADSBVehicle.html)) - Publish received ADSB_VEHICLE messages (MAVLink traffic management). ## Subscribers -- `~/send` ([mavros_msgs::msg::ADSBVehicle](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/ADSBVehicle.html)) +- `~/send` ([mavros_msgs::msg::ADSBVehicle](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/ADSBVehicle.html)) - Subscribe to ADSBVehicle messages to send as ADSB_VEHICLE to the FCU. ## Services diff --git a/docs/plugins/extras/cam_imu_sync.md b/docs/plugins/extras/cam_imu_sync.md index 335455d8d..f432bfd05 100644 --- a/docs/plugins/extras/cam_imu_sync.md +++ b/docs/plugins/extras/cam_imu_sync.md @@ -9,7 +9,7 @@ This plugin publishes a timestamp for when a external camera system was triggered by the FCU. Sequence ID from the message and the image sequence from camera can be correlated to get the exact shutter trigger time. ## Publishers -- `~/cam_imu_stamp` ([mavros_msgs::msg::CamIMUStamp](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/CamIMUStamp.html)) +- `~/cam_imu_stamp` ([mavros_msgs::msg::CamIMUStamp](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/CamIMUStamp.html)) - Publish camera IMU trigger timestamp from MAVLink CAMERA_TRIGGER. ## Subscribers diff --git a/docs/plugins/extras/camera.md b/docs/plugins/extras/camera.md index 57d00e866..a31b989d5 100644 --- a/docs/plugins/extras/camera.md +++ b/docs/plugins/extras/camera.md @@ -9,7 +9,7 @@ Plugin for interfacing on the mavlink camera protocol. Implements the [MAVLink Camera Protocol v2](https://mavlink.io/en/services/camera.html). @see command_cb() ## Publishers -- `~/image_captured` ([mavros_msgs::msg::CameraImageCaptured](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/CameraImageCaptured.html)) +- `~/image_captured` ([mavros_msgs::msg::CameraImageCaptured](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/CameraImageCaptured.html)) - Publish camera image capture info from MAVLink CAMERA_IMAGE_CAPTURED. ## Subscribers diff --git a/docs/plugins/extras/cellular_status.md b/docs/plugins/extras/cellular_status.md index 0e9d4a05e..13d82cfe0 100644 --- a/docs/plugins/extras/cellular_status.md +++ b/docs/plugins/extras/cellular_status.md @@ -13,7 +13,7 @@ Users must publish to the topic the CellularStatus message and it will be relaye ## Subscribers -- `~/status` ([mavros_msgs::msg::CellularStatus](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/CellularStatus.html)) +- `~/status` ([mavros_msgs::msg::CellularStatus](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/CellularStatus.html)) - Subscribe to CellularStatus messages to send as CELLULAR_STATUS to the FCU. ## Services diff --git a/docs/plugins/extras/companion_process_status.md b/docs/plugins/extras/companion_process_status.md index 771b2a5c7..10f642852 100644 --- a/docs/plugins/extras/companion_process_status.md +++ b/docs/plugins/extras/companion_process_status.md @@ -13,7 +13,7 @@ Publishes the status of components running on the companion computer @see status ## Subscribers -- `~/status` ([mavros_msgs::msg::CompanionProcessStatus](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/CompanionProcessStatus.html)) +- `~/status` ([mavros_msgs::msg::CompanionProcessStatus](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/CompanionProcessStatus.html)) - Subscribe to CompanionProcessStatus to send as HEARTBEAT to the FCU. ## Services diff --git a/docs/plugins/extras/debug_value.md b/docs/plugins/extras/debug_value.md index 4d3c09c9d..7287358ea 100644 --- a/docs/plugins/extras/debug_value.md +++ b/docs/plugins/extras/debug_value.md @@ -7,15 +7,15 @@ ## Publishers -- `~/debug` (DV) - publishers -- `~/debug_vector` (DV) -- `~/debug_float_array` (DV) -- `~/named_value_float` (DV) -- `~/named_value_int` (DV) +- `~/debug` (DV) - publishers Publish DEBUG messages from MAVLink DEBUG. +- `~/debug_vector` (DV) - Publish DEBUG_VECT messages from MAVLink DEBUG_VECT. +- `~/debug_float_array` (DV) - Publish DEBUG_FLOAT_ARRAY messages from MAVLink DEBUG_FLOAT_ARRAY. +- `~/named_value_float` (DV) - Publish NAMED_VALUE_FLOAT messages from MAVLink NAMED_VALUE_FLOAT. +- `~/named_value_int` (DV) - Publish NAMED_VALUE_INT messages from MAVLink NAMED_VALUE_INT. ## Subscribers -- `~/send` (DV) +- `~/send` (DV) - subscribers Subscribe to DebugValue to send MAVLink debug messages to the FCU. ## Services diff --git a/docs/plugins/extras/distance_sensor.md b/docs/plugins/extras/distance_sensor.md index ea53636c5..abe47cb93 100644 --- a/docs/plugins/extras/distance_sensor.md +++ b/docs/plugins/extras/distance_sensor.md @@ -9,11 +9,11 @@ This plugin allows publishing distance sensor data, which is connected to an offboard/companion computer through USB/Serial, to the FCU or vice-versa. ## Publishers -- `topic_name` (Range) +- `topic_name` (Range) - Publish sensor_msgs/Range from MAVLink DISTANCE_SENSOR. ## Subscribers -- `topic_name` (Range) +- `topic_name` (Range) - Subscribe sensor_msgs/Range to send as DISTANCE_SENSOR to the FCU. ## Services @@ -25,8 +25,8 @@ This plugin allows publishing distance sensor data, which is connected to an off ## Parameters -- `base_frame_id` [default: `"base_link"`] -- `config` [type: string, default: `""`] +- `base_frame_id` [default: `"base_link"`] - Base frame id used for distance sensor transforms. +- `config` [type: string, default: `""`] - Sensor mapping configuration (YAML: id, topic, orientation, etc). ## MAVLink Subscriptions diff --git a/docs/plugins/extras/esc_status.md b/docs/plugins/extras/esc_status.md index 92866df1a..5e2d4fdf2 100644 --- a/docs/plugins/extras/esc_status.md +++ b/docs/plugins/extras/esc_status.md @@ -7,8 +7,8 @@ ## Publishers -- `~/info` ([mavros_msgs::msg::ESCInfo](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/ESCInfo.html)) -- `~/status` ([mavros_msgs::msg::ESCStatus](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/ESCStatus.html)) +- `~/info` ([mavros_msgs::msg::ESCInfo](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/ESCInfo.html)) - Publish ESC information from MAVLink ESC_INFO. +- `~/status` ([mavros_msgs::msg::ESCStatus](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/ESCStatus.html)) - Publish ESC status from MAVLink ESC_STATUS. ## Subscribers diff --git a/docs/plugins/extras/esc_telemetry.md b/docs/plugins/extras/esc_telemetry.md index a669d2ffc..d42365462 100644 --- a/docs/plugins/extras/esc_telemetry.md +++ b/docs/plugins/extras/esc_telemetry.md @@ -9,7 +9,7 @@ APM specific plugin. ## Publishers -- `~/telemetry` ([mavros_msgs::msg::ESCTelemetry](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/ESCTelemetry.html)) +- `~/telemetry` ([mavros_msgs::msg::ESCTelemetry](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/ESCTelemetry.html)) - Publish ESC telemetry from MAVLink ESC_TELEMETRY_* messages. ## Subscribers diff --git a/docs/plugins/extras/fake_gps.md b/docs/plugins/extras/fake_gps.md index 406726698..13f469d85 100644 --- a/docs/plugins/extras/fake_gps.md +++ b/docs/plugins/extras/fake_gps.md @@ -13,10 +13,10 @@ Sends fake GPS from local position estimation source data (motion capture, visio ## Subscribers -- `~/mocap/tf` ([geometry_msgs::msg::TransformStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TransformStamped.html)) -- `~/mocap/pose_cov` ([geometry_msgs::msg::PoseWithCovarianceStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseWithCovarianceStamped.html)) -- `~/mocap/pose` ([geometry_msgs::msg::PoseStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseStamped.html)) -- `~/vision` ([geometry_msgs::msg::PoseStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseStamped.html)) +- `~/mocap/tf` ([geometry_msgs::msg::TransformStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TransformStamped.html)) - MoCap pose source as TransformStamped. +- `~/mocap/pose_cov` ([geometry_msgs::msg::PoseWithCovarianceStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseWithCovarianceStamped.html)) - MoCap pose source as PoseWithCovarianceStamped. +- `~/mocap/pose` ([geometry_msgs::msg::PoseStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseStamped.html)) - MoCap pose source as PoseStamped. +- `~/vision` ([geometry_msgs::msg::PoseStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseStamped.html)) - Vision pose source as PoseStamped. ## Services @@ -28,23 +28,23 @@ Sends fake GPS from local position estimation source data (motion capture, visio ## Parameters -- `gps_id` [type: integer, default: `0`] - general params -- `fix_type` [default: `utils::enum_value(GPS_FIX_TYPE::NO_GPS)`] -- `gps_rate` [type: double, default: `5.0`] -- `eph` [type: double, default: `2.0`] -- `epv` [type: double, default: `2.0`] -- `horiz_accuracy` [type: double, default: `0.0`] -- `vert_accuracy` [type: double, default: `0.0`] -- `speed_accuracy` [type: double, default: `0.0`] -- `satellites_visible` [type: integer, default: `5`] -- `geo_origin.lat` [type: double, default: `47.3667`] - default origin/starting point: Zürich geodetic coordinates -- `geo_origin.lon` [type: double, default: `8.5500`] -- `geo_origin.alt` [type: double, default: `408.0`] -- `use_hil_gps` [type: bool, default: `false`] -- `tf.frame_id` [default: `"map"`] - tf params -- `tf.child_frame_id` [default: `"base_link"`] -- `tf.rate_limit` [type: double, default: `10.0`] -- `tf.listen` [type: bool, default: `false`] +- `gps_id` [type: integer, default: `0`] - general params GPS receiver id in GPS_INPUT messages. +- `fix_type` [default: `utils::enum_value(GPS_FIX_TYPE::NO_GPS)`] - GPS fix type reported in fake GPS messages. +- `gps_rate` [type: double, default: `5.0`] - Rate at which fake GPS messages are sent. +- `eph` [type: double, default: `2.0`] - Horizontal position error [m]. +- `epv` [type: double, default: `2.0`] - Vertical position error [m]. +- `horiz_accuracy` [type: double, default: `0.0`] - Horizontal position accuracy [m]. +- `vert_accuracy` [type: double, default: `0.0`] - Vertical position accuracy [m]. +- `speed_accuracy` [type: double, default: `0.0`] - Speed accuracy [m/s]. +- `satellites_visible` [type: integer, default: `5`] - Number of visible satellites reported in fake GPS. +- `geo_origin.lat` [type: double, default: `47.3667`] - default origin/starting point: Zürich geodetic coordinates Geodetic origin latitude [deg]. +- `geo_origin.lon` [type: double, default: `8.5500`] - Geodetic origin longitude [deg]. +- `geo_origin.alt` [type: double, default: `408.0`] - Geodetic origin altitude [m]. +- `use_hil_gps` [type: bool, default: `false`] - Send HIL_GPS if true, GPS_INPUT if false. +- `tf.frame_id` [default: `"map"`] - tf params TF frame id for pose source. +- `tf.child_frame_id` [default: `"base_link"`] - TF child frame id for pose source. +- `tf.rate_limit` [type: double, default: `10.0`] - TF rate limit [Hz]. +- `tf.listen` [type: bool, default: `false`] - Listen to TF pose source. ## MAVLink Subscriptions diff --git a/docs/plugins/extras/gimbal_control.md b/docs/plugins/extras/gimbal_control.md index fe7feb750..dc88e9eb6 100644 --- a/docs/plugins/extras/gimbal_control.md +++ b/docs/plugins/extras/gimbal_control.md @@ -9,36 +9,36 @@ Implements the [MAVLink Gimbal Protocol v2](https://mavlink.io/en/services/gimbal_v2.html). Also publishes gimbal pose to TF when parameter tf_send==true ## Publishers -- `~/device/attitude_status` ([mavros_msgs::msg::GimbalDeviceAttitudeStatus](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GimbalDeviceAttitudeStatus.html)) -- `~/manager/status` ([mavros_msgs::msg::GimbalManagerStatus](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GimbalManagerStatus.html)) -- `~/manager/info` ([mavros_msgs::msg::GimbalManagerInformation](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GimbalManagerInformation.html)) -- `~/device/info` ([mavros_msgs::msg::GimbalDeviceInformation](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GimbalDeviceInformation.html)) +- `~/device/attitude_status` ([mavros_msgs::msg::GimbalDeviceAttitudeStatus](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GimbalDeviceAttitudeStatus.html)) - Publishers Publish gimbal device attitude status (GIMBAL_DEVICE_ATTITUDE_STATUS). +- `~/manager/status` ([mavros_msgs::msg::GimbalManagerStatus](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GimbalManagerStatus.html)) - Publish gimbal manager status (GIMBAL_MANAGER_STATUS). +- `~/manager/info` ([mavros_msgs::msg::GimbalManagerInformation](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GimbalManagerInformation.html)) - Publish gimbal manager information (GIMBAL_MANAGER_INFORMATION). +- `~/device/info` ([mavros_msgs::msg::GimbalDeviceInformation](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GimbalDeviceInformation.html)) - --Not successfully validated-- Publish gimbal device information (GIMBAL_DEVICE_INFORMATION). ## Subscribers -- `~/device/set_attitude` ([mavros_msgs::msg::GimbalDeviceSetAttitude](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GimbalDeviceSetAttitude.html)) -- `~/manager/set_attitude` ([mavros_msgs::msg::GimbalManagerSetAttitude](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GimbalManagerSetAttitude.html)) -- `~/manager/set_pitchyaw` ([mavros_msgs::msg::GimbalManagerSetPitchyaw](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GimbalManagerSetPitchyaw.html)) -- `~/manager/set_manual_control` ([mavros_msgs::msg::GimbalManagerSetPitchyaw](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GimbalManagerSetPitchyaw.html)) +- `~/device/set_attitude` ([mavros_msgs::msg::GimbalDeviceSetAttitude](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GimbalDeviceSetAttitude.html)) - Subscribers --Not successfully validated-- Set gimbal device attitude (GIMBAL_DEVICE_SET_ATTITUDE). +- `~/manager/set_attitude` ([mavros_msgs::msg::GimbalManagerSetAttitude](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GimbalManagerSetAttitude.html)) - --Not successfully validated-- Set gimbal manager attitude (GIMBAL_MANAGER_SET_ATTITUDE). +- `~/manager/set_pitchyaw` ([mavros_msgs::msg::GimbalManagerSetPitchyaw](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GimbalManagerSetPitchyaw.html)) - --Not successfully validated-- Set gimbal manager pitch/yaw (GIMBAL_MANAGER_SET_PITCHYAW). +- `~/manager/set_manual_control` ([mavros_msgs::msg::GimbalManagerSetPitchyaw](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GimbalManagerSetPitchyaw.html)) - --Not successfully validated-- also note that the message is the same as pitchyaw and will likely change Set gimbal manager manual control (GIMBAL_MANAGER_SET_PITCHYAW). ## Services -- `~/device/get_info` ([mavros_msgs::srv::GimbalGetInformation](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/GimbalGetInformation.html)) -- `~/manager/get_info` ([mavros_msgs::srv::GimbalGetInformation](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/GimbalGetInformation.html)) -- `~/manager/configure` ([mavros_msgs::srv::GimbalManagerConfigure](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/GimbalManagerConfigure.html)) -- `~/manager/pitchyaw` ([mavros_msgs::srv::GimbalManagerPitchyaw](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/GimbalManagerPitchyaw.html)) -- `~/manager/set_roi` ([mavros_msgs::srv::GimbalManagerSetRoi](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/GimbalManagerSetRoi.html)) -- `~/manager/camera_track` ([mavros_msgs::srv::GimbalManagerCameraTrack](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/GimbalManagerCameraTrack.html)) +- `~/device/get_info` ([mavros_msgs::srv::GimbalGetInformation](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/GimbalGetInformation.html)) - Services --Not successfully validated-- Request gimbal device information (GIMBAL_DEVICE_INFORMATION). +- `~/manager/get_info` ([mavros_msgs::srv::GimbalGetInformation](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/GimbalGetInformation.html)) - Request gimbal manager information (GIMBAL_MANAGER_INFORMATION). +- `~/manager/configure` ([mavros_msgs::srv::GimbalManagerConfigure](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/GimbalManagerConfigure.html)) - Configure gimbal manager (MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE). +- `~/manager/pitchyaw` ([mavros_msgs::srv::GimbalManagerPitchyaw](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/GimbalManagerPitchyaw.html)) - Set gimbal manager pitch/yaw (MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW). +- `~/manager/set_roi` ([mavros_msgs::srv::GimbalManagerSetRoi](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/GimbalManagerSetRoi.html)) - Set gimbal manager region of interest (MAV_CMD_DO_SET_ROI_*). +- `~/manager/camera_track` ([mavros_msgs::srv::GimbalManagerCameraTrack](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/GimbalManagerCameraTrack.html)) - --Not successfully validated-- Control gimbal camera tracking (MAV_CMD_CAMERA_TRACK_*). ## Clients -- `cmd/command` ([mavros_msgs::srv::CommandLong](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/CommandLong.html)) +- `cmd/command` ([mavros_msgs::srv::CommandLong](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/CommandLong.html)) - Client to send MAVLink commands (mavros/cmd/command). ## Parameters -- `frame_id` [default: `"base_link_frd"`] -- `tf.send` [type: bool, default: `false`] - Important tf subsection Report the transform from base_link to gimbal here. -- `tf.frame_id` [default: `"base_link_frd"`] +- `frame_id` [default: `"base_link_frd"`] - Frame id used for topic headers. +- `tf.send` [type: bool, default: `false`] - Important tf subsection Report the transform from base_link to gimbal here. Enable publishing gimbal pose to TF. +- `tf.frame_id` [default: `"base_link_frd"`] - TF frame id for gimbal pose. ## MAVLink Subscriptions diff --git a/docs/plugins/extras/gps_input.md b/docs/plugins/extras/gps_input.md index 766d93d4d..2b7732b72 100644 --- a/docs/plugins/extras/gps_input.md +++ b/docs/plugins/extras/gps_input.md @@ -13,7 +13,7 @@ Sends GPS_INPUT M ## Subscribers -- `~/gps_input` ([mavros_msgs::msg::GPSINPUT](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GPSINPUT.html)) +- `~/gps_input` ([mavros_msgs::msg::GPSINPUT](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GPSINPUT.html)) - Subscribe to GPSINPUT to send as GPS_INPUT to the FCU. ## Services @@ -25,7 +25,7 @@ Sends GPS_INPUT M ## Parameters -- `gps_rate` [type: double, default: `5.0`] +- `gps_rate` [type: double, default: `5.0`] - Rate at which GPS_INPUT messages are sent [Hz]. ## MAVLink Subscriptions diff --git a/docs/plugins/extras/gps_rtk.md b/docs/plugins/extras/gps_rtk.md index 544ac1804..a58bb332b 100644 --- a/docs/plugins/extras/gps_rtk.md +++ b/docs/plugins/extras/gps_rtk.md @@ -9,11 +9,11 @@ 1. Publish the RTCM messages from ROS to the FCU 2. Publish RTK baseline data from the FCU to ROS ## Publishers -- `~/rtk_baseline` ([mavros_msgs::msg::RTKBaseline](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/RTKBaseline.html)) - TODO(vooon): set QoS for latched topic +- `~/rtk_baseline` ([mavros_msgs::msg::RTKBaseline](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/RTKBaseline.html)) - TODO(vooon): set QoS for latched topic Publish RTK baseline data from MAVLink GPS_RTK. ## Subscribers -- `~/send_rtcm` ([mavros_msgs::msg::RTCM](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/RTCM.html)) +- `~/send_rtcm` ([mavros_msgs::msg::RTCM](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/RTCM.html)) - Subscribe to RTCM to send as GPS_RTCM_DATA to the FCU. ## Services diff --git a/docs/plugins/extras/gps_status.md b/docs/plugins/extras/gps_status.md index 1a394eff5..6b4c08636 100644 --- a/docs/plugins/extras/gps_status.md +++ b/docs/plugins/extras/gps_status.md @@ -9,10 +9,10 @@ This plugin publishes GPS sensor data from a Mavlink compatible FCU to ROS. ## Publishers -- `~/gps1/raw` ([mavros_msgs::msg::GPSRAW](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GPSRAW.html)) -- `~/gps2/raw` ([mavros_msgs::msg::GPSRAW](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GPSRAW.html)) -- `~/gps1/rtk` ([mavros_msgs::msg::GPSRTK](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GPSRTK.html)) -- `~/gps2/rtk` ([mavros_msgs::msg::GPSRTK](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GPSRTK.html)) +- `~/gps1/raw` ([mavros_msgs::msg::GPSRAW](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GPSRAW.html)) - Publish GPS raw data from MAVLink GPS_RAW_INT. +- `~/gps2/raw` ([mavros_msgs::msg::GPSRAW](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GPSRAW.html)) - Publish GPS raw data from MAVLink GPS2_RAW. +- `~/gps1/rtk` ([mavros_msgs::msg::GPSRTK](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GPSRTK.html)) - Publish RTK baseline from MAVLink GPS_RTK. +- `~/gps2/rtk` ([mavros_msgs::msg::GPSRTK](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GPSRTK.html)) - Publish RTK baseline from MAVLink GPS2_RTK. ## Subscribers diff --git a/docs/plugins/extras/guided_target.md b/docs/plugins/extras/guided_target.md index 6c0eb6307..71441b5d6 100644 --- a/docs/plugins/extras/guided_target.md +++ b/docs/plugins/extras/guided_target.md @@ -9,11 +9,11 @@ Send and receive setpoint positions from FCU controller. ## Publishers -- `/move_base_simple/goal` ([geometry_msgs::msg::PoseStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseStamped.html)) - Publish targets received from FCU +- `/move_base_simple/goal` ([geometry_msgs::msg::PoseStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseStamped.html)) - Publish targets received from FCU Publish guided target from MAVLink POSITION_TARGET_GLOBAL_INT. ## Subscribers -- `global_position/gp_origin` ([geographic_msgs::msg::GeoPointStamped](https://docs.ros.org/en/rolling/p/geographic_msgs/msg/GeoPointStamped.html)) - Subscriber for global origin (aka map origin). +- `global_position/gp_origin` ([geographic_msgs::msg::GeoPointStamped](https://docs.ros.org/en/rolling/p/geographic_msgs/msg/GeoPointStamped.html)) - Subscriber for global origin (aka map origin). Subscribe to global position origin (map origin). ## Services @@ -25,7 +25,7 @@ Send and receive setpoint positions from FCU controller. ## Parameters -- `frame_id` [default: `"map"`] - frame params: +- `frame_id` [default: `"map"`] - frame params: Frame id used for the published target. ## MAVLink Subscriptions diff --git a/docs/plugins/extras/hil.md b/docs/plugins/extras/hil.md index ec4e56fd9..4672269f0 100644 --- a/docs/plugins/extras/hil.md +++ b/docs/plugins/extras/hil.md @@ -7,16 +7,16 @@ ## Publishers -- `~/controls` ([mavros_msgs::msg::HilControls](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/HilControls.html)) -- `~/actuator_controls` ([mavros_msgs::msg::HilActuatorControls](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/HilActuatorControls.html)) +- `~/controls` ([mavros_msgs::msg::HilControls](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/HilControls.html)) - Publish HIL_CONTROLS from the FCU. +- `~/actuator_controls` ([mavros_msgs::msg::HilActuatorControls](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/HilActuatorControls.html)) - Publish HIL_ACTUATOR_CONTROLS from the FCU. ## Subscribers -- `~/state` ([mavros_msgs::msg::HilStateQuaternion](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/HilStateQuaternion.html)) -- `~/gps` ([mavros_msgs::msg::HilGPS](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/HilGPS.html)) -- `~/imu_ned` ([mavros_msgs::msg::HilSensor](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/HilSensor.html)) -- `~/optical_flow` ([mavros_msgs::msg::OpticalFlowRad](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/OpticalFlowRad.html)) -- `~/rc_inputs` ([mavros_msgs::msg::RCIn](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/RCIn.html)) +- `~/state` ([mavros_msgs::msg::HilStateQuaternion](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/HilStateQuaternion.html)) - Subscribe to receive HIL_STATE_QUATERNION from simulation. +- `~/gps` ([mavros_msgs::msg::HilGPS](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/HilGPS.html)) - Subscribe to receive HIL_GPS from simulation. +- `~/imu_ned` ([mavros_msgs::msg::HilSensor](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/HilSensor.html)) - Subscribe to receive HIL_SENSOR from simulation. +- `~/optical_flow` ([mavros_msgs::msg::OpticalFlowRad](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/OpticalFlowRad.html)) - Subscribe to receive HIL_OPTICAL_FLOW from simulation. +- `~/rc_inputs` ([mavros_msgs::msg::RCIn](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/RCIn.html)) - Subscribe to receive HIL_RC_INPUTS_RAW from simulation. ## Services diff --git a/docs/plugins/extras/index.json b/docs/plugins/extras/index.json index c6643fc69..d5d45ff72 100644 --- a/docs/plugins/extras/index.json +++ b/docs/plugins/extras/index.json @@ -10,14 +10,16 @@ { "name": "~/vehicle", "type_name": "mavros_msgs::msg::ADSBVehicle", - "line": 47 + "line": 48, + "description": "Publish received ADSB_VEHICLE messages (MAVLink traffic management)." } ], "subscribers": [ { "name": "~/send", "type_name": "mavros_msgs::msg::ADSBVehicle", - "line": 49 + "line": 51, + "description": "Subscribe to ADSBVehicle messages to send as ADSB_VEHICLE to the FCU." } ], "services": [], @@ -30,7 +32,7 @@ "message_name": "ADSB_VEHICLE", "msg_id_expr": "mavlink::common::msg::ADSB_VEHICLE::MSG_ID", "dialect": "common", - "line": 57, + "line": 59, "msg_id": 246 } ], @@ -41,7 +43,7 @@ "message_name": "ADSB_VEHICLE", "msg_id_expr": "mavlink::common::msg::ADSB_VEHICLE::MSG_ID", "dialect": "common", - "line": 165, + "line": 167, "msg_id": 246 } ] @@ -57,7 +59,8 @@ { "name": "~/cam_imu_stamp", "type_name": "mavros_msgs::msg::CamIMUStamp", - "line": 42 + "line": 43, + "description": "Publish camera IMU trigger timestamp from MAVLink CAMERA_TRIGGER." } ], "subscribers": [], @@ -71,7 +74,7 @@ "message_name": "CAMERA_TRIGGER", "msg_id_expr": "mavlink::common::msg::CAMERA_TRIGGER::MSG_ID", "dialect": "common", - "line": 48, + "line": 49, "msg_id": 112 } ], @@ -88,7 +91,8 @@ { "name": "~/image_captured", "type_name": "mavros_msgs::msg::CameraImageCaptured", - "line": 48 + "line": 49, + "description": "Publish camera image capture info from MAVLink CAMERA_IMAGE_CAPTURED." } ], "subscribers": [], @@ -102,7 +106,7 @@ "message_name": "CAMERA_IMAGE_CAPTURED", "msg_id_expr": "mavlink::common::msg::CAMERA_IMAGE_CAPTURED::MSG_ID", "dialect": "common", - "line": 55, + "line": 56, "msg_id": 263 } ], @@ -120,7 +124,8 @@ { "name": "~/status", "type_name": "mavros_msgs::msg::CellularStatus", - "line": 42 + "line": 43, + "description": "Subscribe to CellularStatus messages to send as CELLULAR_STATUS to the FCU." } ], "services": [], @@ -134,7 +139,7 @@ "message_name": "CELLULAR_STATUS", "msg_id_expr": "mavlink::common::msg::CELLULAR_STATUS::MSG_ID", "dialect": "common", - "line": 74, + "line": 75, "msg_id": 334 } ] @@ -151,7 +156,8 @@ { "name": "~/status", "type_name": "mavros_msgs::msg::CompanionProcessStatus", - "line": 50 + "line": 51, + "description": "Subscribe to CompanionProcessStatus to send as HEARTBEAT to the FCU." } ], "services": [], @@ -165,7 +171,7 @@ "message_name": "HEARTBEAT", "msg_id_expr": "mavlink::minimal::msg::HEARTBEAT::MSG_ID", "dialect": "minimal", - "line": 86, + "line": 87, "msg_id": 0 } ] @@ -181,35 +187,40 @@ { "name": "~/debug", "type_name": "DV", - "line": 50, - "description": "publishers" + "line": 52, + "description": "publishers Publish DEBUG messages from MAVLink DEBUG." }, { "name": "~/debug_vector", "type_name": "DV", - "line": 51 + "line": 54, + "description": "Publish DEBUG_VECT messages from MAVLink DEBUG_VECT." }, { "name": "~/debug_float_array", "type_name": "DV", - "line": 52 + "line": 56, + "description": "Publish DEBUG_FLOAT_ARRAY messages from MAVLink DEBUG_FLOAT_ARRAY." }, { "name": "~/named_value_float", "type_name": "DV", - "line": 53 + "line": 58, + "description": "Publish NAMED_VALUE_FLOAT messages from MAVLink NAMED_VALUE_FLOAT." }, { "name": "~/named_value_int", "type_name": "DV", - "line": 54 + "line": 60, + "description": "Publish NAMED_VALUE_INT messages from MAVLink NAMED_VALUE_INT." } ], "subscribers": [ { "name": "~/send", "type_name": "DV", - "line": 45 + "line": 46, + "description": "subscribers Subscribe to DebugValue to send MAVLink debug messages to the FCU." } ], "services": [], @@ -222,7 +233,7 @@ "message_name": "DEBUG", "msg_id_expr": "mavlink::common::msg::DEBUG::MSG_ID", "dialect": "common", - "line": 60, + "line": 66, "msg_id": 254 }, { @@ -231,7 +242,7 @@ "message_name": "DEBUG_VECT", "msg_id_expr": "mavlink::common::msg::DEBUG_VECT::MSG_ID", "dialect": "common", - "line": 61, + "line": 67, "msg_id": 250 }, { @@ -240,7 +251,7 @@ "message_name": "DEBUG_FLOAT_ARRAY", "msg_id_expr": "mavlink::common::msg::DEBUG_FLOAT_ARRAY::MSG_ID", "dialect": "common", - "line": 62, + "line": 68, "msg_id": 350 }, { @@ -249,7 +260,7 @@ "message_name": "NAMED_VALUE_FLOAT", "msg_id_expr": "mavlink::common::msg::NAMED_VALUE_FLOAT::MSG_ID", "dialect": "common", - "line": 63, + "line": 69, "msg_id": 251 }, { @@ -258,7 +269,7 @@ "message_name": "NAMED_VALUE_INT", "msg_id_expr": "mavlink::common::msg::NAMED_VALUE_INT::MSG_ID", "dialect": "common", - "line": 64, + "line": 70, "msg_id": 252 } ], @@ -269,7 +280,7 @@ "message_name": "DEBUG", "msg_id_expr": "mavlink::common::msg::DEBUG::MSG_ID", "dialect": "common", - "line": 303, + "line": 309, "msg_id": 254 }, { @@ -278,7 +289,7 @@ "message_name": "DEBUG_VECT", "msg_id_expr": "mavlink::common::msg::DEBUG_VECT::MSG_ID", "dialect": "common", - "line": 320, + "line": 326, "msg_id": 250 }, { @@ -287,7 +298,7 @@ "message_name": "DEBUG_FLOAT_ARRAY", "msg_id_expr": "mavlink::common::msg::DEBUG_FLOAT_ARRAY::MSG_ID", "dialect": "common", - "line": 332, + "line": 338, "msg_id": 350 }, { @@ -296,7 +307,7 @@ "message_name": "NAMED_VALUE_FLOAT", "msg_id_expr": "mavlink::common::msg::NAMED_VALUE_FLOAT::MSG_ID", "dialect": "common", - "line": 342, + "line": 348, "msg_id": 251 }, { @@ -305,7 +316,7 @@ "message_name": "NAMED_VALUE_INT", "msg_id_expr": "mavlink::common::msg::NAMED_VALUE_INT::MSG_ID", "dialect": "common", - "line": 352, + "line": 358, "msg_id": 252 } ] @@ -321,14 +332,16 @@ { "name": "topic_name", "type_name": "Range", - "line": 450 + "line": 453, + "description": "Publish sensor_msgs/Range from MAVLink DISTANCE_SENSOR." } ], "subscribers": [ { "name": "topic_name", "type_name": "Range", - "line": 453 + "line": 457, + "description": "Subscribe sensor_msgs/Range to send as DISTANCE_SENSOR to the FCU." } ], "services": [], @@ -337,14 +350,16 @@ { "name": "base_frame_id", "type_name": "", - "line": 147, - "default_value": "\"base_link\"" + "line": 148, + "default_value": "\"base_link\"", + "description": "Base frame id used for distance sensor transforms." }, { "name": "config", "type_name": "string", - "line": 151, - "default_value": "\"\"" + "line": 153, + "default_value": "\"\"", + "description": "Sensor mapping configuration (YAML: id, topic, orientation, etc)." } ], "mavlink_subscriptions": [ @@ -354,7 +369,7 @@ "message_name": "DISTANCE_SENSOR", "msg_id_expr": "mavlink::common::msg::DISTANCE_SENSOR::MSG_ID", "dialect": "common", - "line": 192, + "line": 194, "msg_id": 132 } ], @@ -365,7 +380,7 @@ "message_name": "DISTANCE_SENSOR", "msg_id_expr": "mavlink::common::msg::DISTANCE_SENSOR::MSG_ID", "dialect": "common", - "line": 247, + "line": 249, "msg_id": 132 } ] @@ -381,12 +396,14 @@ { "name": "~/info", "type_name": "mavros_msgs::msg::ESCInfo", - "line": 46 + "line": 47, + "description": "Publish ESC information from MAVLink ESC_INFO." }, { "name": "~/status", "type_name": "mavros_msgs::msg::ESCStatus", - "line": 47 + "line": 49, + "description": "Publish ESC status from MAVLink ESC_STATUS." } ], "subscribers": [], @@ -400,7 +417,7 @@ "message_name": "ESC_INFO", "msg_id_expr": "mavlink::common::msg::ESC_INFO::MSG_ID", "dialect": "common", - "line": 55, + "line": 57, "msg_id": 290 }, { @@ -409,7 +426,7 @@ "message_name": "ESC_STATUS", "msg_id_expr": "mavlink::common::msg::ESC_STATUS::MSG_ID", "dialect": "common", - "line": 56, + "line": 58, "msg_id": 291 } ], @@ -426,7 +443,8 @@ { "name": "~/telemetry", "type_name": "mavros_msgs::msg::ESCTelemetry", - "line": 42 + "line": 43, + "description": "Publish ESC telemetry from MAVLink ESC_TELEMETRY_* messages." } ], "subscribers": [], @@ -440,7 +458,7 @@ "message_name": "ESC_TELEMETRY_1_TO_4", "msg_id_expr": "mavlink::ardupilotmega::msg::ESC_TELEMETRY_1_TO_4::MSG_ID", "dialect": "ardupilotmega", - "line": 50, + "line": 51, "msg_id": 11030 }, { @@ -449,7 +467,7 @@ "message_name": "ESC_TELEMETRY_5_TO_8", "msg_id_expr": "mavlink::ardupilotmega::msg::ESC_TELEMETRY_5_TO_8::MSG_ID", "dialect": "ardupilotmega", - "line": 51, + "line": 52, "msg_id": 11031 }, { @@ -458,7 +476,7 @@ "message_name": "ESC_TELEMETRY_9_TO_12", "msg_id_expr": "mavlink::ardupilotmega::msg::ESC_TELEMETRY_9_TO_12::MSG_ID", "dialect": "ardupilotmega", - "line": 52, + "line": 53, "msg_id": 11032 } ], @@ -476,22 +494,26 @@ { "name": "~/mocap/tf", "type_name": "geometry_msgs::msg::TransformStamped", - "line": 209 + "line": 231, + "description": "MoCap pose source as TransformStamped." }, { "name": "~/mocap/pose_cov", "type_name": "geometry_msgs::msg::PoseWithCovarianceStamped", - "line": 214 + "line": 237, + "description": "MoCap pose source as PoseWithCovarianceStamped." }, { "name": "~/mocap/pose", "type_name": "geometry_msgs::msg::PoseStamped", - "line": 218 + "line": 242, + "description": "MoCap pose source as PoseStamped." }, { "name": "~/vision", "type_name": "geometry_msgs::msg::PoseStamped", - "line": 224 + "line": 249, + "description": "Vision pose source as PoseStamped." } ], "services": [], @@ -500,107 +522,121 @@ { "name": "gps_id", "type_name": "integer", - "line": 93, + "line": 94, "default_value": "0", - "description": "general params" + "description": "general params GPS receiver id in GPS_INPUT messages." }, { "name": "fix_type", "type_name": "", - "line": 97, - "default_value": "utils::enum_value(GPS_FIX_TYPE::NO_GPS)" + "line": 99, + "default_value": "utils::enum_value(GPS_FIX_TYPE::NO_GPS)", + "description": "GPS fix type reported in fake GPS messages." }, { "name": "gps_rate", "type_name": "double", - "line": 101, - "default_value": "5.0" + "line": 104, + "default_value": "5.0", + "description": "Rate at which fake GPS messages are sent." }, { "name": "eph", "type_name": "double", - "line": 107, - "default_value": "2.0" + "line": 111, + "default_value": "2.0", + "description": "Horizontal position error [m]." }, { "name": "epv", "type_name": "double", - "line": 111, - "default_value": "2.0" + "line": 116, + "default_value": "2.0", + "description": "Vertical position error [m]." }, { "name": "horiz_accuracy", "type_name": "double", - "line": 115, - "default_value": "0.0" + "line": 121, + "default_value": "0.0", + "description": "Horizontal position accuracy [m]." }, { "name": "vert_accuracy", "type_name": "double", - "line": 119, - "default_value": "0.0" + "line": 126, + "default_value": "0.0", + "description": "Vertical position accuracy [m]." }, { "name": "speed_accuracy", "type_name": "double", - "line": 123, - "default_value": "0.0" + "line": 131, + "default_value": "0.0", + "description": "Speed accuracy [m/s]." }, { "name": "satellites_visible", "type_name": "integer", - "line": 127, - "default_value": "5" + "line": 136, + "default_value": "5", + "description": "Number of visible satellites reported in fake GPS." }, { "name": "geo_origin.lat", "type_name": "double", - "line": 133, + "line": 143, "default_value": "47.3667", - "description": "default origin/starting point: Z\u00fcrich geodetic coordinates" + "description": "default origin/starting point: Z\u00fcrich geodetic coordinates Geodetic origin latitude [deg]." }, { "name": "geo_origin.lon", "type_name": "double", - "line": 137, - "default_value": "8.5500" + "line": 148, + "default_value": "8.5500", + "description": "Geodetic origin longitude [deg]." }, { "name": "geo_origin.alt", "type_name": "double", - "line": 141, - "default_value": "408.0" + "line": 153, + "default_value": "408.0", + "description": "Geodetic origin altitude [m]." }, { "name": "use_hil_gps", "type_name": "bool", - "line": 180, - "default_value": "false" + "line": 197, + "default_value": "false", + "description": "Send HIL_GPS if true, GPS_INPUT if false." }, { "name": "tf.frame_id", "type_name": "", - "line": 188, + "line": 206, "default_value": "\"map\"", - "description": "tf params" + "description": "tf params TF frame id for pose source." }, { "name": "tf.child_frame_id", "type_name": "", - "line": 192, - "default_value": "\"base_link\"" + "line": 211, + "default_value": "\"base_link\"", + "description": "TF child frame id for pose source." }, { "name": "tf.rate_limit", "type_name": "double", - "line": 196, - "default_value": "10.0" + "line": 216, + "default_value": "10.0", + "description": "TF rate limit [Hz]." }, { "name": "tf.listen", "type_name": "bool", - "line": 200, - "default_value": "false" + "line": 221, + "default_value": "false", + "description": "Listen to TF pose source." } ], "mavlink_subscriptions": [], @@ -611,7 +647,7 @@ "message_name": "HIL_GPS", "msg_id_expr": "mavlink::common::msg::HIL_GPS::MSG_ID", "dialect": "common", - "line": 353, + "line": 378, "msg_id": 113 }, { @@ -620,7 +656,7 @@ "message_name": "GPS_INPUT", "msg_id_expr": "mavlink::common::msg::GPS_INPUT::MSG_ID", "dialect": "common", - "line": 399, + "line": 424, "msg_id": 232 } ] @@ -636,104 +672,121 @@ { "name": "~/device/attitude_status", "type_name": "mavros_msgs::msg::GimbalDeviceAttitudeStatus", - "line": 134 + "line": 142, + "description": "Publishers Publish gimbal device attitude status (GIMBAL_DEVICE_ATTITUDE_STATUS)." }, { "name": "~/manager/status", "type_name": "mavros_msgs::msg::GimbalManagerStatus", - "line": 139 + "line": 148, + "description": "Publish gimbal manager status (GIMBAL_MANAGER_STATUS)." }, { "name": "~/manager/info", "type_name": "mavros_msgs::msg::GimbalManagerInformation", - "line": 144 + "line": 154, + "description": "Publish gimbal manager information (GIMBAL_MANAGER_INFORMATION)." }, { "name": "~/device/info", "type_name": "mavros_msgs::msg::GimbalDeviceInformation", - "line": 150 + "line": 161, + "description": "--Not successfully validated-- Publish gimbal device information (GIMBAL_DEVICE_INFORMATION)." } ], "subscribers": [ { "name": "~/device/set_attitude", "type_name": "mavros_msgs::msg::GimbalDeviceSetAttitude", - "line": 104 + "line": 108, + "description": "Subscribers --Not successfully validated-- Set gimbal device attitude (GIMBAL_DEVICE_SET_ATTITUDE)." }, { "name": "~/manager/set_attitude", "type_name": "mavros_msgs::msg::GimbalManagerSetAttitude", - "line": 111 + "line": 116, + "description": "--Not successfully validated-- Set gimbal manager attitude (GIMBAL_MANAGER_SET_ATTITUDE)." }, { "name": "~/manager/set_pitchyaw", "type_name": "mavros_msgs::msg::GimbalManagerSetPitchyaw", - "line": 118 + "line": 124, + "description": "--Not successfully validated-- Set gimbal manager pitch/yaw (GIMBAL_MANAGER_SET_PITCHYAW)." }, { "name": "~/manager/set_manual_control", "type_name": "mavros_msgs::msg::GimbalManagerSetPitchyaw", - "line": 126 + "line": 133, + "description": "--Not successfully validated-- also note that the message is the same as pitchyaw and will likely change Set gimbal manager manual control (GIMBAL_MANAGER_SET_PITCHYAW)." } ], "services": [ { "name": "~/device/get_info", "type_name": "mavros_msgs::srv::GimbalGetInformation", - "line": 158 + "line": 170, + "description": "Services --Not successfully validated-- Request gimbal device information (GIMBAL_DEVICE_INFORMATION)." }, { "name": "~/manager/get_info", "type_name": "mavros_msgs::srv::GimbalGetInformation", - "line": 164 + "line": 177, + "description": "Request gimbal manager information (GIMBAL_MANAGER_INFORMATION)." }, { "name": "~/manager/configure", "type_name": "mavros_msgs::srv::GimbalManagerConfigure", - "line": 170 + "line": 184, + "description": "Configure gimbal manager (MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE)." }, { "name": "~/manager/pitchyaw", "type_name": "mavros_msgs::srv::GimbalManagerPitchyaw", - "line": 176 + "line": 191, + "description": "Set gimbal manager pitch/yaw (MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW)." }, { "name": "~/manager/set_roi", "type_name": "mavros_msgs::srv::GimbalManagerSetRoi", - "line": 182 + "line": 198, + "description": "Set gimbal manager region of interest (MAV_CMD_DO_SET_ROI_*)." }, { "name": "~/manager/camera_track", "type_name": "mavros_msgs::srv::GimbalManagerCameraTrack", - "line": 189 + "line": 206, + "description": "--Not successfully validated-- Control gimbal camera tracking (MAV_CMD_CAMERA_TRACK_*)." } ], "clients": [ { "name": "cmd/command", "type_name": "mavros_msgs::srv::CommandLong", - "line": 259 + "line": 277, + "description": "Client to send MAVLink commands (mavros/cmd/command)." } ], "parameters": [ { "name": "frame_id", "type_name": "", - "line": 85, - "default_value": "\"base_link_frd\"" + "line": 86, + "default_value": "\"base_link_frd\"", + "description": "Frame id used for topic headers." }, { "name": "tf.send", "type_name": "bool", - "line": 92, + "line": 94, "default_value": "false", - "description": "Important tf subsection Report the transform from base_link to gimbal here." + "description": "Important tf subsection Report the transform from base_link to gimbal here. Enable publishing gimbal pose to TF." }, { "name": "tf.frame_id", "type_name": "", - "line": 96, - "default_value": "\"base_link_frd\"" + "line": 99, + "default_value": "\"base_link_frd\"", + "description": "TF frame id for gimbal pose." } ], "mavlink_subscriptions": [ @@ -743,7 +796,7 @@ "message_name": "GIMBAL_DEVICE_ATTITUDE_STATUS", "msg_id_expr": "mavlink::common::msg::GIMBAL_DEVICE_ATTITUDE_STATUS::MSG_ID", "dialect": "common", - "line": 198, + "line": 215, "msg_id": 285 }, { @@ -752,7 +805,7 @@ "message_name": "GIMBAL_MANAGER_STATUS", "msg_id_expr": "mavlink::common::msg::GIMBAL_MANAGER_STATUS::MSG_ID", "dialect": "common", - "line": 199, + "line": 216, "msg_id": 281 }, { @@ -761,7 +814,7 @@ "message_name": "GIMBAL_DEVICE_INFORMATION", "msg_id_expr": "mavlink::common::msg::GIMBAL_DEVICE_INFORMATION::MSG_ID", "dialect": "common", - "line": 200, + "line": 217, "msg_id": 283 }, { @@ -770,7 +823,7 @@ "message_name": "GIMBAL_MANAGER_INFORMATION", "msg_id_expr": "mavlink::common::msg::GIMBAL_MANAGER_INFORMATION::MSG_ID", "dialect": "common", - "line": 201, + "line": 218, "msg_id": 280 } ], @@ -781,7 +834,7 @@ "message_name": "GIMBAL_DEVICE_SET_ATTITUDE", "msg_id_expr": "mavlink::common::msg::GIMBAL_DEVICE_SET_ATTITUDE::MSG_ID", "dialect": "common", - "line": 425, + "line": 443, "msg_id": 284 }, { @@ -790,7 +843,7 @@ "message_name": "GIMBAL_MANAGER_SET_ATTITUDE", "msg_id_expr": "mavlink::common::msg::GIMBAL_MANAGER_SET_ATTITUDE::MSG_ID", "dialect": "common", - "line": 452, + "line": 470, "msg_id": 282 }, { @@ -799,7 +852,7 @@ "message_name": "GIMBAL_MANAGER_SET_PITCHYAW", "msg_id_expr": "mavlink::common::msg::GIMBAL_MANAGER_SET_PITCHYAW::MSG_ID", "dialect": "common", - "line": 474, + "line": 492, "msg_id": 287 }, { @@ -808,7 +861,7 @@ "message_name": "GIMBAL_MANAGER_SET_PITCHYAW", "msg_id_expr": "mavlink::common::msg::GIMBAL_MANAGER_SET_PITCHYAW::MSG_ID", "dialect": "common", - "line": 498, + "line": 516, "msg_id": 287 } ] @@ -825,7 +878,8 @@ { "name": "~/gps_input", "type_name": "mavros_msgs::msg::GPSINPUT", - "line": 53 + "line": 55, + "description": "Subscribe to GPSINPUT to send as GPS_INPUT to the FCU." } ], "services": [], @@ -834,8 +888,9 @@ { "name": "gps_rate", "type_name": "double", - "line": 46, - "default_value": "5.0" + "line": 47, + "default_value": "5.0", + "description": "Rate at which GPS_INPUT messages are sent [Hz]." } ], "mavlink_subscriptions": [], @@ -846,7 +901,7 @@ "message_name": "GPS_INPUT", "msg_id_expr": "mavlink::common::msg::GPS_INPUT::MSG_ID", "dialect": "common", - "line": 121, + "line": 123, "msg_id": 232 } ] @@ -862,15 +917,16 @@ { "name": "~/rtk_baseline", "type_name": "mavros_msgs::msg::RTKBaseline", - "line": 52, - "description": "TODO(vooon): set QoS for latched topic" + "line": 54, + "description": "TODO(vooon): set QoS for latched topic Publish RTK baseline data from MAVLink GPS_RTK." } ], "subscribers": [ { "name": "~/send_rtcm", "type_name": "mavros_msgs::msg::RTCM", - "line": 47 + "line": 48, + "description": "Subscribe to RTCM to send as GPS_RTCM_DATA to the FCU." } ], "services": [], @@ -883,7 +939,7 @@ "message_name": "GPS_RTK", "msg_id_expr": "mavlink::common::msg::GPS_RTK::MSG_ID", "dialect": "common", - "line": 58, + "line": 60, "msg_id": 127 } ], @@ -894,7 +950,7 @@ "message_name": "GPS_RTCM_DATA", "msg_id_expr": "mavlink::common::msg::GPS_RTCM_DATA::MSG_ID", "dialect": "common", - "line": 99, + "line": 101, "msg_id": 233 }, { @@ -903,7 +959,7 @@ "message_name": "GPS_RTCM_DATA", "msg_id_expr": "mavlink::common::msg::GPS_RTCM_DATA::MSG_ID", "dialect": "common", - "line": 110, + "line": 112, "msg_id": 233 } ] @@ -919,22 +975,26 @@ { "name": "~/gps1/raw", "type_name": "mavros_msgs::msg::GPSRAW", - "line": 46 + "line": 47, + "description": "Publish GPS raw data from MAVLink GPS_RAW_INT." }, { "name": "~/gps2/raw", "type_name": "mavros_msgs::msg::GPSRAW", - "line": 47 + "line": 49, + "description": "Publish GPS raw data from MAVLink GPS2_RAW." }, { "name": "~/gps1/rtk", "type_name": "mavros_msgs::msg::GPSRTK", - "line": 48 + "line": 51, + "description": "Publish RTK baseline from MAVLink GPS_RTK." }, { "name": "~/gps2/rtk", "type_name": "mavros_msgs::msg::GPSRTK", - "line": 49 + "line": 53, + "description": "Publish RTK baseline from MAVLink GPS2_RTK." } ], "subscribers": [], @@ -948,7 +1008,7 @@ "message_name": "GPS_RAW_INT", "msg_id_expr": "mavlink::common::msg::GPS_RAW_INT::MSG_ID", "dialect": "common", - "line": 55, + "line": 59, "msg_id": 24 }, { @@ -957,7 +1017,7 @@ "message_name": "GPS2_RAW", "msg_id_expr": "mavlink::common::msg::GPS2_RAW::MSG_ID", "dialect": "common", - "line": 56, + "line": 60, "msg_id": 124 }, { @@ -966,7 +1026,7 @@ "message_name": "GPS_RTK", "msg_id_expr": "mavlink::common::msg::GPS_RTK::MSG_ID", "dialect": "common", - "line": 57, + "line": 61, "msg_id": 127 }, { @@ -975,7 +1035,7 @@ "message_name": "GPS2_RTK", "msg_id_expr": "mavlink::common::msg::GPS2_RTK::MSG_ID", "dialect": "common", - "line": 58, + "line": 62, "msg_id": 128 } ], @@ -992,16 +1052,16 @@ { "name": "/move_base_simple/goal", "type_name": "geometry_msgs::msg::PoseStamped", - "line": 65, - "description": "Publish targets received from FCU" + "line": 67, + "description": "Publish targets received from FCU Publish guided target from MAVLink POSITION_TARGET_GLOBAL_INT." } ], "subscribers": [ { "name": "global_position/gp_origin", "type_name": "geographic_msgs::msg::GeoPointStamped", - "line": 70, - "description": "Subscriber for global origin (aka map origin)." + "line": 73, + "description": "Subscriber for global origin (aka map origin). Subscribe to global position origin (map origin)." } ], "services": [], @@ -1010,9 +1070,9 @@ { "name": "frame_id", "type_name": "", - "line": 59, + "line": 60, "default_value": "\"map\"", - "description": "frame params:" + "description": "frame params: Frame id used for the published target." } ], "mavlink_subscriptions": [ @@ -1022,7 +1082,7 @@ "message_name": "POSITION_TARGET_GLOBAL_INT", "msg_id_expr": "mavlink::common::msg::POSITION_TARGET_GLOBAL_INT::MSG_ID", "dialect": "common", - "line": 78, + "line": 81, "msg_id": 87 } ], @@ -1039,39 +1099,46 @@ { "name": "~/controls", "type_name": "mavros_msgs::msg::HilControls", - "line": 78 + "line": 84, + "description": "Publish HIL_CONTROLS from the FCU." }, { "name": "~/actuator_controls", "type_name": "mavros_msgs::msg::HilActuatorControls", - "line": 79 + "line": 86, + "description": "Publish HIL_ACTUATOR_CONTROLS from the FCU." } ], "subscribers": [ { "name": "~/state", "type_name": "mavros_msgs::msg::HilStateQuaternion", - "line": 59 + "line": 60, + "description": "Subscribe to receive HIL_STATE_QUATERNION from simulation." }, { "name": "~/gps", "type_name": "mavros_msgs::msg::HilGPS", - "line": 62 + "line": 64, + "description": "Subscribe to receive HIL_GPS from simulation." }, { "name": "~/imu_ned", "type_name": "mavros_msgs::msg::HilSensor", - "line": 65 + "line": 68, + "description": "Subscribe to receive HIL_SENSOR from simulation." }, { "name": "~/optical_flow", "type_name": "mavros_msgs::msg::OpticalFlowRad", - "line": 69 + "line": 73, + "description": "Subscribe to receive HIL_OPTICAL_FLOW from simulation." }, { "name": "~/rc_inputs", "type_name": "mavros_msgs::msg::RCIn", - "line": 74 + "line": 79, + "description": "Subscribe to receive HIL_RC_INPUTS_RAW from simulation." } ], "services": [], @@ -1084,7 +1151,7 @@ "message_name": "HIL_CONTROLS", "msg_id_expr": "mavlink::common::msg::HIL_CONTROLS::MSG_ID", "dialect": "common", - "line": 86, + "line": 93, "msg_id": 91 }, { @@ -1093,7 +1160,7 @@ "message_name": "HIL_ACTUATOR_CONTROLS", "msg_id_expr": "mavlink::common::msg::HIL_ACTUATOR_CONTROLS::MSG_ID", "dialect": "common", - "line": 87, + "line": 94, "msg_id": 93 } ], @@ -1104,7 +1171,7 @@ "message_name": "HIL_STATE_QUATERNION", "msg_id_expr": "mavlink::common::msg::HIL_STATE_QUATERNION::MSG_ID", "dialect": "common", - "line": 203, + "line": 210, "msg_id": 115 }, { @@ -1113,7 +1180,7 @@ "message_name": "HIL_GPS", "msg_id_expr": "mavlink::common::msg::HIL_GPS::MSG_ID", "dialect": "common", - "line": 237, + "line": 244, "msg_id": 113 }, { @@ -1122,7 +1189,7 @@ "message_name": "HIL_SENSOR", "msg_id_expr": "mavlink::common::msg::HIL_SENSOR::MSG_ID", "dialect": "common", - "line": 284, + "line": 291, "msg_id": 107 }, { @@ -1131,7 +1198,7 @@ "message_name": "HIL_OPTICAL_FLOW", "msg_id_expr": "mavlink::common::msg::HIL_OPTICAL_FLOW::MSG_ID", "dialect": "common", - "line": 328, + "line": 335, "msg_id": 114 }, { @@ -1140,7 +1207,7 @@ "message_name": "HIL_RC_INPUTS_RAW", "msg_id_expr": "mavlink::common::msg::HIL_RC_INPUTS_RAW::MSG_ID", "dialect": "common", - "line": 365, + "line": 372, "msg_id": 92 } ] @@ -1156,24 +1223,28 @@ { "name": "~/pose_in", "type_name": "geometry_msgs::msg::PoseStamped", - "line": 185 + "line": 203, + "description": "Publish landing target pose from MAVLink LANDING_TARGET." }, { "name": "~/lt_marker", "type_name": "geometry_msgs::msg::Vector3Stamped", - "line": 186 + "line": 205, + "description": "Publish landing target size as Vector3Stamped." } ], "subscribers": [ { "name": "~/raw", "type_name": "mavros_msgs::msg::LandingTarget", - "line": 84 + "line": 87, + "description": "Subscribe to raw LandingTarget messages to send to the FCU." }, { "name": "~/pose", "type_name": "geometry_msgs::msg::PoseStamped", - "line": 190 + "line": 210, + "description": "Subscribe to landing target pose to send as LANDING_TARGET to the FCU." } ], "services": [], @@ -1182,104 +1253,114 @@ { "name": "frame_id", "type_name": "", - "line": 72, + "line": 73, "default_value": "\"landing_target_1\"", - "description": "general params" + "description": "general params Frame id for published landing target messages." }, { "name": "listen_lt", "type_name": "bool", - "line": 77, - "default_value": "false" + "line": 79, + "default_value": "false", + "description": "Enable listening to raw LandingTarget messages." }, { "name": "mav_frame", "type_name": "", - "line": 91, - "default_value": "\"LOCAL_NED\"" + "line": 95, + "default_value": "\"LOCAL_NED\"", + "description": "MAVLink MAV_FRAME used when sending LANDING_TARGET." }, { "name": "land_target_type", "type_name": "", - "line": 98, - "default_value": "\"VISION_FIDUCIAL\"" + "line": 103, + "default_value": "\"VISION_FIDUCIAL\"", + "description": "MAVLink LANDING_TARGET_TYPE used when sending LANDING_TARGET." }, { "name": "target_size.x", "type_name": "double", - "line": 106, + "line": 112, "default_value": "1.0", - "description": "target size" + "description": "target size Landing target size on X axis [m]." }, { "name": "target_size.y", "type_name": "double", - "line": 111, - "default_value": "1.0" + "line": 118, + "default_value": "1.0", + "description": "Landing target size on Y axis [m]." }, { "name": "image.width", "type_name": "integer", - "line": 117, + "line": 125, "default_value": "640", - "description": "image size" + "description": "image size Image width in pixels." }, { "name": "image.height", "type_name": "integer", - "line": 122, - "default_value": "480" + "line": 131, + "default_value": "480", + "description": "Image height in pixels." }, { "name": "camera.fov_x", "type_name": "double", - "line": 128, + "line": 138, "default_value": "2.0071286398", - "description": "camera field-of-view -> should be precised using the calibrated camera intrinsics" + "description": "camera field-of-view -> should be precised using the calibrated camera intrinsics Camera field-of-view on X axis [rad]." }, { "name": "camera.fov_y", "type_name": "double", - "line": 133, - "default_value": "2.0071286398" + "line": 144, + "default_value": "2.0071286398", + "description": "Camera field-of-view on Y axis [rad]." }, { "name": "camera.focal_length", "type_name": "double", - "line": 139, + "line": 151, "default_value": "2.8", - "description": "camera focal length" + "description": "camera focal length Camera focal length [mm]." }, { "name": "tf.rate_limit", "type_name": "double", - "line": 145, + "line": 158, "default_value": "50.0", - "description": "tf subsection" + "description": "tf subsection Landing target transform rate limit [Hz]." }, { "name": "tf.send", "type_name": "bool", - "line": 152, - "default_value": "true" + "line": 166, + "default_value": "true", + "description": "Enable sending landing target transform to TF." }, { "name": "tf.frame_id", "type_name": "", - "line": 157, - "default_value": "frame_id" + "line": 172, + "default_value": "frame_id", + "description": "TF frame id for landing target." }, { "name": "tf.child_frame_id", "type_name": "", - "line": 162, - "default_value": "\"camera_center\"" + "line": 178, + "default_value": "\"camera_center\"", + "description": "TF child frame id for landing target." }, { "name": "tf.listen", "type_name": "bool", - "line": 167, - "default_value": "false" + "line": 184, + "default_value": "false", + "description": "Listen to landing target pose from TF." } ], "mavlink_subscriptions": [ @@ -1289,7 +1370,7 @@ "message_name": "LANDING_TARGET", "msg_id_expr": "mavlink::common::msg::LANDING_TARGET::MSG_ID", "dialect": "common", - "line": 198, + "line": 218, "msg_id": 149 } ], @@ -1300,7 +1381,7 @@ "message_name": "LANDING_TARGET", "msg_id_expr": "mavlink::common::msg::LANDING_TARGET::MSG_ID", "dialect": "common", - "line": 261, + "line": 281, "msg_id": 149 } ] @@ -1316,12 +1397,14 @@ { "name": "~/raw/log_entry", "type_name": "mavros_msgs::msg::LogEntry", - "line": 48 + "line": 49, + "description": "Publish log entry from MAVLink LOG_ENTRY." }, { "name": "~/raw/log_data", "type_name": "mavros_msgs::msg::LogData", - "line": 49 + "line": 51, + "description": "Publish log data from MAVLink LOG_DATA." } ], "subscribers": [], @@ -1329,22 +1412,26 @@ { "name": "~/raw/log_request_list", "type_name": "mavros_msgs::srv::LogRequestList", - "line": 51 + "line": 54, + "description": "Request log list (MAVLink LOG_REQUEST_LIST)." }, { "name": "~/raw/log_request_data", "type_name": "mavros_msgs::srv::LogRequestData", - "line": 53 + "line": 57, + "description": "Request log data (MAVLink LOG_REQUEST_DATA)." }, { "name": "~/raw/log_request_end", "type_name": "mavros_msgs::srv::LogRequestEnd", - "line": 55 + "line": 60, + "description": "End log download (MAVLink LOG_REQUEST_END)." }, { "name": "~/raw/log_request_erase", "type_name": "std_srvs::srv::Trigger", - "line": 57 + "line": 63, + "description": "Erase onboard log (MAVLink LOG_ERASE)." } ], "clients": [], @@ -1356,7 +1443,7 @@ "message_name": "LOG_ENTRY", "msg_id_expr": "mavlink::common::msg::LOG_ENTRY::MSG_ID", "dialect": "common", - "line": 66, + "line": 72, "msg_id": 118 }, { @@ -1365,7 +1452,7 @@ "message_name": "LOG_DATA", "msg_id_expr": "mavlink::common::msg::LOG_DATA::MSG_ID", "dialect": "common", - "line": 67, + "line": 73, "msg_id": 120 } ], @@ -1376,7 +1463,7 @@ "message_name": "LOG_REQUEST_LIST", "msg_id_expr": "mavlink::common::msg::LOG_REQUEST_LIST::MSG_ID", "dialect": "common", - "line": 124, + "line": 130, "msg_id": 117 }, { @@ -1385,7 +1472,7 @@ "message_name": "LOG_REQUEST_DATA", "msg_id_expr": "mavlink::common::msg::LOG_REQUEST_DATA::MSG_ID", "dialect": "common", - "line": 141, + "line": 147, "msg_id": 119 }, { @@ -1394,7 +1481,7 @@ "message_name": "LOG_REQUEST_END", "msg_id_expr": "mavlink::common::msg::LOG_REQUEST_END::MSG_ID", "dialect": "common", - "line": 155, + "line": 161, "msg_id": 122 }, { @@ -1403,7 +1490,7 @@ "message_name": "LOG_ERASE", "msg_id_expr": "mavlink::common::msg::LOG_ERASE::MSG_ID", "dialect": "common", - "line": 169, + "line": 175, "msg_id": 121 } ] @@ -1419,13 +1506,14 @@ { "name": "~/status", "type_name": "std_msgs::msg::UInt8", - "line": 47, - "description": "TODO(vooon): use QoS for \"latched\" topics" + "line": 48, + "description": "TODO(vooon): use QoS for \"latched\" topics Publish magnetometer calibration progress from MAVLink MAG_CAL_PROGRESS." }, { "name": "~/report", "type_name": "mavros_msgs::msg::MagnetometerReporter", - "line": 48 + "line": 50, + "description": "Publish magnetometer calibration report from MAVLink MAG_CAL_REPORT." } ], "subscribers": [], @@ -1439,7 +1527,7 @@ "message_name": "MAG_CAL_PROGRESS", "msg_id_expr": "mavlink::ardupilotmega::msg::MAG_CAL_PROGRESS::MSG_ID", "dialect": "ardupilotmega", - "line": 54, + "line": 56, "msg_id": 191 }, { @@ -1448,7 +1536,7 @@ "message_name": "MAG_CAL_REPORT", "msg_id_expr": "mavlink::common::msg::MAG_CAL_REPORT::MSG_ID", "dialect": "common", - "line": 55, + "line": 57, "msg_id": 192 } ], @@ -1466,12 +1554,14 @@ { "name": "~/tf", "type_name": "geometry_msgs::msg::TransformStamped", - "line": 46 + "line": 47, + "description": "Subscribe to motion capture pose as TransformStamped (VICON)." }, { "name": "~/pose", "type_name": "geometry_msgs::msg::PoseStamped", - "line": 51 + "line": 53, + "description": "Subscribe to motion capture pose as PoseStamped (Optitrack)." } ], "services": [], @@ -1485,7 +1575,7 @@ "message_name": "ATT_POS_MOCAP", "msg_id_expr": "mavlink::common::msg::ATT_POS_MOCAP::MSG_ID", "dialect": "common", - "line": 80, + "line": 82, "msg_id": 138 } ] @@ -1501,71 +1591,81 @@ { "name": "~/orientation", "type_name": "geometry_msgs::msg::Quaternion", - "line": 237 + "line": 245, + "description": "Publish mount orientation as quaternion from MAVLink MOUNT_ORIENTATION." }, { "name": "~/status", "type_name": "geometry_msgs::msg::Vector3Stamped", - "line": 240 + "line": 249, + "description": "Publish mount status from MAVLink MOUNT_STATUS." } ], "subscribers": [ { "name": "~/command", "type_name": "mavros_msgs::msg::MountControl", - "line": 232 + "line": 239, + "description": "Subscribe to MountControl to send as MAV_CMD_DO_MOUNT_CONTROL to the FCU." } ], "services": [ { "name": "~/configure", "type_name": "mavros_msgs::srv::MountConfigure", - "line": 242 + "line": 252, + "description": "Configure the mount (MAV_CMD_DO_MOUNT_CONFIGURE)." } ], "clients": [ { "name": "cmd/command", "type_name": "mavros_msgs::srv::CommandLong", - "line": 367 + "line": 377 } ], "parameters": [ { "name": "negate_measured_roll", "type_name": "bool", - "line": 198, - "default_value": "false" + "line": 199, + "default_value": "false", + "description": "Negate the measured roll angle." }, { "name": "negate_measured_pitch", "type_name": "bool", - "line": 202, - "default_value": "false" + "line": 204, + "default_value": "false", + "description": "Negate the measured pitch angle." }, { "name": "negate_measured_yaw", "type_name": "bool", - "line": 206, - "default_value": "false" + "line": 209, + "default_value": "false", + "description": "Negate the measured yaw angle." }, { "name": "debounce_s", "type_name": "double", - "line": 211, - "default_value": "4.0" + "line": 215, + "default_value": "4.0", + "description": "Mount diagnostic error debounce time [s]." }, { "name": "err_threshold_deg", "type_name": "double", - "line": 216, - "default_value": "10.0" + "line": 221, + "default_value": "10.0", + "description": "Mount diagnostic angle error threshold [deg]." }, { "name": "disable_diag", "type_name": "bool", - "line": 221, - "default_value": "false" + "line": 227, + "default_value": "false", + "description": "Disable mount diagnostic updater." } ], "mavlink_subscriptions": [ @@ -1575,7 +1675,7 @@ "message_name": "MOUNT_ORIENTATION", "msg_id_expr": "mavlink::common::msg::MOUNT_ORIENTATION::MSG_ID", "dialect": "common", - "line": 252, + "line": 262, "msg_id": 265 }, { @@ -1584,7 +1684,7 @@ "message_name": "MOUNT_STATUS", "msg_id_expr": "mavlink::ardupilotmega::msg::MOUNT_STATUS::MSG_ID", "dialect": "ardupilotmega", - "line": 253, + "line": 263, "msg_id": 158 } ], @@ -1595,7 +1695,7 @@ "message_name": "COMMAND_LONG", "msg_id_expr": "mavlink::common::msg::COMMAND_LONG::MSG_ID", "dialect": "common", - "line": 355, + "line": 365, "msg_id": 76 } ] @@ -1612,7 +1712,8 @@ { "name": "~/send", "type_name": "sensor_msgs::msg::LaserScan", - "line": 61 + "line": 63, + "description": "Subscribe to LaserScan to send as OBSTACLE_DISTANCE to the FCU." } ], "services": [], @@ -1621,8 +1722,9 @@ { "name": "mav_frame", "type_name": "", - "line": 53, - "default_value": "\"GLOBAL\"" + "line": 54, + "default_value": "\"GLOBAL\"", + "description": "MAVLink MAV_FRAME used when sending OBSTACLE_DISTANCE." } ], "mavlink_subscriptions": [], @@ -1633,7 +1735,7 @@ "message_name": "OBSTACLE_DISTANCE", "msg_id_expr": "mavlink::common::msg::OBSTACLE_DISTANCE::MSG_ID", "dialect": "common", - "line": 138, + "line": 140, "msg_id": 330 } ] @@ -1650,7 +1752,8 @@ { "name": "~/send", "type_name": "mavros_msgs::msg::ObstacleDistance3D", - "line": 52 + "line": 54, + "description": "Subscribe to ObstacleDistance3D to send as OBSTACLE_DISTANCE_3D to the FCU." } ], "services": [], @@ -1659,9 +1762,9 @@ { "name": "mav_frame", "type_name": "", - "line": 46, + "line": 47, "default_value": "\"LOCAL_NED\"", - "description": "Add a configurable parameter for the MAVLink frame, just like the reference." + "description": "Add a configurable parameter for the MAVLink frame, just like the reference. MAVLink MAV_FRAME used when sending OBSTACLE_DISTANCE_3D." } ], "mavlink_subscriptions": [], @@ -1672,7 +1775,7 @@ "message_name": "OBSTACLE_DISTANCE_3D", "msg_id_expr": "mavlink::ardupilotmega::msg::OBSTACLE_DISTANCE_3D::MSG_ID", "dialect": "ardupilotmega", - "line": 105, + "line": 107, "msg_id": 11037 } ] @@ -1688,15 +1791,16 @@ { "name": "~/in", "type_name": "nav_msgs::msg::Odometry", - "line": 82, - "description": "publishers" + "line": 86, + "description": "publishers Publish odometry from MAVLink ODOMETRY." } ], "subscribers": [ { "name": "~/out", "type_name": "nav_msgs::msg::Odometry", - "line": 86 + "line": 91, + "description": "subscribers Subscribe to odometry to send as ODOMETRY to the FCU." } ], "services": [], @@ -1705,21 +1809,23 @@ { "name": "fcu.odom_parent_id_des", "type_name": "", - "line": 67, + "line": 68, "default_value": "uas_->get_odom_frame_id()", - "description": "frame params:" + "description": "frame params: Desired parent frame id for odometry from the FCU." }, { "name": "fcu.odom_child_id_des", "type_name": "", - "line": 71, - "default_value": "uas_->get_base_link_frame_id()" + "line": 73, + "default_value": "uas_->get_base_link_frame_id()", + "description": "Desired child frame id for odometry from the FCU." }, { "name": "fcu.map_id_des", "type_name": "", - "line": 75, - "default_value": "uas_->get_map_frame_id()" + "line": 78, + "default_value": "uas_->get_map_frame_id()", + "description": "Desired map frame id for odometry from the FCU." } ], "mavlink_subscriptions": [ @@ -1729,7 +1835,7 @@ "message_name": "ODOMETRY", "msg_id_expr": "mavlink::common::msg::ODOMETRY::MSG_ID", "dialect": "common", - "line": 94, + "line": 99, "msg_id": 331 } ], @@ -1740,7 +1846,7 @@ "message_name": "ODOMETRY", "msg_id_expr": "mavlink::common::msg::ODOMETRY::MSG_ID", "dialect": "common", - "line": 354, + "line": 359, "msg_id": 331, "description": "send ODOMETRY msg" } @@ -1758,7 +1864,8 @@ { "name": "~/status", "type_name": "mavros_msgs::msg::OnboardComputerStatus", - "line": 45 + "line": 46, + "description": "Subscribe to OnboardComputerStatus to send as ONBOARD_COMPUTER_STATUS." } ], "services": [], @@ -1772,7 +1879,7 @@ "message_name": "ONBOARD_COMPUTER_STATUS", "msg_id_expr": "mavlink::common::msg::ONBOARD_COMPUTER_STATUS::MSG_ID", "dialect": "common", - "line": 115, + "line": 116, "msg_id": 390 } ] @@ -1789,27 +1896,32 @@ { "name": "~/basic_id", "type_name": "mavros_msgs::msg::OpenDroneIDBasicID", - "line": 48 + "line": 49, + "description": "Subscribe to send OPEN_DRONE_ID_BASIC_ID to the FCU." }, { "name": "~/operator_id", "type_name": "mavros_msgs::msg::OpenDroneIDOperatorID", - "line": 53 + "line": 55, + "description": "Subscribe to send OPEN_DRONE_ID_OPERATOR_ID to the FCU." }, { "name": "~/self_id", "type_name": "mavros_msgs::msg::OpenDroneIDSelfID", - "line": 58 + "line": 61, + "description": "Subscribe to send OPEN_DRONE_ID_SELF_ID to the FCU." }, { "name": "~/system", "type_name": "mavros_msgs::msg::OpenDroneIDSystem", - "line": 63 + "line": 67, + "description": "Subscribe to send OPEN_DRONE_ID_SYSTEM to the FCU." }, { "name": "~/system_update", "type_name": "mavros_msgs::msg::OpenDroneIDSystemUpdate", - "line": 68 + "line": 73, + "description": "Subscribe to send OPEN_DRONE_ID_SYSTEM_UPDATE to the FCU." } ], "services": [], @@ -1823,7 +1935,7 @@ "message_name": "OPEN_DRONE_ID_BASIC_ID", "msg_id_expr": "mavlink::common::msg::OPEN_DRONE_ID_BASIC_ID::MSG_ID", "dialect": "common", - "line": 97, + "line": 102, "msg_id": 12900 }, { @@ -1832,7 +1944,7 @@ "message_name": "OPEN_DRONE_ID_OPERATOR_ID", "msg_id_expr": "mavlink::common::msg::OPEN_DRONE_ID_OPERATOR_ID::MSG_ID", "dialect": "common", - "line": 109, + "line": 114, "msg_id": 12905 }, { @@ -1841,7 +1953,7 @@ "message_name": "OPEN_DRONE_ID_SELF_ID", "msg_id_expr": "mavlink::common::msg::OPEN_DRONE_ID_SELF_ID::MSG_ID", "dialect": "common", - "line": 121, + "line": 126, "msg_id": 12903 }, { @@ -1850,7 +1962,7 @@ "message_name": "OPEN_DRONE_ID_SYSTEM", "msg_id_expr": "mavlink::common::msg::OPEN_DRONE_ID_SYSTEM::MSG_ID", "dialect": "common", - "line": 143, + "line": 148, "msg_id": 12904 }, { @@ -1859,7 +1971,7 @@ "message_name": "OPEN_DRONE_ID_SYSTEM_UPDATE", "msg_id_expr": "mavlink::common::msg::OPEN_DRONE_ID_SYSTEM_UPDATE::MSG_ID", "dialect": "common", - "line": 156, + "line": 161, "msg_id": 12919 } ] @@ -1875,19 +1987,22 @@ { "name": "~/raw/optical_flow", "type_name": "mavros_msgs::msg::OpticalFlow", - "line": 76 + "line": 81, + "description": "Publish optical flow from MAVLink OPTICAL_FLOW." }, { "name": "~/ground_distance", "type_name": "sensor_msgs::msg::Range", - "line": 78 + "line": 84, + "description": "Publish ground distance as Range from OPTICAL_FLOW." } ], "subscribers": [ { "name": "~/raw/send", "type_name": "mavros_msgs::msg::OpticalFlow", - "line": 80 + "line": 87, + "description": "Subscribe to OpticalFlow to send as OPTICAL_FLOW to the FCU." } ], "services": [], @@ -1896,27 +2011,30 @@ { "name": "frame_id", "type_name": "", - "line": 50, - "default_value": "\"optical_flow\"" + "line": 51, + "default_value": "\"optical_flow\"", + "description": "Frame id for published optical flow messages." }, { "name": "ranger_fov", "type_name": "double", - "line": 61, + "line": 63, "default_value": "0.119428926", - "description": "This is a narrow beam (60cm wide at 5 meters, but also at 1 meter). 6.8 degrees at 5 meters, 31 degrees at 1 meter" + "description": "Default rangefinder field of view [rad]." }, { "name": "ranger_min_range", "type_name": "double", - "line": 66, - "default_value": "0.3" + "line": 69, + "default_value": "0.3", + "description": "Minimum rangefinder range [m]." }, { "name": "ranger_max_range", "type_name": "double", - "line": 71, - "default_value": "5.0" + "line": 75, + "default_value": "5.0", + "description": "Maximum rangefinder range [m]." } ], "mavlink_subscriptions": [ @@ -1926,7 +2044,7 @@ "message_name": "OPTICAL_FLOW", "msg_id_expr": "mavlink::common::msg::OPTICAL_FLOW::MSG_ID", "dialect": "common", - "line": 89, + "line": 96, "msg_id": 100 } ], @@ -1937,7 +2055,7 @@ "message_name": "OPTICAL_FLOW", "msg_id_expr": "mavlink::common::msg::OPTICAL_FLOW::MSG_ID", "dialect": "common", - "line": 192, + "line": 199, "msg_id": 100 } ] @@ -1954,7 +2072,8 @@ { "name": "play_tune", "type_name": "mavros_msgs::msg::PlayTuneV2", - "line": 43 + "line": 44, + "description": "Subscribe to PlayTuneV2 to send as PLAY_TUNE_V2 to the FCU." } ], "services": [], @@ -1968,7 +2087,7 @@ "message_name": "PLAY_TUNE_V2", "msg_id_expr": "mavlink::common::msg::PLAY_TUNE_V2::MSG_ID", "dialect": "common", - "line": 64, + "line": 65, "msg_id": 400 } ] @@ -1984,24 +2103,28 @@ { "name": "~/raw/optical_flow_rad", "type_name": "mavros_msgs::msg::OpticalFlowRad", - "line": 79 + "line": 84, + "description": "Publish optical flow from MAVLink OPTICAL_FLOW_RAD." }, { "name": "~/ground_distance", "type_name": "sensor_msgs::msg::Range", - "line": 81 + "line": 87, + "description": "Publish ground distance as Range from OPTICAL_FLOW_RAD." }, { "name": "~/temperature", "type_name": "sensor_msgs::msg::Temperature", - "line": 82 + "line": 89, + "description": "Publish optical flow temperature as Temperature." } ], "subscribers": [ { "name": "~/raw/send", "type_name": "mavros_msgs::msg::OpticalFlowRad", - "line": 84 + "line": 92, + "description": "Subscribe to OpticalFlowRad to send as OPTICAL_FLOW_RAD to the FCU." } ], "services": [], @@ -2010,27 +2133,30 @@ { "name": "frame_id", "type_name": "", - "line": 53, - "default_value": "\"px4flow\"" + "line": 54, + "default_value": "\"px4flow\"", + "description": "Frame id for published PX4Flow messages." }, { "name": "ranger_fov", "type_name": "double", - "line": 64, + "line": 66, "default_value": "0.119428926", - "description": "This is a narrow beam (60cm wide at 5 meters, but also at 1 meter). 6.8 degrees at 5 meters, 31 degrees at 1 meter" + "description": "Default rangefinder field of view [rad]." }, { "name": "ranger_min_range", "type_name": "double", - "line": 69, - "default_value": "0.3" + "line": 72, + "default_value": "0.3", + "description": "Minimum rangefinder range [m]." }, { "name": "ranger_max_range", "type_name": "double", - "line": 74, - "default_value": "5.0" + "line": 78, + "default_value": "5.0", + "description": "Maximum rangefinder range [m]." } ], "mavlink_subscriptions": [ @@ -2040,7 +2166,7 @@ "message_name": "OPTICAL_FLOW_RAD", "msg_id_expr": "mavlink::common::msg::OPTICAL_FLOW_RAD::MSG_ID", "dialect": "common", - "line": 93, + "line": 101, "msg_id": 106 } ], @@ -2051,7 +2177,7 @@ "message_name": "OPTICAL_FLOW_RAD", "msg_id_expr": "mavlink::common::msg::OPTICAL_FLOW_RAD::MSG_ID", "dialect": "common", - "line": 210, + "line": 218, "msg_id": 106 } ] @@ -2067,7 +2193,8 @@ { "name": "~/rangefinder", "type_name": "sensor_msgs::msg::Range", - "line": 42 + "line": 43, + "description": "Publish rangefinder data from MAVLink RANGEFINDER." } ], "subscribers": [], @@ -2081,7 +2208,7 @@ "message_name": "RANGEFINDER", "msg_id_expr": "mavlink::ardupilotmega::msg::RANGEFINDER::MSG_ID", "dialect": "ardupilotmega", - "line": 48, + "line": 49, "msg_id": 173 } ], @@ -2098,32 +2225,32 @@ { "name": "~/attitude", "type_name": "sensor_msgs::msg::Imu", - "line": 58, - "description": "IMU attitude publisher (~/attitude): orientation and angular velocity in ENU/base_link" + "line": 59, + "description": "IMU attitude publisher (~/attitude): orientation and angular velocity in ENU/base_link Publish attitude from MAVLink SIM_STATE." }, { "name": "~/acceleration", "type_name": "geometry_msgs::msg::Vector3Stamped", - "line": 62, - "description": "Linear acceleration publisher (~/acceleration): ENU/map, units m/s^2" + "line": 64, + "description": "Linear acceleration publisher (~/acceleration): ENU/map, units m/s^2 Publish linear acceleration from MAVLink SIM_STATE." }, { "name": "~/velocity_body", "type_name": "geometry_msgs::msg::TwistStamped", - "line": 66, - "description": "Body-frame twist publisher (~/velocity_body): base_link linear+angular velocity" + "line": 69, + "description": "Body-frame twist publisher (~/velocity_body): base_link linear+angular velocity Publish body-frame velocity from MAVLink SIM_STATE." }, { "name": "~/velocity_local", "type_name": "geometry_msgs::msg::TwistStamped", - "line": 70, - "description": "Local-frame twist publisher (~/velocity_local): ENU/map linear+angular velocity" + "line": 74, + "description": "Local-frame twist publisher (~/velocity_local): ENU/map linear+angular velocity Publish local-frame velocity from MAVLink SIM_STATE." }, { "name": "~/global_position", "type_name": "sensor_msgs::msg::NavSatFix", - "line": 74, - "description": "Global position publisher (~/global_position): WGS84 NavSatFix" + "line": 79, + "description": "Global position publisher (~/global_position): WGS84 NavSatFix Publish global position from MAVLink SIM_STATE." } ], "subscribers": [], @@ -2137,7 +2264,7 @@ "message_name": "SIM_STATE", "msg_id_expr": "mavlink::common::msg::SIM_STATE::MSG_ID", "dialect": "common", - "line": 82, + "line": 87, "msg_id": 108 } ], @@ -2154,7 +2281,8 @@ { "name": "radio_status", "type_name": "mavros_msgs::msg::RadioStatus", - "line": 70 + "line": 72, + "description": "Publish radio status from MAVLink RADIO_STATUS/RADIO." } ], "subscribers": [], @@ -2164,8 +2292,9 @@ { "name": "low_rssi", "type_name": "integer", - "line": 63, - "default_value": "40" + "line": 64, + "default_value": "40", + "description": "Low RSSI threshold for diagnostics [dB]." } ], "mavlink_subscriptions": [ @@ -2175,7 +2304,7 @@ "message_name": "RADIO_STATUS", "msg_id_expr": "mavlink::common::msg::RADIO_STATUS::MSG_ID", "dialect": "common", - "line": 78, + "line": 80, "msg_id": 109 }, { @@ -2184,7 +2313,7 @@ "message_name": "RADIO", "msg_id_expr": "mavlink::ardupilotmega::msg::RADIO::MSG_ID", "dialect": "ardupilotmega", - "line": 79, + "line": 81, "msg_id": 166 } ], @@ -2201,22 +2330,22 @@ { "name": "~/report", "type_name": "mavros_msgs::msg::TerrainReport", - "line": 63, - "description": "Terrain height reports from FCU and check-service responses" + "line": 64, + "description": "Terrain height reports from FCU and check-service responses Publish terrain reports from MAVLink TERRAIN_REPORT." }, { "name": "~/request", "type_name": "mavros_msgs::msg::TerrainRequest", - "line": 66, - "description": "Grid data requests forwarded from FCU for SRTM lookup" + "line": 68, + "description": "Grid data requests forwarded from FCU for SRTM lookup Publish terrain requests from MAVLink TERRAIN_REQUEST." } ], "subscribers": [ { "name": "~/data", "type_name": "mavros_msgs::msg::TerrainData", - "line": 70, - "description": "Filled terrain grid blocks from terrain_server" + "line": 73, + "description": "Filled terrain grid blocks from terrain_server Subscribe to TerrainData to send as TERRAIN_DATA to the FCU." } ], "services": [], @@ -2224,8 +2353,8 @@ { "name": "~/check", "type_name": "mavros_msgs::srv::TerrainCheck", - "line": 75, - "description": "Point elevation query handled by terrain_server" + "line": 79, + "description": "Point elevation query handled by terrain_server Client to query terrain elevation (terrain/check)." } ], "parameters": [], @@ -2236,7 +2365,7 @@ "message_name": "TERRAIN_REPORT", "msg_id_expr": "mavlink::common::msg::TERRAIN_REPORT::MSG_ID", "dialect": "common", - "line": 82, + "line": 86, "msg_id": 136 }, { @@ -2245,7 +2374,7 @@ "message_name": "TERRAIN_REQUEST", "msg_id_expr": "mavlink::common::msg::TERRAIN_REQUEST::MSG_ID", "dialect": "common", - "line": 83, + "line": 87, "msg_id": 133 }, { @@ -2254,7 +2383,7 @@ "message_name": "TERRAIN_CHECK", "msg_id_expr": "mavlink::common::msg::TERRAIN_CHECK::MSG_ID", "dialect": "common", - "line": 84, + "line": 88, "msg_id": 135 } ], @@ -2265,7 +2394,7 @@ "message_name": "TERRAIN_REPORT", "msg_id_expr": "mavlink::common::msg::TERRAIN_REPORT::MSG_ID", "dialect": "common", - "line": 164, + "line": 168, "msg_id": 136 }, { @@ -2274,7 +2403,7 @@ "message_name": "TERRAIN_DATA", "msg_id_expr": "mavlink::common::msg::TERRAIN_DATA::MSG_ID", "dialect": "common", - "line": 189, + "line": 193, "msg_id": 134 } ] @@ -2290,19 +2419,22 @@ { "name": "~/desired", "type_name": "mavros_msgs::msg::Trajectory", - "line": 63 + "line": 66, + "description": "Publish desired trajectory from MAVLink TRAJECTORY." } ], "subscribers": [ { "name": "~/generated", "type_name": "mavros_msgs::msg::Trajectory", - "line": 56 + "line": 57, + "description": "Subscribe to Trajectory to send as TRAJECTORY to the FCU." }, { "name": "~/path", "type_name": "nav_msgs::msg::Path", - "line": 60 + "line": 62, + "description": "Subscribe to nav_msgs/Path to send as TRAJECTORY to the FCU." } ], "services": [], @@ -2315,7 +2447,7 @@ "message_name": "TRAJECTORY_REPRESENTATION_WAYPOINTS", "msg_id_expr": "mavlink::common::msg::TRAJECTORY_REPRESENTATION_WAYPOINTS::MSG_ID", "dialect": "common", - "line": 69, + "line": 72, "msg_id": 332 } ], @@ -2326,7 +2458,7 @@ "message_name": "TRAJECTORY_REPRESENTATION_WAYPOINTS", "msg_id_expr": "mavlink::common::msg::TRAJECTORY_REPRESENTATION_WAYPOINTS::MSG_ID", "dialect": "common", - "line": 297, + "line": 300, "msg_id": 332 }, { @@ -2335,7 +2467,7 @@ "message_name": "TRAJECTORY_REPRESENTATION_BEZIER", "msg_id_expr": "mavlink::common::msg::TRAJECTORY_REPRESENTATION_BEZIER::MSG_ID", "dialect": "common", - "line": 331, + "line": 334, "msg_id": 333 }, { @@ -2344,7 +2476,7 @@ "message_name": "TRAJECTORY_REPRESENTATION_WAYPOINTS", "msg_id_expr": "mavlink::common::msg::TRAJECTORY_REPRESENTATION_WAYPOINTS::MSG_ID", "dialect": "common", - "line": 373, + "line": 376, "msg_id": 332 } ] @@ -2360,14 +2492,16 @@ { "name": "~/out", "type_name": "mavros_msgs::msg::Tunnel", - "line": 50 + "line": 52, + "description": "Publish TUNNEL messages received from the FCU." } ], "subscribers": [ { "name": "~/in", "type_name": "mavros_msgs::msg::Tunnel", - "line": 47 + "line": 48, + "description": "Subscribe to Tunnel to send as TUNNEL to the FCU." } ], "services": [], @@ -2380,7 +2514,7 @@ "message_name": "TUNNEL", "msg_id_expr": "mavlink::common::msg::TUNNEL::MSG_ID", "dialect": "common", - "line": 56, + "line": 58, "msg_id": 385 } ], @@ -2391,7 +2525,7 @@ "message_name": "TUNNEL", "msg_id_expr": "mavlink::common::msg::TUNNEL::MSG_ID", "dialect": "common", - "line": 71, + "line": 73, "msg_id": 385 } ] @@ -2407,7 +2541,8 @@ { "name": "vfr_hud", "type_name": "mavros_msgs::msg::VfrHud", - "line": 40 + "line": 41, + "description": "Publish VFR HUD data from MAVLink VFR_HUD." } ], "subscribers": [], @@ -2421,7 +2556,7 @@ "message_name": "VFR_HUD", "msg_id_expr": "mavlink::common::msg::VFR_HUD::MSG_ID", "dialect": "common", - "line": 46, + "line": 47, "msg_id": 74 } ], @@ -2438,7 +2573,8 @@ { "name": "~/raw/vibration", "type_name": "mavros_msgs::msg::Vibration", - "line": 52 + "line": 54, + "description": "Publish vibration levels from MAVLink VIBRATION." } ], "subscribers": [], @@ -2448,8 +2584,9 @@ { "name": "frame_id", "type_name": "", - "line": 47, - "default_value": "\"base_link\"" + "line": 48, + "default_value": "\"base_link\"", + "description": "Frame id for published vibration messages." } ], "mavlink_subscriptions": [ @@ -2459,7 +2596,7 @@ "message_name": "VIBRATION", "msg_id_expr": "mavlink::common::msg::VIBRATION::MSG_ID", "dialect": "common", - "line": 58, + "line": 60, "msg_id": 241 } ], @@ -2477,12 +2614,14 @@ { "name": "~/pose", "type_name": "geometry_msgs::msg::PoseStamped", - "line": 68 + "line": 70, + "description": "Subscribe to vision pose as PoseStamped." }, { "name": "~/pose_cov", "type_name": "geometry_msgs::msg::PoseWithCovarianceStamped", - "line": 71 + "line": 74, + "description": "Subscribe to vision pose with covariance as PoseWithCovarianceStamped." } ], "services": [], @@ -2491,27 +2630,30 @@ { "name": "tf/listen", "type_name": "bool", - "line": 58, + "line": 59, "default_value": "false", - "description": "tf params" + "description": "tf params Listen to vision pose from TF (else subscribe to ~/pose)." }, { "name": "tf/frame_id", "type_name": "", - "line": 77, - "default_value": "\"map\"" + "line": 81, + "default_value": "\"map\"", + "description": "TF frame id for vision pose source." }, { "name": "tf/child_frame_id", "type_name": "", - "line": 82, - "default_value": "\"vision_estimate\"" + "line": 87, + "default_value": "\"vision_estimate\"", + "description": "TF child frame id for vision pose source." }, { "name": "tf/rate_limit", "type_name": "double", - "line": 87, - "default_value": "10.0" + "line": 93, + "default_value": "10.0", + "description": "Vision pose send rate limit [Hz]." } ], "mavlink_subscriptions": [], @@ -2522,7 +2664,7 @@ "message_name": "VISION_POSITION_ESTIMATE", "msg_id_expr": "mavlink::common::msg::VISION_POSITION_ESTIMATE::MSG_ID", "dialect": "common", - "line": 156, + "line": 162, "msg_id": 102 } ] @@ -2539,17 +2681,20 @@ { "name": "~/speed_twist_cov", "type_name": "geometry_msgs::msg::TwistWithCovarianceStamped", - "line": 47 + "line": 48, + "description": "Subscribe to vision speed as TwistWithCovarianceStamped." }, { "name": "~/speed_twist", "type_name": "geometry_msgs::msg::TwistStamped", - "line": 49 + "line": 51, + "description": "Subscribe to vision speed as TwistStamped." }, { "name": "~/speed_vector", "type_name": "geometry_msgs::msg::Vector3Stamped", - "line": 52 + "line": 55, + "description": "Subscribe to vision speed as Vector3Stamped." } ], "services": [], @@ -2563,7 +2708,7 @@ "message_name": "VISION_SPEED_ESTIMATE", "msg_id_expr": "mavlink::common::msg::VISION_SPEED_ESTIMATE::MSG_ID", "dialect": "common", - "line": 95, + "line": 98, "msg_id": 103 } ] @@ -2579,22 +2724,26 @@ { "name": "~/rpm", "type_name": "mavros_msgs::msg::WheelOdomStamped", - "line": 70 + "line": 72, + "description": "Publish raw wheel RPM from MAVLink RPM." }, { "name": "~/distance", "type_name": "mavros_msgs::msg::WheelOdomStamped", - "line": 71 + "line": 74, + "description": "Publish raw wheel distances from MAVLink WHEEL_DISTANCE." }, { "name": "~/velocity", "type_name": "geometry_msgs::msg::TwistWithCovarianceStamped", - "line": 196 + "line": 211, + "description": "Publish computed wheel odometry as TwistWithCovarianceStamped." }, { "name": "~/odom", "type_name": "nav_msgs::msg::Odometry", - "line": 199 + "line": 215, + "description": "Publish computed wheel odometry as nav_msgs/Odometry." } ], "subscribers": [], @@ -2604,65 +2753,72 @@ { "name": "send_raw", "type_name": "bool", - "line": 65, + "line": 66, "default_value": "false", - "description": "General params" + "description": "General params Publish raw wheel RPM and distance data." }, { "name": "count", "type_name": "integer", - "line": 78, - "default_value": "2" + "line": 82, + "default_value": "2", + "description": "Number of wheels used for odometry computation." }, { "name": "use_rpm", "type_name": "bool", - "line": 84, - "default_value": "false" + "line": 89, + "default_value": "false", + "description": "Use wheel RPM (true) or cumulative distance (false) for odometry." }, { "name": "send_twist", "type_name": "bool", - "line": 95, + "line": 101, "default_value": "false", - "description": "Odometry params" + "description": "Odometry params Publish TwistWithCovarianceStamped instead of Odometry." }, { "name": "frame_id", "type_name": "", - "line": 100, - "default_value": "uas_->get_odom_frame_id()" + "line": 107, + "default_value": "uas_->get_odom_frame_id()", + "description": "Frame id for published odometry." }, { "name": "child_frame_id", "type_name": "", - "line": 105, - "default_value": "uas_->get_base_link_frame_id()" + "line": 113, + "default_value": "uas_->get_base_link_frame_id()", + "description": "Child frame id for published odometry." }, { "name": "vel_error", "type_name": "double", - "line": 110, - "default_value": "0.1" + "line": 119, + "default_value": "0.1", + "description": "Wheel velocity measurement error (std) [m/s]." }, { "name": "tf.frame_id", "type_name": "", - "line": 117, + "line": 127, "default_value": "uas_->get_odom_frame_id()", - "description": "TF subsection" + "description": "TF subsection TF frame id for published odometry." }, { "name": "tf.child_frame_id", "type_name": "", - "line": 122, - "default_value": "uas_->get_base_link_frame_id()" + "line": 133, + "default_value": "uas_->get_base_link_frame_id()", + "description": "TF child frame id for published odometry." }, { "name": "tf.send", "type_name": "bool", - "line": 127, - "default_value": "false" + "line": 139, + "default_value": "false", + "description": "Enable publishing odometry transform to TF." } ], "mavlink_subscriptions": [ @@ -2672,7 +2828,7 @@ "message_name": "RPM", "msg_id_expr": "mavlink::ardupilotmega::msg::RPM::MSG_ID", "dialect": "ardupilotmega", - "line": 210, + "line": 226, "msg_id": 226 }, { @@ -2681,7 +2837,7 @@ "message_name": "WHEEL_DISTANCE", "msg_id_expr": "mavlink::common::msg::WHEEL_DISTANCE::MSG_ID", "dialect": "common", - "line": 211, + "line": 227, "msg_id": 9000 } ], diff --git a/docs/plugins/extras/landing_target.md b/docs/plugins/extras/landing_target.md index f2128a63d..2cd5c2cb1 100644 --- a/docs/plugins/extras/landing_target.md +++ b/docs/plugins/extras/landing_target.md @@ -9,13 +9,13 @@ This plugin is intended to publish the location of a landing area captured from a downward facing camera to the FCU and/or receive landing target tracking data coming from the FCU. Implements the [MAVLink Landing Target Protocol](https://mavlink.io/en/services/landing_target.html). ## Publishers -- `~/pose_in` ([geometry_msgs::msg::PoseStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseStamped.html)) -- `~/lt_marker` ([geometry_msgs::msg::Vector3Stamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/Vector3Stamped.html)) +- `~/pose_in` ([geometry_msgs::msg::PoseStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseStamped.html)) - Publish landing target pose from MAVLink LANDING_TARGET. +- `~/lt_marker` ([geometry_msgs::msg::Vector3Stamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/Vector3Stamped.html)) - Publish landing target size as Vector3Stamped. ## Subscribers -- `~/raw` ([mavros_msgs::msg::LandingTarget](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/LandingTarget.html)) -- `~/pose` ([geometry_msgs::msg::PoseStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseStamped.html)) +- `~/raw` ([mavros_msgs::msg::LandingTarget](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/LandingTarget.html)) - Subscribe to raw LandingTarget messages to send to the FCU. +- `~/pose` ([geometry_msgs::msg::PoseStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseStamped.html)) - Subscribe to landing target pose to send as LANDING_TARGET to the FCU. ## Services @@ -27,22 +27,22 @@ This plugin is intended to publish the location of a landing area captured from ## Parameters -- `frame_id` [default: `"landing_target_1"`] - general params -- `listen_lt` [type: bool, default: `false`] -- `mav_frame` [default: `"LOCAL_NED"`] -- `land_target_type` [default: `"VISION_FIDUCIAL"`] -- `target_size.x` [type: double, default: `1.0`] - target size -- `target_size.y` [type: double, default: `1.0`] -- `image.width` [type: integer, default: `640`] - image size -- `image.height` [type: integer, default: `480`] -- `camera.fov_x` [type: double, default: `2.0071286398`] - camera field-of-view -> should be precised using the calibrated camera intrinsics -- `camera.fov_y` [type: double, default: `2.0071286398`] -- `camera.focal_length` [type: double, default: `2.8`] - camera focal length -- `tf.rate_limit` [type: double, default: `50.0`] - tf subsection -- `tf.send` [type: bool, default: `true`] -- `tf.frame_id` [default: `frame_id`] -- `tf.child_frame_id` [default: `"camera_center"`] -- `tf.listen` [type: bool, default: `false`] +- `frame_id` [default: `"landing_target_1"`] - general params Frame id for published landing target messages. +- `listen_lt` [type: bool, default: `false`] - Enable listening to raw LandingTarget messages. +- `mav_frame` [default: `"LOCAL_NED"`] - MAVLink MAV_FRAME used when sending LANDING_TARGET. +- `land_target_type` [default: `"VISION_FIDUCIAL"`] - MAVLink LANDING_TARGET_TYPE used when sending LANDING_TARGET. +- `target_size.x` [type: double, default: `1.0`] - target size Landing target size on X axis [m]. +- `target_size.y` [type: double, default: `1.0`] - Landing target size on Y axis [m]. +- `image.width` [type: integer, default: `640`] - image size Image width in pixels. +- `image.height` [type: integer, default: `480`] - Image height in pixels. +- `camera.fov_x` [type: double, default: `2.0071286398`] - camera field-of-view -> should be precised using the calibrated camera intrinsics Camera field-of-view on X axis [rad]. +- `camera.fov_y` [type: double, default: `2.0071286398`] - Camera field-of-view on Y axis [rad]. +- `camera.focal_length` [type: double, default: `2.8`] - camera focal length Camera focal length [mm]. +- `tf.rate_limit` [type: double, default: `50.0`] - tf subsection Landing target transform rate limit [Hz]. +- `tf.send` [type: bool, default: `true`] - Enable sending landing target transform to TF. +- `tf.frame_id` [default: `frame_id`] - TF frame id for landing target. +- `tf.child_frame_id` [default: `"camera_center"`] - TF child frame id for landing target. +- `tf.listen` [type: bool, default: `false`] - Listen to landing target pose from TF. ## MAVLink Subscriptions diff --git a/docs/plugins/extras/log_transfer.md b/docs/plugins/extras/log_transfer.md index 85cb9064e..1b672c224 100644 --- a/docs/plugins/extras/log_transfer.md +++ b/docs/plugins/extras/log_transfer.md @@ -7,8 +7,8 @@ ## Publishers -- `~/raw/log_entry` ([mavros_msgs::msg::LogEntry](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/LogEntry.html)) -- `~/raw/log_data` ([mavros_msgs::msg::LogData](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/LogData.html)) +- `~/raw/log_entry` ([mavros_msgs::msg::LogEntry](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/LogEntry.html)) - Publish log entry from MAVLink LOG_ENTRY. +- `~/raw/log_data` ([mavros_msgs::msg::LogData](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/LogData.html)) - Publish log data from MAVLink LOG_DATA. ## Subscribers @@ -16,10 +16,10 @@ ## Services -- `~/raw/log_request_list` ([mavros_msgs::srv::LogRequestList](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/LogRequestList.html)) -- `~/raw/log_request_data` ([mavros_msgs::srv::LogRequestData](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/LogRequestData.html)) -- `~/raw/log_request_end` ([mavros_msgs::srv::LogRequestEnd](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/LogRequestEnd.html)) -- `~/raw/log_request_erase` ([std_srvs::srv::Trigger](https://docs.ros.org/en/rolling/p/std_srvs/srv/Trigger.html)) +- `~/raw/log_request_list` ([mavros_msgs::srv::LogRequestList](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/LogRequestList.html)) - Request log list (MAVLink LOG_REQUEST_LIST). +- `~/raw/log_request_data` ([mavros_msgs::srv::LogRequestData](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/LogRequestData.html)) - Request log data (MAVLink LOG_REQUEST_DATA). +- `~/raw/log_request_end` ([mavros_msgs::srv::LogRequestEnd](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/LogRequestEnd.html)) - End log download (MAVLink LOG_REQUEST_END). +- `~/raw/log_request_erase` ([std_srvs::srv::Trigger](https://docs.ros.org/en/rolling/p/std_srvs/srv/Trigger.html)) - Erase onboard log (MAVLink LOG_ERASE). ## Clients diff --git a/docs/plugins/extras/mag_calibration_status.md b/docs/plugins/extras/mag_calibration_status.md index a81c45732..341c56367 100644 --- a/docs/plugins/extras/mag_calibration_status.md +++ b/docs/plugins/extras/mag_calibration_status.md @@ -9,8 +9,8 @@ Example and "how to" for users. ## Publishers -- `~/status` ([std_msgs::msg::UInt8](https://docs.ros.org/en/rolling/p/std_msgs/msg/UInt8.html)) - TODO(vooon): use QoS for "latched" topics -- `~/report` ([mavros_msgs::msg::MagnetometerReporter](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/MagnetometerReporter.html)) +- `~/status` ([std_msgs::msg::UInt8](https://docs.ros.org/en/rolling/p/std_msgs/msg/UInt8.html)) - TODO(vooon): use QoS for "latched" topics Publish magnetometer calibration progress from MAVLink MAG_CAL_PROGRESS. +- `~/report` ([mavros_msgs::msg::MagnetometerReporter](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/MagnetometerReporter.html)) - Publish magnetometer calibration report from MAVLink MAG_CAL_REPORT. ## Subscribers diff --git a/docs/plugins/extras/mocap_pose_estimate.md b/docs/plugins/extras/mocap_pose_estimate.md index cdb625072..7dd046eb3 100644 --- a/docs/plugins/extras/mocap_pose_estimate.md +++ b/docs/plugins/extras/mocap_pose_estimate.md @@ -13,8 +13,8 @@ Sends motion capture data to FCU. ## Subscribers -- `~/tf` ([geometry_msgs::msg::TransformStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TransformStamped.html)) -- `~/pose` ([geometry_msgs::msg::PoseStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseStamped.html)) +- `~/tf` ([geometry_msgs::msg::TransformStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TransformStamped.html)) - Subscribe to motion capture pose as TransformStamped (VICON). +- `~/pose` ([geometry_msgs::msg::PoseStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseStamped.html)) - Subscribe to motion capture pose as PoseStamped (Optitrack). ## Services diff --git a/docs/plugins/extras/mount_control.md b/docs/plugins/extras/mount_control.md index d0ec30098..b40bd0580 100644 --- a/docs/plugins/extras/mount_control.md +++ b/docs/plugins/extras/mount_control.md @@ -9,16 +9,16 @@ Publishes Mission commands to control the camera or antenna mount. Implements the superseded [MAVLink Gimbal Protocol v1](https://mavlink.io/en/services/gimbal.html). @see command_cb() ## Publishers -- `~/orientation` ([geometry_msgs::msg::Quaternion](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/Quaternion.html)) -- `~/status` ([geometry_msgs::msg::Vector3Stamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/Vector3Stamped.html)) +- `~/orientation` ([geometry_msgs::msg::Quaternion](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/Quaternion.html)) - Publish mount orientation as quaternion from MAVLink MOUNT_ORIENTATION. +- `~/status` ([geometry_msgs::msg::Vector3Stamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/Vector3Stamped.html)) - Publish mount status from MAVLink MOUNT_STATUS. ## Subscribers -- `~/command` ([mavros_msgs::msg::MountControl](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/MountControl.html)) +- `~/command` ([mavros_msgs::msg::MountControl](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/MountControl.html)) - Subscribe to MountControl to send as MAV_CMD_DO_MOUNT_CONTROL to the FCU. ## Services -- `~/configure` ([mavros_msgs::srv::MountConfigure](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/MountConfigure.html)) +- `~/configure` ([mavros_msgs::srv::MountConfigure](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/MountConfigure.html)) - Configure the mount (MAV_CMD_DO_MOUNT_CONFIGURE). ## Clients @@ -26,12 +26,12 @@ Publishes Mission commands to control the camera or antenna mount. Implements th ## Parameters -- `negate_measured_roll` [type: bool, default: `false`] -- `negate_measured_pitch` [type: bool, default: `false`] -- `negate_measured_yaw` [type: bool, default: `false`] -- `debounce_s` [type: double, default: `4.0`] -- `err_threshold_deg` [type: double, default: `10.0`] -- `disable_diag` [type: bool, default: `false`] +- `negate_measured_roll` [type: bool, default: `false`] - Negate the measured roll angle. +- `negate_measured_pitch` [type: bool, default: `false`] - Negate the measured pitch angle. +- `negate_measured_yaw` [type: bool, default: `false`] - Negate the measured yaw angle. +- `debounce_s` [type: double, default: `4.0`] - Mount diagnostic error debounce time [s]. +- `err_threshold_deg` [type: double, default: `10.0`] - Mount diagnostic angle error threshold [deg]. +- `disable_diag` [type: bool, default: `false`] - Disable mount diagnostic updater. ## MAVLink Subscriptions diff --git a/docs/plugins/extras/obstacle_distance.md b/docs/plugins/extras/obstacle_distance.md index ca6010520..7e62a1265 100644 --- a/docs/plugins/extras/obstacle_distance.md +++ b/docs/plugins/extras/obstacle_distance.md @@ -13,7 +13,7 @@ Publishes obstacle distance array to the FCU, in order to assist in an obstacle ## Subscribers -- `~/send` ([sensor_msgs::msg::LaserScan](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/LaserScan.html)) +- `~/send` ([sensor_msgs::msg::LaserScan](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/LaserScan.html)) - Subscribe to LaserScan to send as OBSTACLE_DISTANCE to the FCU. ## Services @@ -25,7 +25,7 @@ Publishes obstacle distance array to the FCU, in order to assist in an obstacle ## Parameters -- `mav_frame` [default: `"GLOBAL"`] +- `mav_frame` [default: `"GLOBAL"`] - MAVLink MAV_FRAME used when sending OBSTACLE_DISTANCE. ## MAVLink Subscriptions diff --git a/docs/plugins/extras/obstacle_distance_3d.md b/docs/plugins/extras/obstacle_distance_3d.md index 019fc52ab..d37f8eb35 100644 --- a/docs/plugins/extras/obstacle_distance_3d.md +++ b/docs/plugins/extras/obstacle_distance_3d.md @@ -13,7 +13,7 @@ Subscribes to a mavros_msgs/ObstacleDistance3D message and sends the data to the ## Subscribers -- `~/send` ([mavros_msgs::msg::ObstacleDistance3D](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/ObstacleDistance3D.html)) +- `~/send` ([mavros_msgs::msg::ObstacleDistance3D](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/ObstacleDistance3D.html)) - Subscribe to ObstacleDistance3D to send as OBSTACLE_DISTANCE_3D to the FCU. ## Services @@ -25,7 +25,7 @@ Subscribes to a mavros_msgs/ObstacleDistance3D message and sends the data to the ## Parameters -- `mav_frame` [default: `"LOCAL_NED"`] - Add a configurable parameter for the MAVLink frame, just like the reference. +- `mav_frame` [default: `"LOCAL_NED"`] - Add a configurable parameter for the MAVLink frame, just like the reference. MAVLink MAV_FRAME used when sending OBSTACLE_DISTANCE_3D. ## MAVLink Subscriptions diff --git a/docs/plugins/extras/odom.md b/docs/plugins/extras/odom.md index a44ef6471..165fa928b 100644 --- a/docs/plugins/extras/odom.md +++ b/docs/plugins/extras/odom.md @@ -9,11 +9,11 @@ Sends odometry data to the FCU estimator and publishes odometry data that comes from FCU. This plugin is following ROS REP 147. Pose is expressed in parent frame. (Quaternion rotates from child to parent) The twist is expressed in the child frame. @see odom_cb() transforming and sending odometry to fcu @see handle_odom() receiving and transforming odometry from fcu ## Publishers -- `~/in` ([nav_msgs::msg::Odometry](https://docs.ros.org/en/rolling/p/nav_msgs/msg/Odometry.html)) - publishers +- `~/in` ([nav_msgs::msg::Odometry](https://docs.ros.org/en/rolling/p/nav_msgs/msg/Odometry.html)) - publishers Publish odometry from MAVLink ODOMETRY. ## Subscribers -- `~/out` ([nav_msgs::msg::Odometry](https://docs.ros.org/en/rolling/p/nav_msgs/msg/Odometry.html)) +- `~/out` ([nav_msgs::msg::Odometry](https://docs.ros.org/en/rolling/p/nav_msgs/msg/Odometry.html)) - subscribers Subscribe to odometry to send as ODOMETRY to the FCU. ## Services @@ -25,9 +25,9 @@ Sends odometry data to the FCU estimator and publishes odometry data that comes ## Parameters -- `fcu.odom_parent_id_des` [default: `uas_->get_odom_frame_id()`] - frame params: -- `fcu.odom_child_id_des` [default: `uas_->get_base_link_frame_id()`] -- `fcu.map_id_des` [default: `uas_->get_map_frame_id()`] +- `fcu.odom_parent_id_des` [default: `uas_->get_odom_frame_id()`] - frame params: Desired parent frame id for odometry from the FCU. +- `fcu.odom_child_id_des` [default: `uas_->get_base_link_frame_id()`] - Desired child frame id for odometry from the FCU. +- `fcu.map_id_des` [default: `uas_->get_map_frame_id()`] - Desired map frame id for odometry from the FCU. ## MAVLink Subscriptions diff --git a/docs/plugins/extras/onboard_computer_status.md b/docs/plugins/extras/onboard_computer_status.md index 4e5ea09ca..6e735c5ed 100644 --- a/docs/plugins/extras/onboard_computer_status.md +++ b/docs/plugins/extras/onboard_computer_status.md @@ -13,7 +13,7 @@ Publishes the status of the onboard computer @see status_cb() ## Subscribers -- `~/status` ([mavros_msgs::msg::OnboardComputerStatus](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/OnboardComputerStatus.html)) +- `~/status` ([mavros_msgs::msg::OnboardComputerStatus](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/OnboardComputerStatus.html)) - Subscribe to OnboardComputerStatus to send as ONBOARD_COMPUTER_STATUS. ## Services diff --git a/docs/plugins/extras/open_drone_id.md b/docs/plugins/extras/open_drone_id.md index d4b81e32a..a2f0d9aaf 100644 --- a/docs/plugins/extras/open_drone_id.md +++ b/docs/plugins/extras/open_drone_id.md @@ -13,11 +13,11 @@ Sends Open Drone ID data to the FCU. Implements the [MAVLink Open Drone ID Proto ## Subscribers -- `~/basic_id` ([mavros_msgs::msg::OpenDroneIDBasicID](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/OpenDroneIDBasicID.html)) -- `~/operator_id` ([mavros_msgs::msg::OpenDroneIDOperatorID](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/OpenDroneIDOperatorID.html)) -- `~/self_id` ([mavros_msgs::msg::OpenDroneIDSelfID](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/OpenDroneIDSelfID.html)) -- `~/system` ([mavros_msgs::msg::OpenDroneIDSystem](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/OpenDroneIDSystem.html)) -- `~/system_update` ([mavros_msgs::msg::OpenDroneIDSystemUpdate](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/OpenDroneIDSystemUpdate.html)) +- `~/basic_id` ([mavros_msgs::msg::OpenDroneIDBasicID](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/OpenDroneIDBasicID.html)) - Subscribe to send OPEN_DRONE_ID_BASIC_ID to the FCU. +- `~/operator_id` ([mavros_msgs::msg::OpenDroneIDOperatorID](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/OpenDroneIDOperatorID.html)) - Subscribe to send OPEN_DRONE_ID_OPERATOR_ID to the FCU. +- `~/self_id` ([mavros_msgs::msg::OpenDroneIDSelfID](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/OpenDroneIDSelfID.html)) - Subscribe to send OPEN_DRONE_ID_SELF_ID to the FCU. +- `~/system` ([mavros_msgs::msg::OpenDroneIDSystem](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/OpenDroneIDSystem.html)) - Subscribe to send OPEN_DRONE_ID_SYSTEM to the FCU. +- `~/system_update` ([mavros_msgs::msg::OpenDroneIDSystemUpdate](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/OpenDroneIDSystemUpdate.html)) - Subscribe to send OPEN_DRONE_ID_SYSTEM_UPDATE to the FCU. ## Services diff --git a/docs/plugins/extras/optical_flow.md b/docs/plugins/extras/optical_flow.md index 1cca81038..441752f49 100644 --- a/docs/plugins/extras/optical_flow.md +++ b/docs/plugins/extras/optical_flow.md @@ -9,12 +9,12 @@ This plugin can publish data from OpticalFlow camera to ROS ## Publishers -- `~/raw/optical_flow` ([mavros_msgs::msg::OpticalFlow](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/OpticalFlow.html)) -- `~/ground_distance` ([sensor_msgs::msg::Range](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/Range.html)) +- `~/raw/optical_flow` ([mavros_msgs::msg::OpticalFlow](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/OpticalFlow.html)) - Publish optical flow from MAVLink OPTICAL_FLOW. +- `~/ground_distance` ([sensor_msgs::msg::Range](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/Range.html)) - Publish ground distance as Range from OPTICAL_FLOW. ## Subscribers -- `~/raw/send` ([mavros_msgs::msg::OpticalFlow](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/OpticalFlow.html)) +- `~/raw/send` ([mavros_msgs::msg::OpticalFlow](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/OpticalFlow.html)) - Subscribe to OpticalFlow to send as OPTICAL_FLOW to the FCU. ## Services @@ -26,10 +26,10 @@ This plugin can publish data from OpticalFlow camera to ROS ## Parameters -- `frame_id` [default: `"optical_flow"`] -- `ranger_fov` [type: double, default: `0.119428926`] - This is a narrow beam (60cm wide at 5 meters, but also at 1 meter). 6.8 degrees at 5 meters, 31 degrees at 1 meter -- `ranger_min_range` [type: double, default: `0.3`] -- `ranger_max_range` [type: double, default: `5.0`] +- `frame_id` [default: `"optical_flow"`] - Frame id for published optical flow messages. +- `ranger_fov` [type: double, default: `0.119428926`] - Default rangefinder field of view [rad]. +- `ranger_min_range` [type: double, default: `0.3`] - Minimum rangefinder range [m]. +- `ranger_max_range` [type: double, default: `5.0`] - Maximum rangefinder range [m]. ## MAVLink Subscriptions diff --git a/docs/plugins/extras/play_tune.md b/docs/plugins/extras/play_tune.md index ce03e1040..f4f463cbe 100644 --- a/docs/plugins/extras/play_tune.md +++ b/docs/plugins/extras/play_tune.md @@ -11,7 +11,7 @@ ## Subscribers -- `play_tune` ([mavros_msgs::msg::PlayTuneV2](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/PlayTuneV2.html)) +- `play_tune` ([mavros_msgs::msg::PlayTuneV2](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/PlayTuneV2.html)) - Subscribe to PlayTuneV2 to send as PLAY_TUNE_V2 to the FCU. ## Services diff --git a/docs/plugins/extras/px4flow.md b/docs/plugins/extras/px4flow.md index 1a764aef9..6b455e6ad 100644 --- a/docs/plugins/extras/px4flow.md +++ b/docs/plugins/extras/px4flow.md @@ -9,13 +9,13 @@ This plugin can publish data from PX4Flow camera to ROS ## Publishers -- `~/raw/optical_flow_rad` ([mavros_msgs::msg::OpticalFlowRad](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/OpticalFlowRad.html)) -- `~/ground_distance` ([sensor_msgs::msg::Range](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/Range.html)) -- `~/temperature` ([sensor_msgs::msg::Temperature](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/Temperature.html)) +- `~/raw/optical_flow_rad` ([mavros_msgs::msg::OpticalFlowRad](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/OpticalFlowRad.html)) - Publish optical flow from MAVLink OPTICAL_FLOW_RAD. +- `~/ground_distance` ([sensor_msgs::msg::Range](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/Range.html)) - Publish ground distance as Range from OPTICAL_FLOW_RAD. +- `~/temperature` ([sensor_msgs::msg::Temperature](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/Temperature.html)) - Publish optical flow temperature as Temperature. ## Subscribers -- `~/raw/send` ([mavros_msgs::msg::OpticalFlowRad](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/OpticalFlowRad.html)) +- `~/raw/send` ([mavros_msgs::msg::OpticalFlowRad](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/OpticalFlowRad.html)) - Subscribe to OpticalFlowRad to send as OPTICAL_FLOW_RAD to the FCU. ## Services @@ -27,10 +27,10 @@ This plugin can publish data from PX4Flow camera to ROS ## Parameters -- `frame_id` [default: `"px4flow"`] -- `ranger_fov` [type: double, default: `0.119428926`] - This is a narrow beam (60cm wide at 5 meters, but also at 1 meter). 6.8 degrees at 5 meters, 31 degrees at 1 meter -- `ranger_min_range` [type: double, default: `0.3`] -- `ranger_max_range` [type: double, default: `5.0`] +- `frame_id` [default: `"px4flow"`] - Frame id for published PX4Flow messages. +- `ranger_fov` [type: double, default: `0.119428926`] - Default rangefinder field of view [rad]. +- `ranger_min_range` [type: double, default: `0.3`] - Minimum rangefinder range [m]. +- `ranger_max_range` [type: double, default: `5.0`] - Maximum rangefinder range [m]. ## MAVLink Subscriptions diff --git a/docs/plugins/extras/rangefinder.md b/docs/plugins/extras/rangefinder.md index c42efd4a8..611cd2e0d 100644 --- a/docs/plugins/extras/rangefinder.md +++ b/docs/plugins/extras/rangefinder.md @@ -9,7 +9,7 @@ This plugin allows publishing rangefinder sensor data from Ardupilot FCU to ROS. ## Publishers -- `~/rangefinder` ([sensor_msgs::msg::Range](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/Range.html)) +- `~/rangefinder` ([sensor_msgs::msg::Range](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/Range.html)) - Publish rangefinder data from MAVLink RANGEFINDER. ## Subscribers diff --git a/docs/plugins/extras/sim_state.md b/docs/plugins/extras/sim_state.md index 0596711a1..3fd28f7ad 100644 --- a/docs/plugins/extras/sim_state.md +++ b/docs/plugins/extras/sim_state.md @@ -9,11 +9,11 @@ Adds support for MAVLink SIM_STATE (id 108) messages and republishes fields to ROS 2 topics. Intended for simulation use as a high-accuracy ground-truth feed when developing autonomy. Currently verified with ArduCopter SITL. Published topics (relative to plugin namespace): - ~/attitude (sensor_msgs/Imu): orientation (ENU/base_link) and angular velocity - ~/acceleration (geometry_msgs/Vector3Stamped): linear accel (m/s^2) in ENU/map - ~/velocity_body (geometry_msgs/TwistStamped): linear+angular velocity in base_link - ~/velocity_local (geometry_msgs/TwistStamped): linear+angular velocity in ENU/map - ~/global_position (sensor_msgs/NavSatFix): WGS84 lat/lon/alt with optional covariance ## Publishers -- `~/attitude` ([sensor_msgs::msg::Imu](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/Imu.html)) - IMU attitude publisher (~/attitude): orientation and angular velocity in ENU/base_link -- `~/acceleration` ([geometry_msgs::msg::Vector3Stamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/Vector3Stamped.html)) - Linear acceleration publisher (~/acceleration): ENU/map, units m/s^2 -- `~/velocity_body` ([geometry_msgs::msg::TwistStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TwistStamped.html)) - Body-frame twist publisher (~/velocity_body): base_link linear+angular velocity -- `~/velocity_local` ([geometry_msgs::msg::TwistStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TwistStamped.html)) - Local-frame twist publisher (~/velocity_local): ENU/map linear+angular velocity -- `~/global_position` ([sensor_msgs::msg::NavSatFix](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/NavSatFix.html)) - Global position publisher (~/global_position): WGS84 NavSatFix +- `~/attitude` ([sensor_msgs::msg::Imu](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/Imu.html)) - IMU attitude publisher (~/attitude): orientation and angular velocity in ENU/base_link Publish attitude from MAVLink SIM_STATE. +- `~/acceleration` ([geometry_msgs::msg::Vector3Stamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/Vector3Stamped.html)) - Linear acceleration publisher (~/acceleration): ENU/map, units m/s^2 Publish linear acceleration from MAVLink SIM_STATE. +- `~/velocity_body` ([geometry_msgs::msg::TwistStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TwistStamped.html)) - Body-frame twist publisher (~/velocity_body): base_link linear+angular velocity Publish body-frame velocity from MAVLink SIM_STATE. +- `~/velocity_local` ([geometry_msgs::msg::TwistStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TwistStamped.html)) - Local-frame twist publisher (~/velocity_local): ENU/map linear+angular velocity Publish local-frame velocity from MAVLink SIM_STATE. +- `~/global_position` ([sensor_msgs::msg::NavSatFix](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/NavSatFix.html)) - Global position publisher (~/global_position): WGS84 NavSatFix Publish global position from MAVLink SIM_STATE. ## Subscribers diff --git a/docs/plugins/extras/terrain.md b/docs/plugins/extras/terrain.md index 9e0ea6bec..e9e31dcf3 100644 --- a/docs/plugins/extras/terrain.md +++ b/docs/plugins/extras/terrain.md @@ -9,12 +9,12 @@ Bridges the MAVLink terrain protocol between the FCU and a companion terrain_server node that serves SRTM elevation data. Protocol spec: https://mavlink.io/en/services/terrain.html TERRAIN_REQUEST from the FCU is forwarded to the server for SRTM lookup; the server responds with TERRAIN_DATA blocks that are sent back to the FCU. TERRAIN_CHECK point queries are handled via a service call to the server, which responds with elevation data that is returned to the FCU as TERRAIN_REPORT. ## Publishers -- `~/report` ([mavros_msgs::msg::TerrainReport](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/TerrainReport.html)) - Terrain height reports from FCU and check-service responses -- `~/request` ([mavros_msgs::msg::TerrainRequest](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/TerrainRequest.html)) - Grid data requests forwarded from FCU for SRTM lookup +- `~/report` ([mavros_msgs::msg::TerrainReport](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/TerrainReport.html)) - Terrain height reports from FCU and check-service responses Publish terrain reports from MAVLink TERRAIN_REPORT. +- `~/request` ([mavros_msgs::msg::TerrainRequest](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/TerrainRequest.html)) - Grid data requests forwarded from FCU for SRTM lookup Publish terrain requests from MAVLink TERRAIN_REQUEST. ## Subscribers -- `~/data` ([mavros_msgs::msg::TerrainData](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/TerrainData.html)) - Filled terrain grid blocks from terrain_server +- `~/data` ([mavros_msgs::msg::TerrainData](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/TerrainData.html)) - Filled terrain grid blocks from terrain_server Subscribe to TerrainData to send as TERRAIN_DATA to the FCU. ## Services @@ -22,7 +22,7 @@ Bridges the MAVLink terrain protocol between the FCU and a companion terrain_ser ## Clients -- `~/check` ([mavros_msgs::srv::TerrainCheck](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/TerrainCheck.html)) - Point elevation query handled by terrain_server +- `~/check` ([mavros_msgs::srv::TerrainCheck](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/TerrainCheck.html)) - Point elevation query handled by terrain_server Client to query terrain elevation (terrain/check). ## Parameters diff --git a/docs/plugins/extras/trajectory.md b/docs/plugins/extras/trajectory.md index ff79a2724..ee803b7fc 100644 --- a/docs/plugins/extras/trajectory.md +++ b/docs/plugins/extras/trajectory.md @@ -9,12 +9,12 @@ send back to the FCU a corrected path (collision free, smoothed) @see trajectory_cb() ## Publishers -- `~/desired` ([mavros_msgs::msg::Trajectory](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/Trajectory.html)) +- `~/desired` ([mavros_msgs::msg::Trajectory](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/Trajectory.html)) - Publish desired trajectory from MAVLink TRAJECTORY. ## Subscribers -- `~/generated` ([mavros_msgs::msg::Trajectory](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/Trajectory.html)) -- `~/path` ([nav_msgs::msg::Path](https://docs.ros.org/en/rolling/p/nav_msgs/msg/Path.html)) +- `~/generated` ([mavros_msgs::msg::Trajectory](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/Trajectory.html)) - Subscribe to Trajectory to send as TRAJECTORY to the FCU. +- `~/path` ([nav_msgs::msg::Path](https://docs.ros.org/en/rolling/p/nav_msgs/msg/Path.html)) - Subscribe to nav_msgs/Path to send as TRAJECTORY to the FCU. ## Services diff --git a/docs/plugins/extras/tunnel.md b/docs/plugins/extras/tunnel.md index a3daebb6e..7e8fb0c9d 100644 --- a/docs/plugins/extras/tunnel.md +++ b/docs/plugins/extras/tunnel.md @@ -9,11 +9,11 @@ Implements the [MAVLink Tunnel Protocol](https://mavlink.io/en/services/tunnel.html). ## Publishers -- `~/out` ([mavros_msgs::msg::Tunnel](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/Tunnel.html)) +- `~/out` ([mavros_msgs::msg::Tunnel](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/Tunnel.html)) - Publish TUNNEL messages received from the FCU. ## Subscribers -- `~/in` ([mavros_msgs::msg::Tunnel](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/Tunnel.html)) +- `~/in` ([mavros_msgs::msg::Tunnel](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/Tunnel.html)) - Subscribe to Tunnel to send as TUNNEL to the FCU. ## Services diff --git a/docs/plugins/extras/vfr_hud.md b/docs/plugins/extras/vfr_hud.md index f4d01cf2a..ae54e2eea 100644 --- a/docs/plugins/extras/vfr_hud.md +++ b/docs/plugins/extras/vfr_hud.md @@ -7,7 +7,7 @@ ## Publishers -- `vfr_hud` ([mavros_msgs::msg::VfrHud](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/VfrHud.html)) +- `vfr_hud` ([mavros_msgs::msg::VfrHud](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/VfrHud.html)) - Publish VFR HUD data from MAVLink VFR_HUD. ## Subscribers diff --git a/docs/plugins/extras/vibration.md b/docs/plugins/extras/vibration.md index d6c09610b..ac5a8c42d 100644 --- a/docs/plugins/extras/vibration.md +++ b/docs/plugins/extras/vibration.md @@ -9,7 +9,7 @@ This plugin is intended to publish MAV vibration levels and accelerometer clipping from FCU. ## Publishers -- `~/raw/vibration` ([mavros_msgs::msg::Vibration](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/Vibration.html)) +- `~/raw/vibration` ([mavros_msgs::msg::Vibration](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/Vibration.html)) - Publish vibration levels from MAVLink VIBRATION. ## Subscribers @@ -25,7 +25,7 @@ This plugin is intended to publish MAV vibration levels and accelerometer clippi ## Parameters -- `frame_id` [default: `"base_link"`] +- `frame_id` [default: `"base_link"`] - Frame id for published vibration messages. ## MAVLink Subscriptions diff --git a/docs/plugins/extras/vision_pose_estimate.md b/docs/plugins/extras/vision_pose_estimate.md index e7bb82c31..726da0824 100644 --- a/docs/plugins/extras/vision_pose_estimate.md +++ b/docs/plugins/extras/vision_pose_estimate.md @@ -13,8 +13,8 @@ Send pose estimation from various vision estimators to FCU position and attitude ## Subscribers -- `~/pose` ([geometry_msgs::msg::PoseStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseStamped.html)) -- `~/pose_cov` ([geometry_msgs::msg::PoseWithCovarianceStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseWithCovarianceStamped.html)) +- `~/pose` ([geometry_msgs::msg::PoseStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseStamped.html)) - Subscribe to vision pose as PoseStamped. +- `~/pose_cov` ([geometry_msgs::msg::PoseWithCovarianceStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseWithCovarianceStamped.html)) - Subscribe to vision pose with covariance as PoseWithCovarianceStamped. ## Services @@ -26,10 +26,10 @@ Send pose estimation from various vision estimators to FCU position and attitude ## Parameters -- `tf/listen` [type: bool, default: `false`] - tf params -- `tf/frame_id` [default: `"map"`] -- `tf/child_frame_id` [default: `"vision_estimate"`] -- `tf/rate_limit` [type: double, default: `10.0`] +- `tf/listen` [type: bool, default: `false`] - tf params Listen to vision pose from TF (else subscribe to ~/pose). +- `tf/frame_id` [default: `"map"`] - TF frame id for vision pose source. +- `tf/child_frame_id` [default: `"vision_estimate"`] - TF child frame id for vision pose source. +- `tf/rate_limit` [type: double, default: `10.0`] - Vision pose send rate limit [Hz]. ## MAVLink Subscriptions diff --git a/docs/plugins/extras/vision_speed_estimate.md b/docs/plugins/extras/vision_speed_estimate.md index 07799312a..04d9d891a 100644 --- a/docs/plugins/extras/vision_speed_estimate.md +++ b/docs/plugins/extras/vision_speed_estimate.md @@ -13,9 +13,9 @@ Send velocity estimation from various vision estimators to FCU position and atti ## Subscribers -- `~/speed_twist_cov` ([geometry_msgs::msg::TwistWithCovarianceStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TwistWithCovarianceStamped.html)) -- `~/speed_twist` ([geometry_msgs::msg::TwistStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TwistStamped.html)) -- `~/speed_vector` ([geometry_msgs::msg::Vector3Stamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/Vector3Stamped.html)) +- `~/speed_twist_cov` ([geometry_msgs::msg::TwistWithCovarianceStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TwistWithCovarianceStamped.html)) - Subscribe to vision speed as TwistWithCovarianceStamped. +- `~/speed_twist` ([geometry_msgs::msg::TwistStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TwistStamped.html)) - Subscribe to vision speed as TwistStamped. +- `~/speed_vector` ([geometry_msgs::msg::Vector3Stamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/Vector3Stamped.html)) - Subscribe to vision speed as Vector3Stamped. ## Services diff --git a/docs/plugins/extras/wheel_odometry.md b/docs/plugins/extras/wheel_odometry.md index ef5bdcbc4..d02eeeaf5 100644 --- a/docs/plugins/extras/wheel_odometry.md +++ b/docs/plugins/extras/wheel_odometry.md @@ -9,10 +9,10 @@ This plugin allows computing and publishing wheel odometry coming from FCU wheel encoders. Can use either wheel's RPM or WHEEL_DISTANCE messages (the latter gives better accuracy). ## Publishers -- `~/rpm` ([mavros_msgs::msg::WheelOdomStamped](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/WheelOdomStamped.html)) -- `~/distance` ([mavros_msgs::msg::WheelOdomStamped](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/WheelOdomStamped.html)) -- `~/velocity` ([geometry_msgs::msg::TwistWithCovarianceStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TwistWithCovarianceStamped.html)) -- `~/odom` ([nav_msgs::msg::Odometry](https://docs.ros.org/en/rolling/p/nav_msgs/msg/Odometry.html)) +- `~/rpm` ([mavros_msgs::msg::WheelOdomStamped](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/WheelOdomStamped.html)) - Publish raw wheel RPM from MAVLink RPM. +- `~/distance` ([mavros_msgs::msg::WheelOdomStamped](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/WheelOdomStamped.html)) - Publish raw wheel distances from MAVLink WHEEL_DISTANCE. +- `~/velocity` ([geometry_msgs::msg::TwistWithCovarianceStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TwistWithCovarianceStamped.html)) - Publish computed wheel odometry as TwistWithCovarianceStamped. +- `~/odom` ([nav_msgs::msg::Odometry](https://docs.ros.org/en/rolling/p/nav_msgs/msg/Odometry.html)) - Publish computed wheel odometry as nav_msgs/Odometry. ## Subscribers @@ -28,16 +28,16 @@ This plugin allows computing and publishing wheel odometry coming from FCU wheel ## Parameters -- `send_raw` [type: bool, default: `false`] - General params -- `count` [type: integer, default: `2`] -- `use_rpm` [type: bool, default: `false`] -- `send_twist` [type: bool, default: `false`] - Odometry params -- `frame_id` [default: `uas_->get_odom_frame_id()`] -- `child_frame_id` [default: `uas_->get_base_link_frame_id()`] -- `vel_error` [type: double, default: `0.1`] -- `tf.frame_id` [default: `uas_->get_odom_frame_id()`] - TF subsection -- `tf.child_frame_id` [default: `uas_->get_base_link_frame_id()`] -- `tf.send` [type: bool, default: `false`] +- `send_raw` [type: bool, default: `false`] - General params Publish raw wheel RPM and distance data. +- `count` [type: integer, default: `2`] - Number of wheels used for odometry computation. +- `use_rpm` [type: bool, default: `false`] - Use wheel RPM (true) or cumulative distance (false) for odometry. +- `send_twist` [type: bool, default: `false`] - Odometry params Publish TwistWithCovarianceStamped instead of Odometry. +- `frame_id` [default: `uas_->get_odom_frame_id()`] - Frame id for published odometry. +- `child_frame_id` [default: `uas_->get_base_link_frame_id()`] - Child frame id for published odometry. +- `vel_error` [type: double, default: `0.1`] - Wheel velocity measurement error (std) [m/s]. +- `tf.frame_id` [default: `uas_->get_odom_frame_id()`] - TF subsection TF frame id for published odometry. +- `tf.child_frame_id` [default: `uas_->get_base_link_frame_id()`] - TF child frame id for published odometry. +- `tf.send` [type: bool, default: `false`] - Enable publishing odometry transform to TF. ## MAVLink Subscriptions diff --git a/docs/plugins/std/actuator_control.md b/docs/plugins/std/actuator_control.md index db901f7dd..a39bb679d 100644 --- a/docs/plugins/std/actuator_control.md +++ b/docs/plugins/std/actuator_control.md @@ -9,11 +9,11 @@ Sends actuator controls to FCU controller. ## Publishers -- `target_actuator_control` ([mavros_msgs::msg::ActuatorControl](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/ActuatorControl.html)) +- `target_actuator_control` ([mavros_msgs::msg::ActuatorControl](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/ActuatorControl.html)) - Publish actuator control target (ACTUATOR_CONTROL_TARGET). ## Subscribers -- `actuator_control` ([mavros_msgs::msg::ActuatorControl](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/ActuatorControl.html)) +- `actuator_control` ([mavros_msgs::msg::ActuatorControl](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/ActuatorControl.html)) - Send actuator control commands to FCU (SET_ACTUATOR_CONTROL_TARGET). ## Services diff --git a/docs/plugins/std/altitude.md b/docs/plugins/std/altitude.md index cbf95f207..8c5717d39 100644 --- a/docs/plugins/std/altitude.md +++ b/docs/plugins/std/altitude.md @@ -9,7 +9,7 @@ Publish altitude data. ## Publishers -- `altitude` ([mavros_msgs::msg::Altitude](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/Altitude.html)) - ALTITUDE data +- `altitude` ([mavros_msgs::msg::Altitude](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/Altitude.html)) - ALTITUDE data Publish altitude data (ALTITUDE). ## Subscribers @@ -25,7 +25,7 @@ Publish altitude data. ## Parameters -- `frame_id` [default: `"map"`] +- `frame_id` [default: `"map"`] - Coordinate frame used for the altitude topic headers. ## MAVLink Subscriptions diff --git a/docs/plugins/std/command.md b/docs/plugins/std/command.md index 3bd0ac82b..e4e8dead4 100644 --- a/docs/plugins/std/command.md +++ b/docs/plugins/std/command.md @@ -17,17 +17,17 @@ Send any command via COMMAND_LONG. Implements the [MAVLink Command Protocol](htt ## Services -- `~/command` ([mavros_msgs::srv::CommandLong](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/CommandLong.html)) -- `~/command_int` ([mavros_msgs::srv::CommandInt](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/CommandInt.html)) -- `~/arming` ([mavros_msgs::srv::CommandBool](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/CommandBool.html)) -- `~/set_home` ([mavros_msgs::srv::CommandHome](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/CommandHome.html)) -- `~/takeoff` ([mavros_msgs::srv::CommandTOL](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/CommandTOL.html)) -- `~/takeoff_local` ([mavros_msgs::srv::CommandTOLLocal](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/CommandTOLLocal.html)) -- `~/land` ([mavros_msgs::srv::CommandTOL](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/CommandTOL.html)) -- `~/land_local` ([mavros_msgs::srv::CommandTOLLocal](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/CommandTOLLocal.html)) -- `~/trigger_control` ([mavros_msgs::srv::CommandTriggerControl](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/CommandTriggerControl.html)) -- `~/trigger_interval` ([mavros_msgs::srv::CommandTriggerInterval](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/CommandTriggerInterval.html)) -- `~/vtol_transition` ([mavros_msgs::srv::CommandVtolTransition](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/CommandVtolTransition.html)) +- `~/command` ([mavros_msgs::srv::CommandLong](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/CommandLong.html)) - Send any MAVLink command via COMMAND_LONG and wait for the ACK. +- `~/command_int` ([mavros_msgs::srv::CommandInt](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/CommandInt.html)) - Send any MAVLink command via COMMAND_INT (no ACK wait). +- `~/arming` ([mavros_msgs::srv::CommandBool](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/CommandBool.html)) - Arm or disarm the motors (MAV_CMD_COMPONENT_ARM_DISARM). +- `~/set_home` ([mavros_msgs::srv::CommandHome](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/CommandHome.html)) - Set the home position (MAV_CMD_DO_SET_HOME). +- `~/takeoff` ([mavros_msgs::srv::CommandTOL](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/CommandTOL.html)) - Take off to a given altitude/location (MAV_CMD_NAV_TAKEOFF). +- `~/takeoff_local` ([mavros_msgs::srv::CommandTOLLocal](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/CommandTOLLocal.html)) - Take off in local frame (MAV_CMD_NAV_TAKEOFF_LOCAL). +- `~/land` ([mavros_msgs::srv::CommandTOL](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/CommandTOL.html)) - Land at a given location (MAV_CMD_NAV_LAND). +- `~/land_local` ([mavros_msgs::srv::CommandTOLLocal](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/CommandTOLLocal.html)) - Land in local frame (MAV_CMD_NAV_LAND_LOCAL). +- `~/trigger_control` ([mavros_msgs::srv::CommandTriggerControl](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/CommandTriggerControl.html)) - Enable/disable/reset the camera trigger (MAV_CMD_DO_TRIGGER_CONTROL). +- `~/trigger_interval` ([mavros_msgs::srv::CommandTriggerInterval](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/CommandTriggerInterval.html)) - Set the camera trigger interval (MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL). +- `~/vtol_transition` ([mavros_msgs::srv::CommandVtolTransition](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/CommandVtolTransition.html)) - Request a VTOL transition (MAV_CMD_DO_VTOL_TRANSITION). ## Clients diff --git a/docs/plugins/std/ftp.md b/docs/plugins/std/ftp.md index 598aae3fa..c4a7bc00d 100644 --- a/docs/plugins/std/ftp.md +++ b/docs/plugins/std/ftp.md @@ -17,18 +17,18 @@ Implements the [MAVLink File Transfer Protocol](https://mavlink.io/en/services/f ## Services -- `~/list` ([mavros_msgs::srv::FileList](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/FileList.html)) -- `~/open` ([mavros_msgs::srv::FileOpen](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/FileOpen.html)) -- `~/close` ([mavros_msgs::srv::FileClose](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/FileClose.html)) -- `~/read` ([mavros_msgs::srv::FileRead](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/FileRead.html)) -- `~/write` ([mavros_msgs::srv::FileWrite](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/FileWrite.html)) -- `~/mkdir` ([mavros_msgs::srv::FileMakeDir](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/FileMakeDir.html)) -- `~/rmdir` ([mavros_msgs::srv::FileRemoveDir](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/FileRemoveDir.html)) -- `~/remove` ([mavros_msgs::srv::FileRemove](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/FileRemove.html)) -- `~/truncate` ([mavros_msgs::srv::FileTruncate](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/FileTruncate.html)) -- `~/reset` ([std_srvs::srv::Empty](https://docs.ros.org/en/rolling/p/std_srvs/srv/Empty.html)) -- `~/rename` ([mavros_msgs::srv::FileRename](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/FileRename.html)) -- `~/checksum` ([mavros_msgs::srv::FileChecksum](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/FileChecksum.html)) +- `~/list` ([mavros_msgs::srv::FileList](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/FileList.html)) - List the contents of a directory on the FCU (FTP). +- `~/open` ([mavros_msgs::srv::FileOpen](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/FileOpen.html)) - Open a file on the FCU for reading or writing (FTP). +- `~/close` ([mavros_msgs::srv::FileClose](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/FileClose.html)) - Close an open file on the FCU (FTP). +- `~/read` ([mavros_msgs::srv::FileRead](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/FileRead.html)) - Read data from an open file on the FCU (FTP). +- `~/write` ([mavros_msgs::srv::FileWrite](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/FileWrite.html)) - Write data to an open file on the FCU (FTP). +- `~/mkdir` ([mavros_msgs::srv::FileMakeDir](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/FileMakeDir.html)) - Create a directory on the FCU (FTP). +- `~/rmdir` ([mavros_msgs::srv::FileRemoveDir](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/FileRemoveDir.html)) - Remove a directory on the FCU (FTP). +- `~/remove` ([mavros_msgs::srv::FileRemove](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/FileRemove.html)) - Remove a file on the FCU (FTP). +- `~/truncate` ([mavros_msgs::srv::FileTruncate](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/FileTruncate.html)) - Truncate a file to a given length on the FCU (FTP). +- `~/reset` ([std_srvs::srv::Empty](https://docs.ros.org/en/rolling/p/std_srvs/srv/Empty.html)) - Reset the FTP session on both sides (FTP). +- `~/rename` ([mavros_msgs::srv::FileRename](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/FileRename.html)) - Rename a file on the FCU (FTP). +- `~/checksum` ([mavros_msgs::srv::FileChecksum](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/FileChecksum.html)) - Calculate the CRC32 checksum of a file on the FCU (FTP). ## Clients diff --git a/docs/plugins/std/geofence.md b/docs/plugins/std/geofence.md index cc8d390d7..3c76fa7d3 100644 --- a/docs/plugins/std/geofence.md +++ b/docs/plugins/std/geofence.md @@ -9,7 +9,7 @@ Implements the geofence part of the [MAVLink Mission Protocol](https://mavlink.io/en/services/mission.html). ## Publishers -- `~/fences` ([mavros_msgs::msg::WaypointList](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/WaypointList.html)) +- `~/fences` ([mavros_msgs::msg::WaypointList](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/WaypointList.html)) - Publish the current geofence (MISSION protocol). ## Subscribers @@ -17,9 +17,9 @@ Implements the geofence part of the [MAVLink Mission Protocol](https://mavlink.i ## Services -- `~/pull` ([mavros_msgs::srv::WaypointPull](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/WaypointPull.html)) -- `~/push` ([mavros_msgs::srv::WaypointPush](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/WaypointPush.html)) -- `~/clear` ([mavros_msgs::srv::WaypointClear](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/WaypointClear.html)) +- `~/pull` ([mavros_msgs::srv::WaypointPull](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/WaypointPull.html)) - Pull the geofence from the FCU (MISSION_REQUEST_LIST). +- `~/push` ([mavros_msgs::srv::WaypointPush](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/WaypointPush.html)) - Push the geofence to the FCU (MISSION_COUNT). +- `~/clear` ([mavros_msgs::srv::WaypointClear](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/WaypointClear.html)) - Clear the geofence on the FCU (MISSION_CLEAR_ALL). ## Clients @@ -27,8 +27,8 @@ Implements the geofence part of the [MAVLink Mission Protocol](https://mavlink.i ## Parameters -- `pull_after_gcs` [type: bool, default: `true`] - NOTE(vooon): I'm not quite sure that this option would work with mavros router -- `use_mission_item_int` [type: bool, default: `true`] +- `pull_after_gcs` [type: bool, default: `true`] - NOTE(vooon): I'm not quite sure that this option would work with mavros router Pull geofence from the FCU after GCS connection. +- `use_mission_item_int` [type: bool, default: `true`] - Use MISSION_ITEM_INT instead of MISSION_ITEM (MISSION protocol). ## MAVLink Subscriptions diff --git a/docs/plugins/std/global_position.md b/docs/plugins/std/global_position.md index 301a322b8..c5a753e79 100644 --- a/docs/plugins/std/global_position.md +++ b/docs/plugins/std/global_position.md @@ -9,20 +9,20 @@ Publishes global position. Conversion from GPS LLA to ECEF allows publishing local position to TF and PoseWithCovarianceStamped. ## Publishers -- `~/raw/fix` ([sensor_msgs::msg::NavSatFix](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/NavSatFix.html)) - gps data -- `~/raw/gps_vel` ([geometry_msgs::msg::TwistStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TwistStamped.html)) -- `~/raw/satellites` ([std_msgs::msg::UInt32](https://docs.ros.org/en/rolling/p/std_msgs/msg/UInt32.html)) -- `~/global` ([sensor_msgs::msg::NavSatFix](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/NavSatFix.html)) - fused global position -- `~/local` ([nav_msgs::msg::Odometry](https://docs.ros.org/en/rolling/p/nav_msgs/msg/Odometry.html)) -- `~/rel_alt` ([std_msgs::msg::Float64](https://docs.ros.org/en/rolling/p/std_msgs/msg/Float64.html)) -- `~/compass_hdg` ([std_msgs::msg::Float64](https://docs.ros.org/en/rolling/p/std_msgs/msg/Float64.html)) -- `~/gp_origin` ([geographic_msgs::msg::GeoPointStamped](https://docs.ros.org/en/rolling/p/geographic_msgs/msg/GeoPointStamped.html)) - global origin -- `~/gp_lp_offset` ([geometry_msgs::msg::PoseStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseStamped.html)) - offset from local position to the global origin ("earth") +- `~/raw/fix` ([sensor_msgs::msg::NavSatFix](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/NavSatFix.html)) - gps data Publish raw GPS fix (GPS_RAW_INT). +- `~/raw/gps_vel` ([geometry_msgs::msg::TwistStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TwistStamped.html)) - Publish raw GPS velocity (GPS_RAW_INT). +- `~/raw/satellites` ([std_msgs::msg::UInt32](https://docs.ros.org/en/rolling/p/std_msgs/msg/UInt32.html)) - Publish number of visible GPS satellites (GPS_RAW_INT). +- `~/global` ([sensor_msgs::msg::NavSatFix](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/NavSatFix.html)) - fused global position Publish fused global position fix (GLOBAL_POSITION_INT). +- `~/local` ([nav_msgs::msg::Odometry](https://docs.ros.org/en/rolling/p/nav_msgs/msg/Odometry.html)) - Publish fused local position as odometry (GLOBAL_POSITION_INT). +- `~/rel_alt` ([std_msgs::msg::Float64](https://docs.ros.org/en/rolling/p/std_msgs/msg/Float64.html)) - Publish fused relative altitude (GLOBAL_POSITION_INT). +- `~/compass_hdg` ([std_msgs::msg::Float64](https://docs.ros.org/en/rolling/p/std_msgs/msg/Float64.html)) - Publish fused compass heading (GLOBAL_POSITION_INT). +- `~/gp_origin` ([geographic_msgs::msg::GeoPointStamped](https://docs.ros.org/en/rolling/p/geographic_msgs/msg/GeoPointStamped.html)) - global origin Publish the global origin (GPS_GLOBAL_ORIGIN). +- `~/gp_lp_offset` ([geometry_msgs::msg::PoseStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseStamped.html)) - offset from local position to the global origin ("earth") Publish the offset from the local position to the global origin. ## Subscribers -- `~/set_gp_origin` ([geographic_msgs::msg::GeoPointStamped](https://docs.ros.org/en/rolling/p/geographic_msgs/msg/GeoPointStamped.html)) -- `home_position/home` ([mavros_msgs::msg::HomePosition](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/HomePosition.html)) - home position subscriber to set "map" origin TODO(vooon): use UAS +- `~/set_gp_origin` ([geographic_msgs::msg::GeoPointStamped](https://docs.ros.org/en/rolling/p/geographic_msgs/msg/GeoPointStamped.html)) - Set the global origin (SET_GPS_GLOBAL_ORIGIN). +- `home_position/home` ([mavros_msgs::msg::HomePosition](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/HomePosition.html)) - home position subscriber to set "map" origin TODO(vooon): use UAS Set the "map" origin from the home position (HOME_POSITION). ## Services @@ -34,15 +34,15 @@ Publishes global position. Conversion from GPS LLA to ECEF allows publishing loc ## Parameters -- `frame_id` [default: `"map"`] - general params -- `child_frame_id` [default: `"base_link"`] -- `rot_covariance` [type: double, default: `99999.0`] -- `gps_uere` [type: double, default: `1.0`] -- `use_relative_alt` [type: bool, default: `true`] -- `tf.send` [type: bool, default: `false`] - tf subsection -- `tf.frame_id` [default: `"map"`] -- `tf.global_frame_id` [default: `"earth"`] - The global_origin should be represented as "earth" coordinate frame (ECEF) (REP 105) -- `tf.child_frame_id` [default: `"base_link"`] +- `frame_id` [default: `"map"`] - general params Coordinate frame used for the global position topics. +- `child_frame_id` [default: `"base_link"`] - Child body-fixed frame used for the global position topics. +- `rot_covariance` [type: double, default: `99999.0`] - Rotation covariance for the odometry pose. +- `gps_uere` [type: double, default: `1.0`] - GPS user range error used to approximate position covariance. +- `use_relative_alt` [type: bool, default: `true`] - Use relative altitude instead of the geocentric altitude. +- `tf.send` [type: bool, default: `false`] - tf subsection Enable publishing of the global position transform. +- `tf.frame_id` [default: `"map"`] - Map frame used for the published transform. +- `tf.global_frame_id` [default: `"earth"`] - The global_origin should be represented as "earth" coordinate frame (ECEF) (REP 105) Global reference frame (ECEF) for the transform. +- `tf.child_frame_id` [default: `"base_link"`] - Child body-fixed frame used for the transform. ## MAVLink Subscriptions diff --git a/docs/plugins/std/home_position.md b/docs/plugins/std/home_position.md index ff52bfb50..71ed169d5 100644 --- a/docs/plugins/std/home_position.md +++ b/docs/plugins/std/home_position.md @@ -9,19 +9,19 @@ Publishes home position. ## Publishers -- `~/home` ([mavros_msgs::msg::HomePosition](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/HomePosition.html)) +- `~/home` ([mavros_msgs::msg::HomePosition](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/HomePosition.html)) - Publish home position (HOME_POSITION). ## Subscribers -- `~/set` ([mavros_msgs::msg::HomePosition](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/HomePosition.html)) +- `~/set` ([mavros_msgs::msg::HomePosition](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/HomePosition.html)) - Set home position (SET_HOME_POSITION). ## Services -- `~/req_update` ([std_srvs::srv::Trigger](https://docs.ros.org/en/rolling/p/std_srvs/srv/Trigger.html)) +- `~/req_update` ([std_srvs::srv::Trigger](https://docs.ros.org/en/rolling/p/std_srvs/srv/Trigger.html)) - Request home position update (MAV_CMD_GET_HOME_POSITION). ## Clients -- `cmd/command` ([mavros_msgs::srv::CommandLong](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/CommandLong.html)) +- `cmd/command` ([mavros_msgs::srv::CommandLong](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/CommandLong.html)) - Client to request home position via command (MAV_CMD_GET_HOME_POSITION). ## Parameters diff --git a/docs/plugins/std/imu.md b/docs/plugins/std/imu.md index 6eed89f66..ffdcdab04 100644 --- a/docs/plugins/std/imu.md +++ b/docs/plugins/std/imu.md @@ -7,13 +7,13 @@ ## Publishers -- `~/data` ([sensor_msgs::msg::Imu](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/Imu.html)) -- `~/data_raw` ([sensor_msgs::msg::Imu](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/Imu.html)) -- `~/mag` ([sensor_msgs::msg::MagneticField](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/MagneticField.html)) -- `~/temperature_imu` ([sensor_msgs::msg::Temperature](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/Temperature.html)) -- `~/temperature_baro` ([sensor_msgs::msg::Temperature](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/Temperature.html)) -- `~/static_pressure` ([sensor_msgs::msg::FluidPressure](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/FluidPressure.html)) -- `~/diff_pressure` ([sensor_msgs::msg::FluidPressure](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/FluidPressure.html)) +- `~/data` ([sensor_msgs::msg::Imu](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/Imu.html)) - Publish fused IMU data (ATTITUDE / ATTITUDE_QUATERNION). +- `~/data_raw` ([sensor_msgs::msg::Imu](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/Imu.html)) - Publish raw IMU and acceleration data (RAW_IMU / SCALED_IMU / HIGHRES_IMU). +- `~/mag` ([sensor_msgs::msg::MagneticField](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/MagneticField.html)) - Publish filtered magnetic field data (RAW_IMU / SCALED_IMU / HIGHRES_IMU). +- `~/temperature_imu` ([sensor_msgs::msg::Temperature](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/Temperature.html)) - Publish IMU temperature (HIGHRES_IMU). +- `~/temperature_baro` ([sensor_msgs::msg::Temperature](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/Temperature.html)) - Publish barometer temperature (SCALED_PRESSURE). +- `~/static_pressure` ([sensor_msgs::msg::FluidPressure](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/FluidPressure.html)) - Publish absolute (static) pressure (SCALED_PRESSURE / HIGHRES_IMU). +- `~/diff_pressure` ([sensor_msgs::msg::FluidPressure](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/FluidPressure.html)) - Publish differential pressure (SCALED_PRESSURE / HIGHRES_IMU). ## Subscribers @@ -29,11 +29,11 @@ ## Parameters -- `frame_id` [default: `"base_link"`] - Additionally, it is reported the orientation of the vehicle to describe the transformation from the ENU frame to the base_link frame (ENU <-> base_link). THIS ORIENTATION IS NOT THE SAME AS THAT REPORTED BY THE FCU (NED <-> aircraft). -- `linear_acceleration_stdev` [type: double, default: `0.0003`] -- `angular_velocity_stdev` [default: `0.02 * (M_PI / 180.0)`] -- `orientation_stdev` [type: double, default: `1.0`] -- `magnetic_stdev` [type: double, default: `0.0`] +- `frame_id` [default: `"base_link"`] - Coordinate frame used for the published IMU topics. +- `linear_acceleration_stdev` [type: double, default: `0.0003`] - Standard deviation of the linear acceleration. +- `angular_velocity_stdev` [default: `0.02 * (M_PI / 180.0)`] - Standard deviation of the angular velocity. +- `orientation_stdev` [type: double, default: `1.0`] - Standard deviation of the orientation. +- `magnetic_stdev` [type: double, default: `0.0`] - Standard deviation of the magnetic field. ## MAVLink Subscriptions diff --git a/docs/plugins/std/index.json b/docs/plugins/std/index.json index 98273d665..7ada8d97e 100644 --- a/docs/plugins/std/index.json +++ b/docs/plugins/std/index.json @@ -10,14 +10,16 @@ { "name": "target_actuator_control", "type_name": "mavros_msgs::msg::ActuatorControl", - "line": 45 + "line": 46, + "description": "Publish actuator control target (ACTUATOR_CONTROL_TARGET)." } ], "subscribers": [ { "name": "actuator_control", "type_name": "mavros_msgs::msg::ActuatorControl", - "line": 47 + "line": 49, + "description": "Send actuator control commands to FCU (SET_ACTUATOR_CONTROL_TARGET)." } ], "services": [], @@ -30,7 +32,7 @@ "message_name": "ACTUATOR_CONTROL_TARGET", "msg_id_expr": "mavlink::common::msg::ACTUATOR_CONTROL_TARGET::MSG_ID", "dialect": "common", - "line": 55, + "line": 57, "msg_id": 140 } ], @@ -41,7 +43,7 @@ "message_name": "SET_ACTUATOR_CONTROL_TARGET", "msg_id_expr": "mavlink::common::msg::SET_ACTUATOR_CONTROL_TARGET::MSG_ID", "dialect": "common", - "line": 91, + "line": 93, "msg_id": 139 } ] @@ -57,8 +59,8 @@ { "name": "altitude", "type_name": "mavros_msgs::msg::Altitude", - "line": 54, - "description": "ALTITUDE data" + "line": 56, + "description": "ALTITUDE data Publish altitude data (ALTITUDE)." } ], "subscribers": [], @@ -68,8 +70,9 @@ { "name": "frame_id", "type_name": "", - "line": 46, - "default_value": "\"map\"" + "line": 47, + "default_value": "\"map\"", + "description": "Coordinate frame used for the altitude topic headers." } ], "mavlink_subscriptions": [ @@ -79,7 +82,7 @@ "message_name": "ALTITUDE", "msg_id_expr": "mavlink::common::msg::ALTITUDE::MSG_ID", "dialect": "common", - "line": 60, + "line": 62, "msg_id": 141 } ], @@ -98,57 +101,68 @@ { "name": "~/command", "type_name": "mavros_msgs::srv::CommandLong", - "line": 97 + "line": 98, + "description": "Send any MAVLink command via COMMAND_LONG and wait for the ACK." }, { "name": "~/command_int", "type_name": "mavros_msgs::srv::CommandInt", - "line": 103 + "line": 105, + "description": "Send any MAVLink command via COMMAND_INT (no ACK wait)." }, { "name": "~/arming", "type_name": "mavros_msgs::srv::CommandBool", - "line": 109 + "line": 112, + "description": "Arm or disarm the motors (MAV_CMD_COMPONENT_ARM_DISARM)." }, { "name": "~/set_home", "type_name": "mavros_msgs::srv::CommandHome", - "line": 115 + "line": 119, + "description": "Set the home position (MAV_CMD_DO_SET_HOME)." }, { "name": "~/takeoff", "type_name": "mavros_msgs::srv::CommandTOL", - "line": 121 + "line": 126, + "description": "Take off to a given altitude/location (MAV_CMD_NAV_TAKEOFF)." }, { "name": "~/takeoff_local", "type_name": "mavros_msgs::srv::CommandTOLLocal", - "line": 127 + "line": 133, + "description": "Take off in local frame (MAV_CMD_NAV_TAKEOFF_LOCAL)." }, { "name": "~/land", "type_name": "mavros_msgs::srv::CommandTOL", - "line": 133 + "line": 140, + "description": "Land at a given location (MAV_CMD_NAV_LAND)." }, { "name": "~/land_local", "type_name": "mavros_msgs::srv::CommandTOLLocal", - "line": 138 + "line": 146, + "description": "Land in local frame (MAV_CMD_NAV_LAND_LOCAL)." }, { "name": "~/trigger_control", "type_name": "mavros_msgs::srv::CommandTriggerControl", - "line": 142 + "line": 151, + "description": "Enable/disable/reset the camera trigger (MAV_CMD_DO_TRIGGER_CONTROL)." }, { "name": "~/trigger_interval", "type_name": "mavros_msgs::srv::CommandTriggerInterval", - "line": 146 + "line": 156, + "description": "Set the camera trigger interval (MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL)." }, { "name": "~/vtol_transition", "type_name": "mavros_msgs::srv::CommandVtolTransition", - "line": 150 + "line": 161, + "description": "Request a VTOL transition (MAV_CMD_DO_VTOL_TRANSITION)." } ], "clients": [], @@ -173,7 +187,7 @@ "message_name": "COMMAND_ACK", "msg_id_expr": "mavlink::common::msg::COMMAND_ACK::MSG_ID", "dialect": "common", - "line": 159, + "line": 170, "msg_id": 77 } ], @@ -184,7 +198,7 @@ "message_name": "COMMAND_LONG", "msg_id_expr": "mavlink::common::msg::COMMAND_LONG::MSG_ID", "dialect": "common", - "line": 357, + "line": 368, "msg_id": 76 }, { @@ -193,7 +207,7 @@ "message_name": "COMMAND_INT", "msg_id_expr": "mavlink::common::msg::COMMAND_INT::MSG_ID", "dialect": "common", - "line": 384, + "line": 395, "msg_id": 75 } ] @@ -265,62 +279,74 @@ { "name": "~/list", "type_name": "mavros_msgs::srv::FileList", - "line": 276 + "line": 277, + "description": "List the contents of a directory on the FCU (FTP)." }, { "name": "~/open", "type_name": "mavros_msgs::srv::FileOpen", - "line": 280 + "line": 282, + "description": "Open a file on the FCU for reading or writing (FTP)." }, { "name": "~/close", "type_name": "mavros_msgs::srv::FileClose", - "line": 284 + "line": 287, + "description": "Close an open file on the FCU (FTP)." }, { "name": "~/read", "type_name": "mavros_msgs::srv::FileRead", - "line": 288 + "line": 292, + "description": "Read data from an open file on the FCU (FTP)." }, { "name": "~/write", "type_name": "mavros_msgs::srv::FileWrite", - "line": 292 + "line": 297, + "description": "Write data to an open file on the FCU (FTP)." }, { "name": "~/mkdir", "type_name": "mavros_msgs::srv::FileMakeDir", - "line": 296 + "line": 302, + "description": "Create a directory on the FCU (FTP)." }, { "name": "~/rmdir", "type_name": "mavros_msgs::srv::FileRemoveDir", - "line": 300 + "line": 307, + "description": "Remove a directory on the FCU (FTP)." }, { "name": "~/remove", "type_name": "mavros_msgs::srv::FileRemove", - "line": 304 + "line": 312, + "description": "Remove a file on the FCU (FTP)." }, { "name": "~/truncate", "type_name": "mavros_msgs::srv::FileTruncate", - "line": 308 + "line": 317, + "description": "Truncate a file to a given length on the FCU (FTP)." }, { "name": "~/reset", "type_name": "std_srvs::srv::Empty", - "line": 312 + "line": 322, + "description": "Reset the FTP session on both sides (FTP)." }, { "name": "~/rename", "type_name": "mavros_msgs::srv::FileRename", - "line": 316 + "line": 327, + "description": "Rename a file on the FCU (FTP)." }, { "name": "~/checksum", "type_name": "mavros_msgs::srv::FileChecksum", - "line": 320 + "line": 332, + "description": "Calculate the CRC32 checksum of a file on the FCU (FTP)." } ], "clients": [], @@ -332,7 +358,7 @@ "message_name": "FILE_TRANSFER_PROTOCOL", "msg_id_expr": "mavlink::common::msg::FILE_TRANSFER_PROTOCOL::MSG_ID", "dialect": "common", - "line": 328, + "line": 340, "msg_id": 110 } ], @@ -359,7 +385,8 @@ { "name": "~/fences", "type_name": "mavros_msgs::msg::WaypointList", - "line": 55 + "line": 58, + "description": "Publish the current geofence (MISSION protocol)." } ], "subscribers": [], @@ -367,17 +394,20 @@ { "name": "~/pull", "type_name": "mavros_msgs::srv::WaypointPull", - "line": 64 + "line": 68, + "description": "Pull the geofence from the FCU (MISSION_REQUEST_LIST)." }, { "name": "~/push", "type_name": "mavros_msgs::srv::WaypointPush", - "line": 69 + "line": 74, + "description": "Push the geofence to the FCU (MISSION_COUNT)." }, { "name": "~/clear", "type_name": "mavros_msgs::srv::WaypointClear", - "line": 74 + "line": 80, + "description": "Clear the geofence on the FCU (MISSION_CLEAR_ALL)." } ], "clients": [], @@ -385,15 +415,16 @@ { "name": "pull_after_gcs", "type_name": "bool", - "line": 43, + "line": 44, "default_value": "true", - "description": "NOTE(vooon): I'm not quite sure that this option would work with mavros router" + "description": "NOTE(vooon): I'm not quite sure that this option would work with mavros router Pull geofence from the FCU after GCS connection." }, { "name": "use_mission_item_int", "type_name": "bool", - "line": 48, - "default_value": "true" + "line": 50, + "default_value": "true", + "description": "Use MISSION_ITEM_INT instead of MISSION_ITEM (MISSION protocol)." } ], "mavlink_subscriptions": [ @@ -403,7 +434,7 @@ "message_name": "MISSION_ITEM", "msg_id_expr": "mavlink::common::msg::MISSION_ITEM::MSG_ID", "dialect": "common", - "line": 341, + "line": 345, "msg_id": 39 }, { @@ -412,7 +443,7 @@ "message_name": "MISSION_ITEM_INT", "msg_id_expr": "mavlink::common::msg::MISSION_ITEM_INT::MSG_ID", "dialect": "common", - "line": 342, + "line": 346, "msg_id": 73 }, { @@ -421,7 +452,7 @@ "message_name": "MISSION_REQUEST", "msg_id_expr": "mavlink::common::msg::MISSION_REQUEST::MSG_ID", "dialect": "common", - "line": 343, + "line": 347, "msg_id": 40 }, { @@ -430,7 +461,7 @@ "message_name": "MISSION_REQUEST_INT", "msg_id_expr": "mavlink::common::msg::MISSION_REQUEST_INT::MSG_ID", "dialect": "common", - "line": 344, + "line": 348, "msg_id": 51 }, { @@ -439,7 +470,7 @@ "message_name": "MISSION_COUNT", "msg_id_expr": "mavlink::common::msg::MISSION_COUNT::MSG_ID", "dialect": "common", - "line": 345, + "line": 349, "msg_id": 44 }, { @@ -448,7 +479,7 @@ "message_name": "MISSION_ACK", "msg_id_expr": "mavlink::common::msg::MISSION_ACK::MSG_ID", "dialect": "common", - "line": 346, + "line": 350, "msg_id": 47 } ], @@ -557,64 +588,70 @@ { "name": "~/raw/fix", "type_name": "sensor_msgs::msg::NavSatFix", - "line": 116, - "description": "gps data" + "line": 126, + "description": "gps data Publish raw GPS fix (GPS_RAW_INT)." }, { "name": "~/raw/gps_vel", "type_name": "geometry_msgs::msg::TwistStamped", - "line": 117 + "line": 128, + "description": "Publish raw GPS velocity (GPS_RAW_INT)." }, { "name": "~/raw/satellites", "type_name": "std_msgs::msg::UInt32", - "line": 120 + "line": 132, + "description": "Publish number of visible GPS satellites (GPS_RAW_INT)." }, { "name": "~/global", "type_name": "sensor_msgs::msg::NavSatFix", - "line": 123, - "description": "fused global position" + "line": 136, + "description": "fused global position Publish fused global position fix (GLOBAL_POSITION_INT)." }, { "name": "~/local", "type_name": "nav_msgs::msg::Odometry", - "line": 124 + "line": 138, + "description": "Publish fused local position as odometry (GLOBAL_POSITION_INT)." }, { "name": "~/rel_alt", "type_name": "std_msgs::msg::Float64", - "line": 125 + "line": 140, + "description": "Publish fused relative altitude (GLOBAL_POSITION_INT)." }, { "name": "~/compass_hdg", "type_name": "std_msgs::msg::Float64", - "line": 126 + "line": 142, + "description": "Publish fused compass heading (GLOBAL_POSITION_INT)." }, { "name": "~/gp_origin", "type_name": "geographic_msgs::msg::GeoPointStamped", - "line": 129, - "description": "global origin" + "line": 146, + "description": "global origin Publish the global origin (GPS_GLOBAL_ORIGIN)." }, { "name": "~/gp_lp_offset", "type_name": "geometry_msgs::msg::PoseStamped", - "line": 144, - "description": "offset from local position to the global origin (\"earth\")" + "line": 164, + "description": "offset from local position to the global origin (\"earth\") Publish the offset from the local position to the global origin." } ], "subscribers": [ { "name": "~/set_gp_origin", "type_name": "geographic_msgs::msg::GeoPointStamped", - "line": 132 + "line": 150, + "description": "Set the global origin (SET_GPS_GLOBAL_ORIGIN)." }, { "name": "home_position/home", "type_name": "mavros_msgs::msg::HomePosition", - "line": 138, - "description": "home position subscriber to set \"map\" origin TODO(vooon): use UAS" + "line": 157, + "description": "home position subscriber to set \"map\" origin TODO(vooon): use UAS Set the \"map\" origin from the home position (HOME_POSITION)." } ], "services": [], @@ -623,59 +660,65 @@ { "name": "frame_id", "type_name": "", - "line": 70, + "line": 71, "default_value": "\"map\"", - "description": "general params" + "description": "general params Coordinate frame used for the global position topics." }, { "name": "child_frame_id", "type_name": "", - "line": 74, - "default_value": "\"base_link\"" + "line": 76, + "default_value": "\"base_link\"", + "description": "Child body-fixed frame used for the global position topics." }, { "name": "rot_covariance", "type_name": "double", - "line": 78, - "default_value": "99999.0" + "line": 81, + "default_value": "99999.0", + "description": "Rotation covariance for the odometry pose." }, { "name": "gps_uere", "type_name": "double", - "line": 82, - "default_value": "1.0" + "line": 86, + "default_value": "1.0", + "description": "GPS user range error used to approximate position covariance." }, { "name": "use_relative_alt", "type_name": "bool", - "line": 86, - "default_value": "true" + "line": 91, + "default_value": "true", + "description": "Use relative altitude instead of the geocentric altitude." }, { "name": "tf.send", "type_name": "bool", - "line": 92, + "line": 98, "default_value": "false", - "description": "tf subsection" + "description": "tf subsection Enable publishing of the global position transform." }, { "name": "tf.frame_id", "type_name": "", - "line": 96, - "default_value": "\"map\"" + "line": 103, + "default_value": "\"map\"", + "description": "Map frame used for the published transform." }, { "name": "tf.global_frame_id", "type_name": "", - "line": 101, + "line": 109, "default_value": "\"earth\"", - "description": "The global_origin should be represented as \"earth\" coordinate frame (ECEF) (REP 105)" + "description": "The global_origin should be represented as \"earth\" coordinate frame (ECEF) (REP 105) Global reference frame (ECEF) for the transform." }, { "name": "tf.child_frame_id", "type_name": "", - "line": 105, - "default_value": "\"base_link\"" + "line": 114, + "default_value": "\"base_link\"", + "description": "Child body-fixed frame used for the transform." } ], "mavlink_subscriptions": [ @@ -685,7 +728,7 @@ "message_name": "GPS_RAW_INT", "msg_id_expr": "mavlink::common::msg::GPS_RAW_INT::MSG_ID", "dialect": "common", - "line": 152, + "line": 172, "msg_id": 24 }, { @@ -694,7 +737,7 @@ "message_name": "GLOBAL_POSITION_INT", "msg_id_expr": "mavlink::standard::msg::GLOBAL_POSITION_INT::MSG_ID", "dialect": "standard", - "line": 154, + "line": 174, "msg_id": 33, "description": "GPS_STATUS: there no corresponding ROS message, and it is not supported by APM" }, @@ -704,7 +747,7 @@ "message_name": "GPS_GLOBAL_ORIGIN", "msg_id_expr": "mavlink::common::msg::GPS_GLOBAL_ORIGIN::MSG_ID", "dialect": "common", - "line": 155, + "line": 175, "msg_id": 49 }, { @@ -713,7 +756,7 @@ "message_name": "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET", "msg_id_expr": "mavlink::common::msg::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET::MSG_ID", "dialect": "common", - "line": 156, + "line": 176, "msg_id": 89 } ], @@ -724,7 +767,7 @@ "message_name": "SET_GPS_GLOBAL_ORIGIN", "msg_id_expr": "mavlink::common::msg::SET_GPS_GLOBAL_ORIGIN::MSG_ID", "dialect": "common", - "line": 566, + "line": 586, "msg_id": 48 } ] @@ -740,28 +783,32 @@ { "name": "~/home", "type_name": "mavros_msgs::msg::HomePosition", - "line": 52 + "line": 53, + "description": "Publish home position (HOME_POSITION)." } ], "subscribers": [ { "name": "~/set", "type_name": "mavros_msgs::msg::HomePosition", - "line": 54 + "line": 56, + "description": "Set home position (SET_HOME_POSITION)." } ], "services": [ { "name": "~/req_update", "type_name": "std_srvs::srv::Trigger", - "line": 58 + "line": 61, + "description": "Request home position update (MAV_CMD_GET_HOME_POSITION)." } ], "clients": [ { "name": "cmd/command", "type_name": "mavros_msgs::srv::CommandLong", - "line": 93 + "line": 97, + "description": "Client to request home position via command (MAV_CMD_GET_HOME_POSITION)." } ], "parameters": [], @@ -772,7 +819,7 @@ "message_name": "HOME_POSITION", "msg_id_expr": "mavlink::common::msg::HOME_POSITION::MSG_ID", "dialect": "common", - "line": 73, + "line": 76, "msg_id": 242 } ], @@ -783,7 +830,7 @@ "message_name": "SET_HOME_POSITION", "msg_id_expr": "mavlink::common::msg::SET_HOME_POSITION::MSG_ID", "dialect": "common", - "line": 183, + "line": 187, "msg_id": 243 } ] @@ -799,37 +846,44 @@ { "name": "~/data", "type_name": "sensor_msgs::msg::Imu", - "line": 111 + "line": 117, + "description": "Publish fused IMU data (ATTITUDE / ATTITUDE_QUATERNION)." }, { "name": "~/data_raw", "type_name": "sensor_msgs::msg::Imu", - "line": 112 + "line": 119, + "description": "Publish raw IMU and acceleration data (RAW_IMU / SCALED_IMU / HIGHRES_IMU)." }, { "name": "~/mag", "type_name": "sensor_msgs::msg::MagneticField", - "line": 113 + "line": 121, + "description": "Publish filtered magnetic field data (RAW_IMU / SCALED_IMU / HIGHRES_IMU)." }, { "name": "~/temperature_imu", "type_name": "sensor_msgs::msg::Temperature", - "line": 114 + "line": 123, + "description": "Publish IMU temperature (HIGHRES_IMU)." }, { "name": "~/temperature_baro", "type_name": "sensor_msgs::msg::Temperature", - "line": 117 + "line": 127, + "description": "Publish barometer temperature (SCALED_PRESSURE)." }, { "name": "~/static_pressure", "type_name": "sensor_msgs::msg::FluidPressure", - "line": 120 + "line": 131, + "description": "Publish absolute (static) pressure (SCALED_PRESSURE / HIGHRES_IMU)." }, { "name": "~/diff_pressure", "type_name": "sensor_msgs::msg::FluidPressure", - "line": 123 + "line": 135, + "description": "Publish differential pressure (SCALED_PRESSURE / HIGHRES_IMU)." } ], "subscribers": [], @@ -839,33 +893,37 @@ { "name": "frame_id", "type_name": "", - "line": 81, + "line": 82, "default_value": "\"base_link\"", - "description": "Additionally, it is reported the orientation of the vehicle to describe the transformation from the ENU frame to the base_link frame (ENU <-> base_link). THIS ORIENTATION IS NOT THE SAME AS THAT REPORTED BY THE FCU (NED <-> aircraft)." + "description": "Coordinate frame used for the published IMU topics." }, { "name": "linear_acceleration_stdev", "type_name": "double", - "line": 86, - "default_value": "0.0003" + "line": 88, + "default_value": "0.0003", + "description": "Standard deviation of the linear acceleration." }, { "name": "angular_velocity_stdev", "type_name": "", - "line": 91, - "default_value": "0.02 * (M_PI / 180.0)" + "line": 94, + "default_value": "0.02 * (M_PI / 180.0)", + "description": "Standard deviation of the angular velocity." }, { "name": "orientation_stdev", "type_name": "double", - "line": 96, - "default_value": "1.0" + "line": 100, + "default_value": "1.0", + "description": "Standard deviation of the orientation." }, { "name": "magnetic_stdev", "type_name": "double", - "line": 101, - "default_value": "0.0" + "line": 106, + "default_value": "0.0", + "description": "Standard deviation of the magnetic field." } ], "mavlink_subscriptions": [ @@ -875,7 +933,7 @@ "message_name": "ATTITUDE", "msg_id_expr": "mavlink::common::msg::ATTITUDE::MSG_ID", "dialect": "common", - "line": 134, + "line": 146, "msg_id": 30 }, { @@ -884,7 +942,7 @@ "message_name": "ATTITUDE_QUATERNION", "msg_id_expr": "mavlink::common::msg::ATTITUDE_QUATERNION::MSG_ID", "dialect": "common", - "line": 135, + "line": 147, "msg_id": 31 }, { @@ -893,7 +951,7 @@ "message_name": "HIGHRES_IMU", "msg_id_expr": "mavlink::common::msg::HIGHRES_IMU::MSG_ID", "dialect": "common", - "line": 136, + "line": 148, "msg_id": 105 }, { @@ -902,7 +960,7 @@ "message_name": "RAW_IMU", "msg_id_expr": "mavlink::common::msg::RAW_IMU::MSG_ID", "dialect": "common", - "line": 137, + "line": 149, "msg_id": 27 }, { @@ -911,7 +969,7 @@ "message_name": "SCALED_IMU", "msg_id_expr": "mavlink::common::msg::SCALED_IMU::MSG_ID", "dialect": "common", - "line": 138, + "line": 150, "msg_id": 26 }, { @@ -920,7 +978,7 @@ "message_name": "SCALED_PRESSURE", "msg_id_expr": "mavlink::common::msg::SCALED_PRESSURE::MSG_ID", "dialect": "common", - "line": 139, + "line": 151, "msg_id": 29 } ], @@ -937,37 +995,44 @@ { "name": "~/pose", "type_name": "geometry_msgs::msg::PoseStamped", - "line": 83 + "line": 88, + "description": "Local position (LOCAL_POSITION_NED)." }, { "name": "~/pose_cov", "type_name": "geometry_msgs::msg::PoseWithCovarianceStamped", - "line": 84 + "line": 90, + "description": "Local position with covariance (LOCAL_POSITION_NED_COV)." }, { "name": "~/velocity_local", "type_name": "geometry_msgs::msg::TwistStamped", - "line": 86 + "line": 93, + "description": "Local velocity in NED frame (LOCAL_POSITION_NED)." }, { "name": "~/velocity_body", "type_name": "geometry_msgs::msg::TwistStamped", - "line": 88 + "line": 96, + "description": "Local velocity in body frame (LOCAL_POSITION_NED)." }, { "name": "~/velocity_body_cov", "type_name": "geometry_msgs::msg::TwistWithCovarianceStamped", - "line": 91 + "line": 100, + "description": "Local velocity with covariance (LOCAL_POSITION_NED_COV)." }, { "name": "~/accel", "type_name": "geometry_msgs::msg::AccelWithCovarianceStamped", - "line": 93 + "line": 103, + "description": "Local acceleration with covariance (LOCAL_POSITION_NED_COV)." }, { "name": "~/odom", "type_name": "nav_msgs::msg::Odometry", - "line": 96 + "line": 107, + "description": "Local odometry (LOCAL_POSITION_NED / LOCAL_POSITION_NED_COV)." } ], "subscribers": [], @@ -977,28 +1042,30 @@ { "name": "frame_id", "type_name": "", - "line": 61, + "line": 62, "default_value": "\"map\"", - "description": "header frame_id. default to map (world-fixed, ENU as per REP-105)." + "description": "header frame_id. default to map (world-fixed, ENU as per REP-105). Set the frame id for the published messages." }, { "name": "tf.send", "type_name": "bool", - "line": 68, + "line": 70, "default_value": "false", - "description": "Important tf subsection Report the transform from world to base_link here." + "description": "Important tf subsection Report the transform from world to base_link here. Enable publishing of the world to base_link TF tree." }, { "name": "tf.frame_id", "type_name": "", - "line": 72, - "default_value": "\"map\"" + "line": 75, + "default_value": "\"map\"", + "description": "World frame id for the published TF." }, { "name": "tf.child_frame_id", "type_name": "", - "line": 76, - "default_value": "\"base_link\"" + "line": 80, + "default_value": "\"base_link\"", + "description": "Body frame id for the published TF." } ], "mavlink_subscriptions": [ @@ -1008,7 +1075,7 @@ "message_name": "LOCAL_POSITION_NED", "msg_id_expr": "mavlink::common::msg::LOCAL_POSITION_NED::MSG_ID", "dialect": "common", - "line": 102, + "line": 113, "msg_id": 32 }, { @@ -1017,7 +1084,7 @@ "message_name": "LOCAL_POSITION_NED_COV", "msg_id_expr": "mavlink::common::msg::LOCAL_POSITION_NED_COV::MSG_ID", "dialect": "common", - "line": 103, + "line": 114, "msg_id": 64 } ], @@ -1034,14 +1101,16 @@ { "name": "~/control", "type_name": "mavros_msgs::msg::ManualControl", - "line": 44 + "line": 45, + "description": "Publish manual control input from FCU (MANUAL_CONTROL)." } ], "subscribers": [ { "name": "~/send", "type_name": "mavros_msgs::msg::ManualControl", - "line": 46 + "line": 48, + "description": "Send manual control commands to FCU (MANUAL_CONTROL)." } ], "services": [], @@ -1054,7 +1123,7 @@ "message_name": "MANUAL_CONTROL", "msg_id_expr": "mavlink::common::msg::MANUAL_CONTROL::MSG_ID", "dialect": "common", - "line": 54, + "line": 56, "msg_id": 69 } ], @@ -1065,7 +1134,7 @@ "message_name": "MANUAL_CONTROL", "msg_id_expr": "mavlink::common::msg::MANUAL_CONTROL::MSG_ID", "dialect": "common", - "line": 115, + "line": 117, "msg_id": 69 } ] @@ -1081,7 +1150,8 @@ { "name": "~/output", "type_name": "mavros_msgs::msg::NavControllerOutput", - "line": 42 + "line": 43, + "description": "Publish navigation controller output (NAV_CONTROLLER_OUTPUT)." } ], "subscribers": [], @@ -1095,7 +1165,7 @@ "message_name": "NAV_CONTROLLER_OUTPUT", "msg_id_expr": "mavlink::common::msg::NAV_CONTROLLER_OUTPUT::MSG_ID", "dialect": "common", - "line": 48, + "line": 49, "msg_id": 62 } ], @@ -1112,12 +1182,14 @@ { "name": "~/event", "type_name": "mavros_msgs::msg::ParamEvent", - "line": 444 + "line": 445, + "description": "Parameter change notifications (new/updated/changed)." }, { "name": "/parameter_events", "type_name": "rcl_interfaces::msg::ParameterEvent", - "line": 445 + "line": 447, + "description": "Standard ROS parameter events (on /parameter_events)." } ], "subscribers": [], @@ -1125,43 +1197,50 @@ { "name": "~/pull", "type_name": "mavros_msgs::srv::ParamPull", - "line": 453 + "line": 456, + "description": "Custom parameter services Fetch all parameters from the device (PARAM_REQUEST_LIST)." }, { "name": "~/set", "type_name": "mavros_msgs::srv::ParamSetV2", - "line": 457 + "line": 461, + "description": "Set a single parameter value (PARAM_SET)." }, { "name": "~/get_parameters", "type_name": "rcl_interfaces::srv::GetParameters", - "line": 462, - "description": "Standard parameter services" + "line": 467, + "description": "Standard parameter services Get parameter values from the local cache." }, { "name": "~/get_parameter_types", "type_name": "rcl_interfaces::srv::GetParameterTypes", - "line": 465 + "line": 471, + "description": "Get parameter types from the local cache." }, { "name": "~/set_parameters", "type_name": "rcl_interfaces::srv::SetParameters", - "line": 468 + "line": 475, + "description": "Set parameter values (PARAM_SET for each)." }, { "name": "~/set_parameters_atomically", "type_name": "rcl_interfaces::srv::SetParametersAtomically", - "line": 472 + "line": 480, + "description": "Unsupported: device-side atomic set, always reports failure." }, { "name": "~/describe_parameters", "type_name": "rcl_interfaces::srv::DescribeParameters", - "line": 475 + "line": 484, + "description": "Describe parameter descriptors from the local cache." }, { "name": "~/list_parameters", "type_name": "rcl_interfaces::srv::ListParameters", - "line": 478 + "line": 488, + "description": "List parameter names from the local cache." } ], "clients": [], @@ -1169,20 +1248,23 @@ { "name": "param_set_timeout", "type_name": "double", - "line": 484, - "default_value": "param_set_timeout.seconds()" + "line": 495, + "default_value": "param_set_timeout.seconds()", + "description": "Timeout for a single PARAM_SET retry (seconds)." }, { "name": "param_list_timeout", "type_name": "double", - "line": 495, - "default_value": "param_list_timeout.seconds()" + "line": 507, + "default_value": "param_list_timeout.seconds()", + "description": "Timeout waiting for a full parameter list pull (seconds)." }, { "name": "param_retries", "type_name": "", - "line": 499, - "default_value": "param_retries_count" + "line": 512, + "default_value": "param_retries_count", + "description": "Number of retries before reporting a parameter operation as failed." } ], "mavlink_subscriptions": [ @@ -1192,7 +1274,7 @@ "message_name": "PARAM_VALUE", "msg_id_expr": "mavlink::common::msg::PARAM_VALUE::MSG_ID", "dialect": "common", - "line": 520, + "line": 533, "msg_id": 22 } ], @@ -1203,7 +1285,7 @@ "message_name": "PARAM_REQUEST_LIST", "msg_id_expr": "mavlink::common::msg::PARAM_REQUEST_LIST::MSG_ID", "dialect": "common", - "line": 720, + "line": 733, "msg_id": 21 }, { @@ -1212,7 +1294,7 @@ "message_name": "PARAM_REQUEST_READ", "msg_id_expr": "mavlink::common::msg::PARAM_REQUEST_READ::MSG_ID", "dialect": "common", - "line": 737, + "line": 750, "msg_id": 20 }, { @@ -1221,7 +1303,7 @@ "message_name": "PARAM_SET", "msg_id_expr": "mavlink::common::msg::PARAM_SET::MSG_ID", "dialect": "common", - "line": 755, + "line": 768, "msg_id": 23 } ] @@ -1237,7 +1319,8 @@ { "name": "~/rallypoints", "type_name": "mavros_msgs::msg::WaypointList", - "line": 54 + "line": 57, + "description": "Publish the current rally points (MISSION protocol)." } ], "subscribers": [], @@ -1245,17 +1328,20 @@ { "name": "~/pull", "type_name": "mavros_msgs::srv::WaypointPull", - "line": 63 + "line": 67, + "description": "Pull the rally points from the FCU (MISSION_REQUEST_LIST)." }, { "name": "~/push", "type_name": "mavros_msgs::srv::WaypointPush", - "line": 68 + "line": 73, + "description": "Push the rally points to the FCU (MISSION_COUNT)." }, { "name": "~/clear", "type_name": "mavros_msgs::srv::WaypointClear", - "line": 73 + "line": 79, + "description": "Clear the rally points on the FCU (MISSION_CLEAR_ALL)." } ], "clients": [], @@ -1263,15 +1349,16 @@ { "name": "pull_after_gcs", "type_name": "bool", - "line": 42, + "line": 43, "default_value": "true", - "description": "NOTE(vooon): I'm not quite sure that this option would work with mavros router" + "description": "NOTE(vooon): I'm not quite sure that this option would work with mavros router Pull rally points from the FCU after GCS connection." }, { "name": "use_mission_item_int", "type_name": "bool", - "line": 47, - "default_value": "true" + "line": 49, + "default_value": "true", + "description": "Use MISSION_ITEM_INT instead of MISSION_ITEM (MISSION protocol)." } ], "mavlink_subscriptions": [ @@ -1281,7 +1368,7 @@ "message_name": "MISSION_ITEM", "msg_id_expr": "mavlink::common::msg::MISSION_ITEM::MSG_ID", "dialect": "common", - "line": 341, + "line": 345, "msg_id": 39 }, { @@ -1290,7 +1377,7 @@ "message_name": "MISSION_ITEM_INT", "msg_id_expr": "mavlink::common::msg::MISSION_ITEM_INT::MSG_ID", "dialect": "common", - "line": 342, + "line": 346, "msg_id": 73 }, { @@ -1299,7 +1386,7 @@ "message_name": "MISSION_REQUEST", "msg_id_expr": "mavlink::common::msg::MISSION_REQUEST::MSG_ID", "dialect": "common", - "line": 343, + "line": 347, "msg_id": 40 }, { @@ -1308,7 +1395,7 @@ "message_name": "MISSION_REQUEST_INT", "msg_id_expr": "mavlink::common::msg::MISSION_REQUEST_INT::MSG_ID", "dialect": "common", - "line": 344, + "line": 348, "msg_id": 51 }, { @@ -1317,7 +1404,7 @@ "message_name": "MISSION_COUNT", "msg_id_expr": "mavlink::common::msg::MISSION_COUNT::MSG_ID", "dialect": "common", - "line": 345, + "line": 349, "msg_id": 44 }, { @@ -1326,7 +1413,7 @@ "message_name": "MISSION_ACK", "msg_id_expr": "mavlink::common::msg::MISSION_ACK::MSG_ID", "dialect": "common", - "line": 346, + "line": 350, "msg_id": 47 } ], @@ -1435,19 +1522,22 @@ { "name": "~/in", "type_name": "mavros_msgs::msg::RCIn", - "line": 47 + "line": 48, + "description": "Publish RC input (RC_CHANNELS / RC_CHANNELS_RAW)." }, { "name": "~/out", "type_name": "mavros_msgs::msg::RCOut", - "line": 48 + "line": 50, + "description": "Publish RC servo output (SERVO_OUTPUT_RAW)." } ], "subscribers": [ { "name": "~/override", "type_name": "mavros_msgs::msg::OverrideRCIn", - "line": 49 + "line": 52, + "description": "Override RC input on the FCU (RC_CHANNELS_OVERRIDE)." } ], "services": [], @@ -1460,7 +1550,7 @@ "message_name": "RC_CHANNELS_RAW", "msg_id_expr": "mavlink::common::msg::RC_CHANNELS_RAW::MSG_ID", "dialect": "common", - "line": 60, + "line": 63, "msg_id": 35 }, { @@ -1469,7 +1559,7 @@ "message_name": "RC_CHANNELS", "msg_id_expr": "mavlink::common::msg::RC_CHANNELS::MSG_ID", "dialect": "common", - "line": 61, + "line": 64, "msg_id": 65 }, { @@ -1478,7 +1568,7 @@ "message_name": "SERVO_OUTPUT_RAW", "msg_id_expr": "mavlink::common::msg::SERVO_OUTPUT_RAW::MSG_ID", "dialect": "common", - "line": 62, + "line": 65, "msg_id": 36 } ], @@ -1489,7 +1579,7 @@ "message_name": "RC_CHANNELS_OVERRIDE", "msg_id_expr": "mavlink::common::msg::RC_CHANNELS_OVERRIDE::MSG_ID", "dialect": "common", - "line": 286, + "line": 289, "msg_id": 70 } ] @@ -1506,7 +1596,8 @@ { "name": "~/accel", "type_name": "geometry_msgs::msg::Vector3Stamped", - "line": 52 + "line": 53, + "description": "Setpoint acceleration/force (SET_POSITION_TARGET_LOCAL_NED)." } ], "services": [], @@ -1544,19 +1635,20 @@ { "name": "~/attitude", "type_name": "geometry_msgs::msg::PoseStamped", - "line": 97, - "description": "Use message_filters to sync attitude and thrust msg coming from different topics" + "line": 98, + "description": "Attitude setpoint as quaternion (SET_ATTITUDE_TARGET)." }, { "name": "~/cmd_vel", "type_name": "geometry_msgs::msg::TwistStamped", - "line": 103 + "line": 105, + "description": "Attitude setpoint as angular velocity (SET_ATTITUDE_TARGET)." }, { "name": "~/thrust", "type_name": "mavros_msgs::msg::Thrust", - "line": 112, - "description": "thrust msg subscriber to sync" + "line": 116, + "description": "Thrust setpoint (SET_ATTITUDE_TARGET)." } ], "services": [], @@ -1600,27 +1692,32 @@ { "name": "~/local", "type_name": "geometry_msgs::msg::PoseStamped", - "line": 72 + "line": 73, + "description": "Local position setpoint (SET_POSITION_TARGET_LOCAL_NED)." }, { "name": "~/global", "type_name": "geographic_msgs::msg::GeoPoseStamped", - "line": 76 + "line": 78, + "description": "Global position setpoint (SET_POSITION_TARGET_GLOBAL_INT)." }, { "name": "~/global_to_local", "type_name": "geographic_msgs::msg::GeoPoseStamped", - "line": 81 + "line": 84, + "description": "Global setpoint converted to local setpoint (SET_POSITION_TARGET_LOCAL_NED)." }, { "name": "global_position/global", "type_name": "sensor_msgs::msg::NavSatFix", - "line": 85 + "line": 89, + "description": "Current global position used for conversion." }, { "name": "local_position/pose", "type_name": "geometry_msgs::msg::PoseStamped", - "line": 89 + "line": 94, + "description": "Current local position used for conversion." } ], "services": [], @@ -1666,34 +1763,40 @@ { "name": "~/target_local", "type_name": "mavros_msgs::msg::PositionTarget", - "line": 77 + "line": 82, + "description": "Publish local position target (POSITION_TARGET_LOCAL_NED)." }, { "name": "~/target_global", "type_name": "mavros_msgs::msg::GlobalPositionTarget", - "line": 80 + "line": 86, + "description": "Publish global position target (POSITION_TARGET_GLOBAL_INT)." }, { "name": "~/target_attitude", "type_name": "mavros_msgs::msg::AttitudeTarget", - "line": 82 + "line": 89, + "description": "Publish attitude target (ATTITUDE_TARGET)." } ], "subscribers": [ { "name": "~/local", "type_name": "mavros_msgs::msg::PositionTarget", - "line": 63 + "line": 65, + "description": "Local position/velocity/accel setpoint (SET_POSITION_TARGET_LOCAL_NED)." }, { "name": "~/global", "type_name": "mavros_msgs::msg::GlobalPositionTarget", - "line": 67 + "line": 70, + "description": "Global position/velocity/accel setpoint (SET_POSITION_TARGET_GLOBAL_INT)." }, { "name": "~/attitude", "type_name": "mavros_msgs::msg::AttitudeTarget", - "line": 72 + "line": 76, + "description": "Attitude/thrust setpoint (SET_ATTITUDE_TARGET)." } ], "services": [], @@ -1702,8 +1805,9 @@ { "name": "thrust_scaling", "type_name": "", - "line": 56, - "default_value": "NAN" + "line": 57, + "default_value": "NAN", + "description": "Scaling factor applied to the thrust setpoint." } ], "mavlink_subscriptions": [ @@ -1713,7 +1817,7 @@ "message_name": "POSITION_TARGET_LOCAL_NED", "msg_id_expr": "mavlink::common::msg::POSITION_TARGET_LOCAL_NED::MSG_ID", "dialect": "common", - "line": 89, + "line": 96, "msg_id": 85 }, { @@ -1722,7 +1826,7 @@ "message_name": "POSITION_TARGET_GLOBAL_INT", "msg_id_expr": "mavlink::common::msg::POSITION_TARGET_GLOBAL_INT::MSG_ID", "dialect": "common", - "line": 90, + "line": 97, "msg_id": 87 }, { @@ -1731,7 +1835,7 @@ "message_name": "ATTITUDE_TARGET", "msg_id_expr": "mavlink::common::msg::ATTITUDE_TARGET::MSG_ID", "dialect": "common", - "line": 91, + "line": 98, "msg_id": 83 } ], @@ -1776,21 +1880,24 @@ { "name": "~/desired", "type_name": "nav_msgs::msg::Path", - "line": 84 + "line": 88, + "description": "Publish the desired trajectory path." } ], "subscribers": [ { "name": "~/local", "type_name": "trajectory_msgs::msg::MultiDOFJointTrajectory", - "line": 79 + "line": 82, + "description": "Trajectory setpoints (SET_POSITION_TARGET_LOCAL_NED)." } ], "services": [ { "name": "~/reset", "type_name": "std_srvs::srv::Trigger", - "line": 87 + "line": 92, + "description": "Reset the current trajectory." } ], "clients": [], @@ -1798,14 +1905,16 @@ { "name": "frame_id", "type_name": "", - "line": 58, - "default_value": "\"map\"" + "line": 59, + "default_value": "\"map\"", + "description": "Frame id for the published path." }, { "name": "mav_frame", "type_name": "", - "line": 63, - "default_value": "\"LOCAL_NED\"" + "line": 65, + "default_value": "\"LOCAL_NED\"", + "description": "Coordinate frame of the trajectory setpoints." } ], "mavlink_subscriptions": [], @@ -1833,13 +1942,14 @@ { "name": "~/cmd_vel", "type_name": "geometry_msgs::msg::TwistStamped", - "line": 69, - "description": "cmd_vel usually is the topic used for velocity control in many controllers / planners" + "line": 72, + "description": "Velocity setpoint (SET_POSITION_TARGET_LOCAL_NED)." }, { "name": "~/cmd_vel_unstamped", "type_name": "geometry_msgs::msg::Twist", - "line": 73 + "line": 77, + "description": "Velocity setpoint without timestamp (SET_POSITION_TARGET_LOCAL_NED)." } ], "services": [], @@ -1848,8 +1958,9 @@ { "name": "mav_frame", "type_name": "", - "line": 52, - "default_value": "\"LOCAL_NED\"" + "line": 53, + "default_value": "\"LOCAL_NED\"", + "description": "Coordinate frame of the velocity setpoints." } ], "mavlink_subscriptions": [], @@ -1876,105 +1987,122 @@ { "name": "state", "type_name": "mavros_msgs::msg::State", - "line": 576 + "line": 582, + "description": "Publish connection, armed and mode state (HEARTBEAT)." }, { "name": "extended_state", "type_name": "mavros_msgs::msg::ExtendedState", - "line": 578 + "line": 585, + "description": "Publish VTOL and landed state (EXTENDED_SYS_STATE)." }, { "name": "sys_status", "type_name": "mavros_msgs::msg::SysStatus", - "line": 580 + "line": 588, + "description": "Publish system and battery status (SYS_STATUS)." }, { "name": "estimator_status", "type_name": "mavros_msgs::msg::EstimatorStatus", - "line": 582 + "line": 591, + "description": "Publish estimator status flags (ESTIMATOR_STATUS)." }, { "name": "battery", "type_name": "BatteryMsg", - "line": 584 + "line": 594, + "description": "Publish battery state (BATTERY_STATUS)." }, { "name": "statustext/recv", "type_name": "mavros_msgs::msg::StatusText", - "line": 586 + "line": 597, + "description": "Publish status text received from the FCU (STATUSTEXT)." }, { "name": "status_event", "type_name": "mavros_msgs::msg::StatusEvent", - "line": 591 + "line": 604, + "description": "Publish status events received from the FCU (EVENT)." } ], "subscribers": [ { "name": "statustext/send", "type_name": "mavros_msgs::msg::StatusText", - "line": 588 + "line": 600, + "description": "Send status text to the FCU (STATUSTEXT)." } ], "services": [ { "name": "set_mode", "type_name": "mavros_msgs::srv::SetMode", - "line": 602 + "line": 616, + "description": "Change the flight mode (MAV_CMD_DO_SET_MODE / SET_MODE)." }, { "name": "set_stream_rate", "type_name": "mavros_msgs::srv::StreamRate", - "line": 607 + "line": 622, + "description": "Set the stream rate of a MAVLink message (REQUEST_DATA_STREAM)." }, { "name": "set_message_interval", "type_name": "mavros_msgs::srv::MessageInterval", - "line": 612 + "line": 628, + "description": "Set the interval of a MAVLink message (MAV_CMD_SET_MESSAGE_INTERVAL)." }, { "name": "vehicle_info_get", "type_name": "mavros_msgs::srv::VehicleInfoGet", - "line": 617 + "line": 634, + "description": "Query information about the FCU and connected vehicles." } ], "clients": [ { "name": "cmd/command", "type_name": "mavros_msgs::srv::CommandLong", - "line": 1323 + "line": 1340 } ], "parameters": [ { "name": "conn_timeout", "type_name": "double", - "line": 509, - "default_value": "10.0" + "line": 510, + "default_value": "10.0", + "description": "Connection timeout in seconds before the link is considered lost." }, { "name": "min_voltage", "type_name": "", - "line": 519, - "default_value": "std::vector({10.0})" + "line": 521, + "default_value": "std::vector({10.0})", + "description": "Minimum battery voltage per battery instance before a warning is raised." }, { "name": "disable_diag", "type_name": "bool", - "line": 527, - "default_value": "false" + "line": 530, + "default_value": "false", + "description": "Disable publishing diagnostic updates." }, { "name": "heartbeat_mav_type", "type_name": "", - "line": 547, - "default_value": "utils::enum_to_name(\n conn_heartbeat_mav_type)" + "line": 551, + "default_value": "utils::enum_to_name(\n conn_heartbeat_mav_type)", + "description": "MAV type of the heartbeat sent by the GCS." }, { "name": "heartbeat_rate", "type_name": "double", - "line": 553, - "default_value": "1.0" + "line": 558, + "default_value": "1.0", + "description": "Rate (Hz) at which the GCS heartbeat is sent to the FCU." } ], "mavlink_subscriptions": [ @@ -1984,7 +2112,7 @@ "message_name": "HEARTBEAT", "msg_id_expr": "mavlink::minimal::msg::HEARTBEAT::MSG_ID", "dialect": "minimal", - "line": 636, + "line": 653, "msg_id": 0 }, { @@ -1993,7 +2121,7 @@ "message_name": "SYS_STATUS", "msg_id_expr": "mavlink::common::msg::SYS_STATUS::MSG_ID", "dialect": "common", - "line": 637, + "line": 654, "msg_id": 1 }, { @@ -2002,7 +2130,7 @@ "message_name": "STATUSTEXT", "msg_id_expr": "mavlink::common::msg::STATUSTEXT::MSG_ID", "dialect": "common", - "line": 638, + "line": 655, "msg_id": 253 }, { @@ -2011,7 +2139,7 @@ "message_name": "EVENT", "msg_id_expr": "mavlink::common::msg::EVENT::MSG_ID", "dialect": "common", - "line": 639, + "line": 656, "msg_id": 410 }, { @@ -2020,7 +2148,7 @@ "message_name": "MEMINFO", "msg_id_expr": "mavlink::ardupilotmega::msg::MEMINFO::MSG_ID", "dialect": "ardupilotmega", - "line": 640, + "line": 657, "msg_id": 152 }, { @@ -2029,7 +2157,7 @@ "message_name": "HWSTATUS", "msg_id_expr": "mavlink::ardupilotmega::msg::HWSTATUS::MSG_ID", "dialect": "ardupilotmega", - "line": 641, + "line": 658, "msg_id": 165 }, { @@ -2038,7 +2166,7 @@ "message_name": "AUTOPILOT_VERSION", "msg_id_expr": "mavlink::standard::msg::AUTOPILOT_VERSION::MSG_ID", "dialect": "standard", - "line": 642, + "line": 659, "msg_id": 148 }, { @@ -2047,7 +2175,7 @@ "message_name": "EXTENDED_SYS_STATE", "msg_id_expr": "mavlink::common::msg::EXTENDED_SYS_STATE::MSG_ID", "dialect": "common", - "line": 643, + "line": 660, "msg_id": 245 }, { @@ -2056,7 +2184,7 @@ "message_name": "BATTERY_STATUS", "msg_id_expr": "mavlink::common::msg::BATTERY_STATUS::MSG_ID", "dialect": "common", - "line": 644, + "line": 661, "msg_id": 147 }, { @@ -2065,7 +2193,7 @@ "message_name": "ESTIMATOR_STATUS", "msg_id_expr": "mavlink::common::msg::ESTIMATOR_STATUS::MSG_ID", "dialect": "common", - "line": 645, + "line": 662, "msg_id": 230 } ], @@ -2076,7 +2204,7 @@ "message_name": "HEARTBEAT", "msg_id_expr": "mavlink::minimal::msg::HEARTBEAT::MSG_ID", "dialect": "minimal", - "line": 1309, + "line": 1326, "msg_id": 0 }, { @@ -2085,7 +2213,7 @@ "message_name": "STATUSTEXT", "msg_id_expr": "mavlink::common::msg::STATUSTEXT::MSG_ID", "dialect": "common", - "line": 1415, + "line": 1432, "msg_id": 253 }, { @@ -2094,7 +2222,7 @@ "message_name": "REQUEST_DATA_STREAM", "msg_id_expr": "mavlink::common::msg::REQUEST_DATA_STREAM::MSG_ID", "dialect": "common", - "line": 1431, + "line": 1448, "msg_id": 66 }, { @@ -2103,7 +2231,7 @@ "message_name": "SET_MODE", "msg_id_expr": "mavlink::common::msg::SET_MODE::MSG_ID", "dialect": "common", - "line": 1516, + "line": 1533, "msg_id": 11 } ] @@ -2119,12 +2247,14 @@ { "name": "time_reference", "type_name": "sensor_msgs::msg::TimeReference", - "line": 289 + "line": 294, + "description": "Publish FCU time reference for ntpd (SYSTEM_TIME)." }, { "name": "timesync_status", "type_name": "mavros_msgs::msg::TimesyncStatus", - "line": 292 + "line": 298, + "description": "Publish timesync status (TIMESYNC)." } ], "subscribers": [], @@ -2134,82 +2264,86 @@ { "name": "time_ref_source", "type_name": "", - "line": 166, - "default_value": "\"fcu\"" + "line": 167, + "default_value": "\"fcu\"", + "description": "Source name reported in the time_reference topic." }, { "name": "timesync_mode", "type_name": "", - "line": 171, - "default_value": "\"MAVLINK\"" + "line": 173, + "default_value": "\"MAVLINK\"", + "description": "Timesync mode: MAVLINK, PASSTHROUGH, NONE or ONBOARD." }, { "name": "system_time_rate", "type_name": "double", - "line": 178, - "default_value": "0.0" + "line": 181, + "default_value": "0.0", + "description": "Rate (Hz) at which SYSTEM_TIME is sent to the FCU; 0 disables it." }, { "name": "timesync_rate", "type_name": "double", - "line": 197, - "default_value": "0.0" + "line": 201, + "default_value": "0.0", + "description": "Rate (Hz) at which TIMESYNC packets are exchanged; 0 disables it." }, { "name": "timesync_alpha_initial", "type_name": "double", - "line": 229, + "line": 233, "default_value": "0.05", "description": "Filter gains Alpha : Used to smooth the overall clock offset estimate. Smaller values will lead to a smoother estimate, but track time drift more slowly, introducing a bias in the estimate. Larger values will cause low-amplitude oscillations. Beta : Used to smooth the clock skew estimate. Smaller values will lead to a tighter estimation of the skew (derivative), but will negatively affect how fast the filter reacts to clock skewing (e.g cause by temperature changes to the oscillator). Larger values will cause large-amplitude oscillations." }, { "name": "timesync_beta_initial", "type_name": "double", - "line": 234, + "line": 238, "default_value": "0.05" }, { "name": "timesync_alpha_final", "type_name": "double", - "line": 239, + "line": 243, "default_value": "0.003" }, { "name": "timesync_beta_final", "type_name": "double", - "line": 244, + "line": 248, "default_value": "0.003" }, { "name": "convergence_window", "type_name": "integer", - "line": 256, + "line": 260, "default_value": "500", "description": "Filter gain scheduling The filter interpolates between the initial and final gains while the number of exchanged timesync packets is less than convergence_window. A lower value will allow the timesync to converge faster, but with potentially less accurate initial offset and skew estimates." }, { "name": "max_rtt_sample", "type_name": "integer", - "line": 270, + "line": 274, "default_value": "10", "description": "Outlier rejection and filter reset Samples with round-trip time higher than max_rtt_sample are not used to update the filter. More than max_consecutive_high_rtt number of such events in a row will throw a warning but not reset the filter. Samples whose calculated clock offset is more than max_deviation_sample off from the current estimate are not used to update the filter. More than max_consecutive_high_deviation number of such events in a row will reset the filter. This usually happens only due to a time jump on the remote system." }, { "name": "max_deviation_sample", "type_name": "integer", - "line": 274, + "line": 278, "default_value": "10" }, { "name": "max_consecutive_high_rtt", "type_name": "integer", - "line": 278, + "line": 282, "default_value": "10" }, { "name": "max_consecutive_high_deviation", "type_name": "integer", - "line": 282, + "line": 286, "default_value": "10" } ], @@ -2220,7 +2354,7 @@ "message_name": "SYSTEM_TIME", "msg_id_expr": "mavlink::common::msg::SYSTEM_TIME::MSG_ID", "dialect": "common", - "line": 301, + "line": 307, "msg_id": 2 }, { @@ -2229,7 +2363,7 @@ "message_name": "TIMESYNC", "msg_id_expr": "mavlink::common::msg::TIMESYNC::MSG_ID", "dialect": "common", - "line": 302, + "line": 308, "msg_id": 111 } ], @@ -2240,7 +2374,7 @@ "message_name": "SYSTEM_TIME", "msg_id_expr": "mavlink::common::msg::SYSTEM_TIME::MSG_ID", "dialect": "common", - "line": 389, + "line": 395, "msg_id": 2 }, { @@ -2249,7 +2383,7 @@ "message_name": "TIMESYNC", "msg_id_expr": "mavlink::common::msg::TIMESYNC::MSG_ID", "dialect": "common", - "line": 416, + "line": 422, "msg_id": 111 } ] @@ -2265,12 +2399,14 @@ { "name": "~/waypoints", "type_name": "mavros_msgs::msg::WaypointList", - "line": 83 + "line": 86, + "description": "The current mission waypoint list." }, { "name": "~/reached", "type_name": "mavros_msgs::msg::WaypointReached", - "line": 84 + "line": 88, + "description": "Notifies when a mission waypoint is reached." } ], "subscribers": [], @@ -2278,22 +2414,26 @@ { "name": "~/pull", "type_name": "mavros_msgs::srv::WaypointPull", - "line": 93 + "line": 98, + "description": "Pull the mission from the FCU (MISSION_REQUEST_LIST)." }, { "name": "~/push", "type_name": "mavros_msgs::srv::WaypointPush", - "line": 98 + "line": 104, + "description": "Push a mission to the FCU (full or partial)." }, { "name": "~/clear", "type_name": "mavros_msgs::srv::WaypointClear", - "line": 103 + "line": 110, + "description": "Clear the mission on the FCU (MISSION_CLEAR_ALL)." }, { "name": "~/set_current", "type_name": "mavros_msgs::srv::WaypointSetCurrent", - "line": 107 + "line": 115, + "description": "Set the active/current mission waypoint." } ], "clients": [], @@ -2303,19 +2443,21 @@ "type_name": "bool", "line": 51, "default_value": "true", - "description": "NOTE(vooon): I'm not quite sure that this option would work with mavros router" + "description": "Re-pull the mission automatically after a GCS pushes it." }, { "name": "use_mission_item_int", "type_name": "bool", - "line": 56, - "default_value": "true" + "line": 57, + "default_value": "true", + "description": "Use MISSION_ITEM_INT instead of MISSION_ITEM when supported." }, { "name": "enable_partial_push", "type_name": "integer", - "line": 61, - "default_value": "2" + "line": 63, + "default_value": "2", + "description": "Enable partial mission push (0/off, 1/on, 2/auto-detect)." } ], "mavlink_subscriptions": [ @@ -2325,7 +2467,7 @@ "message_name": "MISSION_ITEM", "msg_id_expr": "mavlink::common::msg::MISSION_ITEM::MSG_ID", "dialect": "common", - "line": 341, + "line": 345, "msg_id": 39 }, { @@ -2334,7 +2476,7 @@ "message_name": "MISSION_ITEM_INT", "msg_id_expr": "mavlink::common::msg::MISSION_ITEM_INT::MSG_ID", "dialect": "common", - "line": 342, + "line": 346, "msg_id": 73 }, { @@ -2343,7 +2485,7 @@ "message_name": "MISSION_REQUEST", "msg_id_expr": "mavlink::common::msg::MISSION_REQUEST::MSG_ID", "dialect": "common", - "line": 343, + "line": 347, "msg_id": 40 }, { @@ -2352,7 +2494,7 @@ "message_name": "MISSION_REQUEST_INT", "msg_id_expr": "mavlink::common::msg::MISSION_REQUEST_INT::MSG_ID", "dialect": "common", - "line": 344, + "line": 348, "msg_id": 51 }, { @@ -2361,7 +2503,7 @@ "message_name": "MISSION_COUNT", "msg_id_expr": "mavlink::common::msg::MISSION_COUNT::MSG_ID", "dialect": "common", - "line": 345, + "line": 349, "msg_id": 44 }, { @@ -2370,7 +2512,7 @@ "message_name": "MISSION_ACK", "msg_id_expr": "mavlink::common::msg::MISSION_ACK::MSG_ID", "dialect": "common", - "line": 346, + "line": 350, "msg_id": 47 }, { @@ -2379,7 +2521,7 @@ "message_name": "MISSION_CURRENT", "msg_id_expr": "mavlink::common::msg::MISSION_CURRENT::MSG_ID", "dialect": "common", - "line": 351, + "line": 355, "msg_id": 42 }, { @@ -2388,7 +2530,7 @@ "message_name": "MISSION_ITEM_REACHED", "msg_id_expr": "mavlink::common::msg::MISSION_ITEM_REACHED::MSG_ID", "dialect": "common", - "line": 352, + "line": 356, "msg_id": 46 } ], @@ -2497,7 +2639,8 @@ { "name": "wind_estimation", "type_name": "geometry_msgs::msg::TwistWithCovarianceStamped", - "line": 46 + "line": 47, + "description": "Publish wind estimation (WIND / WIND_COV)." } ], "subscribers": [], @@ -2511,7 +2654,7 @@ "message_name": "WIND", "msg_id_expr": "mavlink::ardupilotmega::msg::WIND::MSG_ID", "dialect": "ardupilotmega", - "line": 53, + "line": 54, "msg_id": 168 }, { @@ -2520,7 +2663,7 @@ "message_name": "WIND_COV", "msg_id_expr": "mavlink::common::msg::WIND_COV::MSG_ID", "dialect": "common", - "line": 54, + "line": 55, "msg_id": 231 } ], diff --git a/docs/plugins/std/local_position.md b/docs/plugins/std/local_position.md index 1ab30a22c..9344fe49f 100644 --- a/docs/plugins/std/local_position.md +++ b/docs/plugins/std/local_position.md @@ -9,13 +9,13 @@ Publish local position to TF, PositionStamped, TwistStamped and Odometry ## Publishers -- `~/pose` ([geometry_msgs::msg::PoseStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseStamped.html)) -- `~/pose_cov` ([geometry_msgs::msg::PoseWithCovarianceStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseWithCovarianceStamped.html)) -- `~/velocity_local` ([geometry_msgs::msg::TwistStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TwistStamped.html)) -- `~/velocity_body` ([geometry_msgs::msg::TwistStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TwistStamped.html)) -- `~/velocity_body_cov` ([geometry_msgs::msg::TwistWithCovarianceStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TwistWithCovarianceStamped.html)) -- `~/accel` ([geometry_msgs::msg::AccelWithCovarianceStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/AccelWithCovarianceStamped.html)) -- `~/odom` ([nav_msgs::msg::Odometry](https://docs.ros.org/en/rolling/p/nav_msgs/msg/Odometry.html)) +- `~/pose` ([geometry_msgs::msg::PoseStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseStamped.html)) - Local position (LOCAL_POSITION_NED). +- `~/pose_cov` ([geometry_msgs::msg::PoseWithCovarianceStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseWithCovarianceStamped.html)) - Local position with covariance (LOCAL_POSITION_NED_COV). +- `~/velocity_local` ([geometry_msgs::msg::TwistStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TwistStamped.html)) - Local velocity in NED frame (LOCAL_POSITION_NED). +- `~/velocity_body` ([geometry_msgs::msg::TwistStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TwistStamped.html)) - Local velocity in body frame (LOCAL_POSITION_NED). +- `~/velocity_body_cov` ([geometry_msgs::msg::TwistWithCovarianceStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TwistWithCovarianceStamped.html)) - Local velocity with covariance (LOCAL_POSITION_NED_COV). +- `~/accel` ([geometry_msgs::msg::AccelWithCovarianceStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/AccelWithCovarianceStamped.html)) - Local acceleration with covariance (LOCAL_POSITION_NED_COV). +- `~/odom` ([nav_msgs::msg::Odometry](https://docs.ros.org/en/rolling/p/nav_msgs/msg/Odometry.html)) - Local odometry (LOCAL_POSITION_NED / LOCAL_POSITION_NED_COV). ## Subscribers @@ -31,10 +31,10 @@ Publish local position to TF, PositionStamped, TwistStamped and Odometry ## Parameters -- `frame_id` [default: `"map"`] - header frame_id. default to map (world-fixed, ENU as per REP-105). -- `tf.send` [type: bool, default: `false`] - Important tf subsection Report the transform from world to base_link here. -- `tf.frame_id` [default: `"map"`] -- `tf.child_frame_id` [default: `"base_link"`] +- `frame_id` [default: `"map"`] - header frame_id. default to map (world-fixed, ENU as per REP-105). Set the frame id for the published messages. +- `tf.send` [type: bool, default: `false`] - Important tf subsection Report the transform from world to base_link here. Enable publishing of the world to base_link TF tree. +- `tf.frame_id` [default: `"map"`] - World frame id for the published TF. +- `tf.child_frame_id` [default: `"base_link"`] - Body frame id for the published TF. ## MAVLink Subscriptions diff --git a/docs/plugins/std/manual_control.md b/docs/plugins/std/manual_control.md index 97af64724..cfbe13590 100644 --- a/docs/plugins/std/manual_control.md +++ b/docs/plugins/std/manual_control.md @@ -9,11 +9,11 @@ Implements the [MAVLink Manual Control (Joystick) Protocol](https://mavlink.io/en/services/manual_control.html). ## Publishers -- `~/control` ([mavros_msgs::msg::ManualControl](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/ManualControl.html)) +- `~/control` ([mavros_msgs::msg::ManualControl](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/ManualControl.html)) - Publish manual control input from FCU (MANUAL_CONTROL). ## Subscribers -- `~/send` ([mavros_msgs::msg::ManualControl](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/ManualControl.html)) +- `~/send` ([mavros_msgs::msg::ManualControl](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/ManualControl.html)) - Send manual control commands to FCU (MANUAL_CONTROL). ## Services diff --git a/docs/plugins/std/nav_controller_output.md b/docs/plugins/std/nav_controller_output.md index ce506d7e9..087414087 100644 --- a/docs/plugins/std/nav_controller_output.md +++ b/docs/plugins/std/nav_controller_output.md @@ -9,7 +9,7 @@ Publishes nav_controller_output message https://mavlink.io/en/messages/common.html#NAV_CONTROLLER_OUTPUT ## Publishers -- `~/output` ([mavros_msgs::msg::NavControllerOutput](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/NavControllerOutput.html)) +- `~/output` ([mavros_msgs::msg::NavControllerOutput](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/NavControllerOutput.html)) - Publish navigation controller output (NAV_CONTROLLER_OUTPUT). ## Subscribers diff --git a/docs/plugins/std/param.md b/docs/plugins/std/param.md index 5bcda1512..064be0320 100644 --- a/docs/plugins/std/param.md +++ b/docs/plugins/std/param.md @@ -9,8 +9,8 @@ Implements the [MAVLink Parameter Protocol](https://mavlink.io/en/services/parameter.html). ## Publishers -- `~/event` ([mavros_msgs::msg::ParamEvent](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/ParamEvent.html)) -- `/parameter_events` ([rcl_interfaces::msg::ParameterEvent](https://docs.ros.org/en/rolling/p/rcl_interfaces/msg/ParameterEvent.html)) +- `~/event` ([mavros_msgs::msg::ParamEvent](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/ParamEvent.html)) - Parameter change notifications (new/updated/changed). +- `/parameter_events` ([rcl_interfaces::msg::ParameterEvent](https://docs.ros.org/en/rolling/p/rcl_interfaces/msg/ParameterEvent.html)) - Standard ROS parameter events (on /parameter_events). ## Subscribers @@ -18,14 +18,14 @@ Implements the [MAVLink Parameter Protocol](https://mavlink.io/en/services/param ## Services -- `~/pull` ([mavros_msgs::srv::ParamPull](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/ParamPull.html)) -- `~/set` ([mavros_msgs::srv::ParamSetV2](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/ParamSetV2.html)) -- `~/get_parameters` ([rcl_interfaces::srv::GetParameters](https://docs.ros.org/en/rolling/p/rcl_interfaces/srv/GetParameters.html)) - Standard parameter services -- `~/get_parameter_types` ([rcl_interfaces::srv::GetParameterTypes](https://docs.ros.org/en/rolling/p/rcl_interfaces/srv/GetParameterTypes.html)) -- `~/set_parameters` ([rcl_interfaces::srv::SetParameters](https://docs.ros.org/en/rolling/p/rcl_interfaces/srv/SetParameters.html)) -- `~/set_parameters_atomically` ([rcl_interfaces::srv::SetParametersAtomically](https://docs.ros.org/en/rolling/p/rcl_interfaces/srv/SetParametersAtomically.html)) -- `~/describe_parameters` ([rcl_interfaces::srv::DescribeParameters](https://docs.ros.org/en/rolling/p/rcl_interfaces/srv/DescribeParameters.html)) -- `~/list_parameters` ([rcl_interfaces::srv::ListParameters](https://docs.ros.org/en/rolling/p/rcl_interfaces/srv/ListParameters.html)) +- `~/pull` ([mavros_msgs::srv::ParamPull](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/ParamPull.html)) - Custom parameter services Fetch all parameters from the device (PARAM_REQUEST_LIST). +- `~/set` ([mavros_msgs::srv::ParamSetV2](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/ParamSetV2.html)) - Set a single parameter value (PARAM_SET). +- `~/get_parameters` ([rcl_interfaces::srv::GetParameters](https://docs.ros.org/en/rolling/p/rcl_interfaces/srv/GetParameters.html)) - Standard parameter services Get parameter values from the local cache. +- `~/get_parameter_types` ([rcl_interfaces::srv::GetParameterTypes](https://docs.ros.org/en/rolling/p/rcl_interfaces/srv/GetParameterTypes.html)) - Get parameter types from the local cache. +- `~/set_parameters` ([rcl_interfaces::srv::SetParameters](https://docs.ros.org/en/rolling/p/rcl_interfaces/srv/SetParameters.html)) - Set parameter values (PARAM_SET for each). +- `~/set_parameters_atomically` ([rcl_interfaces::srv::SetParametersAtomically](https://docs.ros.org/en/rolling/p/rcl_interfaces/srv/SetParametersAtomically.html)) - Unsupported: device-side atomic set, always reports failure. +- `~/describe_parameters` ([rcl_interfaces::srv::DescribeParameters](https://docs.ros.org/en/rolling/p/rcl_interfaces/srv/DescribeParameters.html)) - Describe parameter descriptors from the local cache. +- `~/list_parameters` ([rcl_interfaces::srv::ListParameters](https://docs.ros.org/en/rolling/p/rcl_interfaces/srv/ListParameters.html)) - List parameter names from the local cache. ## Clients @@ -33,9 +33,9 @@ Implements the [MAVLink Parameter Protocol](https://mavlink.io/en/services/param ## Parameters -- `param_set_timeout` [type: double, default: `param_set_timeout.seconds()`] -- `param_list_timeout` [type: double, default: `param_list_timeout.seconds()`] -- `param_retries` [default: `param_retries_count`] +- `param_set_timeout` [type: double, default: `param_set_timeout.seconds()`] - Timeout for a single PARAM_SET retry (seconds). +- `param_list_timeout` [type: double, default: `param_list_timeout.seconds()`] - Timeout waiting for a full parameter list pull (seconds). +- `param_retries` [default: `param_retries_count`] - Number of retries before reporting a parameter operation as failed. ## MAVLink Subscriptions diff --git a/docs/plugins/std/rallypoint.md b/docs/plugins/std/rallypoint.md index b968f0e96..239a43acd 100644 --- a/docs/plugins/std/rallypoint.md +++ b/docs/plugins/std/rallypoint.md @@ -9,7 +9,7 @@ Implements the rally point part of the [MAVLink Mission Protocol](https://mavlink.io/en/services/mission.html). ## Publishers -- `~/rallypoints` ([mavros_msgs::msg::WaypointList](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/WaypointList.html)) +- `~/rallypoints` ([mavros_msgs::msg::WaypointList](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/WaypointList.html)) - Publish the current rally points (MISSION protocol). ## Subscribers @@ -17,9 +17,9 @@ Implements the rally point part of the [MAVLink Mission Protocol](https://mavlin ## Services -- `~/pull` ([mavros_msgs::srv::WaypointPull](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/WaypointPull.html)) -- `~/push` ([mavros_msgs::srv::WaypointPush](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/WaypointPush.html)) -- `~/clear` ([mavros_msgs::srv::WaypointClear](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/WaypointClear.html)) +- `~/pull` ([mavros_msgs::srv::WaypointPull](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/WaypointPull.html)) - Pull the rally points from the FCU (MISSION_REQUEST_LIST). +- `~/push` ([mavros_msgs::srv::WaypointPush](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/WaypointPush.html)) - Push the rally points to the FCU (MISSION_COUNT). +- `~/clear` ([mavros_msgs::srv::WaypointClear](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/WaypointClear.html)) - Clear the rally points on the FCU (MISSION_CLEAR_ALL). ## Clients @@ -27,8 +27,8 @@ Implements the rally point part of the [MAVLink Mission Protocol](https://mavlin ## Parameters -- `pull_after_gcs` [type: bool, default: `true`] - NOTE(vooon): I'm not quite sure that this option would work with mavros router -- `use_mission_item_int` [type: bool, default: `true`] +- `pull_after_gcs` [type: bool, default: `true`] - NOTE(vooon): I'm not quite sure that this option would work with mavros router Pull rally points from the FCU after GCS connection. +- `use_mission_item_int` [type: bool, default: `true`] - Use MISSION_ITEM_INT instead of MISSION_ITEM (MISSION protocol). ## MAVLink Subscriptions diff --git a/docs/plugins/std/rc_io.md b/docs/plugins/std/rc_io.md index 7c36dfce0..210239954 100644 --- a/docs/plugins/std/rc_io.md +++ b/docs/plugins/std/rc_io.md @@ -7,12 +7,12 @@ ## Publishers -- `~/in` ([mavros_msgs::msg::RCIn](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/RCIn.html)) -- `~/out` ([mavros_msgs::msg::RCOut](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/RCOut.html)) +- `~/in` ([mavros_msgs::msg::RCIn](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/RCIn.html)) - Publish RC input (RC_CHANNELS / RC_CHANNELS_RAW). +- `~/out` ([mavros_msgs::msg::RCOut](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/RCOut.html)) - Publish RC servo output (SERVO_OUTPUT_RAW). ## Subscribers -- `~/override` ([mavros_msgs::msg::OverrideRCIn](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/OverrideRCIn.html)) +- `~/override` ([mavros_msgs::msg::OverrideRCIn](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/OverrideRCIn.html)) - Override RC input on the FCU (RC_CHANNELS_OVERRIDE). ## Services diff --git a/docs/plugins/std/setpoint_accel.md b/docs/plugins/std/setpoint_accel.md index 375360844..192899e33 100644 --- a/docs/plugins/std/setpoint_accel.md +++ b/docs/plugins/std/setpoint_accel.md @@ -13,7 +13,7 @@ Send setpoint accelerations/forces to FCU controller. Uses the [MAVLink Offboard ## Subscribers -- `~/accel` ([geometry_msgs::msg::Vector3Stamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/Vector3Stamped.html)) +- `~/accel` ([geometry_msgs::msg::Vector3Stamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/Vector3Stamped.html)) - Setpoint acceleration/force (SET_POSITION_TARGET_LOCAL_NED). ## Services diff --git a/docs/plugins/std/setpoint_attitude.md b/docs/plugins/std/setpoint_attitude.md index becaf6c3a..fa6ab1d17 100644 --- a/docs/plugins/std/setpoint_attitude.md +++ b/docs/plugins/std/setpoint_attitude.md @@ -13,9 +13,9 @@ Send setpoint attitude/orientation/thrust to FCU controller. Uses the [MAVLink O ## Subscribers -- `~/attitude` ([geometry_msgs::msg::PoseStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseStamped.html)) - Use message_filters to sync attitude and thrust msg coming from different topics -- `~/cmd_vel` ([geometry_msgs::msg::TwistStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TwistStamped.html)) -- `~/thrust` ([mavros_msgs::msg::Thrust](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/Thrust.html)) - thrust msg subscriber to sync +- `~/attitude` ([geometry_msgs::msg::PoseStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseStamped.html)) - Attitude setpoint as quaternion (SET_ATTITUDE_TARGET). +- `~/cmd_vel` ([geometry_msgs::msg::TwistStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TwistStamped.html)) - Attitude setpoint as angular velocity (SET_ATTITUDE_TARGET). +- `~/thrust` ([mavros_msgs::msg::Thrust](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/Thrust.html)) - Thrust setpoint (SET_ATTITUDE_TARGET). ## Services diff --git a/docs/plugins/std/setpoint_position.md b/docs/plugins/std/setpoint_position.md index 3a1866114..5b15880ca 100644 --- a/docs/plugins/std/setpoint_position.md +++ b/docs/plugins/std/setpoint_position.md @@ -13,11 +13,11 @@ Send setpoint positions to FCU controller. Uses the [MAVLink Offboard Control Pr ## Subscribers -- `~/local` ([geometry_msgs::msg::PoseStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseStamped.html)) -- `~/global` ([geographic_msgs::msg::GeoPoseStamped](https://docs.ros.org/en/rolling/p/geographic_msgs/msg/GeoPoseStamped.html)) -- `~/global_to_local` ([geographic_msgs::msg::GeoPoseStamped](https://docs.ros.org/en/rolling/p/geographic_msgs/msg/GeoPoseStamped.html)) -- `global_position/global` ([sensor_msgs::msg::NavSatFix](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/NavSatFix.html)) -- `local_position/pose` ([geometry_msgs::msg::PoseStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseStamped.html)) +- `~/local` ([geometry_msgs::msg::PoseStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseStamped.html)) - Local position setpoint (SET_POSITION_TARGET_LOCAL_NED). +- `~/global` ([geographic_msgs::msg::GeoPoseStamped](https://docs.ros.org/en/rolling/p/geographic_msgs/msg/GeoPoseStamped.html)) - Global position setpoint (SET_POSITION_TARGET_GLOBAL_INT). +- `~/global_to_local` ([geographic_msgs::msg::GeoPoseStamped](https://docs.ros.org/en/rolling/p/geographic_msgs/msg/GeoPoseStamped.html)) - Global setpoint converted to local setpoint (SET_POSITION_TARGET_LOCAL_NED). +- `global_position/global` ([sensor_msgs::msg::NavSatFix](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/NavSatFix.html)) - Current global position used for conversion. +- `local_position/pose` ([geometry_msgs::msg::PoseStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/PoseStamped.html)) - Current local position used for conversion. ## Services diff --git a/docs/plugins/std/setpoint_raw.md b/docs/plugins/std/setpoint_raw.md index 3f4f5432b..92bb64b68 100644 --- a/docs/plugins/std/setpoint_raw.md +++ b/docs/plugins/std/setpoint_raw.md @@ -9,15 +9,15 @@ Send position setpoints and publish current state (return loop). User can decide what set of filed needed for operation via IGNORE bits. Uses the [MAVLink Offboard Control Protocol](https://mavlink.io/en/services/offboard_control.html). ## Publishers -- `~/target_local` ([mavros_msgs::msg::PositionTarget](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/PositionTarget.html)) -- `~/target_global` ([mavros_msgs::msg::GlobalPositionTarget](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GlobalPositionTarget.html)) -- `~/target_attitude` ([mavros_msgs::msg::AttitudeTarget](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/AttitudeTarget.html)) +- `~/target_local` ([mavros_msgs::msg::PositionTarget](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/PositionTarget.html)) - Publish local position target (POSITION_TARGET_LOCAL_NED). +- `~/target_global` ([mavros_msgs::msg::GlobalPositionTarget](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GlobalPositionTarget.html)) - Publish global position target (POSITION_TARGET_GLOBAL_INT). +- `~/target_attitude` ([mavros_msgs::msg::AttitudeTarget](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/AttitudeTarget.html)) - Publish attitude target (ATTITUDE_TARGET). ## Subscribers -- `~/local` ([mavros_msgs::msg::PositionTarget](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/PositionTarget.html)) -- `~/global` ([mavros_msgs::msg::GlobalPositionTarget](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GlobalPositionTarget.html)) -- `~/attitude` ([mavros_msgs::msg::AttitudeTarget](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/AttitudeTarget.html)) +- `~/local` ([mavros_msgs::msg::PositionTarget](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/PositionTarget.html)) - Local position/velocity/accel setpoint (SET_POSITION_TARGET_LOCAL_NED). +- `~/global` ([mavros_msgs::msg::GlobalPositionTarget](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/GlobalPositionTarget.html)) - Global position/velocity/accel setpoint (SET_POSITION_TARGET_GLOBAL_INT). +- `~/attitude` ([mavros_msgs::msg::AttitudeTarget](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/AttitudeTarget.html)) - Attitude/thrust setpoint (SET_ATTITUDE_TARGET). ## Services @@ -29,7 +29,7 @@ Send position setpoints and publish current state (return loop). User can decide ## Parameters -- `thrust_scaling` [default: `NAN`] +- `thrust_scaling` [default: `NAN`] - Scaling factor applied to the thrust setpoint. ## MAVLink Subscriptions diff --git a/docs/plugins/std/setpoint_trajectory.md b/docs/plugins/std/setpoint_trajectory.md index fb338fc15..e800c4ab3 100644 --- a/docs/plugins/std/setpoint_trajectory.md +++ b/docs/plugins/std/setpoint_trajectory.md @@ -9,15 +9,15 @@ Receive trajectory setpoints and send setpoint_raw setpoints along the trajectory. Uses the [MAVLink Offboard Control Protocol](https://mavlink.io/en/services/offboard_control.html). ## Publishers -- `~/desired` ([nav_msgs::msg::Path](https://docs.ros.org/en/rolling/p/nav_msgs/msg/Path.html)) +- `~/desired` ([nav_msgs::msg::Path](https://docs.ros.org/en/rolling/p/nav_msgs/msg/Path.html)) - Publish the desired trajectory path. ## Subscribers -- `~/local` ([trajectory_msgs::msg::MultiDOFJointTrajectory](https://docs.ros.org/en/rolling/p/trajectory_msgs/msg/MultiDOFJointTrajectory.html)) +- `~/local` ([trajectory_msgs::msg::MultiDOFJointTrajectory](https://docs.ros.org/en/rolling/p/trajectory_msgs/msg/MultiDOFJointTrajectory.html)) - Trajectory setpoints (SET_POSITION_TARGET_LOCAL_NED). ## Services -- `~/reset` ([std_srvs::srv::Trigger](https://docs.ros.org/en/rolling/p/std_srvs/srv/Trigger.html)) +- `~/reset` ([std_srvs::srv::Trigger](https://docs.ros.org/en/rolling/p/std_srvs/srv/Trigger.html)) - Reset the current trajectory. ## Clients @@ -25,8 +25,8 @@ Receive trajectory setpoints and send setpoint_raw setpoints along the trajector ## Parameters -- `frame_id` [default: `"map"`] -- `mav_frame` [default: `"LOCAL_NED"`] +- `frame_id` [default: `"map"`] - Frame id for the published path. +- `mav_frame` [default: `"LOCAL_NED"`] - Coordinate frame of the trajectory setpoints. ## MAVLink Subscriptions diff --git a/docs/plugins/std/setpoint_velocity.md b/docs/plugins/std/setpoint_velocity.md index 8a0b7a60f..b294a79bc 100644 --- a/docs/plugins/std/setpoint_velocity.md +++ b/docs/plugins/std/setpoint_velocity.md @@ -13,8 +13,8 @@ Send setpoint velocities to FCU controller. Uses the [MAVLink Offboard Control P ## Subscribers -- `~/cmd_vel` ([geometry_msgs::msg::TwistStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TwistStamped.html)) - cmd_vel usually is the topic used for velocity control in many controllers / planners -- `~/cmd_vel_unstamped` ([geometry_msgs::msg::Twist](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/Twist.html)) +- `~/cmd_vel` ([geometry_msgs::msg::TwistStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TwistStamped.html)) - Velocity setpoint (SET_POSITION_TARGET_LOCAL_NED). +- `~/cmd_vel_unstamped` ([geometry_msgs::msg::Twist](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/Twist.html)) - Velocity setpoint without timestamp (SET_POSITION_TARGET_LOCAL_NED). ## Services @@ -26,7 +26,7 @@ Send setpoint velocities to FCU controller. Uses the [MAVLink Offboard Control P ## Parameters -- `mav_frame` [default: `"LOCAL_NED"`] +- `mav_frame` [default: `"LOCAL_NED"`] - Coordinate frame of the velocity setpoints. ## MAVLink Subscriptions diff --git a/docs/plugins/std/sys_status.md b/docs/plugins/std/sys_status.md index d5e40d56b..0b6df6f34 100644 --- a/docs/plugins/std/sys_status.md +++ b/docs/plugins/std/sys_status.md @@ -9,24 +9,24 @@ Required by all plugins. Implements the [MAVLink Heartbeat/Connection Protocol](https://mavlink.io/en/services/heartbeat.html). ## Publishers -- `state` ([mavros_msgs::msg::State](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/State.html)) -- `extended_state` ([mavros_msgs::msg::ExtendedState](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/ExtendedState.html)) -- `sys_status` ([mavros_msgs::msg::SysStatus](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/SysStatus.html)) -- `estimator_status` ([mavros_msgs::msg::EstimatorStatus](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/EstimatorStatus.html)) -- `battery` (BatteryMsg) -- `statustext/recv` ([mavros_msgs::msg::StatusText](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/StatusText.html)) -- `status_event` ([mavros_msgs::msg::StatusEvent](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/StatusEvent.html)) +- `state` ([mavros_msgs::msg::State](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/State.html)) - Publish connection, armed and mode state (HEARTBEAT). +- `extended_state` ([mavros_msgs::msg::ExtendedState](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/ExtendedState.html)) - Publish VTOL and landed state (EXTENDED_SYS_STATE). +- `sys_status` ([mavros_msgs::msg::SysStatus](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/SysStatus.html)) - Publish system and battery status (SYS_STATUS). +- `estimator_status` ([mavros_msgs::msg::EstimatorStatus](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/EstimatorStatus.html)) - Publish estimator status flags (ESTIMATOR_STATUS). +- `battery` (BatteryMsg) - Publish battery state (BATTERY_STATUS). +- `statustext/recv` ([mavros_msgs::msg::StatusText](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/StatusText.html)) - Publish status text received from the FCU (STATUSTEXT). +- `status_event` ([mavros_msgs::msg::StatusEvent](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/StatusEvent.html)) - Publish status events received from the FCU (EVENT). ## Subscribers -- `statustext/send` ([mavros_msgs::msg::StatusText](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/StatusText.html)) +- `statustext/send` ([mavros_msgs::msg::StatusText](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/StatusText.html)) - Send status text to the FCU (STATUSTEXT). ## Services -- `set_mode` ([mavros_msgs::srv::SetMode](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/SetMode.html)) -- `set_stream_rate` ([mavros_msgs::srv::StreamRate](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/StreamRate.html)) -- `set_message_interval` ([mavros_msgs::srv::MessageInterval](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/MessageInterval.html)) -- `vehicle_info_get` ([mavros_msgs::srv::VehicleInfoGet](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/VehicleInfoGet.html)) +- `set_mode` ([mavros_msgs::srv::SetMode](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/SetMode.html)) - Change the flight mode (MAV_CMD_DO_SET_MODE / SET_MODE). +- `set_stream_rate` ([mavros_msgs::srv::StreamRate](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/StreamRate.html)) - Set the stream rate of a MAVLink message (REQUEST_DATA_STREAM). +- `set_message_interval` ([mavros_msgs::srv::MessageInterval](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/MessageInterval.html)) - Set the interval of a MAVLink message (MAV_CMD_SET_MESSAGE_INTERVAL). +- `vehicle_info_get` ([mavros_msgs::srv::VehicleInfoGet](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/VehicleInfoGet.html)) - Query information about the FCU and connected vehicles. ## Clients @@ -34,12 +34,12 @@ Required by all plugins. Implements the [MAVLink Heartbeat/Connection Protocol]( ## Parameters -- `conn_timeout` [type: double, default: `10.0`] -- `min_voltage` [default: `std::vector({10.0})`] -- `disable_diag` [type: bool, default: `false`] +- `conn_timeout` [type: double, default: `10.0`] - Connection timeout in seconds before the link is considered lost. +- `min_voltage` [default: `std::vector({10.0})`] - Minimum battery voltage per battery instance before a warning is raised. +- `disable_diag` [type: bool, default: `false`] - Disable publishing diagnostic updates. - `heartbeat_mav_type` [default: `utils::enum_to_name( - conn_heartbeat_mav_type)`] -- `heartbeat_rate` [type: double, default: `1.0`] + conn_heartbeat_mav_type)`] - MAV type of the heartbeat sent by the GCS. +- `heartbeat_rate` [type: double, default: `1.0`] - Rate (Hz) at which the GCS heartbeat is sent to the FCU. ## MAVLink Subscriptions diff --git a/docs/plugins/std/sys_time.md b/docs/plugins/std/sys_time.md index 0517ed395..37aa4a727 100644 --- a/docs/plugins/std/sys_time.md +++ b/docs/plugins/std/sys_time.md @@ -9,8 +9,8 @@ Implements the [MAVLink Time Synchronization](https://mavlink.io/en/services/timesync.html). ## Publishers -- `time_reference` ([sensor_msgs::msg::TimeReference](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/TimeReference.html)) -- `timesync_status` ([mavros_msgs::msg::TimesyncStatus](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/TimesyncStatus.html)) +- `time_reference` ([sensor_msgs::msg::TimeReference](https://docs.ros.org/en/rolling/p/sensor_msgs/msg/TimeReference.html)) - Publish FCU time reference for ntpd (SYSTEM_TIME). +- `timesync_status` ([mavros_msgs::msg::TimesyncStatus](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/TimesyncStatus.html)) - Publish timesync status (TIMESYNC). ## Subscribers @@ -26,10 +26,10 @@ Implements the [MAVLink Time Synchronization](https://mavlink.io/en/services/tim ## Parameters -- `time_ref_source` [default: `"fcu"`] -- `timesync_mode` [default: `"MAVLINK"`] -- `system_time_rate` [type: double, default: `0.0`] -- `timesync_rate` [type: double, default: `0.0`] +- `time_ref_source` [default: `"fcu"`] - Source name reported in the time_reference topic. +- `timesync_mode` [default: `"MAVLINK"`] - Timesync mode: MAVLINK, PASSTHROUGH, NONE or ONBOARD. +- `system_time_rate` [type: double, default: `0.0`] - Rate (Hz) at which SYSTEM_TIME is sent to the FCU; 0 disables it. +- `timesync_rate` [type: double, default: `0.0`] - Rate (Hz) at which TIMESYNC packets are exchanged; 0 disables it. - `timesync_alpha_initial` [type: double, default: `0.05`] - Filter gains Alpha : Used to smooth the overall clock offset estimate. Smaller values will lead to a smoother estimate, but track time drift more slowly, introducing a bias in the estimate. Larger values will cause low-amplitude oscillations. Beta : Used to smooth the clock skew estimate. Smaller values will lead to a tighter estimation of the skew (derivative), but will negatively affect how fast the filter reacts to clock skewing (e.g cause by temperature changes to the oscillator). Larger values will cause large-amplitude oscillations. - `timesync_beta_initial` [type: double, default: `0.05`] - `timesync_alpha_final` [type: double, default: `0.003`] diff --git a/docs/plugins/std/waypoint.md b/docs/plugins/std/waypoint.md index ab38a2175..fb3d30afe 100644 --- a/docs/plugins/std/waypoint.md +++ b/docs/plugins/std/waypoint.md @@ -9,8 +9,8 @@ Implements the [MAVLink Mission Protocol](https://mavlink.io/en/services/mission.html). ## Publishers -- `~/waypoints` ([mavros_msgs::msg::WaypointList](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/WaypointList.html)) -- `~/reached` ([mavros_msgs::msg::WaypointReached](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/WaypointReached.html)) +- `~/waypoints` ([mavros_msgs::msg::WaypointList](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/WaypointList.html)) - The current mission waypoint list. +- `~/reached` ([mavros_msgs::msg::WaypointReached](https://docs.ros.org/en/rolling/p/mavros_msgs/msg/WaypointReached.html)) - Notifies when a mission waypoint is reached. ## Subscribers @@ -18,10 +18,10 @@ Implements the [MAVLink Mission Protocol](https://mavlink.io/en/services/mission ## Services -- `~/pull` ([mavros_msgs::srv::WaypointPull](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/WaypointPull.html)) -- `~/push` ([mavros_msgs::srv::WaypointPush](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/WaypointPush.html)) -- `~/clear` ([mavros_msgs::srv::WaypointClear](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/WaypointClear.html)) -- `~/set_current` ([mavros_msgs::srv::WaypointSetCurrent](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/WaypointSetCurrent.html)) +- `~/pull` ([mavros_msgs::srv::WaypointPull](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/WaypointPull.html)) - Pull the mission from the FCU (MISSION_REQUEST_LIST). +- `~/push` ([mavros_msgs::srv::WaypointPush](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/WaypointPush.html)) - Push a mission to the FCU (full or partial). +- `~/clear` ([mavros_msgs::srv::WaypointClear](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/WaypointClear.html)) - Clear the mission on the FCU (MISSION_CLEAR_ALL). +- `~/set_current` ([mavros_msgs::srv::WaypointSetCurrent](https://docs.ros.org/en/rolling/p/mavros_msgs/srv/WaypointSetCurrent.html)) - Set the active/current mission waypoint. ## Clients @@ -29,9 +29,9 @@ Implements the [MAVLink Mission Protocol](https://mavlink.io/en/services/mission ## Parameters -- `pull_after_gcs` [type: bool, default: `true`] - NOTE(vooon): I'm not quite sure that this option would work with mavros router -- `use_mission_item_int` [type: bool, default: `true`] -- `enable_partial_push` [type: integer, default: `2`] +- `pull_after_gcs` [type: bool, default: `true`] - Re-pull the mission automatically after a GCS pushes it. +- `use_mission_item_int` [type: bool, default: `true`] - Use MISSION_ITEM_INT instead of MISSION_ITEM when supported. +- `enable_partial_push` [type: integer, default: `2`] - Enable partial mission push (0/off, 1/on, 2/auto-detect). ## MAVLink Subscriptions diff --git a/docs/plugins/std/wind_estimation.md b/docs/plugins/std/wind_estimation.md index 3e56c32ae..2eca95960 100644 --- a/docs/plugins/std/wind_estimation.md +++ b/docs/plugins/std/wind_estimation.md @@ -7,7 +7,7 @@ ## Publishers -- `wind_estimation` ([geometry_msgs::msg::TwistWithCovarianceStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TwistWithCovarianceStamped.html)) +- `wind_estimation` ([geometry_msgs::msg::TwistWithCovarianceStamped](https://docs.ros.org/en/rolling/p/geometry_msgs/msg/TwistWithCovarianceStamped.html)) - Publish wind estimation (WIND / WIND_COV). ## Subscribers diff --git a/mavros/include/mavros/mission_protocol_base.hpp b/mavros/include/mavros/mission_protocol_base.hpp index 00ef5db88..703173d00 100644 --- a/mavros/include/mavros/mission_protocol_base.hpp +++ b/mavros/include/mavros/mission_protocol_base.hpp @@ -300,6 +300,7 @@ class MissionBase : public plugin::Plugin { enable_node_watch_parameters(); + //! Timeout for a single mission item transfer/retry (seconds). node_declare_and_watch_parameter( "mission_wp_timeout", mission_wp_timeout.seconds(), [this](const rclcpp::Parameter & p) { mission_wp_timeout = rclcpp::Duration::from_seconds(p.as_double()); @@ -311,14 +312,17 @@ class MissionBase : public plugin::Plugin std::bind(&MissionBase::timeout_cb, this)); timeout_timer->cancel(); }); + //! Timeout waiting for the whole mission pull/push to finish (seconds). node_declare_and_watch_parameter( "mission_list_timeout", mission_list_timeout.seconds(), [&](const rclcpp::Parameter & p) { mission_list_timeout = rclcpp::Duration::from_seconds(p.as_double()); }); + //! Number of retries before reporting a mission transfer as failed. node_declare_and_watch_parameter( "mission_retries", mission_retries_count, [&](const rclcpp::Parameter & p) { mission_retries_count = p.as_int(); }); + //! Delay before re-scheduling a pull when the mission is busy (seconds). node_declare_and_watch_parameter( "mission_reschedule_time", mission_reschedule_time.seconds(), [&](const rclcpp::Parameter & p) { diff --git a/mavros/src/plugins/actuator_control.cpp b/mavros/src/plugins/actuator_control.cpp index 0ac36bf0b..58bf51da9 100644 --- a/mavros/src/plugins/actuator_control.cpp +++ b/mavros/src/plugins/actuator_control.cpp @@ -42,8 +42,10 @@ class ActuatorControlPlugin : public plugin::Plugin { auto sensor_qos = rclcpp::SensorDataQoS(); + //! Publish actuator control target (ACTUATOR_CONTROL_TARGET). target_actuator_control_pub = node->create_publisher( "target_actuator_control", sensor_qos); + //! Send actuator control commands to FCU (SET_ACTUATOR_CONTROL_TARGET). actuator_control_sub = node->create_subscription( "actuator_control", sensor_qos, std::bind( &ActuatorControlPlugin::actuator_control_cb, this, _1)); diff --git a/mavros/src/plugins/altitude.cpp b/mavros/src/plugins/altitude.cpp index 3f88153fd..e76dea6f4 100644 --- a/mavros/src/plugins/altitude.cpp +++ b/mavros/src/plugins/altitude.cpp @@ -43,6 +43,7 @@ class AltitudePlugin : public plugin::Plugin { enable_node_watch_parameters(); + //! Coordinate frame used for the altitude topic headers. node_declare_and_watch_parameter( "frame_id", "map", [&](const rclcpp::Parameter & p) { frame_id = p.as_string(); @@ -51,6 +52,7 @@ class AltitudePlugin : public plugin::Plugin auto sensor_qos = rclcpp::SensorDataQoS(); /// ALTITUDE data + //! Publish altitude data (ALTITUDE). altitude_pub = node->create_publisher("altitude", sensor_qos); } diff --git a/mavros/src/plugins/command.cpp b/mavros/src/plugins/command.cpp index ca57bc8fc..ffa26714f 100644 --- a/mavros/src/plugins/command.cpp +++ b/mavros/src/plugins/command.cpp @@ -93,60 +93,71 @@ class CommandPlugin : public plugin::Plugin auto services_qos = rclcpp::ServicesQoS(); #endif + //! Send any MAVLink command via COMMAND_LONG and wait for the ACK. command_long_srv = node->create_service( "~/command", std::bind( &CommandPlugin::command_long_cb, this, _1, _2, _3), services_qos, srv_cg); + //! Send any MAVLink command via COMMAND_INT (no ACK wait). command_int_srv = node->create_service( "~/command_int", std::bind( &CommandPlugin::command_int_cb, this, _1, _2, _3), services_qos, srv_cg); + //! Arm or disarm the motors (MAV_CMD_COMPONENT_ARM_DISARM). arming_srv = node->create_service( "~/arming", std::bind( &CommandPlugin::arming_cb, this, _1, _2, _3), services_qos, srv_cg); + //! Set the home position (MAV_CMD_DO_SET_HOME). set_home_srv = node->create_service( "~/set_home", std::bind( &CommandPlugin::set_home_cb, this, _1, _2, _3), services_qos, srv_cg); + //! Take off to a given altitude/location (MAV_CMD_NAV_TAKEOFF). takeoff_srv = node->create_service( "~/takeoff", std::bind( &CommandPlugin::takeoff_cb, this, _1, _2, _3), services_qos, srv_cg); + //! Take off in local frame (MAV_CMD_NAV_TAKEOFF_LOCAL). takeoff_local_srv = node->create_service( "~/takeoff_local", std::bind( &CommandPlugin::takeoff_local_cb, this, _1, _2, _3), services_qos, srv_cg); + //! Land at a given location (MAV_CMD_NAV_LAND). land_srv = node->create_service( "~/land", std::bind(&CommandPlugin::land_cb, this, _1, _2, _3), services_qos, srv_cg); + //! Land in local frame (MAV_CMD_NAV_LAND_LOCAL). land_local_srv = node->create_service( "~/land_local", std::bind(&CommandPlugin::land_local_cb, this, _1, _2, _3), services_qos, srv_cg); + //! Enable/disable/reset the camera trigger (MAV_CMD_DO_TRIGGER_CONTROL). trigger_control_srv = node->create_service( "~/trigger_control", std::bind( &CommandPlugin::trigger_control_cb, this, _1, _2, _3), services_qos, srv_cg); + //! Set the camera trigger interval (MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL). trigger_interval_srv = node->create_service( "~/trigger_interval", std::bind( &CommandPlugin::trigger_interval_cb, this, _1, _2, _3), services_qos, srv_cg); + //! Request a VTOL transition (MAV_CMD_DO_VTOL_TRANSITION). vtol_transition_srv = node->create_service( "~/vtol_transition", std::bind( &CommandPlugin::vtol_transition_cb, this, _1, _2, diff --git a/mavros/src/plugins/ftp.cpp b/mavros/src/plugins/ftp.cpp index ed2fe41ac..603ab90b0 100644 --- a/mavros/src/plugins/ftp.cpp +++ b/mavros/src/plugins/ftp.cpp @@ -272,50 +272,62 @@ class FTPPlugin : public plugin::Plugin FTPRequest r; rcpputils::assert_true((r.payload.size() - sizeof(FTPRequest::PayloadHeader)) == r.DATA_MAXSZ); + //! List the contents of a directory on the FCU (FTP). list_srv = node->create_service( "~/list", std::bind(&FTPPlugin::list_cb, this, _1, _2)); + //! Open a file on the FCU for reading or writing (FTP). open_srv = node->create_service( "~/open", std::bind(&FTPPlugin::open_cb, this, _1, _2)); + //! Close an open file on the FCU (FTP). close_srv = node->create_service( "~/close", std::bind(&FTPPlugin::close_cb, this, _1, _2)); + //! Read data from an open file on the FCU (FTP). read_srv = node->create_service( "~/read", std::bind(&FTPPlugin::read_cb, this, _1, _2)); + //! Write data to an open file on the FCU (FTP). write_srv = node->create_service( "~/write", std::bind(&FTPPlugin::write_cb, this, _1, _2)); + //! Create a directory on the FCU (FTP). mkdir_srv = node->create_service( "~/mkdir", std::bind(&FTPPlugin::mkdir_cb, this, _1, _2)); + //! Remove a directory on the FCU (FTP). rmdir_srv = node->create_service( "~/rmdir", std::bind(&FTPPlugin::rmdir_cb, this, _1, _2)); + //! Remove a file on the FCU (FTP). remove_srv = node->create_service( "~/remove", std::bind(&FTPPlugin::remove_cb, this, _1, _2)); + //! Truncate a file to a given length on the FCU (FTP). truncate_srv = node->create_service( "~/truncate", std::bind(&FTPPlugin::truncate_cb, this, _1, _2)); + //! Reset the FTP session on both sides (FTP). reset_srv = node->create_service( "~/reset", std::bind(&FTPPlugin::reset_cb, this, _1, _2)); + //! Rename a file on the FCU (FTP). rename_srv = node->create_service( "~/rename", std::bind(&FTPPlugin::rename_cb, this, _1, _2)); + //! Calculate the CRC32 checksum of a file on the FCU (FTP). checksum_srv = node->create_service( "~/checksum", diff --git a/mavros/src/plugins/geofence.cpp b/mavros/src/plugins/geofence.cpp index b2fc06891..3b89d1dc5 100644 --- a/mavros/src/plugins/geofence.cpp +++ b/mavros/src/plugins/geofence.cpp @@ -40,11 +40,13 @@ class GeofencePlugin : public plugin::MissionBase enable_node_watch_parameters(); // NOTE(vooon): I'm not quite sure that this option would work with mavros router + //! Pull geofence from the FCU after GCS connection. node_declare_and_watch_parameter( "pull_after_gcs", true, [&](const rclcpp::Parameter & p) { do_pull_after_gcs = p.as_bool(); }); + //! Use MISSION_ITEM_INT instead of MISSION_ITEM (MISSION protocol). node_declare_and_watch_parameter( "use_mission_item_int", true, [&](const rclcpp::Parameter & p) { use_mission_item_int = p.as_bool(); @@ -52,6 +54,7 @@ class GeofencePlugin : public plugin::MissionBase auto gf_qos = mavros::LatchedStateQoS(); + //! Publish the current geofence (MISSION protocol). gf_list_pub = node->create_publisher("~/fences", gf_qos); #ifdef USE_OLD_RMW_QOS @@ -60,16 +63,19 @@ class GeofencePlugin : public plugin::MissionBase auto services_qos = rclcpp::ServicesQoS(); #endif + //! Pull the geofence from the FCU (MISSION_REQUEST_LIST). pull_srv = node->create_service( "~/pull", std::bind(&GeofencePlugin::pull_cb, this, _1, _2), services_qos, srv_cg); + //! Push the geofence to the FCU (MISSION_COUNT). push_srv = node->create_service( "~/push", std::bind(&GeofencePlugin::push_cb, this, _1, _2), services_qos, srv_cg); + //! Clear the geofence on the FCU (MISSION_CLEAR_ALL). clear_srv = node->create_service( "~/clear", diff --git a/mavros/src/plugins/global_position.cpp b/mavros/src/plugins/global_position.cpp index 6109c869b..4c3464798 100644 --- a/mavros/src/plugins/global_position.cpp +++ b/mavros/src/plugins/global_position.cpp @@ -67,41 +67,50 @@ class GlobalPositionPlugin : public plugin::Plugin enable_node_watch_parameters(); // general params + //! Coordinate frame used for the global position topics. node_declare_and_watch_parameter( "frame_id", "map", [&](const rclcpp::Parameter & p) { frame_id = p.as_string(); }); + //! Child body-fixed frame used for the global position topics. node_declare_and_watch_parameter( "child_frame_id", "base_link", [&](const rclcpp::Parameter & p) { child_frame_id = p.as_string(); }); + //! Rotation covariance for the odometry pose. node_declare_and_watch_parameter( "rot_covariance", 99999.0, [&](const rclcpp::Parameter & p) { rot_cov = p.as_double(); }); + //! GPS user range error used to approximate position covariance. node_declare_and_watch_parameter( "gps_uere", 1.0, [&](const rclcpp::Parameter & p) { gps_uere = p.as_double(); }); + //! Use relative altitude instead of the geocentric altitude. node_declare_and_watch_parameter( "use_relative_alt", true, [&](const rclcpp::Parameter & p) { use_relative_alt = p.as_bool(); }); // tf subsection + //! Enable publishing of the global position transform. node_declare_and_watch_parameter( "tf.send", false, [&](const rclcpp::Parameter & p) { tf_send = p.as_bool(); }); + //! Map frame used for the published transform. node_declare_and_watch_parameter( "tf.frame_id", "map", [&](const rclcpp::Parameter & p) { tf_frame_id = p.as_string(); }); // The global_origin should be represented as "earth" coordinate frame (ECEF) (REP 105) + //! Global reference frame (ECEF) for the transform. node_declare_and_watch_parameter( "tf.global_frame_id", "earth", [&](const rclcpp::Parameter & p) { tf_global_frame_id = p.as_string(); }); + //! Child body-fixed frame used for the transform. node_declare_and_watch_parameter( "tf.child_frame_id", "base_link", [&](const rclcpp::Parameter & p) { tf_child_frame_id = p.as_string(); @@ -113,21 +122,30 @@ class GlobalPositionPlugin : public plugin::Plugin auto origin_qos = mavros::LatchedStateQoS(); // gps data + //! Publish raw GPS fix (GPS_RAW_INT). raw_fix_pub = node->create_publisher("~/raw/fix", sensor_qos); + //! Publish raw GPS velocity (GPS_RAW_INT). raw_vel_pub = node->create_publisher( "~/raw/gps_vel", sensor_qos); + //! Publish number of visible GPS satellites (GPS_RAW_INT). raw_sat_pub = node->create_publisher("~/raw/satellites", sensor_qos); // fused global position + //! Publish fused global position fix (GLOBAL_POSITION_INT). gp_fix_pub = node->create_publisher("~/global", sensor_qos); + //! Publish fused local position as odometry (GLOBAL_POSITION_INT). gp_odom_pub = node->create_publisher("~/local", sensor_qos); + //! Publish fused relative altitude (GLOBAL_POSITION_INT). gp_rel_alt_pub = node->create_publisher("~/rel_alt", sensor_qos); + //! Publish fused compass heading (GLOBAL_POSITION_INT). gp_hdg_pub = node->create_publisher("~/compass_hdg", sensor_qos); // global origin + //! Publish the global origin (GPS_GLOBAL_ORIGIN). gp_global_origin_pub = node->create_publisher( "~/gp_origin", origin_qos); + //! Set the global origin (SET_GPS_GLOBAL_ORIGIN). gp_set_global_origin_sub = node->create_subscription( "~/set_gp_origin", sensor_qos, @@ -135,12 +153,14 @@ class GlobalPositionPlugin : public plugin::Plugin // home position subscriber to set "map" origin // TODO(vooon): use UAS + //! Set the "map" origin from the home position (HOME_POSITION). hp_sub = node->create_subscription( "home_position/home", sensor_qos, std::bind(&GlobalPositionPlugin::home_position_cb, this, _1)); // offset from local position to the global origin ("earth") + //! Publish the offset from the local position to the global origin. gp_global_offset_pub = node->create_publisher( "~/gp_lp_offset", sensor_qos); diff --git a/mavros/src/plugins/home_position.cpp b/mavros/src/plugins/home_position.cpp index ba3312247..7f6d8d171 100644 --- a/mavros/src/plugins/home_position.cpp +++ b/mavros/src/plugins/home_position.cpp @@ -49,11 +49,14 @@ class HomePositionPlugin : public plugin::Plugin { auto state_qos = rclcpp::QoS(10).transient_local(); + //! Publish home position (HOME_POSITION). hp_pub = node->create_publisher("~/home", state_qos); + //! Set home position (SET_HOME_POSITION). hp_sub = node->create_subscription( "~/set", 10, std::bind(&HomePositionPlugin::home_position_cb, this, _1)); + //! Request home position update (MAV_CMD_GET_HOME_POSITION). update_srv = node->create_service( "~/req_update", @@ -90,6 +93,7 @@ class HomePositionPlugin : public plugin::Plugin bool ret = false; try { + //! Client to request home position via command (MAV_CMD_GET_HOME_POSITION). auto client = node->create_client("cmd/command"); auto cmdrq = std::make_shared(); diff --git a/mavros/src/plugins/imu.cpp b/mavros/src/plugins/imu.cpp index f72c5e414..489b9e46d 100644 --- a/mavros/src/plugins/imu.cpp +++ b/mavros/src/plugins/imu.cpp @@ -78,26 +78,31 @@ class IMUPlugin : public plugin::Plugin * transformation from the ENU frame to the base_link frame (ENU <-> base_link). * THIS ORIENTATION IS NOT THE SAME AS THAT REPORTED BY THE FCU (NED <-> aircraft). */ + //! Coordinate frame used for the published IMU topics. node_declare_and_watch_parameter( "frame_id", "base_link", [&](const rclcpp::Parameter & p) { frame_id = p.as_string(); }); + //! Standard deviation of the linear acceleration. node_declare_and_watch_parameter( "linear_acceleration_stdev", 0.0003, [&](const rclcpp::Parameter & p) { auto linear_stdev = p.as_double(); setup_covariance(linear_acceleration_cov, linear_stdev); }); + //! Standard deviation of the angular velocity. node_declare_and_watch_parameter( "angular_velocity_stdev", 0.02 * (M_PI / 180.0), [&](const rclcpp::Parameter & p) { auto angular_stdev = p.as_double(); setup_covariance(angular_velocity_cov, angular_stdev); }); + //! Standard deviation of the orientation. node_declare_and_watch_parameter( "orientation_stdev", 1.0, [&](const rclcpp::Parameter & p) { auto orientation_stdev = p.as_double(); setup_covariance(orientation_cov, orientation_stdev); }); + //! Standard deviation of the magnetic field. node_declare_and_watch_parameter( "magnetic_stdev", 0.0, [&](const rclcpp::Parameter & p) { auto mag_stdev = p.as_double(); @@ -108,18 +113,25 @@ class IMUPlugin : public plugin::Plugin auto sensor_qos = rclcpp::SensorDataQoS(); + //! Publish fused IMU data (ATTITUDE / ATTITUDE_QUATERNION). imu_pub = node->create_publisher("~/data", sensor_qos); + //! Publish raw IMU and acceleration data (RAW_IMU / SCALED_IMU / HIGHRES_IMU). imu_raw_pub = node->create_publisher("~/data_raw", sensor_qos); + //! Publish filtered magnetic field data (RAW_IMU / SCALED_IMU / HIGHRES_IMU). magn_pub = node->create_publisher("~/mag", sensor_qos); + //! Publish IMU temperature (HIGHRES_IMU). temp_imu_pub = node->create_publisher( "~/temperature_imu", sensor_qos); + //! Publish barometer temperature (SCALED_PRESSURE). temp_baro_pub = node->create_publisher( "~/temperature_baro", sensor_qos); + //! Publish absolute (static) pressure (SCALED_PRESSURE / HIGHRES_IMU). static_press_pub = node->create_publisher( "~/static_pressure", sensor_qos); + //! Publish differential pressure (SCALED_PRESSURE / HIGHRES_IMU). diff_press_pub = node->create_publisher( "~/diff_pressure", sensor_qos); diff --git a/mavros/src/plugins/local_position.cpp b/mavros/src/plugins/local_position.cpp index afbf868c8..31a22c5cd 100644 --- a/mavros/src/plugins/local_position.cpp +++ b/mavros/src/plugins/local_position.cpp @@ -58,6 +58,7 @@ class LocalPositionPlugin : public plugin::Plugin // header frame_id. // default to map (world-fixed, ENU as per REP-105). + //! Set the frame id for the published messages. node_declare_and_watch_parameter( "frame_id", "map", [&](const rclcpp::Parameter & p) { frame_id = p.as_string(); @@ -65,14 +66,17 @@ class LocalPositionPlugin : public plugin::Plugin // Important tf subsection // Report the transform from world to base_link here. + //! Enable publishing of the world to base_link TF tree. node_declare_and_watch_parameter( "tf.send", false, [&](const rclcpp::Parameter & p) { tf_send = p.as_bool(); }); + //! World frame id for the published TF. node_declare_and_watch_parameter( "tf.frame_id", "map", [&](const rclcpp::Parameter & p) { tf_frame_id = p.as_string(); }); + //! Body frame id for the published TF. node_declare_and_watch_parameter( "tf.child_frame_id", "base_link", [&](const rclcpp::Parameter & p) { tf_child_frame_id = p.as_string(); @@ -80,19 +84,26 @@ class LocalPositionPlugin : public plugin::Plugin auto sensor_qos = rclcpp::SensorDataQoS(); + //! Local position (LOCAL_POSITION_NED). local_position = node->create_publisher("~/pose", sensor_qos); + //! Local position with covariance (LOCAL_POSITION_NED_COV). local_position_cov = node->create_publisher( "~/pose_cov", sensor_qos); + //! Local velocity in NED frame (LOCAL_POSITION_NED). local_velocity_local = node->create_publisher( "~/velocity_local", sensor_qos); + //! Local velocity in body frame (LOCAL_POSITION_NED). local_velocity_body = node->create_publisher( "~/velocity_body", sensor_qos); + //! Local velocity with covariance (LOCAL_POSITION_NED_COV). local_velocity_cov = node->create_publisher( "~/velocity_body_cov", sensor_qos); + //! Local acceleration with covariance (LOCAL_POSITION_NED_COV). local_accel = node->create_publisher( "~/accel", sensor_qos); + //! Local odometry (LOCAL_POSITION_NED / LOCAL_POSITION_NED_COV). local_odom = node->create_publisher("~/odom", sensor_qos); } diff --git a/mavros/src/plugins/manual_control.cpp b/mavros/src/plugins/manual_control.cpp index 472eea361..4fa4ddf35 100644 --- a/mavros/src/plugins/manual_control.cpp +++ b/mavros/src/plugins/manual_control.cpp @@ -41,7 +41,9 @@ class ManualControlPlugin : public plugin::Plugin explicit ManualControlPlugin(plugin::UASPtr uas_) : Plugin(uas_, "manual_control") { + //! Publish manual control input from FCU (MANUAL_CONTROL). control_pub = node->create_publisher("~/control", 10); + //! Send manual control commands to FCU (MANUAL_CONTROL). send_sub = node->create_subscription( "~/send", 10, diff --git a/mavros/src/plugins/nav_controller_output.cpp b/mavros/src/plugins/nav_controller_output.cpp index 22aadc05f..e3823a27f 100644 --- a/mavros/src/plugins/nav_controller_output.cpp +++ b/mavros/src/plugins/nav_controller_output.cpp @@ -39,6 +39,7 @@ class NavControllerOutputPlugin : public plugin::Plugin explicit NavControllerOutputPlugin(plugin::UASPtr uas_) : Plugin(uas_, "nav_controller_output") { + //! Publish navigation controller output (NAV_CONTROLLER_OUTPUT). nco_pub = node->create_publisher("~/output", 10); } diff --git a/mavros/src/plugins/param.cpp b/mavros/src/plugins/param.cpp index 7f1141ca3..f0b42d923 100644 --- a/mavros/src/plugins/param.cpp +++ b/mavros/src/plugins/param.cpp @@ -441,7 +441,9 @@ class ParamPlugin : public plugin::Plugin auto qos = rclcpp::ParametersQoS(); #endif + //! Parameter change notifications (new/updated/changed). param_event_pub = node->create_publisher("~/event", event_qos); + //! Standard ROS parameter events (on /parameter_events). std_event_pub = node->create_publisher( PSN::events, event_qos); @@ -449,38 +451,47 @@ class ParamPlugin : public plugin::Plugin srv_cg = node->create_callback_group(rclcpp::CallbackGroupType::MutuallyExclusive); // Custom parameter services + //! Fetch all parameters from the device (PARAM_REQUEST_LIST). pull_srv = node->create_service( "~/pull", std::bind(&ParamPlugin::pull_cb, this, _1, _2), qos, srv_cg); + //! Set a single parameter value (PARAM_SET). set_srv = node->create_service( "~/set", std::bind(&ParamPlugin::set_cb, this, _1, _2), qos, srv_cg); // Standard parameter services + //! Get parameter values from the local cache. get_parameters_srv = node->create_service( PSN::get_parameters, std::bind(&ParamPlugin::get_parameters_cb, this, _1, _2), qos, srv_cg); + //! Get parameter types from the local cache. get_parameter_types_srv = node->create_service( PSN::get_parameter_types, std::bind(&ParamPlugin::get_parameter_types_cb, this, _1, _2), qos, srv_cg); + //! Set parameter values (PARAM_SET for each). set_parameters_srv = node->create_service( PSN::set_parameters, std::bind(&ParamPlugin::set_parameters_cb, this, _1, _2), qos, srv_cg); + //! Unsupported: device-side atomic set, always reports failure. set_parameters_atomically_srv = node->create_service( PSN::set_parameters_atomically, std::bind(&ParamPlugin::set_parameters_atomically_cb, this, _1, _2), qos, srv_cg); + //! Describe parameter descriptors from the local cache. describe_parameters_srv = node->create_service( PSN::describe_parameters, std::bind(&ParamPlugin::describe_parameters_cb, this, _1, _2), qos, srv_cg); + //! List parameter names from the local cache. list_parameters_srv = node->create_service( PSN::list_parameters, std::bind(&ParamPlugin::list_parameters_cb, this, _1, _2), qos, srv_cg); enable_node_watch_parameters(); + //! Timeout for a single PARAM_SET retry (seconds). node_declare_and_watch_parameter( "param_set_timeout", param_set_timeout.seconds(), [this](const rclcpp::Parameter & p) { param_set_timeout = rclcpp::Duration::from_seconds(p.as_double()); @@ -492,10 +503,12 @@ class ParamPlugin : public plugin::Plugin std::bind(&ParamPlugin::timeout_cb, this)); timeout_timer->cancel(); }); + //! Timeout waiting for a full parameter list pull (seconds). node_declare_and_watch_parameter( "param_list_timeout", param_list_timeout.seconds(), [&](const rclcpp::Parameter & p) { param_list_timeout = rclcpp::Duration::from_seconds(p.as_double()); }); + //! Number of retries before reporting a parameter operation as failed. node_declare_and_watch_parameter( "param_retries", param_retries_count, [&](const rclcpp::Parameter & p) { param_retries_count = p.as_int(); diff --git a/mavros/src/plugins/rallypoint.cpp b/mavros/src/plugins/rallypoint.cpp index 5725e9369..16fcb0e9f 100644 --- a/mavros/src/plugins/rallypoint.cpp +++ b/mavros/src/plugins/rallypoint.cpp @@ -39,11 +39,13 @@ class RallypointPlugin : public plugin::MissionBase enable_node_watch_parameters(); // NOTE(vooon): I'm not quite sure that this option would work with mavros router + //! Pull rally points from the FCU after GCS connection. node_declare_and_watch_parameter( "pull_after_gcs", true, [&](const rclcpp::Parameter & p) { do_pull_after_gcs = p.as_bool(); }); + //! Use MISSION_ITEM_INT instead of MISSION_ITEM (MISSION protocol). node_declare_and_watch_parameter( "use_mission_item_int", true, [&](const rclcpp::Parameter & p) { use_mission_item_int = p.as_bool(); @@ -51,6 +53,7 @@ class RallypointPlugin : public plugin::MissionBase auto rp_qos = mavros::LatchedStateQoS(); + //! Publish the current rally points (MISSION protocol). rp_list_pub = node->create_publisher("~/rallypoints", rp_qos); #ifdef USE_OLD_RMW_QOS @@ -59,16 +62,19 @@ class RallypointPlugin : public plugin::MissionBase auto services_qos = rclcpp::ServicesQoS(); #endif + //! Pull the rally points from the FCU (MISSION_REQUEST_LIST). pull_srv = node->create_service( "~/pull", std::bind(&RallypointPlugin::pull_cb, this, _1, _2), services_qos, srv_cg); + //! Push the rally points to the FCU (MISSION_COUNT). push_srv = node->create_service( "~/push", std::bind(&RallypointPlugin::push_cb, this, _1, _2), services_qos, srv_cg); + //! Clear the rally points on the FCU (MISSION_CLEAR_ALL). clear_srv = node->create_service( "~/clear", diff --git a/mavros/src/plugins/rc_io.cpp b/mavros/src/plugins/rc_io.cpp index 8a23d0d7a..5c86a7a93 100644 --- a/mavros/src/plugins/rc_io.cpp +++ b/mavros/src/plugins/rc_io.cpp @@ -44,8 +44,11 @@ class RCIOPlugin : public plugin::Plugin raw_rc_out(0), has_rc_channels_msg(false) { + //! Publish RC input (RC_CHANNELS / RC_CHANNELS_RAW). rc_in_pub = node->create_publisher("~/in", 10); + //! Publish RC servo output (SERVO_OUTPUT_RAW). rc_out_pub = node->create_publisher("~/out", 10); + //! Override RC input on the FCU (RC_CHANNELS_OVERRIDE). override_sub = node->create_subscription( "~/override", 10, std::bind( &RCIOPlugin::override_cb, this, diff --git a/mavros/src/plugins/setpoint_accel.cpp b/mavros/src/plugins/setpoint_accel.cpp index a219059d9..7101e77e2 100644 --- a/mavros/src/plugins/setpoint_accel.cpp +++ b/mavros/src/plugins/setpoint_accel.cpp @@ -49,6 +49,7 @@ class SetpointAccelerationPlugin : public plugin::Plugin, auto sensor_qos = rclcpp::SensorDataQoS(); + //! Setpoint acceleration/force (SET_POSITION_TARGET_LOCAL_NED). accel_sub = node->create_subscription( "~/accel", sensor_qos, std::bind( &SetpointAccelerationPlugin::accel_cb, this, diff --git a/mavros/src/plugins/setpoint_attitude.cpp b/mavros/src/plugins/setpoint_attitude.cpp index eea4e7e83..82220c1a3 100644 --- a/mavros/src/plugins/setpoint_attitude.cpp +++ b/mavros/src/plugins/setpoint_attitude.cpp @@ -94,12 +94,14 @@ class SetpointAttitudePlugin : public plugin::Plugin, /** * @brief Use message_filters to sync attitude and thrust msg coming from different topics */ + //! Attitude setpoint as quaternion (SET_ATTITUDE_TARGET). pose_sub.subscribe(node, "~/attitude", subscriber_qos); sync_pose = std::make_unique(SyncPoseThrustPolicy(10), pose_sub, th_sub); sync_pose->registerCallback(&SetpointAttitudePlugin::attitude_pose_cb, this); } else { + //! Attitude setpoint as angular velocity (SET_ATTITUDE_TARGET). twist_sub.subscribe(node, "~/cmd_vel", subscriber_qos); sync_twist = @@ -109,6 +111,8 @@ class SetpointAttitudePlugin : public plugin::Plugin, }); // thrust msg subscriber to sync + + //! Thrust setpoint (SET_ATTITUDE_TARGET). th_sub.subscribe(node, "~/thrust", subscriber_qos); } diff --git a/mavros/src/plugins/setpoint_position.cpp b/mavros/src/plugins/setpoint_position.cpp index 4ab1b7319..3f4265fd8 100644 --- a/mavros/src/plugins/setpoint_position.cpp +++ b/mavros/src/plugins/setpoint_position.cpp @@ -69,23 +69,28 @@ class SetpointPositionPlugin : public plugin::Plugin, auto sensor_qos = rclcpp::SensorDataQoS(); + //! Local position setpoint (SET_POSITION_TARGET_LOCAL_NED). setpoint_sub = node->create_subscription( "~/local", sensor_qos, std::bind( &SetpointPositionPlugin::setpoint_cb, this, _1)); + //! Global position setpoint (SET_POSITION_TARGET_GLOBAL_INT). setpointg_sub = node->create_subscription( "~/global", sensor_qos, std::bind( &SetpointPositionPlugin::setpointg_cb, this, _1)); + //! Global setpoint converted to local setpoint (SET_POSITION_TARGET_LOCAL_NED). setpointg2l_sub = node->create_subscription( "~/global_to_local", sensor_qos, std::bind(&SetpointPositionPlugin::setpointg2l_cb, this, _1)); + //! Current global position used for conversion. gps_sub = node->create_subscription( "global_position/global", sensor_qos, std::bind(&SetpointPositionPlugin::gps_cb, this, _1)); + //! Current local position used for conversion. local_sub = node->create_subscription( "local_position/pose", sensor_qos, diff --git a/mavros/src/plugins/setpoint_raw.cpp b/mavros/src/plugins/setpoint_raw.cpp index cda76b528..8ab069371 100644 --- a/mavros/src/plugins/setpoint_raw.cpp +++ b/mavros/src/plugins/setpoint_raw.cpp @@ -53,6 +53,7 @@ class SetpointRawPlugin : public plugin::Plugin, { enable_node_watch_parameters(); + //! Scaling factor applied to the thrust setpoint. node_declare_and_watch_parameter( "thrust_scaling", NAN, [&](const rclcpp::Parameter & p) { thrust_scaling = p.as_double(); @@ -60,25 +61,31 @@ class SetpointRawPlugin : public plugin::Plugin, auto sensor_qos = rclcpp::SensorDataQoS(); + //! Local position/velocity/accel setpoint (SET_POSITION_TARGET_LOCAL_NED). local_sub = node->create_subscription( "~/local", sensor_qos, std::bind( &SetpointRawPlugin::local_cb, this, _1)); + //! Global position/velocity/accel setpoint (SET_POSITION_TARGET_GLOBAL_INT). global_sub = node->create_subscription( "~/global", sensor_qos, std::bind( &SetpointRawPlugin::global_cb, this, _1)); + //! Attitude/thrust setpoint (SET_ATTITUDE_TARGET). attitude_sub = node->create_subscription( "~/attitude", sensor_qos, std::bind( &SetpointRawPlugin::attitude_cb, this, _1)); + //! Publish local position target (POSITION_TARGET_LOCAL_NED). target_local_pub = node->create_publisher( "~/target_local", sensor_qos); + //! Publish global position target (POSITION_TARGET_GLOBAL_INT). target_global_pub = node->create_publisher( "~/target_global", sensor_qos); + //! Publish attitude target (ATTITUDE_TARGET). target_attitude_pub = node->create_publisher( "~/target_attitude", sensor_qos); } diff --git a/mavros/src/plugins/setpoint_trajectory.cpp b/mavros/src/plugins/setpoint_trajectory.cpp index 67e54b827..0e64cef5f 100644 --- a/mavros/src/plugins/setpoint_trajectory.cpp +++ b/mavros/src/plugins/setpoint_trajectory.cpp @@ -55,11 +55,13 @@ class SetpointTrajectoryPlugin : public plugin::Plugin, { enable_node_watch_parameters(); + //! Frame id for the published path. node_declare_and_watch_parameter( "frame_id", "map", [&](const rclcpp::Parameter & p) { frame_id = p.as_string(); }); + //! Coordinate frame of the trajectory setpoints. node_declare_and_watch_parameter( "mav_frame", "LOCAL_NED", [&](const rclcpp::Parameter & p) { auto mav_frame_str = p.as_string(); @@ -76,13 +78,16 @@ class SetpointTrajectoryPlugin : public plugin::Plugin, auto sensor_qos = rclcpp::SensorDataQoS(); + //! Trajectory setpoints (SET_POSITION_TARGET_LOCAL_NED). local_sub = node->create_subscription( "~/local", sensor_qos, std::bind( &SetpointTrajectoryPlugin::local_cb, this, _1)); + //! Publish the desired trajectory path. desired_pub = node->create_publisher("~/desired", sensor_qos); + //! Reset the current trajectory. trajectory_reset_srv = node->create_service( "~/reset", diff --git a/mavros/src/plugins/setpoint_velocity.cpp b/mavros/src/plugins/setpoint_velocity.cpp index e6d07a32e..d4c5cdde9 100644 --- a/mavros/src/plugins/setpoint_velocity.cpp +++ b/mavros/src/plugins/setpoint_velocity.cpp @@ -49,6 +49,7 @@ class SetpointVelocityPlugin : public plugin::Plugin, { enable_node_watch_parameters(); + //! Coordinate frame of the velocity setpoints. node_declare_and_watch_parameter( "mav_frame", "LOCAL_NED", [&](const rclcpp::Parameter & p) { auto mav_frame_str = p.as_string(); @@ -66,10 +67,13 @@ class SetpointVelocityPlugin : public plugin::Plugin, auto sensor_qos = rclcpp::SensorDataQoS(); // cmd_vel usually is the topic used for velocity control in many controllers / planners + + //! Velocity setpoint (SET_POSITION_TARGET_LOCAL_NED). vel_sub = node->create_subscription( "~/cmd_vel", sensor_qos, std::bind( &SetpointVelocityPlugin::vel_cb, this, _1)); + //! Velocity setpoint without timestamp (SET_POSITION_TARGET_LOCAL_NED). vel_unstamped_sub = node->create_subscription( "~/cmd_vel_unstamped", sensor_qos, std::bind( diff --git a/mavros/src/plugins/sys_status.cpp b/mavros/src/plugins/sys_status.cpp index 5de810220..bd0d5ee71 100644 --- a/mavros/src/plugins/sys_status.cpp +++ b/mavros/src/plugins/sys_status.cpp @@ -506,6 +506,7 @@ class SystemStatusPlugin : public plugin::Plugin enable_node_watch_parameters(); + //! Connection timeout in seconds before the link is considered lost. node_declare_and_watch_parameter( "conn_timeout", 10.0, [&](const rclcpp::Parameter & p) { auto conn_timeout = rclcpp::Duration::from_seconds(p.as_double()); @@ -516,6 +517,7 @@ class SystemStatusPlugin : public plugin::Plugin std::bind(&SystemStatusPlugin::timeout_cb, this)); }); + //! Minimum battery voltage per battery instance before a warning is raised. node_declare_and_watch_parameter( "min_voltage", std::vector({10.0}), [&](const rclcpp::Parameter & p) { min_voltage = p.as_double_array(); @@ -524,6 +526,7 @@ class SystemStatusPlugin : public plugin::Plugin } }); + //! Disable publishing diagnostic updates. node_declare_and_watch_parameter( "disable_diag", false, [&](const rclcpp::Parameter & p) { disable_diag = p.as_bool(); @@ -544,12 +547,14 @@ class SystemStatusPlugin : public plugin::Plugin } }); + //! MAV type of the heartbeat sent by the GCS. node_declare_and_watch_parameter( "heartbeat_mav_type", utils::enum_to_name( conn_heartbeat_mav_type), [&](const rclcpp::Parameter & p) { conn_heartbeat_mav_type = utils::mav_type_from_str(p.as_string()); }); + //! Rate (Hz) at which the GCS heartbeat is sent to the FCU. node_declare_and_watch_parameter( "heartbeat_rate", 1.0, [&](const rclcpp::Parameter & p) { auto rate_d = p.as_double(); @@ -573,21 +578,29 @@ class SystemStatusPlugin : public plugin::Plugin auto state_qos = rclcpp::QoS(10).transient_local(); auto sensor_qos = rclcpp::SensorDataQoS(); + //! Publish connection, armed and mode state (HEARTBEAT). state_pub = node->create_publisher( "state", state_qos); + //! Publish VTOL and landed state (EXTENDED_SYS_STATE). extended_state_pub = node->create_publisher( "extended_state", state_qos); + //! Publish system and battery status (SYS_STATUS). sys_status_pub = node->create_publisher( "sys_status", state_qos); + //! Publish estimator status flags (ESTIMATOR_STATUS). estimator_status_pub = node->create_publisher( "estimator_status", state_qos); + //! Publish battery state (BATTERY_STATUS). batt_pub = node->create_publisher("battery", sensor_qos); + //! Publish status text received from the FCU (STATUSTEXT). statustext_pub = node->create_publisher( "statustext/recv", sensor_qos); + //! Send status text to the FCU (STATUSTEXT). statustext_sub = node->create_subscription( "statustext/send", sensor_qos, std::bind(&SystemStatusPlugin::statustext_cb, this, _1)); + //! Publish status events received from the FCU (EVENT). statusevent_pub = node->create_publisher( "status_event", sensor_qos); @@ -599,21 +612,25 @@ class SystemStatusPlugin : public plugin::Plugin auto services_qos = rclcpp::ServicesQoS(); #endif + //! Change the flight mode (MAV_CMD_DO_SET_MODE / SET_MODE). mode_srv = node->create_service( "set_mode", std::bind( &SystemStatusPlugin::set_mode_cb, this, _1, _2), services_qos, srv_cg); + //! Set the stream rate of a MAVLink message (REQUEST_DATA_STREAM). stream_rate_srv = node->create_service( "set_stream_rate", std::bind( &SystemStatusPlugin::set_rate_cb, this, _1, _2), services_qos, srv_cg); + //! Set the interval of a MAVLink message (MAV_CMD_SET_MESSAGE_INTERVAL). message_interval_srv = node->create_service( "set_message_interval", std::bind( &SystemStatusPlugin::set_message_interval_cb, this, _1, _2), services_qos, srv_cg); + //! Query information about the FCU and connected vehicles. vehicle_info_get_srv = node->create_service( "vehicle_info_get", std::bind( &SystemStatusPlugin::vehicle_info_get_cb, this, _1, diff --git a/mavros/src/plugins/sys_time.cpp b/mavros/src/plugins/sys_time.cpp index 41a1a9dc6..42bd903ed 100644 --- a/mavros/src/plugins/sys_time.cpp +++ b/mavros/src/plugins/sys_time.cpp @@ -163,11 +163,13 @@ class SystemTimePlugin : public plugin::Plugin { enable_node_watch_parameters(); + //! Source name reported in the time_reference topic. node_declare_and_watch_parameter( "time_ref_source", "fcu", [&](const rclcpp::Parameter & p) { time_ref_source = p.as_string(); }); + //! Timesync mode: MAVLINK, PASSTHROUGH, NONE or ONBOARD. node_declare_and_watch_parameter( "timesync_mode", "MAVLINK", [&](const rclcpp::Parameter & p) { auto ts_mode = utils::timesync_mode_from_str(p.as_string()); @@ -175,6 +177,7 @@ class SystemTimePlugin : public plugin::Plugin RCLCPP_INFO_STREAM(get_logger(), "TM: Timesync mode: " << utils::to_string(ts_mode)); }); + //! Rate (Hz) at which SYSTEM_TIME is sent to the FCU; 0 disables it. node_declare_and_watch_parameter( "system_time_rate", 0.0, [&](const rclcpp::Parameter & p) { auto rate_d = p.as_double(); @@ -194,6 +197,7 @@ class SystemTimePlugin : public plugin::Plugin } }); + //! Rate (Hz) at which TIMESYNC packets are exchanged; 0 disables it. node_declare_and_watch_parameter( "timesync_rate", 0.0, [&](const rclcpp::Parameter & p) { auto rate_d = p.as_double(); @@ -286,9 +290,11 @@ class SystemTimePlugin : public plugin::Plugin auto sensor_qos = rclcpp::SensorDataQoS(); + //! Publish FCU time reference for ntpd (SYSTEM_TIME). time_ref_pub = node->create_publisher( "time_reference", sensor_qos); + //! Publish timesync status (TIMESYNC). timesync_status_pub = node->create_publisher( "timesync_status", sensor_qos); diff --git a/mavros/src/plugins/waypoint.cpp b/mavros/src/plugins/waypoint.cpp index 31f2f303d..c13689e5f 100644 --- a/mavros/src/plugins/waypoint.cpp +++ b/mavros/src/plugins/waypoint.cpp @@ -47,17 +47,19 @@ class WaypointPlugin : public plugin::MissionBase enable_node_watch_parameters(); - // NOTE(vooon): I'm not quite sure that this option would work with mavros router + //! Re-pull the mission automatically after a GCS pushes it. node_declare_and_watch_parameter( "pull_after_gcs", true, [&](const rclcpp::Parameter & p) { do_pull_after_gcs = p.as_bool(); }); + //! Use MISSION_ITEM_INT instead of MISSION_ITEM when supported. node_declare_and_watch_parameter( "use_mission_item_int", true, [&](const rclcpp::Parameter & p) { use_mission_item_int = p.as_bool(); }); + //! Enable partial mission push (0/off, 1/on, 2/auto-detect). node_declare_and_watch_parameter( "enable_partial_push", 2, [&](const rclcpp::Parameter & p) { RCLCPP_DEBUG_STREAM(get_logger(), log_prefix << ": enable_partial_push = " << p); @@ -80,7 +82,9 @@ class WaypointPlugin : public plugin::MissionBase auto wp_qos = mavros::LatchedStateQoS(); + //! The current mission waypoint list. wp_list_pub = node->create_publisher("~/waypoints", wp_qos); + //! Notifies when a mission waypoint is reached. wp_reached_pub = node->create_publisher("~/reached", wp_qos); #ifdef USE_OLD_RMW_QOS @@ -89,21 +93,25 @@ class WaypointPlugin : public plugin::MissionBase auto services_qos = rclcpp::ServicesQoS(); #endif + //! Pull the mission from the FCU (MISSION_REQUEST_LIST). pull_srv = node->create_service( "~/pull", std::bind(&WaypointPlugin::pull_cb, this, _1, _2), services_qos, srv_cg); + //! Push a mission to the FCU (full or partial). push_srv = node->create_service( "~/push", std::bind(&WaypointPlugin::push_cb, this, _1, _2), services_qos, srv_cg); + //! Clear the mission on the FCU (MISSION_CLEAR_ALL). clear_srv = node->create_service( "~/clear", std::bind(&WaypointPlugin::clear_cb, this, _1, _2), services_qos, srv_cg); + //! Set the active/current mission waypoint. set_cur_srv = node->create_service( "~/set_current", std::bind( &WaypointPlugin::set_cur_cb, this, _1, _2), diff --git a/mavros/src/plugins/wind_estimation.cpp b/mavros/src/plugins/wind_estimation.cpp index 659d79425..fde56d290 100644 --- a/mavros/src/plugins/wind_estimation.cpp +++ b/mavros/src/plugins/wind_estimation.cpp @@ -43,6 +43,7 @@ class WindEstimationPlugin : public plugin::Plugin { auto sensor_qos = rclcpp::SensorDataQoS(); + //! Publish wind estimation (WIND / WIND_COV). wind_pub = node->create_publisher( "wind_estimation", sensor_qos); } diff --git a/mavros_extras/src/plugins/3dr_radio.cpp b/mavros_extras/src/plugins/3dr_radio.cpp index 058a377e6..59a73a47a 100644 --- a/mavros_extras/src/plugins/3dr_radio.cpp +++ b/mavros_extras/src/plugins/3dr_radio.cpp @@ -60,6 +60,7 @@ class TDRRadioPlugin : public plugin::Plugin { enable_node_watch_parameters(); + //! Low RSSI threshold for diagnostics [dB]. node_declare_and_watch_parameter( "low_rssi", 40, [&](const rclcpp::Parameter & p) { low_rssi = p.as_int(); @@ -67,6 +68,7 @@ class TDRRadioPlugin : public plugin::Plugin auto sensor_qos = rclcpp::SensorDataQoS(); + //! Publish radio status from MAVLink RADIO_STATUS/RADIO. status_pub = node->create_publisher("radio_status", sensor_qos); enable_connection_cb(); diff --git a/mavros_extras/src/plugins/adsb.cpp b/mavros_extras/src/plugins/adsb.cpp index 7a0a94878..ce9b0fdbc 100644 --- a/mavros_extras/src/plugins/adsb.cpp +++ b/mavros_extras/src/plugins/adsb.cpp @@ -44,7 +44,9 @@ class ADSBPlugin : public plugin::Plugin explicit ADSBPlugin(plugin::UASPtr uas_) : Plugin(uas_, "adsb") { + //! Publish received ADSB_VEHICLE messages (MAVLink traffic management). adsb_pub = node->create_publisher("~/vehicle", 10); + //! Subscribe to ADSBVehicle messages to send as ADSB_VEHICLE to the FCU. adsb_sub = node->create_subscription( "~/send", 10, diff --git a/mavros_extras/src/plugins/cam_imu_sync.cpp b/mavros_extras/src/plugins/cam_imu_sync.cpp index e9e001ec2..d321d898f 100644 --- a/mavros_extras/src/plugins/cam_imu_sync.cpp +++ b/mavros_extras/src/plugins/cam_imu_sync.cpp @@ -39,6 +39,7 @@ class CamIMUSyncPlugin : public plugin::Plugin explicit CamIMUSyncPlugin(plugin::UASPtr uas_) : Plugin(uas_, "cam_imu_sync") { + //! Publish camera IMU trigger timestamp from MAVLink CAMERA_TRIGGER. cam_imu_pub = node->create_publisher("~/cam_imu_stamp", 10); } diff --git a/mavros_extras/src/plugins/camera.cpp b/mavros_extras/src/plugins/camera.cpp index 21c935551..4c83164aa 100644 --- a/mavros_extras/src/plugins/camera.cpp +++ b/mavros_extras/src/plugins/camera.cpp @@ -45,6 +45,7 @@ class CameraPlugin : public plugin::Plugin explicit CameraPlugin(plugin::UASPtr uas_) : Plugin(uas_, "camera") { + //! Publish camera image capture info from MAVLink CAMERA_IMAGE_CAPTURED. camera_image_captured_pub = node->create_publisher( "~/image_captured", 10); } diff --git a/mavros_extras/src/plugins/cellular_status.cpp b/mavros_extras/src/plugins/cellular_status.cpp index 82fef5605..c6a074721 100644 --- a/mavros_extras/src/plugins/cellular_status.cpp +++ b/mavros_extras/src/plugins/cellular_status.cpp @@ -39,6 +39,7 @@ class CellularStatusPlugin : public plugin::Plugin explicit CellularStatusPlugin(plugin::UASPtr uas_) : Plugin(uas_, "cellular_status") { + //! Subscribe to CellularStatus messages to send as CELLULAR_STATUS to the FCU. sub_status = node->create_subscription( "~/status", 1, std::bind( &CellularStatusPlugin::status_cb, this, diff --git a/mavros_extras/src/plugins/companion_process_status.cpp b/mavros_extras/src/plugins/companion_process_status.cpp index acd3adf60..0083cd3d7 100644 --- a/mavros_extras/src/plugins/companion_process_status.cpp +++ b/mavros_extras/src/plugins/companion_process_status.cpp @@ -47,6 +47,7 @@ class CompanionProcessStatusPlugin : public plugin::Plugin explicit CompanionProcessStatusPlugin(plugin::UASPtr uas_) : Plugin(uas_, "companion_process") { + //! Subscribe to CompanionProcessStatus to send as HEARTBEAT to the FCU. status_sub = node->create_subscription( "~/status", 10, std::bind( &CompanionProcessStatusPlugin::status_cb, this, diff --git a/mavros_extras/src/plugins/debug_value.cpp b/mavros_extras/src/plugins/debug_value.cpp index a30bdeabf..c94f98980 100644 --- a/mavros_extras/src/plugins/debug_value.cpp +++ b/mavros_extras/src/plugins/debug_value.cpp @@ -41,16 +41,22 @@ class DebugValuePlugin : public plugin::Plugin : Plugin(uas_, "debug_value") { // subscribers + //! Subscribe to DebugValue to send MAVLink debug messages to the FCU. debug_sub = node->create_subscription( "~/send", 10, std::bind(&DebugValuePlugin::debug_cb, this, _1)); // publishers + //! Publish DEBUG messages from MAVLink DEBUG. debug_pub = node->create_publisher("~/debug", 10); + //! Publish DEBUG_VECT messages from MAVLink DEBUG_VECT. debug_vector_pub = node->create_publisher("~/debug_vector", 10); + //! Publish DEBUG_FLOAT_ARRAY messages from MAVLink DEBUG_FLOAT_ARRAY. debug_float_array_pub = node->create_publisher("~/debug_float_array", 10); + //! Publish NAMED_VALUE_FLOAT messages from MAVLink NAMED_VALUE_FLOAT. named_value_float_pub = node->create_publisher("~/named_value_float", 10); + //! Publish NAMED_VALUE_INT messages from MAVLink NAMED_VALUE_INT. named_value_int_pub = node->create_publisher("~/named_value_int", 10); } diff --git a/mavros_extras/src/plugins/distance_sensor.cpp b/mavros_extras/src/plugins/distance_sensor.cpp index 2286c76a4..7defc0905 100644 --- a/mavros_extras/src/plugins/distance_sensor.cpp +++ b/mavros_extras/src/plugins/distance_sensor.cpp @@ -144,10 +144,12 @@ class DistanceSensorPlugin : public plugin::Plugin { enable_node_watch_parameters(); + //! Base frame id used for distance sensor transforms. node_declare_and_watch_parameter( "base_frame_id", "base_link", [&](const rclcpp::Parameter & p) { base_frame_id = p.as_string(); }); + //! Sensor mapping configuration (YAML: id, topic, orientation, etc). node_declare_and_watch_parameter( "config", "", [&](const rclcpp::Parameter & p) { std::unique_lock lock(mutex); @@ -447,8 +449,10 @@ DistanceSensorItem::DistanceSensorItem( // create topic handles auto sensor_qos = rclcpp::SensorDataQoS(); if (!is_subscriber) { + //! Publish sensor_msgs/Range from MAVLink DISTANCE_SENSOR. pub = owner->node->create_publisher(topic_name, sensor_qos); } else { + //! Subscribe sensor_msgs/Range to send as DISTANCE_SENSOR to the FCU. sub = owner->node->create_subscription( topic_name, sensor_qos, diff --git a/mavros_extras/src/plugins/esc_status.cpp b/mavros_extras/src/plugins/esc_status.cpp index c23516c59..22173ce2b 100644 --- a/mavros_extras/src/plugins/esc_status.cpp +++ b/mavros_extras/src/plugins/esc_status.cpp @@ -43,7 +43,9 @@ class ESCStatusPlugin : public plugin::Plugin _max_esc_info_index(0), _max_esc_status_index(0) { + //! Publish ESC information from MAVLink ESC_INFO. esc_info_pub = node->create_publisher("~/info", 10); + //! Publish ESC status from MAVLink ESC_STATUS. esc_status_pub = node->create_publisher("~/status", 10); enable_connection_cb(); diff --git a/mavros_extras/src/plugins/esc_telemetry.cpp b/mavros_extras/src/plugins/esc_telemetry.cpp index 05dd8926e..d32ccbb03 100644 --- a/mavros_extras/src/plugins/esc_telemetry.cpp +++ b/mavros_extras/src/plugins/esc_telemetry.cpp @@ -39,6 +39,7 @@ class ESCTelemetryPlugin : public plugin::Plugin explicit ESCTelemetryPlugin(plugin::UASPtr uas_) : Plugin(uas_, "esc_telemetry") { + //! Publish ESC telemetry from MAVLink ESC_TELEMETRY_* messages. esc_telemetry_pub = node->create_publisher("~/telemetry", 10); enable_connection_cb(); diff --git a/mavros_extras/src/plugins/fake_gps.cpp b/mavros_extras/src/plugins/fake_gps.cpp index 328fe1816..cfcc739f3 100644 --- a/mavros_extras/src/plugins/fake_gps.cpp +++ b/mavros_extras/src/plugins/fake_gps.cpp @@ -90,54 +90,66 @@ class FakeGPSPlugin : public plugin::Plugin, last_pos_time = rclcpp::Time(0.0); // general params + //! GPS receiver id in GPS_INPUT messages. node_declare_and_watch_parameter( "gps_id", 0, [&](const rclcpp::Parameter & p) { gps_id = p.as_int(); }); + //! GPS fix type reported in fake GPS messages. node_declare_and_watch_parameter( "fix_type", utils::enum_value(GPS_FIX_TYPE::NO_GPS), [&](const rclcpp::Parameter & p) { fix_type = static_cast( p.as_int()); }); + //! Rate at which fake GPS messages are sent. node_declare_and_watch_parameter( "gps_rate", 5.0, [&](const rclcpp::Parameter & p) { rclcpp::Rate rate(p.as_double()); gps_rate_period = rate.period(); }); + //! Horizontal position error [m]. node_declare_and_watch_parameter( "eph", 2.0, [&](const rclcpp::Parameter & p) { eph = p.as_double(); }); + //! Vertical position error [m]. node_declare_and_watch_parameter( "epv", 2.0, [&](const rclcpp::Parameter & p) { epv = p.as_double(); }); + //! Horizontal position accuracy [m]. node_declare_and_watch_parameter( "horiz_accuracy", 0.0, [&](const rclcpp::Parameter & p) { horiz_accuracy = p.as_double(); }); + //! Vertical position accuracy [m]. node_declare_and_watch_parameter( "vert_accuracy", 0.0, [&](const rclcpp::Parameter & p) { vert_accuracy = p.as_double(); }); + //! Speed accuracy [m/s]. node_declare_and_watch_parameter( "speed_accuracy", 0.0, [&](const rclcpp::Parameter & p) { speed_accuracy = p.as_double(); }); + //! Number of visible satellites reported in fake GPS. node_declare_and_watch_parameter( "satellites_visible", 5, [&](const rclcpp::Parameter & p) { satellites_visible = p.as_int(); }); // default origin/starting point: Zürich geodetic coordinates + //! Geodetic origin latitude [deg]. node_declare_and_watch_parameter( "geo_origin.lat", 47.3667, [&](const rclcpp::Parameter & p) { map_origin.x() = p.as_double(); }); + //! Geodetic origin longitude [deg]. node_declare_and_watch_parameter( "geo_origin.lon", 8.5500, [&](const rclcpp::Parameter & p) { map_origin.y() = p.as_double(); }); + //! Geodetic origin altitude [m]. node_declare_and_watch_parameter( "geo_origin.alt", 408.0, [&](const rclcpp::Parameter & p) { map_origin.z() = p.as_double(); @@ -156,27 +168,32 @@ class FakeGPSPlugin : public plugin::Plugin, } // source set params + //! Listen to MoCap source. node_declare_and_watch_parameter( // listen to MoCap source "use_mocap", true, [&](const rclcpp::Parameter & p) { use_mocap = p.as_bool(); }); + //! Use TransformStamped if true, PoseStamped if false. node_declare_and_watch_parameter( // listen to MoCap source (TransformStamped if true; PoseStamped if false) "mocap_transform", true, [&](const rclcpp::Parameter & p) { mocap_transform = p.as_bool(); }); + //! ~mocap/pose uses PoseWithCovarianceStamped Message. node_declare_and_watch_parameter( // ~mocap/pose uses PoseWithCovarianceStamped Message "mocap_withcovariance", false, [&](const rclcpp::Parameter & p) { mocap_withcovariance = p.as_bool(); }); + //! Listen to Vision source. node_declare_and_watch_parameter( // listen to Vision source "use_vision", false, [&](const rclcpp::Parameter & p) { use_vision = p.as_bool(); }); + //! Send HIL_GPS if true, GPS_INPUT if false. node_declare_and_watch_parameter( "use_hil_gps", false, [&](const rclcpp::Parameter & p) { // send HIL_GPS MAVLink messages if true, @@ -185,18 +202,22 @@ class FakeGPSPlugin : public plugin::Plugin, }); // tf params + //! TF frame id for pose source. node_declare_and_watch_parameter( "tf.frame_id", "map", [&](const rclcpp::Parameter & p) { tf_frame_id = p.as_string(); }); + //! TF child frame id for pose source. node_declare_and_watch_parameter( "tf.child_frame_id", "base_link", [&](const rclcpp::Parameter & p) { tf_child_frame_id = p.as_string(); }); + //! TF rate limit [Hz]. node_declare_and_watch_parameter( "tf.rate_limit", 10.0, [&](const rclcpp::Parameter & p) { tf_rate = p.as_double(); }); + //! Listen to TF pose source. node_declare_and_watch_parameter( "tf.listen", false, [&](const rclcpp::Parameter & p) { tf_listen = p.as_bool(); @@ -205,21 +226,25 @@ class FakeGPSPlugin : public plugin::Plugin, if (use_mocap) { if (mocap_transform) { // MoCap data in TransformStamped msg + //! MoCap pose source as TransformStamped. mocap_tf_sub = node->create_subscription( "~/mocap/tf", 10, std::bind(&FakeGPSPlugin::mocap_tf_cb, this, _1)); } else if (mocap_withcovariance) { // MoCap data in PoseWithCovarianceStamped msg + //! MoCap pose source as PoseWithCovarianceStamped. mocap_pose_cov_sub = node->create_subscription( "~/mocap/pose_cov", 10, std::bind(&FakeGPSPlugin::mocap_pose_cov_cb, this, _1)); } else { // MoCap data in PoseStamped msg + //! MoCap pose source as PoseStamped. mocap_pose_sub = node->create_subscription( "~/mocap/pose", 10, std::bind(&FakeGPSPlugin::mocap_pose_cb, this, _1)); } } else if (use_vision) { // Vision data in PoseStamped msg + //! Vision pose source as PoseStamped. vision_pose_sub = node->create_subscription( "~/vision", 10, diff --git a/mavros_extras/src/plugins/gimbal_control.cpp b/mavros_extras/src/plugins/gimbal_control.cpp index 11de84fa5..bd4f9ff39 100644 --- a/mavros_extras/src/plugins/gimbal_control.cpp +++ b/mavros_extras/src/plugins/gimbal_control.cpp @@ -82,6 +82,7 @@ class GimbalControlPlugin : public plugin::Plugin // Parameter for msg header frame enable_node_watch_parameters(); + //! Frame id used for topic headers. node_declare_and_watch_parameter( "frame_id", "base_link_frd", [&](const rclcpp::Parameter & p) { frame_id = p.as_string(); @@ -89,10 +90,12 @@ class GimbalControlPlugin : public plugin::Plugin // Important tf subsection // Report the transform from base_link to gimbal here. + //! Enable publishing gimbal pose to TF. node_declare_and_watch_parameter( "tf.send", false, [&](const rclcpp::Parameter & p) { tf_send = p.as_bool(); }); + //! TF frame id for gimbal pose. node_declare_and_watch_parameter( "tf.frame_id", "base_link_frd", [&](const rclcpp::Parameter & p) { tf_frame_id = p.as_string(); @@ -100,6 +103,7 @@ class GimbalControlPlugin : public plugin::Plugin // Subscribers // --Not successfully validated-- + //! Set gimbal device attitude (GIMBAL_DEVICE_SET_ATTITUDE). set_device_attitude_sub = node->create_subscription( "~/device/set_attitude", 10, std::bind( @@ -107,6 +111,7 @@ class GimbalControlPlugin : public plugin::Plugin _1)); // --Not successfully validated-- + //! Set gimbal manager attitude (GIMBAL_MANAGER_SET_ATTITUDE). set_manager_attitude_sub = node->create_subscription( "~/manager/set_attitude", 10, std::bind( @@ -114,6 +119,7 @@ class GimbalControlPlugin : public plugin::Plugin _1)); // --Not successfully validated-- + //! Set gimbal manager pitch/yaw (GIMBAL_MANAGER_SET_PITCHYAW). set_manager_pitchyaw_sub = node->create_subscription( "~/manager/set_pitchyaw", 10, std::bind( @@ -122,6 +128,7 @@ class GimbalControlPlugin : public plugin::Plugin // --Not successfully validated-- // also note that the message is the same as pitchyaw and will likely change + //! Set gimbal manager manual control (GIMBAL_MANAGER_SET_PITCHYAW). set_manager_manual_control_sub = node->create_subscription( "~/manager/set_manual_control", 10, std::bind( @@ -130,22 +137,26 @@ class GimbalControlPlugin : public plugin::Plugin // Publishers + //! Publish gimbal device attitude status (GIMBAL_DEVICE_ATTITUDE_STATUS). gimbal_attitude_status_pub = node->create_publisher( "~/device/attitude_status", 10); + //! Publish gimbal manager status (GIMBAL_MANAGER_STATUS). gimbal_manager_status_pub = node->create_publisher( "~/manager/status", 10); + //! Publish gimbal manager information (GIMBAL_MANAGER_INFORMATION). gimbal_manager_info_pub = node->create_publisher( "~/manager/info", 10); // --Not successfully validated-- + //! Publish gimbal device information (GIMBAL_DEVICE_INFORMATION). gimbal_device_info_pub = node->create_publisher( "~/device/info", @@ -154,30 +165,35 @@ class GimbalControlPlugin : public plugin::Plugin // Services // --Not successfully validated-- + //! Request gimbal device information (GIMBAL_DEVICE_INFORMATION). gimbal_device_info_srv = node->create_service( "~/device/get_info", std::bind( &GimbalControlPlugin::device_get_info_cb, this, _1, _2)); + //! Request gimbal manager information (GIMBAL_MANAGER_INFORMATION). gimbal_manager_info_srv = node->create_service( "~/manager/get_info", std::bind( &GimbalControlPlugin::manager_get_info_cb, this, _1, _2)); + //! Configure gimbal manager (MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE). gimbal_manager_configure_srv = node->create_service( "~/manager/configure", std::bind( &GimbalControlPlugin::manager_configure_cb, this, _1, _2)); + //! Set gimbal manager pitch/yaw (MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW). gimbal_manager_pitchyaw_srv = node->create_service( "~/manager/pitchyaw", std::bind( &GimbalControlPlugin::manager_pitchyaw_cb, this, _1, _2)); + //! Set gimbal manager region of interest (MAV_CMD_DO_SET_ROI_*). gimbal_manager_set_roi_srv = node->create_service( "~/manager/set_roi", std::bind( @@ -185,6 +201,7 @@ class GimbalControlPlugin : public plugin::Plugin this, _1, _2)); // --Not successfully validated-- + //! Control gimbal camera tracking (MAV_CMD_CAMERA_TRACK_*). gimbal_manager_camera_track = node->create_service( "~/manager/camera_track", std::bind( @@ -256,6 +273,7 @@ class GimbalControlPlugin : public plugin::Plugin auto services_qos = rclcpp::ServicesQoS(); #endif + //! Client to send MAVLink commands (mavros/cmd/command). cmd_cli = node->create_client( "cmd/command", services_qos, cb_group); diff --git a/mavros_extras/src/plugins/gps_input.cpp b/mavros_extras/src/plugins/gps_input.cpp index cadf8e78a..54a2a7eb4 100644 --- a/mavros_extras/src/plugins/gps_input.cpp +++ b/mavros_extras/src/plugins/gps_input.cpp @@ -43,6 +43,7 @@ class GpsInputPlugin : public plugin::Plugin { enable_node_watch_parameters(); + //! Rate at which GPS_INPUT messages are sent [Hz]. node_declare_and_watch_parameter( "gps_rate", 5.0, [&](const rclcpp::Parameter & p) { rclcpp::Rate rate(p.as_double()); @@ -50,6 +51,7 @@ class GpsInputPlugin : public plugin::Plugin rate_period = rate.period(); }); + //! Subscribe to GPSINPUT to send as GPS_INPUT to the FCU. gps_input_sub = node->create_subscription( "~/gps_input", 1, std::bind( &GpsInputPlugin::send_cb, this, diff --git a/mavros_extras/src/plugins/gps_rtk.cpp b/mavros_extras/src/plugins/gps_rtk.cpp index 134433667..a4eff4863 100644 --- a/mavros_extras/src/plugins/gps_rtk.cpp +++ b/mavros_extras/src/plugins/gps_rtk.cpp @@ -43,12 +43,14 @@ class GpsRtkPlugin : public plugin::Plugin explicit GpsRtkPlugin(plugin::UASPtr uas_) : Plugin(uas_, "gps_rtk") { + //! Subscribe to RTCM to send as GPS_RTCM_DATA to the FCU. gps_rtk_sub = node->create_subscription( "~/send_rtcm", 10, std::bind(&GpsRtkPlugin::rtcm_cb, this, _1)); // TODO(vooon): set QoS for latched topic + //! Publish RTK baseline data from MAVLink GPS_RTK. rtk_baseline_pub = node->create_publisher("~/rtk_baseline", 1); } diff --git a/mavros_extras/src/plugins/gps_status.cpp b/mavros_extras/src/plugins/gps_status.cpp index a9c413ad0..c0ebdab4e 100644 --- a/mavros_extras/src/plugins/gps_status.cpp +++ b/mavros_extras/src/plugins/gps_status.cpp @@ -43,9 +43,13 @@ class GpsStatusPlugin : public plugin::Plugin explicit GpsStatusPlugin(plugin::UASPtr uas_) : Plugin(uas_, "gpsstatus") { + //! Publish GPS raw data from MAVLink GPS_RAW_INT. gps1_raw_pub = node->create_publisher("~/gps1/raw", 10); + //! Publish GPS raw data from MAVLink GPS2_RAW. gps2_raw_pub = node->create_publisher("~/gps2/raw", 10); + //! Publish RTK baseline from MAVLink GPS_RTK. gps1_rtk_pub = node->create_publisher("~/gps1/rtk", 10); + //! Publish RTK baseline from MAVLink GPS2_RTK. gps2_rtk_pub = node->create_publisher("~/gps2/rtk", 10); } diff --git a/mavros_extras/src/plugins/guided_target.cpp b/mavros_extras/src/plugins/guided_target.cpp index 0259526a9..808935a62 100644 --- a/mavros_extras/src/plugins/guided_target.cpp +++ b/mavros_extras/src/plugins/guided_target.cpp @@ -56,17 +56,20 @@ class GuidedTargetPlugin : public plugin::Plugin enable_node_watch_parameters(); // frame params: + //! Frame id used for the published target. node_declare_and_watch_parameter( "frame_id", "map", [&](const rclcpp::Parameter & p) { frame_id = p.as_string(); }); // Publish targets received from FCU + //! Publish guided target from MAVLink POSITION_TARGET_GLOBAL_INT. setpointg_pub = node->create_publisher( "/move_base_simple/goal", 10); // Subscriber for global origin (aka map origin). + //! Subscribe to global position origin (map origin). gp_origin_sub = node->create_subscription( "global_position/gp_origin", mavros::LatchedStateQoS(), std::bind(&GuidedTargetPlugin::gp_origin_cb, this, _1)); diff --git a/mavros_extras/src/plugins/hil.cpp b/mavros_extras/src/plugins/hil.cpp index 271a4450f..174420dba 100644 --- a/mavros_extras/src/plugins/hil.cpp +++ b/mavros_extras/src/plugins/hil.cpp @@ -56,26 +56,33 @@ class HilPlugin : public plugin::Plugin explicit HilPlugin(plugin::UASPtr uas_) : Plugin(uas_, "hil") { + //! Subscribe to receive HIL_STATE_QUATERNION from simulation. hil_state_quaternion_sub = node->create_subscription( "~/state", 10, std::bind(&HilPlugin::state_quat_cb, this, _1)); + //! Subscribe to receive HIL_GPS from simulation. hil_gps_sub = node->create_subscription( "~/gps", 10, std::bind(&HilPlugin::gps_cb, this, _1)); + //! Subscribe to receive HIL_SENSOR from simulation. hil_sensor_sub = node->create_subscription( "~/imu_ned", 10, std::bind( &HilPlugin::sensor_cb, this, _1)); + //! Subscribe to receive HIL_OPTICAL_FLOW from simulation. hil_flow_sub = node->create_subscription( "~/optical_flow", 10, std::bind( &HilPlugin::optical_flow_cb, this, _1)); + //! Subscribe to receive HIL_RC_INPUTS_RAW from simulation. hil_rcin_sub = node->create_subscription( "~/rc_inputs", 10, std::bind(&HilPlugin::rcin_raw_cb, this, _1)); + //! Publish HIL_CONTROLS from the FCU. hil_controls_pub = node->create_publisher("~/controls", 10); + //! Publish HIL_ACTUATOR_CONTROLS from the FCU. hil_actuator_controls_pub = node->create_publisher( "~/actuator_controls", 10); } diff --git a/mavros_extras/src/plugins/landing_target.cpp b/mavros_extras/src/plugins/landing_target.cpp index d196666f5..9bd48a894 100644 --- a/mavros_extras/src/plugins/landing_target.cpp +++ b/mavros_extras/src/plugins/landing_target.cpp @@ -69,11 +69,13 @@ class LandingTargetPlugin : public plugin::Plugin, enable_node_watch_parameters(); // general params + //! Frame id for published landing target messages. node_declare_and_watch_parameter( "frame_id", "landing_target_1", [&](const rclcpp::Parameter & p) { frame_id = p.as_string(); }); + //! Enable listening to raw LandingTarget messages. node_declare_and_watch_parameter( "listen_lt", false, [&](const rclcpp::Parameter & p) { auto listen_lt = p.as_bool(); @@ -81,6 +83,7 @@ class LandingTargetPlugin : public plugin::Plugin, land_target_sub.reset(); if (listen_lt) { + //! Subscribe to raw LandingTarget messages to send to the FCU. land_target_sub = node->create_subscription( "~/raw", 10, std::bind( &LandingTargetPlugin::landtarget_cb, this, @@ -88,6 +91,7 @@ class LandingTargetPlugin : public plugin::Plugin, } }); + //! MAVLink MAV_FRAME used when sending LANDING_TARGET. node_declare_and_watch_parameter( "mav_frame", "LOCAL_NED", [&](const rclcpp::Parameter & p) { mav_frame = p.as_string(); @@ -95,6 +99,7 @@ class LandingTargetPlugin : public plugin::Plugin, // MAV_FRAME index based on given frame name (If unknown, defaults to GENERIC) }); + //! MAVLink LANDING_TARGET_TYPE used when sending LANDING_TARGET. node_declare_and_watch_parameter( "land_target_type", "VISION_FIDUCIAL", [&](const rclcpp::Parameter & p) { land_target_type = p.as_string(); @@ -103,45 +108,53 @@ class LandingTargetPlugin : public plugin::Plugin, }); // target size + //! Landing target size on X axis [m]. node_declare_and_watch_parameter( "target_size.x", 1.0, [&](const rclcpp::Parameter & p) { target_size_x = p.as_double(); // [meters] }); + //! Landing target size on Y axis [m]. node_declare_and_watch_parameter( "target_size.y", 1.0, [&](const rclcpp::Parameter & p) { target_size_y = p.as_double(); }); // image size + //! Image width in pixels. node_declare_and_watch_parameter( "image.width", 640, [&](const rclcpp::Parameter & p) { image_width = p.as_int(); // [pixels] }); + //! Image height in pixels. node_declare_and_watch_parameter( "image.height", 480, [&](const rclcpp::Parameter & p) { image_height = p.as_int(); }); // camera field-of-view -> should be precised using the calibrated camera intrinsics + //! Camera field-of-view on X axis [rad]. node_declare_and_watch_parameter( "camera.fov_x", 2.0071286398, [&](const rclcpp::Parameter & p) { fov_x = p.as_double(); // default: 115 degrees in [radians] }); + //! Camera field-of-view on Y axis [rad]. node_declare_and_watch_parameter( "camera.fov_y", 2.0071286398, [&](const rclcpp::Parameter & p) { fov_y = p.as_double(); // default: 115 degrees in [radians] }); // camera focal length + //! Camera focal length [mm]. node_declare_and_watch_parameter( "camera.focal_length", 2.8, [&](const rclcpp::Parameter & p) { focal_length = p.as_double(); // ex: OpenMV Cam M7: 2.8 [mm] }); // tf subsection + //! Landing target transform rate limit [Hz]. node_declare_and_watch_parameter( "tf.rate_limit", 50.0, [&](const rclcpp::Parameter & p) { // no dynamic update here yet. need to modify the thread in @@ -149,21 +162,25 @@ class LandingTargetPlugin : public plugin::Plugin, tf_rate = p.as_double(); }); + //! Enable sending landing target transform to TF. node_declare_and_watch_parameter( "tf.send", true, [&](const rclcpp::Parameter & p) { tf_send = p.as_bool(); }); + //! TF frame id for landing target. node_declare_and_watch_parameter( "tf.frame_id", frame_id, [&](const rclcpp::Parameter & p) { tf_frame_id = p.as_string(); }); + //! TF child frame id for landing target. node_declare_and_watch_parameter( "tf.child_frame_id", "camera_center", [&](const rclcpp::Parameter & p) { tf_child_frame_id = p.as_string(); }); + //! Listen to landing target pose from TF. node_declare_and_watch_parameter( "tf.listen", false, [&](const rclcpp::Parameter & p) { tf_listen = p.as_bool(); @@ -181,12 +198,15 @@ class LandingTargetPlugin : public plugin::Plugin, auto sensor_qos = rclcpp::SensorDataQoS(); + //! Publish landing target pose from MAVLink LANDING_TARGET. land_target_pub = node->create_publisher("~/pose_in", sensor_qos); + //! Publish landing target size as Vector3Stamped. lt_marker_pub = node->create_publisher( "~/lt_marker", sensor_qos); + //! Subscribe to landing target pose to send as LANDING_TARGET to the FCU. pose_sub = node->create_subscription( "~/pose", 10, std::bind( &LandingTargetPlugin::pose_cb, this, _1)); diff --git a/mavros_extras/src/plugins/log_transfer.cpp b/mavros_extras/src/plugins/log_transfer.cpp index 89c143ba4..0aecd2ce3 100644 --- a/mavros_extras/src/plugins/log_transfer.cpp +++ b/mavros_extras/src/plugins/log_transfer.cpp @@ -45,15 +45,21 @@ class LogTransferPlugin : public plugin::Plugin explicit LogTransferPlugin(plugin::UASPtr uas_) : plugin::Plugin(uas_, "log_transfer") { + //! Publish log entry from MAVLink LOG_ENTRY. log_entry_pub = node->create_publisher("~/raw/log_entry", 1000); + //! Publish log data from MAVLink LOG_DATA. log_data_pub = node->create_publisher("~/raw/log_data", 1000); + //! Request log list (MAVLink LOG_REQUEST_LIST). log_request_list_srv = node->create_service( "~/raw/log_request_list", std::bind(&LogTransferPlugin::log_request_list_cb, this, _1, _2)); + //! Request log data (MAVLink LOG_REQUEST_DATA). log_request_data_srv = node->create_service( "~/raw/log_request_data", std::bind(&LogTransferPlugin::log_request_data_cb, this, _1, _2)); + //! End log download (MAVLink LOG_REQUEST_END). log_request_end_srv = node->create_service( "~/raw/log_request_end", std::bind(&LogTransferPlugin::log_request_end_cb, this, _1, _2)); + //! Erase onboard log (MAVLink LOG_ERASE). log_request_erase_srv = node->create_service( "~/raw/log_request_erase", std::bind( &LogTransferPlugin::log_request_erase_cb, this, _1, diff --git a/mavros_extras/src/plugins/mag_calibration_status.cpp b/mavros_extras/src/plugins/mag_calibration_status.cpp index ebedd725a..896d66eb2 100644 --- a/mavros_extras/src/plugins/mag_calibration_status.cpp +++ b/mavros_extras/src/plugins/mag_calibration_status.cpp @@ -44,7 +44,9 @@ class MagCalStatusPlugin : public plugin::Plugin : Plugin(uas_, "mag_calibration") { // TODO(vooon): use QoS for "latched" topics + //! Publish magnetometer calibration progress from MAVLink MAG_CAL_PROGRESS. mcs_pub = node->create_publisher("~/status", 2); + //! Publish magnetometer calibration report from MAVLink MAG_CAL_REPORT. mcr_pub = node->create_publisher("~/report", 2); } diff --git a/mavros_extras/src/plugins/mocap_pose_estimate.cpp b/mavros_extras/src/plugins/mocap_pose_estimate.cpp index 4903e79a7..4f50d24e0 100644 --- a/mavros_extras/src/plugins/mocap_pose_estimate.cpp +++ b/mavros_extras/src/plugins/mocap_pose_estimate.cpp @@ -43,11 +43,13 @@ class MocapPoseEstimatePlugin : public plugin::Plugin : Plugin(uas_, "mocap") { /** @note For VICON ROS package, subscribe to TransformStamped topic */ + //! Subscribe to motion capture pose as TransformStamped (VICON). mocap_tf_sub = node->create_subscription( "~/tf", 1, std::bind( &MocapPoseEstimatePlugin::mocap_tf_cb, this, _1)); /** @note For Optitrack ROS package, subscribe to PoseStamped topic */ + //! Subscribe to motion capture pose as PoseStamped (Optitrack). mocap_pose_sub = node->create_subscription( "~/pose", 1, std::bind( &MocapPoseEstimatePlugin::mocap_pose_cb, this, diff --git a/mavros_extras/src/plugins/mount_control.cpp b/mavros_extras/src/plugins/mount_control.cpp index 9febc54c7..14096154d 100644 --- a/mavros_extras/src/plugins/mount_control.cpp +++ b/mavros_extras/src/plugins/mount_control.cpp @@ -195,29 +195,35 @@ class MountControlPlugin : public plugin::Plugin { enable_node_watch_parameters(); + //! Negate the measured roll angle. node_declare_and_watch_parameter( "negate_measured_roll", false, [&](const rclcpp::Parameter & p) { negate_measured_roll = p.as_bool(); }); + //! Negate the measured pitch angle. node_declare_and_watch_parameter( "negate_measured_pitch", false, [&](const rclcpp::Parameter & p) { negate_measured_pitch = p.as_bool(); }); + //! Negate the measured yaw angle. node_declare_and_watch_parameter( "negate_measured_yaw", false, [&](const rclcpp::Parameter & p) { negate_measured_yaw = p.as_bool(); }); + //! Mount diagnostic error debounce time [s]. node_declare_and_watch_parameter( "debounce_s", 4.0, [&](const rclcpp::Parameter & p) { auto debounce_s = p.as_double(); mount_diag.set_debounce_s(debounce_s); }); + //! Mount diagnostic angle error threshold [deg]. node_declare_and_watch_parameter( "err_threshold_deg", 10.0, [&](const rclcpp::Parameter & p) { auto err_threshold_deg = p.as_double(); mount_diag.set_err_threshold_deg(err_threshold_deg); }); + //! Disable mount diagnostic updater. node_declare_and_watch_parameter( "disable_diag", false, [&](const rclcpp::Parameter & p) { auto disable_diag = p.as_bool(); @@ -229,16 +235,20 @@ class MountControlPlugin : public plugin::Plugin } }); + //! Subscribe to MountControl to send as MAV_CMD_DO_MOUNT_CONTROL to the FCU. command_sub = node->create_subscription( "~/command", 10, std::bind( &MountControlPlugin::command_cb, this, _1)); + //! Publish mount orientation as quaternion from MAVLink MOUNT_ORIENTATION. mount_orientation_pub = node->create_publisher( "~/orientation", 10); + //! Publish mount status from MAVLink MOUNT_STATUS. mount_status_pub = node->create_publisher("~/status", 10); + //! Configure the mount (MAV_CMD_DO_MOUNT_CONFIGURE). configure_srv = node->create_service( "~/configure", std::bind( &MountControlPlugin::mount_configure_cb, diff --git a/mavros_extras/src/plugins/obstacle_distance.cpp b/mavros_extras/src/plugins/obstacle_distance.cpp index b73b389c4..bb52137fe 100644 --- a/mavros_extras/src/plugins/obstacle_distance.cpp +++ b/mavros_extras/src/plugins/obstacle_distance.cpp @@ -50,6 +50,7 @@ class ObstacleDistancePlugin : public plugin::Plugin { enable_node_watch_parameters(); + //! MAVLink MAV_FRAME used when sending OBSTACLE_DISTANCE. node_declare_and_watch_parameter( "mav_frame", "GLOBAL", [&](const rclcpp::Parameter & p) { auto mav_frame = p.as_string(); @@ -57,6 +58,7 @@ class ObstacleDistancePlugin : public plugin::Plugin // MAV_FRAME index based on given frame name (If unknown, defaults to GENERIC) }); + //! Subscribe to LaserScan to send as OBSTACLE_DISTANCE to the FCU. obstacle_sub = node->create_subscription( "~/send", 10, diff --git a/mavros_extras/src/plugins/obstacle_distance_3d.cpp b/mavros_extras/src/plugins/obstacle_distance_3d.cpp index 79c6ef81d..cdfb233ea 100644 --- a/mavros_extras/src/plugins/obstacle_distance_3d.cpp +++ b/mavros_extras/src/plugins/obstacle_distance_3d.cpp @@ -43,12 +43,14 @@ class ObstacleDistance3DPlugin : public plugin::Plugin enable_node_watch_parameters(); // Add a configurable parameter for the MAVLink frame, just like the reference. + //! MAVLink MAV_FRAME used when sending OBSTACLE_DISTANCE_3D. node_declare_and_watch_parameter( "mav_frame", "LOCAL_NED", [&](const rclcpp::Parameter & p) { auto mav_frame_str = p.as_string(); frame = utils::mav_frame_from_str(mav_frame_str); }); + //! Subscribe to ObstacleDistance3D to send as OBSTACLE_DISTANCE_3D to the FCU. obstacle_sub_ = node->create_subscription( "~/send", 10, std::bind(&ObstacleDistance3DPlugin::obstacle_cb, this, _1)); } diff --git a/mavros_extras/src/plugins/odom.cpp b/mavros_extras/src/plugins/odom.cpp index 67886e268..37c0e1890 100644 --- a/mavros_extras/src/plugins/odom.cpp +++ b/mavros_extras/src/plugins/odom.cpp @@ -64,14 +64,17 @@ class OdometryPlugin : public plugin::Plugin enable_node_watch_parameters(); // frame params: + //! Desired parent frame id for odometry from the FCU. node_declare_and_watch_parameter( "fcu.odom_parent_id_des", uas_->get_odom_frame_id(), [&](const rclcpp::Parameter & p) { fcu_odom_parent_id_des = p.as_string(); }); + //! Desired child frame id for odometry from the FCU. node_declare_and_watch_parameter( "fcu.odom_child_id_des", uas_->get_base_link_frame_id(), [&](const rclcpp::Parameter & p) { fcu_odom_child_id_des = p.as_string(); }); + //! Desired map frame id for odometry from the FCU. node_declare_and_watch_parameter( "fcu.map_id_des", uas_->get_map_frame_id(), [&](const rclcpp::Parameter & p) { fcu_map_id_des = p.as_string(); @@ -79,9 +82,11 @@ class OdometryPlugin : public plugin::Plugin // publishers + //! Publish odometry from MAVLink ODOMETRY. odom_pub = node->create_publisher("~/in", 10); // subscribers + //! Subscribe to odometry to send as ODOMETRY to the FCU. odom_sub = node->create_subscription( "~/out", 1, diff --git a/mavros_extras/src/plugins/onboard_computer_status.cpp b/mavros_extras/src/plugins/onboard_computer_status.cpp index f8698cce4..bbb08dbe4 100644 --- a/mavros_extras/src/plugins/onboard_computer_status.cpp +++ b/mavros_extras/src/plugins/onboard_computer_status.cpp @@ -42,6 +42,7 @@ class OnboardComputerStatusPlugin : public plugin::Plugin explicit OnboardComputerStatusPlugin(plugin::UASPtr uas_) : Plugin(uas_, "onboard_computer") { + //! Subscribe to OnboardComputerStatus to send as ONBOARD_COMPUTER_STATUS. status_sub = node->create_subscription( "~/status", 10, std::bind( &OnboardComputerStatusPlugin::status_cb, this, diff --git a/mavros_extras/src/plugins/open_drone_id.cpp b/mavros_extras/src/plugins/open_drone_id.cpp index 2ed5871f1..8f105c3df 100644 --- a/mavros_extras/src/plugins/open_drone_id.cpp +++ b/mavros_extras/src/plugins/open_drone_id.cpp @@ -45,26 +45,31 @@ class OpenDroneIDPlugin : public plugin::Plugin explicit OpenDroneIDPlugin(plugin::UASPtr uas_) : Plugin(uas_, "open_drone_id") { + //! Subscribe to send OPEN_DRONE_ID_BASIC_ID to the FCU. basic_id_sub = node->create_subscription( "~/basic_id", 1, std::bind( &OpenDroneIDPlugin::basic_id_cb, this, _1)); + //! Subscribe to send OPEN_DRONE_ID_OPERATOR_ID to the FCU. operator_id_sub = node->create_subscription( "~/operator_id", 1, std::bind( &OpenDroneIDPlugin::operator_id_cb, this, _1)); + //! Subscribe to send OPEN_DRONE_ID_SELF_ID to the FCU. self_id_sub = node->create_subscription( "~/self_id", 1, std::bind( &OpenDroneIDPlugin::self_id_cb, this, _1)); + //! Subscribe to send OPEN_DRONE_ID_SYSTEM to the FCU. system_sub = node->create_subscription( "~/system", 1, std::bind( &OpenDroneIDPlugin::system_cb, this, _1)); + //! Subscribe to send OPEN_DRONE_ID_SYSTEM_UPDATE to the FCU. system_update_sub = node->create_subscription( "~/system_update", 1, std::bind( &OpenDroneIDPlugin::system_update_cb, this, diff --git a/mavros_extras/src/plugins/optical_flow.cpp b/mavros_extras/src/plugins/optical_flow.cpp index a89909247..852f6336b 100644 --- a/mavros_extras/src/plugins/optical_flow.cpp +++ b/mavros_extras/src/plugins/optical_flow.cpp @@ -47,6 +47,7 @@ class OpticalFlowPlugin : public plugin::Plugin { enable_node_watch_parameters(); + //! Frame id for published optical flow messages. node_declare_and_watch_parameter( "frame_id", "optical_flow", [&](const rclcpp::Parameter & p) { frame_id = p.as_string(); @@ -58,25 +59,31 @@ class OpticalFlowPlugin : public plugin::Plugin * but also at 1 meter). 6.8 degrees at 5 meters, 31 degrees * at 1 meter */ + //! Default rangefinder field of view [rad]. node_declare_and_watch_parameter( "ranger_fov", 0.119428926, [&](const rclcpp::Parameter & p) { ranger_fov = p.as_double(); }); + //! Minimum rangefinder range [m]. node_declare_and_watch_parameter( "ranger_min_range", 0.3, [&](const rclcpp::Parameter & p) { ranger_min_range = p.as_double(); }); + //! Maximum rangefinder range [m]. node_declare_and_watch_parameter( "ranger_max_range", 5.0, [&](const rclcpp::Parameter & p) { ranger_max_range = p.as_double(); }); + //! Publish optical flow from MAVLink OPTICAL_FLOW. flow_pub = node->create_publisher( "~/raw/optical_flow", 10); + //! Publish ground distance as Range from OPTICAL_FLOW. range_pub = node->create_publisher("~/ground_distance", 10); + //! Subscribe to OpticalFlow to send as OPTICAL_FLOW to the FCU. flow_sub = node->create_subscription( "~/raw/send", 1, std::bind( &OpticalFlowPlugin::send_cb, this, diff --git a/mavros_extras/src/plugins/play_tune.cpp b/mavros_extras/src/plugins/play_tune.cpp index 3f0894f21..47a546fdd 100644 --- a/mavros_extras/src/plugins/play_tune.cpp +++ b/mavros_extras/src/plugins/play_tune.cpp @@ -39,6 +39,7 @@ class PlayTunePlugin : public plugin::Plugin explicit PlayTunePlugin(plugin::UASPtr uas_) : Plugin(uas_, "play_tune") { + //! Subscribe to PlayTuneV2 to send as PLAY_TUNE_V2 to the FCU. sub = node->create_subscription( "play_tune", 1, diff --git a/mavros_extras/src/plugins/px4flow.cpp b/mavros_extras/src/plugins/px4flow.cpp index c0607ac60..fd0269add 100644 --- a/mavros_extras/src/plugins/px4flow.cpp +++ b/mavros_extras/src/plugins/px4flow.cpp @@ -50,6 +50,7 @@ class PX4FlowPlugin : public plugin::Plugin { enable_node_watch_parameters(); + //! Frame id for published PX4Flow messages. node_declare_and_watch_parameter( "frame_id", "px4flow", [&](const rclcpp::Parameter & p) { frame_id = p.as_string(); @@ -61,26 +62,33 @@ class PX4FlowPlugin : public plugin::Plugin * but also at 1 meter). 6.8 degrees at 5 meters, 31 degrees * at 1 meter */ + //! Default rangefinder field of view [rad]. node_declare_and_watch_parameter( "ranger_fov", 0.119428926, [&](const rclcpp::Parameter & p) { ranger_fov = p.as_double(); }); + //! Minimum rangefinder range [m]. node_declare_and_watch_parameter( "ranger_min_range", 0.3, [&](const rclcpp::Parameter & p) { ranger_min_range = p.as_double(); }); + //! Maximum rangefinder range [m]. node_declare_and_watch_parameter( "ranger_max_range", 5.0, [&](const rclcpp::Parameter & p) { ranger_max_range = p.as_double(); }); + //! Publish optical flow from MAVLink OPTICAL_FLOW_RAD. flow_rad_pub = node->create_publisher( "~/raw/optical_flow_rad", 10); + //! Publish ground distance as Range from OPTICAL_FLOW_RAD. range_pub = node->create_publisher("~/ground_distance", 10); + //! Publish optical flow temperature as Temperature. temp_pub = node->create_publisher("~/temperature", 10); + //! Subscribe to OpticalFlowRad to send as OPTICAL_FLOW_RAD to the FCU. flow_rad_sub = node->create_subscription( "~/raw/send", 1, std::bind( &PX4FlowPlugin::send_cb, this, diff --git a/mavros_extras/src/plugins/rangefinder.cpp b/mavros_extras/src/plugins/rangefinder.cpp index 4d583fb0f..acc9cc5fb 100644 --- a/mavros_extras/src/plugins/rangefinder.cpp +++ b/mavros_extras/src/plugins/rangefinder.cpp @@ -39,6 +39,7 @@ class RangefinderPlugin : public plugin::Plugin explicit RangefinderPlugin(plugin::UASPtr uas_) : Plugin(uas_, "rangefinder") { + //! Publish rangefinder data from MAVLink RANGEFINDER. rangefinder_pub = node->create_publisher("~/rangefinder", 10); } diff --git a/mavros_extras/src/plugins/sim_state.cpp b/mavros_extras/src/plugins/sim_state.cpp index ca31ab0b7..7414aaaed 100644 --- a/mavros_extras/src/plugins/sim_state.cpp +++ b/mavros_extras/src/plugins/sim_state.cpp @@ -55,22 +55,27 @@ class SimStatePlugin : public plugin::Plugin : Plugin(uas_, "sim_state") { // IMU attitude publisher (~/attitude): orientation and angular velocity in ENU/base_link + //! Publish attitude from MAVLink SIM_STATE. attitude_pub = node->create_publisher( "~/attitude", 10); // Linear acceleration publisher (~/acceleration): ENU/map, units m/s^2 + //! Publish linear acceleration from MAVLink SIM_STATE. acceleration_pub = node->create_publisher( "~/acceleration", 10); // Body-frame twist publisher (~/velocity_body): base_link linear+angular velocity + //! Publish body-frame velocity from MAVLink SIM_STATE. velocity_body_pub = node->create_publisher( "~/velocity_body", 10); // Local-frame twist publisher (~/velocity_local): ENU/map linear+angular velocity + //! Publish local-frame velocity from MAVLink SIM_STATE. velocity_local_pub = node->create_publisher( "~/velocity_local", 10); // Global position publisher (~/global_position): WGS84 NavSatFix + //! Publish global position from MAVLink SIM_STATE. global_position_pub = node->create_publisher( "~/global_position", 10); } diff --git a/mavros_extras/src/plugins/terrain.cpp b/mavros_extras/src/plugins/terrain.cpp index 203265e9a..165d5add0 100644 --- a/mavros_extras/src/plugins/terrain.cpp +++ b/mavros_extras/src/plugins/terrain.cpp @@ -60,18 +60,22 @@ class TerrainPlugin : public plugin::Plugin : Plugin(uas_, "terrain") { // Terrain height reports from FCU and check-service responses + //! Publish terrain reports from MAVLink TERRAIN_REPORT. report_pub_ = node->create_publisher( "~/report", 10); // Grid data requests forwarded from FCU for SRTM lookup + //! Publish terrain requests from MAVLink TERRAIN_REQUEST. request_pub_ = node->create_publisher( "~/request", 10); // Filled terrain grid blocks from terrain_server + //! Subscribe to TerrainData to send as TERRAIN_DATA to the FCU. data_sub_ = node->create_subscription( "~/data", 64, std::bind(&TerrainPlugin::data_cb, this, _1)); // Point elevation query handled by terrain_server + //! Client to query terrain elevation (terrain/check). check_client_ = node->create_client( "~/check"); } diff --git a/mavros_extras/src/plugins/trajectory.cpp b/mavros_extras/src/plugins/trajectory.cpp index 9167c3fb9..8cd18d7dc 100644 --- a/mavros_extras/src/plugins/trajectory.cpp +++ b/mavros_extras/src/plugins/trajectory.cpp @@ -53,13 +53,16 @@ class TrajectoryPlugin : public plugin::Plugin explicit TrajectoryPlugin(plugin::UASPtr uas_) : Plugin(uas_, "trajectory") { + //! Subscribe to Trajectory to send as TRAJECTORY to the FCU. trajectory_generated_sub = node->create_subscription( "~/generated", 10, std::bind( &TrajectoryPlugin::trajectory_cb, this, _1)); + //! Subscribe to nav_msgs/Path to send as TRAJECTORY to the FCU. path_sub = node->create_subscription( "~/path", 10, std::bind(&TrajectoryPlugin::path_cb, this, _1)); + //! Publish desired trajectory from MAVLink TRAJECTORY. trajectory_desired_pub = node->create_publisher("~/desired", 10); } diff --git a/mavros_extras/src/plugins/tunnel.cpp b/mavros_extras/src/plugins/tunnel.cpp index de2ceb28a..c2a648346 100644 --- a/mavros_extras/src/plugins/tunnel.cpp +++ b/mavros_extras/src/plugins/tunnel.cpp @@ -43,10 +43,12 @@ class TunnelPlugin : public plugin::Plugin explicit TunnelPlugin(plugin::UASPtr uas_) : Plugin(uas_, "tunnel") { + //! Subscribe to Tunnel to send as TUNNEL to the FCU. sub_ = node->create_subscription( "~/in", 10, std::bind(&TunnelPlugin::ros_callback, this, _1)); + //! Publish TUNNEL messages received from the FCU. pub_ = node->create_publisher("~/out", 10); } diff --git a/mavros_extras/src/plugins/vfr_hud.cpp b/mavros_extras/src/plugins/vfr_hud.cpp index 8662baafc..d20c36c2e 100644 --- a/mavros_extras/src/plugins/vfr_hud.cpp +++ b/mavros_extras/src/plugins/vfr_hud.cpp @@ -37,6 +37,7 @@ class VfrHudPlugin : public plugin::Plugin explicit VfrHudPlugin(plugin::UASPtr uas_) : Plugin(uas_, "vfr_hud") { + //! Publish VFR HUD data from MAVLink VFR_HUD. vfr_pub = node->create_publisher("vfr_hud", 10); } diff --git a/mavros_extras/src/plugins/vibration.cpp b/mavros_extras/src/plugins/vibration.cpp index 73fbdab14..f914538bb 100644 --- a/mavros_extras/src/plugins/vibration.cpp +++ b/mavros_extras/src/plugins/vibration.cpp @@ -44,11 +44,13 @@ class VibrationPlugin : public plugin::Plugin { enable_node_watch_parameters(); + //! Frame id for published vibration messages. node_declare_and_watch_parameter( "frame_id", "base_link", [&](const rclcpp::Parameter & p) { frame_id = p.as_string(); }); + //! Publish vibration levels from MAVLink VIBRATION. vibration_pub = node->create_publisher("~/raw/vibration", 10); } diff --git a/mavros_extras/src/plugins/vision_pose_estimate.cpp b/mavros_extras/src/plugins/vision_pose_estimate.cpp index 1673681db..e77d4b1ac 100644 --- a/mavros_extras/src/plugins/vision_pose_estimate.cpp +++ b/mavros_extras/src/plugins/vision_pose_estimate.cpp @@ -55,6 +55,7 @@ class VisionPoseEstimatePlugin : public plugin::Plugin, enable_node_watch_parameters(); // tf params + //! Listen to vision pose from TF (else subscribe to ~/pose). node_declare_and_watch_parameter( "tf/listen", false, [&](const rclcpp::Parameter & p) { auto tf_listen = p.as_bool(); @@ -65,25 +66,30 @@ class VisionPoseEstimatePlugin : public plugin::Plugin, " -> " << tf_child_frame_id); tf2_start("VisionPoseTF", &VisionPoseEstimatePlugin::transform_cb); } else { + //! Subscribe to vision pose as PoseStamped. vision_sub = node->create_subscription( "~/pose", 10, std::bind( &VisionPoseEstimatePlugin::vision_cb, this, _1)); + //! Subscribe to vision pose with covariance as PoseWithCovarianceStamped. vision_cov_sub = node->create_subscription( "~/pose_cov", 10, std::bind( &VisionPoseEstimatePlugin::vision_cov_cb, this, _1)); } }); + //! TF frame id for vision pose source. node_declare_and_watch_parameter( "tf/frame_id", "map", [&](const rclcpp::Parameter & p) { tf_frame_id = p.as_string(); }); + //! TF child frame id for vision pose source. node_declare_and_watch_parameter( "tf/child_frame_id", "vision_estimate", [&](const rclcpp::Parameter & p) { tf_child_frame_id = p.as_string(); }); + //! Vision pose send rate limit [Hz]. node_declare_and_watch_parameter( "tf/rate_limit", 10.0, [&](const rclcpp::Parameter & p) { tf_rate = p.as_double(); diff --git a/mavros_extras/src/plugins/vision_speed_estimate.cpp b/mavros_extras/src/plugins/vision_speed_estimate.cpp index 757eead10..a8c4c3666 100644 --- a/mavros_extras/src/plugins/vision_speed_estimate.cpp +++ b/mavros_extras/src/plugins/vision_speed_estimate.cpp @@ -43,12 +43,15 @@ class VisionSpeedEstimatePlugin : public plugin::Plugin explicit VisionSpeedEstimatePlugin(plugin::UASPtr uas_) : Plugin(uas_, "vision_speed") { + //! Subscribe to vision speed as TwistWithCovarianceStamped. vision_twist_cov_sub = node->create_subscription( "~/speed_twist_cov", 10, std::bind(&VisionSpeedEstimatePlugin::twist_cov_cb, this, _1)); + //! Subscribe to vision speed as TwistStamped. vision_twist_sub = node->create_subscription( "~/speed_twist", 10, std::bind(&VisionSpeedEstimatePlugin::twist_cb, this, _1)); + //! Subscribe to vision speed as Vector3Stamped. vision_vector_sub = node->create_subscription( "~/speed_vector", 10, std::bind(&VisionSpeedEstimatePlugin::vector_cb, this, _1)); } diff --git a/mavros_extras/src/plugins/wheel_odometry.cpp b/mavros_extras/src/plugins/wheel_odometry.cpp index 3dff05fc5..d44b28210 100644 --- a/mavros_extras/src/plugins/wheel_odometry.cpp +++ b/mavros_extras/src/plugins/wheel_odometry.cpp @@ -62,12 +62,15 @@ class WheelOdometryPlugin : public plugin::Plugin enable_node_watch_parameters(); // General params + //! Publish raw wheel RPM and distance data. node_declare_and_watch_parameter( "send_raw", false, [&](const rclcpp::Parameter & p) { raw_send = p.as_bool(); if (raw_send) { + //! Publish raw wheel RPM from MAVLink RPM. rpm_pub = node->create_publisher("~/rpm", 10); + //! Publish raw wheel distances from MAVLink WHEEL_DISTANCE. dist_pub = node->create_publisher("~/distance", 10); } else { rpm_pub.reset(); @@ -75,12 +78,14 @@ class WheelOdometryPlugin : public plugin::Plugin } }); + //! Number of wheels used for odometry computation. node_declare_and_watch_parameter( "count", 2, [&](const rclcpp::Parameter & p) { int count_ = p.as_int(); count = std::max(2, count_); // bound check }); + //! Use wheel RPM (true) or cumulative distance (false) for odometry. node_declare_and_watch_parameter( "use_rpm", false, [&](const rclcpp::Parameter & p) { bool use_rpm = p.as_bool(); @@ -92,21 +97,25 @@ class WheelOdometryPlugin : public plugin::Plugin }); // Odometry params + //! Publish TwistWithCovarianceStamped instead of Odometry. node_declare_and_watch_parameter( "send_twist", false, [&](const rclcpp::Parameter & p) { twist_send = p.as_bool(); }); + //! Frame id for published odometry. node_declare_and_watch_parameter( "frame_id", uas_->get_odom_frame_id(), [&](const rclcpp::Parameter & p) { frame_id = p.as_string(); }); + //! Child frame id for published odometry. node_declare_and_watch_parameter( "child_frame_id", uas_->get_base_link_frame_id(), [&](const rclcpp::Parameter & p) { frame_id = p.as_string(); }); + //! Wheel velocity measurement error (std) [m/s]. node_declare_and_watch_parameter( "vel_error", 0.1, [&](const rclcpp::Parameter & p) { double vel_error = p.as_double(); @@ -114,16 +123,19 @@ class WheelOdometryPlugin : public plugin::Plugin }); // TF subsection + //! TF frame id for published odometry. node_declare_and_watch_parameter( "tf.frame_id", uas_->get_odom_frame_id(), [&](const rclcpp::Parameter & p) { tf_frame_id = p.as_string(); }); + //! TF child frame id for published odometry. node_declare_and_watch_parameter( "tf.child_frame_id", uas_->get_base_link_frame_id(), [&](const rclcpp::Parameter & p) { tf_child_frame_id = p.as_string(); }); + //! Enable publishing odometry transform to TF. node_declare_and_watch_parameter( "tf.send", false, [&](const rclcpp::Parameter & p) { tf_send = p.as_bool(); @@ -142,10 +154,12 @@ class WheelOdometryPlugin : public plugin::Plugin utils::format("wheel%i.x", wi), 0.0, [wi, this](const rclcpp::Parameter & p) { wheel_offset[wi][0] = p.as_double(); }); + //! Wheel Y offset from vehicle origin [m]. node_declare_and_watch_parameter( utils::format("wheel%i.y", wi), 0.0, [wi, this](const rclcpp::Parameter & p) { wheel_offset[wi][1] = p.as_double(); }); + //! Wheel radius [m]. node_declare_and_watch_parameter( utils::format("wheel%i.radius", wi), 0.05, [wi, this](const rclcpp::Parameter & p) { wheel_radius[wi] = p.as_double(); @@ -193,9 +207,11 @@ class WheelOdometryPlugin : public plugin::Plugin // Advertise topics if (odom_mode != OM::NONE) { if (twist_send) { + //! Publish computed wheel odometry as TwistWithCovarianceStamped. twist_pub = node->create_publisher( "~/velocity", 10); } else { + //! Publish computed wheel odometry as nav_msgs/Odometry. odom_pub = node->create_publisher("~/odom", 10); } } else { From 4165223dce0d5950a4474f043f4c0cc0282c198b Mon Sep 17 00:00:00 2001 From: Vladimir Ermakov Date: Fri, 7 Aug 2026 15:37:00 +0200 Subject: [PATCH 09/12] mavros: harden plugin tests against CI-only hangs/crashes Fix two classes of failures seen only on the CI runners (not locally): - Initialize rclcpp once per test binary instead of per test. Repeated rclcpp::init()/shutdown() across the integration tests hung on lyrical and rolling CI (FastDDS SHM / context teardown). Add TestUAS::Init() called from main() and stop calling shutdown() in the fixture. - Match the capture subscription QoS to the sink publisher (best_effort + durability_volatile). On humble this avoided the intraprocess-communication exception thrown while subscribing in SetUp, which crashed the mission suite. Also move the pure Parameter conversion tests into a lightweight fixture that does not construct the ROS node stack, reducing node churn. Signed-off-by: Vladimir Ermakov --- mavros/test/test_command.cpp | 5 ++- mavros/test/test_mission_flow.cpp | 5 ++- mavros/test/test_param.cpp | 50 +++++++++++++++++------------ mavros/test/test_plugin_helpers.hpp | 13 +++++--- 4 files changed, 46 insertions(+), 27 deletions(-) diff --git a/mavros/test/test_command.cpp b/mavros/test/test_command.cpp index 922ba32d4..a869fb404 100644 --- a/mavros/test/test_command.cpp +++ b/mavros/test/test_command.cpp @@ -427,5 +427,8 @@ TEST_F(CommandFlowTest, ack_failed_result) int main(int argc, char ** argv) { ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); + mavros::uas::TestUAS::Init(); + int rc = RUN_ALL_TESTS(); + rclcpp::shutdown(); + return rc; } diff --git a/mavros/test/test_mission_flow.cpp b/mavros/test/test_mission_flow.cpp index c4ef6f611..9d46a252d 100644 --- a/mavros/test/test_mission_flow.cpp +++ b/mavros/test/test_mission_flow.cpp @@ -347,5 +347,8 @@ TEST_F(MissionFlowTest, partial_push_out_of_range) int main(int argc, char ** argv) { ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); + mavros::uas::TestUAS::Init(); + int rc = RUN_ALL_TESTS(); + rclcpp::shutdown(); + return rc; } diff --git a/mavros/test/test_param.cpp b/mavros/test/test_param.cpp index e80675375..579e517db 100644 --- a/mavros/test/test_param.cpp +++ b/mavros/test/test_param.cpp @@ -40,6 +40,28 @@ namespace mavros namespace uas { +// Encode an integer into the MAVLink param union (which is carried in the +// float `param_value` field). +float union_float_from_int(int type, int64_t v) +{ + mavlink::mavlink_param_union_t uv{}; + switch (type) { + case enum_value(MAV_PARAM_TYPE::INT8): uv.param_int8 = static_cast(v); break; + case enum_value(MAV_PARAM_TYPE::UINT8): uv.param_uint8 = static_cast(v); break; + case enum_value(MAV_PARAM_TYPE::INT16): uv.param_int16 = static_cast(v); break; + case enum_value(MAV_PARAM_TYPE::UINT16): uv.param_uint16 = static_cast(v); break; + case enum_value(MAV_PARAM_TYPE::INT32): uv.param_int32 = static_cast(v); break; + case enum_value(MAV_PARAM_TYPE::UINT32): uv.param_uint32 = static_cast(v); break; + default: uv.param_float = static_cast(v); break; + } + return uv.param_float; +} + +// Pure conversion tests need no ROS stack. +class ParameterTest : public ::testing::Test +{ +}; + class ParamFlowTest : public TestUAS { public: @@ -107,23 +129,6 @@ class ParamFlowTest : public TestUAS return out; } - // Encode an integer into the MAVLink param union (which is carried in the - // float `param_value` field). - static float union_float_from_int(int type, int64_t v) - { - mavlink::mavlink_param_union_t uv{}; - switch (type) { - case enum_value(MAV_PARAM_TYPE::INT8): uv.param_int8 = static_cast(v); break; - case enum_value(MAV_PARAM_TYPE::UINT8): uv.param_uint8 = static_cast(v); break; - case enum_value(MAV_PARAM_TYPE::INT16): uv.param_int16 = static_cast(v); break; - case enum_value(MAV_PARAM_TYPE::UINT16): uv.param_uint16 = static_cast(v); break; - case enum_value(MAV_PARAM_TYPE::INT32): uv.param_int32 = static_cast(v); break; - case enum_value(MAV_PARAM_TYPE::UINT32): uv.param_uint32 = static_cast(v); break; - default: uv.param_float = static_cast(v); break; - } - return uv.param_float; - } - size_t count_msgid(uint32_t msgid) const { size_t n = 0; @@ -137,7 +142,7 @@ class ParamFlowTest : public TestUAS }; // Pure conversion: MAVLink PARAM_VALUE -> rclcpp value for every type. -TEST_F(ParamFlowTest, parameter_set_value_types) +TEST_F(ParameterTest, parameter_set_value_types) { mavros::std_plugins::Parameter p("TEST"); @@ -173,7 +178,7 @@ TEST_F(ParamFlowTest, parameter_set_value_types) } // Pure conversion: rclcpp value -> PARAM_SET. -TEST_F(ParamFlowTest, parameter_to_param_set) +TEST_F(ParameterTest, parameter_to_param_set) { auto check = [](const rclcpp::ParameterValue & v, int expected_type, float expected_union) { mavros::std_plugins::Parameter p("TEST", 0, 0, v); @@ -193,7 +198,7 @@ TEST_F(ParamFlowTest, parameter_to_param_set) } // Pure conversion: excluded parameter ids. -TEST_F(ParamFlowTest, parameter_exclude_ids) +TEST_F(ParameterTest, parameter_exclude_ids) { EXPECT_TRUE(mavros::std_plugins::Parameter::check_exclude_param_id("CMD_TOTAL")); EXPECT_TRUE(mavros::std_plugins::Parameter::check_exclude_param_id("_HASH_CHECK")); @@ -386,5 +391,8 @@ TEST_F(ParamFlowTest, set_unknown_param) int main(int argc, char ** argv) { ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); + mavros::uas::TestUAS::Init(); + int rc = RUN_ALL_TESTS(); + rclcpp::shutdown(); + return rc; } diff --git a/mavros/test/test_plugin_helpers.hpp b/mavros/test/test_plugin_helpers.hpp index 4675ae865..696f47973 100644 --- a/mavros/test/test_plugin_helpers.hpp +++ b/mavros/test/test_plugin_helpers.hpp @@ -51,18 +51,22 @@ namespace uas class TestUAS : public ::testing::Test { public: - TestUAS() + //! Initialize rclcpp once per test binary (idempotent). Call from main(). + static void Init() { - rclcpp::init(0, nullptr); + if (!rclcpp::ok()) { + rclcpp::init(0, nullptr); + } } + TestUAS() = default; + ~TestUAS() override { stop_spin(); exec_.reset(); nodes_.clear(); sink_subs_.clear(); - rclcpp::shutdown(); } //! Real UAS node with the outbound sink created and the startup timer stopped @@ -121,7 +125,8 @@ class TestUAS : public ::testing::Test auto mtx = std::make_shared(); sink_subs_.push_back( uas->create_subscription( - "/" + name + "/mavlink_sink", rclcpp::QoS(1000).best_effort(), + "/" + name + "/mavlink_sink", + rclcpp::QoS(1000).best_effort().durability_volatile(), [buf, mtx](const mavros_msgs::msg::Mavlink::SharedPtr m) { std::lock_guard lk(*mtx); (void)lk; From 25bc4c2c016370f5347fecd4a406a9267af6ac66 Mon Sep 17 00:00:00 2001 From: Vladimir Ermakov Date: Fri, 7 Aug 2026 16:08:01 +0200 Subject: [PATCH 10/12] mavros: disable intra-process for latched publishers Plugin nodes enable intra-process comms, but rclcpp (e.g. humble) rejects creating a latched (transient_local) publisher or subscription on an intra-process node: "intraprocess communication allowed only with volatile durability". This made the waypoint/geofence/rallypoint/global_position/ home_position/sys_status plugins (which publish latched state) fail to start on humble, and the mission plugin test crash in CI. Add NonIntraProcessPublisherOptions()/NonIntraProcessSubscriptionOptions() helpers and pass them to the transient_local publishers and subscriptions, so those entities opt out of intra-process delivery while volatile topics keep the zero-copy path. Signed-off-by: Vladimir Ermakov --- mavros/include/mavros/qos.hpp | 22 +++++++++++++++++++++ mavros/src/plugins/geofence.cpp | 3 ++- mavros/src/plugins/global_position.cpp | 2 +- mavros/src/plugins/home_position.cpp | 4 +++- mavros/src/plugins/rallypoint.cpp | 3 ++- mavros/src/plugins/sys_status.cpp | 9 +++++---- mavros/src/plugins/waypoint.cpp | 6 ++++-- mavros_extras/src/plugins/guided_target.cpp | 3 ++- 8 files changed, 41 insertions(+), 11 deletions(-) diff --git a/mavros/include/mavros/qos.hpp b/mavros/include/mavros/qos.hpp index f156d7f76..ff762fe73 100644 --- a/mavros/include/mavros/qos.hpp +++ b/mavros/include/mavros/qos.hpp @@ -43,6 +43,28 @@ static inline rclcpp::QoS LatchedStateQoS() return rclcpp::QoS(10).keep_last(1).reliable().transient_local(); } +//! Publisher options that opt out of intra-process comms. +// +// Latched (transient_local) publishers are not compatible with intra-process +// delivery; rclcpp throws "intraprocess communication allowed only with +// volatile durability" when such a publisher is created on an intra-process +// node (e.g. on humble). Plugin nodes enable intra-process comms, so latched +// publishers must disable it per-publisher. +static inline rclcpp::PublisherOptions NonIntraProcessPublisherOptions() +{ + rclcpp::PublisherOptions opts; + opts.use_intra_process_comm = rclcpp::IntraProcessSetting::Disable; + return opts; +} + +//! Subscription options that opt out of intra-process comms (see above). +static inline rclcpp::SubscriptionOptions NonIntraProcessSubscriptionOptions() +{ + rclcpp::SubscriptionOptions opts; + opts.use_intra_process_comm = rclcpp::IntraProcessSetting::Disable; + return opts; +} + } // namespace mavros #endif // MAVROS__QOS_HPP_ diff --git a/mavros/src/plugins/geofence.cpp b/mavros/src/plugins/geofence.cpp index 3b89d1dc5..1493c92e5 100644 --- a/mavros/src/plugins/geofence.cpp +++ b/mavros/src/plugins/geofence.cpp @@ -55,7 +55,8 @@ class GeofencePlugin : public plugin::MissionBase auto gf_qos = mavros::LatchedStateQoS(); //! Publish the current geofence (MISSION protocol). - gf_list_pub = node->create_publisher("~/fences", gf_qos); + gf_list_pub = node->create_publisher( + "~/fences", gf_qos, mavros::NonIntraProcessPublisherOptions()); #ifdef USE_OLD_RMW_QOS auto services_qos = rmw_qos_profile_services_default; diff --git a/mavros/src/plugins/global_position.cpp b/mavros/src/plugins/global_position.cpp index 4c3464798..6001152ae 100644 --- a/mavros/src/plugins/global_position.cpp +++ b/mavros/src/plugins/global_position.cpp @@ -144,7 +144,7 @@ class GlobalPositionPlugin : public plugin::Plugin // global origin //! Publish the global origin (GPS_GLOBAL_ORIGIN). gp_global_origin_pub = node->create_publisher( - "~/gp_origin", origin_qos); + "~/gp_origin", origin_qos, mavros::NonIntraProcessPublisherOptions()); //! Set the global origin (SET_GPS_GLOBAL_ORIGIN). gp_set_global_origin_sub = node->create_subscription( diff --git a/mavros/src/plugins/home_position.cpp b/mavros/src/plugins/home_position.cpp index 7f6d8d171..deb9bac7e 100644 --- a/mavros/src/plugins/home_position.cpp +++ b/mavros/src/plugins/home_position.cpp @@ -23,6 +23,7 @@ #include "mavros/mavros_uas.hpp" #include "mavros/plugin.hpp" #include "mavros/plugin_filter.hpp" +#include "mavros/qos.hpp" #include "std_srvs/srv/trigger.hpp" #include "mavros_msgs/srv/command_long.hpp" @@ -50,7 +51,8 @@ class HomePositionPlugin : public plugin::Plugin auto state_qos = rclcpp::QoS(10).transient_local(); //! Publish home position (HOME_POSITION). - hp_pub = node->create_publisher("~/home", state_qos); + hp_pub = node->create_publisher( + "~/home", state_qos, mavros::NonIntraProcessPublisherOptions()); //! Set home position (SET_HOME_POSITION). hp_sub = node->create_subscription( diff --git a/mavros/src/plugins/rallypoint.cpp b/mavros/src/plugins/rallypoint.cpp index 16fcb0e9f..d195c485f 100644 --- a/mavros/src/plugins/rallypoint.cpp +++ b/mavros/src/plugins/rallypoint.cpp @@ -54,7 +54,8 @@ class RallypointPlugin : public plugin::MissionBase auto rp_qos = mavros::LatchedStateQoS(); //! Publish the current rally points (MISSION protocol). - rp_list_pub = node->create_publisher("~/rallypoints", rp_qos); + rp_list_pub = node->create_publisher( + "~/rallypoints", rp_qos, mavros::NonIntraProcessPublisherOptions()); #ifdef USE_OLD_RMW_QOS auto services_qos = rmw_qos_profile_services_default; diff --git a/mavros/src/plugins/sys_status.cpp b/mavros/src/plugins/sys_status.cpp index bd0d5ee71..0e374ea39 100644 --- a/mavros/src/plugins/sys_status.cpp +++ b/mavros/src/plugins/sys_status.cpp @@ -26,6 +26,7 @@ #include "rcpputils/asserts.hpp" #include "mavros/mavros_uas.hpp" +#include "mavros/qos.hpp" #include "mavros/plugin.hpp" #include "mavros/plugin_filter.hpp" @@ -580,16 +581,16 @@ class SystemStatusPlugin : public plugin::Plugin //! Publish connection, armed and mode state (HEARTBEAT). state_pub = node->create_publisher( - "state", state_qos); + "state", state_qos, mavros::NonIntraProcessPublisherOptions()); //! Publish VTOL and landed state (EXTENDED_SYS_STATE). extended_state_pub = node->create_publisher( - "extended_state", state_qos); + "extended_state", state_qos, mavros::NonIntraProcessPublisherOptions()); //! Publish system and battery status (SYS_STATUS). sys_status_pub = node->create_publisher( - "sys_status", state_qos); + "sys_status", state_qos, mavros::NonIntraProcessPublisherOptions()); //! Publish estimator status flags (ESTIMATOR_STATUS). estimator_status_pub = node->create_publisher( - "estimator_status", state_qos); + "estimator_status", state_qos, mavros::NonIntraProcessPublisherOptions()); //! Publish battery state (BATTERY_STATUS). batt_pub = node->create_publisher("battery", sensor_qos); diff --git a/mavros/src/plugins/waypoint.cpp b/mavros/src/plugins/waypoint.cpp index c13689e5f..6c2c1b2b9 100644 --- a/mavros/src/plugins/waypoint.cpp +++ b/mavros/src/plugins/waypoint.cpp @@ -83,9 +83,11 @@ class WaypointPlugin : public plugin::MissionBase auto wp_qos = mavros::LatchedStateQoS(); //! The current mission waypoint list. - wp_list_pub = node->create_publisher("~/waypoints", wp_qos); + wp_list_pub = node->create_publisher( + "~/waypoints", wp_qos, mavros::NonIntraProcessPublisherOptions()); //! Notifies when a mission waypoint is reached. - wp_reached_pub = node->create_publisher("~/reached", wp_qos); + wp_reached_pub = node->create_publisher( + "~/reached", wp_qos, mavros::NonIntraProcessPublisherOptions()); #ifdef USE_OLD_RMW_QOS auto services_qos = rmw_qos_profile_services_default; diff --git a/mavros_extras/src/plugins/guided_target.cpp b/mavros_extras/src/plugins/guided_target.cpp index 808935a62..5f2a5b668 100644 --- a/mavros_extras/src/plugins/guided_target.cpp +++ b/mavros_extras/src/plugins/guided_target.cpp @@ -72,7 +72,8 @@ class GuidedTargetPlugin : public plugin::Plugin //! Subscribe to global position origin (map origin). gp_origin_sub = node->create_subscription( "global_position/gp_origin", mavros::LatchedStateQoS(), - std::bind(&GuidedTargetPlugin::gp_origin_cb, this, _1)); + std::bind(&GuidedTargetPlugin::gp_origin_cb, this, _1), + mavros::NonIntraProcessSubscriptionOptions()); } Subscriptions get_subscriptions() override From 2ebdf221b208fa015d21aa0fab5c950ad49a4774 Mon Sep 17 00:00:00 2001 From: Vladimir Ermakov Date: Fri, 7 Aug 2026 16:10:06 +0200 Subject: [PATCH 11/12] docs: reference per-package API docs on docs.ros.org Link the auto-generated per-package C++/Python API reference (docs.ros.org/en/rolling/p/mavros*, libmavconn) from the README and the docs index, alongside the readthedocs site and plugin index. Signed-off-by: Vladimir Ermakov --- README.md | 2 ++ docs/index.md | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/README.md b/README.md index 2f730fd21..944243041 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ MAVLink extendable communication node for ROS. - Full documentation: [https://mavros.readthedocs.io/][rtd] - Plugin reference (all ROS API): [Plugin index](docs/plugins/index.md) +- Per-package C++/Python API reference (auto-generated): [https://docs.ros.org/en/rolling/p/mavros/][api] - Since 2014-08-11 this repository contains several packages. - Since 2014-11-02 hydro support separated from master to hydro-devel branch. @@ -82,6 +83,7 @@ CI Statuses [mrrm]: https://github.com/mavlink/mavros/blob/ros2/mavros/README.md [rtd]: https://mavros.readthedocs.io/en/latest/ +[api]: https://docs.ros.org/en/rolling/p/mavros/ [exrm]: https://github.com/mavlink/mavros/blob/ros2/mavros_extras/README.md [libmc]: https://github.com/mavlink/mavros/blob/ros2/libmavconn/README.md [test]: https://github.com/mavlink/mavros/blob/ros2/test_mavros/README.md diff --git a/docs/index.md b/docs/index.md index 95f81136f..13539754b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -35,6 +35,13 @@ Index data used for generation: - `docs/plugins/std/index.json` - `docs/plugins/extras/index.json` +Auto-generated per-package C++/Python API reference (published by ROS 2): + +- [mavros](https://docs.ros.org/en/rolling/p/mavros/), + [mavros_extras](https://docs.ros.org/en/rolling/p/mavros_extras/), + [mavros_msgs](https://docs.ros.org/en/rolling/p/mavros_msgs/), + [libmavconn](https://docs.ros.org/en/rolling/p/libmavconn/) + Build And Test (Workspace) -------------------------- From 3fb0865d694e27315010b37fb3a40f143b093226 Mon Sep 17 00:00:00 2001 From: Vladimir Ermakov Date: Fri, 7 Aug 2026 16:33:12 +0200 Subject: [PATCH 12/12] agents: forbid printing token/secret environment variables Agents must never print, echo, export, or otherwise output the value of any *_TOKEN/*_SECRET/*_KEY ... environment variable, referencing them only by name (e.g. "$GITHUB_MCP_RO_TOKEN") and preferring MCP/tooling that handles auth internally. Signed-off-by: Vladimir Ermakov --- AGENTS.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 45e1754d3..2675bbe62 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -11,6 +11,11 @@ Guidance for coding agents in this repository. - CI `colcon test` is a merge gate and must pass before merge. - Follow generated-code workflows (`cog`, docs extractors/templates); do not hand-edit generated regions. - Use commit subject format: `: ...` with short component names (for example: `msgs`, `extras`, `tools`). +- Never print, echo, export, or otherwise output the value of any token/secret environment variable + (e.g. `*_TOKEN`, `*_SECRET`, `*_KEY`, `*_USERNAME`, `*_PASSWORD`, `GH_TOKEN`, `GITHUB_*`, `GITLAB_*`). + Reference them only by variable name (e.g. `"$GITHUB_MCP_RO_TOKEN"`) so the value is + never captured in tool output, logs, or transcripts. Prefer MCP/tooling that handles auth internally + over shelling out with an explicit secret value. ## Repository Scope