mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-10 03:41:35 +08:00
PX4 ROS2 msg conformity and explicit topics
- .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
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
|
||||
#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)
|
||||
@@ -43,7 +43,6 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <queue.h>
|
||||
#include <px4_platform_types.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user