mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
- new ROS2 platform in PX4 intended for creating configs that build and run entirely in ROS2 - PX4_CONFIG defaults to px4_ros2_default if no config specified and in a colcon workspace with ROS_VERSION=2 - currently doesn't do much other than allow you to build px4 msgs interface package
43 lines
715 B
C++
43 lines
715 B
C++
|
|
#pragma once
|
|
|
|
#include "rclcpp/rclcpp.hpp"
|
|
|
|
namespace px4
|
|
{
|
|
|
|
class Node : public rclcpp::Node
|
|
{
|
|
public:
|
|
explicit Node(const char *node_name) :
|
|
rclcpp::Node(node_name)
|
|
{
|
|
|
|
}
|
|
|
|
|
|
~Node() override = default;
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
// 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)
|