moveit / moveit_planners

THIS REPO HAS MOVED TO https://github.com/ros-planning/moveit
15 stars 34 forks source link

Constraint sampling IK alternate bugfix #48

Closed arjungm closed 10 years ago

arjungm commented 10 years ago

In response to this issue: https://github.com/ros-planning/moveit_planners/issues/44

Rather than changing anything in moveit::core::constraint_samplers, simply setting the GroupStateValidityCallbackFn for the constraint_sampler_ member will make the IKConstraintSampler check the validity of the state and loop over correctly.

To do this, I just added two functions to ompl_interface::ConstrainedGoalSampler (a callback and a function for checking validity) which is then used by the member constraint_sampler::ConstraintSampler during IK calls to correctly loop and try randomized seeds.

The other helpful side effect is that this means ompl_interface::ConstrainedGoalSampler::work_state_ is not modified by the IK call unless it is valid.

This pull request makes the following pull requests redundant: https://github.com/ros-planning/moveit_planners/pull/46 https://github.com/ros-planning/moveit_core/pull/188

davetcoleman commented 10 years ago

+1 looks good to me, though I haven't worked much on the work_space state space.

arjungm commented 10 years ago

@sachinchitta we've talked about this fix, so I think it's ready to merge. Thoughts?

sachinchitta commented 10 years ago

I will merge this - could you open a similar PR against indigo-devel as well?