mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-04 04:30:34 +08:00
9ee8fa21cd
- .msg files are PascalCase - topics are still either per msg or explicitly listed in TOPICS - compatible structs are still generated (eg struct msg_s), but ROS2 style px4::msg::Msg is also available
48 lines
762 B
C++
48 lines
762 B
C++
|
|
#pragma once
|
|
|
|
namespace px4
|
|
{
|
|
|
|
class Node
|
|
{
|
|
public:
|
|
explicit Node(const char *node_name) :
|
|
_name(node_name)
|
|
{
|
|
|
|
}
|
|
|
|
~Node() override = default;
|
|
|
|
|
|
const char *get_name() const { return _name; }
|
|
|
|
// bool get_parameter()
|
|
|
|
|
|
private:
|
|
|
|
|
|
const char *_name{nullptr};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
// int main(int argc, char *argv[])
|
|
// {
|
|
// rclcpp::init(argc, argv);
|
|
// rclcpp::spin(std::make_shared<MulticopterRateControl>());
|
|
// rclcpp::shutdown();
|
|
// return 0;
|
|
// }
|
|
|
|
|
|
// #include "rclcpp_components/register_node_macro.hpp"
|
|
|
|
// // Register the component with class_loader.
|
|
// // This acts as a sort of entry point, allowing the component to be discoverable when its library
|
|
// // is being loaded into a running process.
|
|
// RCLCPP_COMPONENTS_REGISTER_NODE(composition::Client)
|