Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix timeout calculation if solution callback fails #73

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

timonegk
Copy link
Contributor

Currently, the remaining timeout is recalculated after a solution callback fails by subtracting the total time since the start from the current remaining timeout. This is wrong in all iterations except the first, instead, the total time since the start should be subtracted from the initial timeout.
The current behavior is that pick_ik runs for the whole time available but after some time (in my case around 140ms) the remaining timeout is negative and the while loop in

while ((std::chrono::system_clock::now() < timeout_point) && (iter < params.max_generations)) {
immediately exits, making it impossible to find more solutions.

@sea-bass sea-bass merged commit 0ed7cb3 into PickNikRobotics:main Sep 30, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants