course1_ws/my_cpp_pkg/src/template_cpp_node.cpp

20 lines
371 B
C++
Raw Normal View History

2024-12-11 19:24:37 +00:00
#include "rclcpp/rclcpp.hpp"
class MyCustomeNode : public rclcpp::Node // MODIFY NAME
{
public:
MyCustomeNode() : Node("node_name") // MODIFY NAME
{
}
private:
};
int main(int argc, char **argv)
{
rclcpp::init(argc, argv);
auto node = std::make_shared<MyCustomeNode>(); // MODIFY NAME
rclcpp::spin(node);
rclcpp::shutdown();
return 0;
}