Support for optimising IK solvers. Use minimum of the remaining stage timeout and configured IK solver timeout #724
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change is to support using optimising IK solvers such as TRAC-IK distance solver in compute_ik stages.
The previous behaviour was to use the remaining stage timeout as the timeout for the individual call to the IK solver. In the case of optimising IK solvers, which use the entire provided timeout to find the best solution, this would mean that only one IK solution would be generated.
For example with TRAC-IK distance solver configured to use a 5ms timeout and the stage timeout set to 1s, the full 1s was actually used for a single solution generation.
This change uses the minimum of the configured timeout on the IK solver, or the remaining stage time left. Thus meaning that the above scenario will make multiple 5ms calls to the TRAC-IK solver until the total 1s stage timeout is reached.