From 7851d903d55b9200d092de81c48f293169263d36 Mon Sep 17 00:00:00 2001 From: Wojciech Kwolek Date: Fri, 16 Apr 2021 12:39:37 +0000 Subject: [PATCH] rename ros2aria class --- src/ros2aria/src/ros2aria.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ros2aria/src/ros2aria.cpp b/src/ros2aria/src/ros2aria.cpp index 0baf3a5..3cc0e5d 100644 --- a/src/ros2aria/src/ros2aria.cpp +++ b/src/ros2aria/src/ros2aria.cpp @@ -14,18 +14,18 @@ using std::placeholders::_1; using std::placeholders::_2; using namespace std::chrono_literals; -class MinimalSubscriber : public rclcpp::Node +class Ros2Aria : public rclcpp::Node { public: - MinimalSubscriber() + Ros2Aria() : Node("minimal_subscriber") { this->robot = std::make_shared(this, "/dev/ttyS0"); RCLCPP_INFO(this->get_logger(), "starting subscribers and services"); cmd_vel_sub_ = this->create_subscription( - "cmd_vel", 10, std::bind(&MinimalSubscriber::cmd_vel_callback, this, _1)); - stop_service_ = this->create_service("stop", std::bind(&MinimalSubscriber::stop, this, _1, _2)); + "cmd_vel", 10, std::bind(&Ros2Aria::cmd_vel_callback, this, _1)); + stop_service_ = this->create_service("stop", std::bind(&Ros2Aria::stop, this, _1, _2)); } private: @@ -80,7 +80,7 @@ int main(int argc, char **argv) // return 0; rclcpp::init(argc, argv); - rclcpp::spin(std::make_shared()); + rclcpp::spin(std::make_shared()); rclcpp::shutdown(); return 0;