rename ros2aria class

This commit is contained in:
Wojciech Kwolek 2021-04-16 12:39:37 +00:00
parent d293fda07c
commit 7851d903d5

View File

@ -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<RAIIBot>(this, "/dev/ttyS0");
RCLCPP_INFO(this->get_logger(), "starting subscribers and services");
cmd_vel_sub_ = this->create_subscription<geometry_msgs::msg::Twist>(
"cmd_vel", 10, std::bind(&MinimalSubscriber::cmd_vel_callback, this, _1));
stop_service_ = this->create_service<std_srvs::srv::Empty>("stop", std::bind(&MinimalSubscriber::stop, this, _1, _2));
"cmd_vel", 10, std::bind(&Ros2Aria::cmd_vel_callback, this, _1));
stop_service_ = this->create_service<std_srvs::srv::Empty>("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<MinimalSubscriber>());
rclcpp::spin(std::make_shared<Ros2Aria>());
rclcpp::shutdown();
return 0;