Auterion / px4-ros2-interface-lib

Library to interface with PX4 from a companion computer using ROS 2
BSD 3-Clause "New" or "Revised" License
68 stars 21 forks source link

components: add NodeWithMode class #30

Closed GuillaumeLaine closed 9 months ago

GuillaumeLaine commented 9 months ago

Changes

Example usage NodeWithMode:

class MyMode : public px4_ros2::ModeBase {...};
rclcpp::spin(std::make_shared<px4_ros2::NodeWithMode<MyMode>>("my_node"));

Example usage NodeWithModeExecutor:

class MyMode : public px4_ros2::ModeBase {...};
class MyExecutor : public px4_ros2::ModeExecutor {...};
rclcpp::spin(std::make_shared<px4_ros2::NodeWithMode<MyExecutor, MyMode>>("my_node"));

Discussion

Alternative name ideas for NodeWithMode?

JIRA: APX4-3823