Hello
I am currently doing the ROS2 Service Quiz for C++.
When I run my code in the shell, everything works correctly. But when I start the gradebot, then it gives me the error that it can not find the /rotate service.
When I do ros2 launch services_quiz services_quiz_server.launch.py in the shell, then I can find it.
I can also call it manually or with my client launch file
Here is the part in my code where I create it:
{
ServerNode()
: Node("services_quiz_server")
{
srv_ = create_service<Spin>("rotate", std::bind(&ServerNode::moving_callback, this, _1, _2));
publisher_ = this->create_publisher<geometry_msgs::msg::Twist>("cmd_vel", 10);
}
}
So why does it fail in the gradebot?
Any help is appreciated.