PX4 ROS 2 Interface Library
Library to interface with PX4 from a companion computer using ROS 2
|
A ROS2 node which instantiates a mode executor and its owned mode, and handles their registration with PX4. More...
#include <px4_ros2/components/node_with_mode.hpp>
Public Member Functions | |
NodeWithModeExecutor (std::string node_name, bool enable_debug_output=false) | |
template<typename ModeT = OwnedModeT> | |
ModeT & | getMode () const |
A ROS2 node which instantiates a mode executor and its owned mode, and handles their registration with PX4.
Assumes mode executor constructor signature is ModeExecutorT(rclcpp::Node, OwnedModeT, OtherModesT...)
.
ModeExecutorT | The mode executor type, which must be derived from px4_ros2::ModeExecutorBase. |
OwnedModeT | The mode type owned by the executor, which must be derived from px4_ros2::ModeBase. |
OtherModesT | Optional additional modes not owned by the executor but registered by the node, which must be derived from px4_ros2::ModeBase. |
Example usage: