Repository navigation
Conversation
3b39b9b to
326a76f
Compare
41ff137 to
5f16b39
Compare
calling getParentLinkModel() shouldn't be so expensive as to judge another code block
- remove unused variables - fixed type of max_solver_iterations_ - directly read parameters into class members
This function is doing exactly the same as CartToJnt(). The extra argument lock_redundant_joints is not used at all.
5f16b39 to
a2b6735
Compare
|
This is great!
What is a forward kinematics manifold?
KDL does not randomly sample seeds AFAIK, only MoveIt!'s wrapper as you pointed out. I'm confused by your statement here
Which kin plugin are you talking about?
Agreed
I like this option the best... the intent of that struct is to allow new options to be added. I also think Melodic would be a perfect time to do a major cleanup of KinematicsBase and just outline the changes in the migration plan. Want to writeup a draft for the new interface? |
| robot_model::RobotModelPtr robot_model_; | ||
|
|
||
| robot_state::RobotStatePtr state_, state_2_; | ||
| robot_state::RobotStatePtr state_; |
| { | ||
| const std::vector<const LinkModel*>& links = start->getDescendantLinkModels(); | ||
| if (!links.empty()) | ||
| for (const LinkModel* link : links) |
There was a problem hiding this comment.
can you add some comments to this function?
| if (delta_twist_err >= last_delta_twist_err) { | ||
| // if the error increased, we are close to a singularity -> reduce step size | ||
| double old_step_size = step_size; | ||
| step_size *= 0.5; // reduce scale; |
There was a problem hiding this comment.
seems to me there should be a min step_size that should be checked s.t. the value can't get too close to zero. does that make sense here?
There was a problem hiding this comment.
There is a check a few lines down: if (step_size < eps).
|
Have you checked this PR against the tests in moveit_kinematic_tests? |
Just the manifold of Cartesian poses spanned by the joint space. Close to a singularity, this manifold has a strong curvature and Jacobian-based IK approaches tend to overshoot.
It does, namely via
Now, I did. All tests pass, except one. I need to look into this. |
davetcoleman
left a comment
There was a problem hiding this comment.
Please address broken kinematics test and retarget melodic-devel branch
|
@davetcoleman I already have prepared locally a branch targeted to Melodic for this. |
|
I did not merge this! Re-targeting this for melodic is a good idea, I hadn't realized this was still targeted at kinetic |
|
You merged kinetic-devel into this PR branch. I will close this for now and re-open for Melodic. |
This is an attempt to cleanup and improve the KDL IK plugin.
The first 4 commits simply cleanup code (hopefully) without changing semantics.
326a76f improves IK when passing through singularities. In that case, the step size of the velocity IK solver needs to be decreased to match the highly nonlinear shape of the FK manifold.
The Kinematics plugin has a major design flaw, which I want to discuss here as well:
Currently it's only possible to specify a timeout for the solver. There is no way to specify the number of search attempts (randomly sampling e.g. a new seeds).
However,
RobotState::setFromIKprovides anattemptsargument. But, even if you specify 1 there, the underlying Kinematics plugin will randomly sample seeds until thetimeoutis reached, which is really annoying if one just wants to test IK for the current seed.This highlights another design flaw: Both
RobotState::setFromIKand the Kinematics plugin perform random seed sampling. I think, this should be done only once! I discussed this issue shortly with @v4hn already and we agreed that the random sampling should be removed fromRobotState, but only be done in the IK plugins (TracIKrelies on sampling inside the plugin). In that case, theKinematicsBaseclass should provide a utility function to sample new seeds to avoid reimplementing this functionality in all plugin instances.However, we need a mechanism to pass a
max attemptsargument. I'm afraid that all clean solutions will change API. I see the following options:KinematicsQueryOptionsWhat do you think?