ros-planning/moveit_core — pull request #151 by davetcoleman (2014-02-25 05:59:21+00:00)
Title: Constraint samplers bug fix and improvements

As I'm implementing my own constraint sampler I've found the following issues:

- In the default JointConstraintSampler, if you have any unbound joints there is a bug where it accesses memory outside of it array. The mistake was that it was get the ``getFirstVariableIndex()`` of the joint with respect to the *robot state* instead of the *joint model group*

- I fixed a bug where the default JointConstraintSampler will allow a planner to sample states even when it has not been properly configured. Both the default JointConstraintSampler and IKConstraintSampler is the ``is_valid_`` boolean to determine if the sampler has properly been setup, yet the constructor of the default ConstraintSampler set this flag to true under only one condition - that a valid joint model group was passed in. It should not do this, but instead wait until ``configure()`` has succeeded, otherwise a segfault will occur when ``sample()`` is called. I also clarified the documentation of this flag

- I added some comments I used when reading through the default constraint sampler logic