Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken Tutorial "Beginner: Client libraries" / "Writing a simple service and client (C++)" #4916

Closed
Darkproduct opened this issue Dec 25, 2024 · 1 comment · Fixed by #4917
Assignees

Comments

@Darkproduct
Copy link

The example code for the client doesn't compile.

Example: result is used (L218) before it is declared (L225)

if (rclcpp::spin_until_future_complete(node, result) ==
rclcpp::FutureReturnCode::SUCCESS)
{
RCLCPP_ERROR(node->get_logger(), "service call failed :(");
client->remove_pending_request(result_future);
return 1;
}
auto result = result_future.get();

I think this was somehow messed up in 6e92e0e, which, from the commit message, should only update python tutorials. @clalancette

@fujitatomoya
Copy link
Collaborator

@Darkproduct thanks for creating issue, i just made #4917, it would be appreciated if you can review.

@fujitatomoya fujitatomoya self-assigned this Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants