Skip to content

Commit d42eac6

Browse files
committed
Update tutorials
1 parent bdc95ba commit d42eac6

File tree

7 files changed

+11
-67
lines changed

7 files changed

+11
-67
lines changed

doc/concepts/motion_planning.rst

-6
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,6 @@ The fix start state collision adapter will attempt to sample a new collision-fre
7171
The amount that it will perturb the values by is specified by the **jiggle_fraction** parameter that controls the perturbation as a percentage of the total range of motion for the joint.
7272
The other parameter for this adapter specifies how many random perturbations the adapter will sample before giving up.
7373

74-
FixStartStatePathConstraints
75-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
76-
77-
This adapter is applied when the start state for a motion plan does not obey the specified path constraints.
78-
It will attempt to plan a path between the current configuration of the robot to a new location where the path constraint is obeyed.
79-
The new location will serve as the start state for planning.
8074

8175
AddTimeParameterization
8276
^^^^^^^^^^^^^^^^^^^^^^^

doc/examples/planning_adapters/planning_adapters_tutorial.rst

+1-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Planning Adapter Tutorials
77
==========================
88

9-
Planning Request Adapters is a concept in MoveIt which can be used to modify the trajectory (pre-processing and/or post-processing) for a motion planner. Some examples of existing planning adapters in MoveIt include AddTimeParameterization, FixWorkspaceBounds, FixStartBounds, FixStartStateCollision, FixStartStatePathConstraints, CHOMPOptimizerAdapter, etc. ! Using the concepts of Planning Adapters, multiple motion planning algorithms can be used in a pipeline to produce robust motion plans. For example, a sample pipeline of motion plans might include an initial plan produced by OMPL which can then be optimized by CHOMP to produce a motion plan which would likely be better than a path produced by OMPL or CHOMP alone. Similarly, using the concept of Planning Adapters, other motion planners can be mixed and matched depending on the environment the robot is operating in. This section provides a step by step tutorial on using a mix and match of different motion planners and also provides insights on when to use which particular motion planners.
9+
Planning Request Adapters is a concept in MoveIt which can be used to modify the trajectory (pre-processing and/or post-processing) for a motion planner. Some examples of existing planning adapters in MoveIt include AddTimeParameterization, FixWorkspaceBounds, FixStartBounds, FixStartStateCollision, CHOMPOptimizerAdapter, etc. ! Using the concepts of Planning Adapters, multiple motion planning algorithms can be used in a pipeline to produce robust motion plans. For example, a sample pipeline of motion plans might include an initial plan produced by OMPL which can then be optimized by CHOMP to produce a motion plan which would likely be better than a path produced by OMPL or CHOMP alone. Similarly, using the concept of Planning Adapters, other motion planners can be mixed and matched depending on the environment the robot is operating in. This section provides a step by step tutorial on using a mix and match of different motion planners and also provides insights on when to use which particular motion planners.
1010

1111
Getting Started
1212
---------------
@@ -50,7 +50,6 @@ To achieve this, follow the steps:
5050
default_planner_request_adapters/FixWorkspaceBounds
5151
default_planner_request_adapters/FixStartStateBounds
5252
default_planner_request_adapters/FixStartStateCollision
53-
default_planner_request_adapters/FixStartStatePathConstraints
5453
chomp/OptimizerAdapter" />
5554

5655
#. The values of the ``planning_adapters`` is the order in which the mentioned adapters are called / invoked. Order here matters. Inside the CHOMP adapter, a :moveit_codedir:`call <moveit_planners/chomp/chomp_optimizer_adapter/src/chomp_optimizer_adapter.cpp#L169>` to OMPL is made before invoking the CHOMP optimization solver, so CHOMP takes the initial path computed by OMPL as the starting point to further optimize it.
@@ -85,7 +84,6 @@ To achieve this, follow the steps:
8584
default_planner_request_adapters/FixWorkspaceBounds
8685
default_planner_request_adapters/FixStartStateBounds
8786
default_planner_request_adapters/FixStartStateCollision
88-
default_planner_request_adapters/FixStartStatePathConstraints
8987
chomp/OptimizerAdapter" />
9088

