Adds template classes NodeWithMode and NodeWithModeExecutor to factorize repeated code in examples.
NodeWithMode<ModeT> instantiates and registers a mode of type ModeT.
NodeWithModeExecutor<ExecutorModeT, ModeT> instantiates and registers a mode executor of type ExecutorModeT. Also instantiates a mode of type ModeT, whose ownership is passed to the executor.
Add doxygen group and subgroups for utils/ folder.
In Doxyfile, set EXTRACT_STATIC = YES because many utils functions are static qualified and weren't shown.
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"));
Changes
NodeWithMode
andNodeWithModeExecutor
to factorize repeated code in examples.NodeWithMode<ModeT>
instantiates and registers a mode of typeModeT
.NodeWithModeExecutor<ExecutorModeT, ModeT>
instantiates and registers a mode executor of typeExecutorModeT
. Also instantiates a mode of typeModeT
, whose ownership is passed to the executor.utils/
folder.EXTRACT_STATIC = YES
because many utils functions are static qualified and weren't shown.Example usage
NodeWithMode
:Example usage
NodeWithModeExecutor
:Discussion
Alternative name ideas for
NodeWithMode
?ModeControlNode
ModeHandlingNode
/ModeHandlerNode
JIRA: APX4-3823