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;