9189
#. The values of the ``planning_adapters`` is the order in which the mentioned adapters are called / invoked. Order here matters. Inside the CHOMP adapter, a call to STOMP is made before invoking the CHOMP optimization solver, so CHOMP takes the initial path computed by STOMP as the starting point to further optimize it.
@@ -122,7 +120,6 @@ To achieve this, follow the steps:
122120
default_planner_request_adapters/FixWorkspaceBounds
123121
default_planner_request_adapters/FixStartStateBounds
124122
default_planner_request_adapters/FixStartStateCollision
125-
default_planner_request_adapters/FixStartStatePathConstraints
126123
stomp_moveit/StompSmoothingAdapter" />
127124

128125
#. The values of the ``planning_adapters`` is the order in which the mentioned adapters are called / invoked. Order here matters. Inside the STOMP adapter, a call to OMPL is made before invoking the STOMP smoothing solver, so STOMP takes the initial path computed by OMPL as the starting point to further optimize it.

doc/examples/time_parameterization/time_parameterization_tutorial.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Finally, add the Ruckig smoothing algorithm to the list of planning request adap
3434

3535
.. code-block:: yaml
3636
37-
request_adapters: >-
38-
default_planner_request_adapters/AddRuckigTrajectorySmoothing
39-
default_planner_request_adapters/AddTimeOptimalParameterization
37+
response_adapters:
38+
- default_planner_request_adapters/AddRuckigTrajectorySmoothing
39+
- default_planner_request_adapters/AddTimeOptimalParameterization
4040
...

doc/how_to_guides/benchmarking/launch/run_benchmarks.launch.py

-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ def generate_launch_description():
5252
default_planner_request_adapters/FixWorkspaceBounds \
5353
default_planner_request_adapters/FixStartStateBounds \
5454
default_planner_request_adapters/FixStartStateCollision \
55-
default_planner_request_adapters/FixStartStatePathConstraints \
5655
""",
5756
"start_state_max_bounds_error": 0.1,
5857
}

doc/how_to_guides/chomp_planner/chomp_planner_tutorial.rst

-28
Original file line numberDiff line numberDiff line change
@@ -98,31 +98,3 @@ OMPL is a open source library for sampling based / randomized motion planning al
9898
CHOMP: While most high-dimensional motion planners separate trajectory generation into distinct planning and optimization stages, CHOMP capitalizes on covariant gradient and functional gradient approaches to the optimization stage to design a motion planning algorithm based entirely on trajectory optimization. Given an infeasible naive trajectory, CHOMP reacts to the surrounding environment to quickly pull the trajectory out of collision while simultaneously optimizing dynamic quantities such as joint velocities and accelerations. It rapidly converges to a smooth, collision-free trajectory that can be executed efficiently on the robot. A covariant update rule ensures that CHOMP quickly converges to a locally optimal trajectory.
9999

100100
For scenes containing obstacles, CHOMP often generates paths which do not prefer smooth trajectories by addition of some noise (*ridge_factor*) in the cost function for the dynamic quantities of the robot (like acceleration, velocity). CHOMP is able to avoid obstacles in most cases, but it can fail if it gets stuck in local minima due to a bad initial guess for the trajectory. OMPL can be used to generate collision-free seed trajectories for CHOMP to mitigate this issue.
101-
102-
Using CHOMP as a post-processor for OMPL
103-
----------------------------------------
104-
Here, we will demonstrate that CHOMP can also be used as a post-processing optimization technique for plans obtained by other planning algorithms. The intuition behind this is that some randomized planning algorithm produces an initial guess for CHOMP. CHOMP then takes this initial guess and further optimizes the trajectory.
105-
To achieve this, use the following steps:
106-
107-
#. Edit ``ompl_planning.yaml`` in the ``<robot_moveit_config>/config`` folder of your robot. Add ``chomp/OptimizerAdapter`` to the bottom of the list of request_adapters: ::
108-
109-
request_adapters: >-
110-
...
111-
default_planner_request_adapters/FixStartStatePathConstraints
112-
chomp/OptimizerAdapter
113-
114-
#. Change the ``trajectory_initialization_method`` parameter in ``chomp_planning.yaml`` to ``fillTrajectory`` so that OMPL can provide the input for the CHOMP algorithm: ::
115-
116-
trajectory_initialization_method: "fillTrajectory"
117-
118-
#. Add the CHOMP config file to the launch file of your robot, ``<robot_moveit_config>/launch/chomp_demo.launch.py``, if it is not there already: ::
119-
120-
.planning_pipelines(pipelines=["ompl", "chomp"])
121-
122-
#. Now you can launch the newly configured planning pipeline as follows: ::
123-
124-
ros2 launch moveit2_tutorials chomp_demo.launch.py rviz_tutorial:=True
125-
126-
This will launch RViz. Select OMPL in the Motion Planning panel under the Context tab. Set the desired start and goal states by moving the end-effector around in the same way as was done for CHOMP above. Finally click on the Plan button to start planning. The planner will now first run OMPL, then run CHOMP on OMPL's output to produce an optimized path. To make the planner's task more challenging, add obstacles to the scene using: ::
127-
128-
ros2 run moveit2_tutorials collision_scene_example

doc/how_to_guides/parallel_planning/launch/parallel_planning_example.launch.py

-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ def launch_setup(context, *args, **kwargs):
6363
default_planner_request_adapters/FixWorkspaceBounds \
6464
default_planner_request_adapters/FixStartStateBounds \
6565
default_planner_request_adapters/FixStartStateCollision \
66-
default_planner_request_adapters/FixStartStatePathConstraints \
6766
""",
6867
"start_state_max_bounds_error": 0.1,
6968
}

