Skip to content

Commit d3eeaff

Browse files
davetcolemanmamollfelixvd
authored
Create 'Representation and Evaluation of Constraints' tutorial (#501)
* Create 'Representation and Evaluation of Constraints' tutorial * Integrate with new Approx Constraint Manifold tutorial * Update doc/planning_with_approximated_constraint_manifolds/planning_with_approximated_constraint_manifolds_tutorial.rst Co-authored-by: Mark Moll <[email protected]> * Update doc/planning_with_approximated_constraint_manifolds/planning_with_approximated_constraint_manifolds_tutorial.rst Co-authored-by: Felix von Drigalski <[email protected]> * Apply suggestions from code review Co-authored-by: Felix von Drigalski <[email protected]> Co-authored-by: Mark Moll <[email protected]> Co-authored-by: Felix von Drigalski <[email protected]>
1 parent 74577a8 commit d3eeaff

File tree

4 files changed

+33
-5
lines changed

4 files changed

+33
-5
lines changed
75.2 KB
Loading
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Representation and Evaluation of Constraints
2+
============================================
3+
4+
Constraints are an integral component of MoveIt and OMPL. They are used both to constrain robot motion as well as to define planning goals. There following set of constraints are defined in the :code:`kinematic_constraints` namespace:
5+
6+
- kinematic_constraints::JointConstraint
7+
- kinematic_constraints::OrientationConstraint
8+
- kinematic_constraints::PositionConstraint
9+
- kinematic_constraints::VisibilityConstraint
10+
11+
All of these constraints inherit from the :code:`kinematic_constraints::KinematicConstraint` base class and thus more constraint types can be added by the user by providing their own derived classes. The main operation each constraint implements is the :code:`KinematicConstraint::decide()` function, which decides whether a constraint is satisfied, and optionally returns a distance (an error) when a constraint is not satisfied.
12+
13+
Often multiple constraints need to be imposed on a particular motion plan or for a particular goal. The class :code:`kinematic_constraints::KinematicConstraintSet` facilitates operating with sets of constraints.
14+
15+
A related functionality to representing and evaluating constraints is :code:`constraint_sampling` "generating samples" that satisfy those constraints.
16+
17+
18+
.. figure:: fingertip_collision.png
19+
:width: 400px
20+
21+
An example of a Visibility Constraint, whereby the motion of the arm is planned to avoid obscuring the workpiece from the cameras.
22+
23+
See Also
24+
--------
25+
- `How to plan with path constraints in general <../move_group_interface/move_group_interface_tutorial.html#planning-with-path-constraints>`_.
26+
- `Planning with Approximated Constraint Manifolds <../planning_with_approximated_constraint_manifolds/planning_with_approximated_constraint_manifolds_tutorial>`_.

doc/planning_with_approximated_constraint_manifolds/planning_with_approximated_constraint_manifolds_tutorial.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ Planning with Approximated Constraint Manifolds
33

44
OMPL supports custom constraints to enable planning trajectories that follow a desired behavior.
55
Constraints can be defined in joint space and Cartesian space where the latter is either orientation or position based.
6-
While planning a trajectory each joint state needs to follow all of the set constraints, which is performed by rejection sampling by default.
7-
This however might lead to very long planning times, especially when the constraints are very restrictive and the rejection rate is correspondingly high.
6+
While planning a trajectory, each joint state needs to follow all of the set constraints, which is performed by rejection sampling by default. For more information see `Representation and Evaluation of Constraints <../planning_constraints/planning_constraints>`_.
87

9-
`Sucan et al <http://ioan.sucan.ro/files/pubs/constraints_iros2012.pdf>`_ present an approach where they compute an approximation of the constraint manifold beforehand and perform trajectory planning in that.
8+
Rejection sampling for each joint state might lead to very long planning times, especially when the constraints are very restrictive and the rejection rate is correspondingly high. `Sucan et al <http://ioan.sucan.ro/files/pubs/constraints_iros2012.pdf>`_ present an approach where they compute an approximation of the constraint manifold beforehand and perform trajectory planning in that.
109
The OMPL plugin contains the functionality to do that for a given set of constraints and save it in a database.
1110
In later instances the database can be loaded to use for constrained planning with any OMPL planner which strongly reduces planning time.
1211

@@ -23,6 +22,7 @@ Defining constraints
2322
^^^^^^^^^^^^^^^^^^^^
2423

2524
The ``generate_state_database`` executable reads constraints from ROS parameters on ``/constraints``, in a more compact format that a complete ROS message.
25+
2626
You can define these in ``rosparam`` to be loaded together in a file, eg. ``X_moveit_config/config/constraints.yaml``::
2727

2828
path_constraint:
@@ -61,11 +61,12 @@ For example::
6161
PositionConstraint
6262
""""""""""""""""""
6363

64-
A ``PositionConstraint`` constraints the Cartesian positions allowed for a (position relative to a) link.
64+
A ``PositionConstraint`` constrains the Cartesian positions allowed for a (position relative to a) link.
65+
6566
``target_offset`` is that relative position w.r.t. a link, e.g., the tip of the end-effector relative to its mounting point or other origin definition.
6667
This region (boxes only in this compact definition) is compactly defined by specifying the upper and lower bounds along each axis.
6768

68-
For example::
69+
For example (in YAML format)::
6970

7071
- type: position
7172
frame_id: base_link

index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ Configuration
7575

7676
doc/kinematics_configuration/kinematics_configuration_tutorial
7777
doc/custom_constraint_samplers/custom_constraint_samplers_tutorial
78+
doc/planning_constraints/planning_constraints.rst
7879
doc/ompl_interface/ompl_interface_tutorial
7980
doc/chomp_planner/chomp_planner_tutorial
8081
doc/stomp_planner/stomp_planner_tutorial

0 commit comments

Comments
 (0)