Skip to content

Remove (redundant) random seeding and #attempts from RobotState::setFromIK - #1288

Merged
rhaschke merged 11 commits into
moveit:melodic-develfrom
ubi-agni:remove-ik-attempts
Jan 31, 2019
Merged

rhaschke merged 11 commits into
moveit:melodic-develfrom
ubi-agni:remove-ik-attempts

Conversation

@rhaschke

@rhaschke rhaschke commented Dec 30, 2018 •

Copy link
Copy Markdown
Contributor

As originally pointed out in #725, both RobotState::setFromIK() and (all?) actual kinematics solvers in searchPositionIK() perform random seeding if IK attempts fail, until the given timeout is reached. In setFromIK() the number of attempts was - additionally to the timeout - limited by a max number of attempts.

@v4hn suggested to remove the random sampling from RobotState as all important IK solvers (KDL, IKFast, TracIK) perform this random seeding internally anyway, and sometimes (IKFast) they rely on it.

This PR removes the random sampling from RobotState::setFromIK() and, simultaneously, removes the notion of max IK attempts from MoveIt. Thus, the number of attempts can only be limited by a timeout or appropriate measures in IK solvers (but there is no general support by KinematicsBase for this).

In my point of view, the only relevant use for a max number of attempts is to request a single attempt only (finding the one and only solution closest to the initial seed). In all other cases, when we just want to find any solution, there is no need to limit the attempts other than by a timeout.

If this PR is accepted, we should also remove attempts from PositionIKRequest.
Please merge in conjuction with #1272 and #1294.

@rhaschke rhaschke changed the title Remove ik attempts Remove (redundant) random seeding and #attempts from RobotState::setFromIK Dec 30, 2018
@rhaschke
rhaschke requested review from mlautman and v4hn December 30, 2018 01:13
@rhaschke

Copy link
Copy Markdown
Contributor Author

Due to API changes, this PR requires also changes to downstream packages, e.g. moveit_visual_tools.

Comment thread moveit.rosinstall Resolved
@rhaschke
rhaschke force-pushed the remove-ik-attempts branch 4 times, most recently from 2563bc0 to ff9dfa0 Compare January 4, 2019 10:48
@rhaschke

rhaschke commented Jan 4, 2019

Copy link
Copy Markdown
Contributor Author

Rebased to resolve merge conflicts.

@rhaschke

rhaschke commented Jan 4, 2019

Copy link
Copy Markdown
Contributor Author

Ping @mlautman, @v4hn. Would be great to get some feedback on these API changes.

@rhaschke rhaschke mentioned this pull request Jan 4, 2019
@mlautman
mlautman dismissed their stale review January 7, 2019 18:54

All critical feedback has been discussed and a resolution reached

@mlautman

mlautman commented Jan 7, 2019

Copy link
Copy Markdown
Contributor

I dismissed my "Request Changes" review since I am happy with this but I did add one last suggestion that I think would be an improvement. +1 after at least considering new feedback

Comment thread MIGRATION.md Resolved
@rhaschke

Copy link
Copy Markdown
Contributor Author

Rebased to resolve conflicts. Added deprecated function versions.

@rhaschke
rhaschke force-pushed the remove-ik-attempts branch 2 times, most recently from 12529e2 to b607212 Compare January 14, 2019 14:04
@davetcoleman

Copy link
Copy Markdown
Member

I'm still not a fan of this big of change for something that isn't "broken" but rather just "sub-optimal". This approach has been working all this time and no one noticed the weird duplicate functionality. But I'll defer to @v4hn's decision / approval

@rhaschke

Copy link
Copy Markdown
Contributor Author

@v4hn Ping again.

randomized seeding happens in the kinematics solvers and shouldn't repeated in setFromIK()

@davetcoleman davetcoleman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve this after the rosinstall is restored and travis passes

Comment thread moveit.rosinstall
- git:
local-name: moveit_tutorials
uri: https://github.com/ros-planning/moveit_tutorials.git
version: melodic-devel

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it sure would be nice if all these repos were merged together - we wouldn't have this issue

Comment thread moveit.rosinstall Resolved
Distribute the remaining time equally to all sub group solvers.
Also allow random seeding after first loop, by setting first_seed=false.
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 this pull request may close these issues.

3 participants