doc/how_to_guides/stomp_planner/stomp_planner.rst

+7-24
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,13 @@ Using STOMP with Your Robot
3232
#. Simply add the `stomp_planning.yaml <https://github.com/ros-planning/moveit_resources/blob/ros2/panda_moveit_config/config/stomp_planning.yaml>`__ configuration file into the config directory of your MoveIt config package. It contains the plugin identifier, a planning pipeline adapter list, and the STOMP planning parameters. The config file should look like example below: ::
3333

3434
planning_plugin: stomp_moveit/StompPlanner
35-
request_adapters: >-
36-
default_planner_request_adapters/AddTimeOptimalParameterization
37-
default_planner_request_adapters/FixWorkspaceBounds
38-
default_planner_request_adapters/FixStartStateBounds
39-
default_planner_request_adapters/FixStartStateCollision
40-
default_planner_request_adapters/FixStartStatePathConstraints
35+
request_adapters:
36+
- default_planner_request_adapters/ResolveConstraintFrames
37+
- default_planner_request_adapters/FixWorkspaceBounds
38+
- default_planner_request_adapters/FixStartStateBounds
39+
- default_planner_request_adapters/FixStartStateCollision
40+
response_adapters:
41+
- default_planner_response_adapters/AddTimeOptimalParameterization
4142

4243
stomp_moveit:
4344
num_timesteps: 60
@@ -51,24 +52,6 @@ Using STOMP with Your Robot
5152

5253
#. Configure MoveIt to load the STOMP planning pipeline by adding "stomp" to your MoveItConfiguration launch statement next to "ompl" and the other planners. You can find an example for this in the `demo.launch.py <https://github.com/ros-planning/moveit_resources/blob/ros2/panda_moveit_config/launch/demo.launch.py#L42>`_ of the Panda config.
5354

54-
Using STOMP's planner adapter
55-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
56-
57-
STOMP can also be used for smoothing and optimizing trajectories from other planner plugins using the ``StompSmoothingAdapter`` plugin.
58-
The only step needed is to add the plugin name ``stomp_moveit/StompSmoothingAdapter`` to the ``request_adapters`` parameter list configured for the planning pipeline: ::
59-
60-
request_adapters: >-
61-
default_planner_request_adapters/AddTimeOptimalParameterization
62-
default_planner_request_adapters/FixWorkspaceBounds
63-
default_planner_request_adapters/FixStartStateBounds
64-
default_planner_request_adapters/FixStartStateCollision
65-
default_planner_request_adapters/FixStartStatePathConstraints
66-
stomp_moveit/StompSmoothingAdapter
67-
68-
In addition, STOMP parameters can be specified just like for the usual planning setup.
69-
An important detail is that now the parameter ``num_iterations_after_valid`` is used for specifying the smoothing steps since the input trajectory is already valid.
70-
It should therefore be larger than 0 to have an effect.
71-
7255
Running the Demo
7356
----------------
7457
If you have the ``panda_moveit_config`` from the `ros-planning/moveit_resources <https://github.com/ros-planning/moveit_resources>`_ repository you should be able to simply launch the demo setup and start planning with STOMP in RViZ ::

0 commit comments

Comments
 (0)