-
Notifications
You must be signed in to change notification settings - Fork 21
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
Consider continuing optimization when solution_callback
fails but there is still time budget remaining
#49
Comments
I thought a bit more about the problem and came up with different ideas to solve it. Maybe we could discuss it a bit and then I could try to create a PR.
I think that option 3 would be very user friendly, but would require somehow getting the planning scene into the kinematics plugin which might be difficult. |
I would do Option 2: implement KDL-like random restarts of the initial seed. Option 1 could be maybe useful for the global solver, and could be used at least on the elite member selection but not every time. As you said, it would really slow things down if we're not careful, and I think asking users to provide a gradient for the solution callback may be very challenging and require interface changes at the MoveIt level. I might have some idea to explore here as well. However, this could be combined with Option 3 (custom collision avoidance cost function) which actually would guide optimization away from collisions and reduce the probability of having to restart in the first place. FYI @stephanie-eng this is likely the issue that made your ROS 1 pick_ik benchmarking barf on collision checking and we should try again when we have a solution. @SammyRamone I am happy to work on a PR for Option 2 as I have some ideas, but if you have time and get to it first, go ahead and I'll review. |
Fine for me. It is probably the "safest" approach which will not confuse the user too much. Everyone who uses pick_ik for more uncommon stuff (like me) can still maintain a fork with a custom implementation for option 1, if it is necessary for them.
I was more thinking of providing the gradient via the cost function. Then it would not require any changes to the MoveIt interface. However, I agree that this is not simple to do and the typical user does not want to do this.
If you already have an idea how to nicely implement Option 2, go ahead. I have (yet another) idea for a PR that I'm currently working on 😅 |
behold! #53 |
From @SammyRamone:
Independent from this error, I was also wondering if the current way to call this function makes sense. Currently, it is only called at the very end of searchPositionIK(). This means, during the process of searching for an IK solution, pick_ik constantly checks the solution_fn (which does not contain the callback). When this finally returns true, it will check the callback. If the callback then returns false, pick_ik will say that it did not find a valid solution, although neither time nor iteration limits have been reached. Instead it would also be possible to continue searching for a solution until either a limit has reached or the solution_fn and the callback are valid at the same time.
I saw that bio_ik was doing it also like pick_ik is doing it currently. Maybe it is how MoveIt expects the kinematics_plugins to behave. However, I think that there might be benefit in changing this behavior, so that a valid solution is found more often.
The text was updated successfully, but these errors were encountered: