add response
This commit is contained in:
@@ -168,8 +168,9 @@ public:
|
|||||||
{
|
{
|
||||||
RCLCPP_INFO(this->get_logger(), "Incoming request\nfront_back: %f\nleft_right: %f\nup_down: %f\nangle: %f", request->front_back, request->left_right, request->up_down, request->angle);
|
RCLCPP_INFO(this->get_logger(), "Incoming request\nfront_back: %f\nleft_right: %f\nup_down: %f\nangle: %f", request->front_back, request->left_right, request->up_down, request->angle);
|
||||||
// TODO add check_move_direction_allowed results to this calculation
|
// TODO add check_move_direction_allowed results to this calculation
|
||||||
this->current_yaw += request->angle * (M_PI / 180.0); // get the angle in radians
|
this->current_yaw += (request->angle % 360) * (M_PI / 180.0); // get the angle in radians
|
||||||
get_x_y_with_rotation(request->front_back, request->left_right, this->current_yaw, &this->current_speed_x, &this->current_speed_y);
|
get_x_y_with_rotation(request->front_back, request->left_right, this->current_yaw, &this->current_speed_x, &this->current_speed_y);
|
||||||
|
response->success = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user