Skip to content

Commit 4dcf79b

Browse files
davetcolemanBey Hao Yun
andauthored
Improve chomp_planner_tutorial text and formatting (#609)
Co-authored-by: Bey Hao Yun <cardboardmails@gmail.com>
1 parent 5b2080d commit 4dcf79b

3 files changed

Lines changed: 97 additions & 42 deletions

File tree

doc/chomp_planner/chomp_planner_tutorial.rst

Lines changed: 45 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -58,43 +58,70 @@ Tweaking some of the parameters for CHOMP
5858
-----------------------------------------
5959
CHOMP has some optimization parameters associated with it. These can be modified for the given environment/robot you are working with and is normally present in the :panda_codedir:`chomp_planning.yaml <config/chomp_planning.yaml>` file in config folder of the robot you are working with. If this file does not exist for your robot, you can create it and set the parameter values as you want. The following are some of the insights to set up these parameter values for some of them:
6060

61-
- *planning_time_limit*: the maximum time the optimizer can take to find a solution before terminating
61+
- **planning_time_limit**: ::
62+
The maximum time the optimizer can take to find a solution before terminating
6263

63-
- *max_iterations*: this is the maximum number of iterations that the planner can take to find a good solution while optimization
64+
- **max_iterations**: ::
65+
This is the maximum number of iterations that the planner can take to find a good solution while optimization
6466

65-
- *max_iterations_after_collision_free*: maximum iterations to be performed after a collision-free path is found.
67+
- **max_iterations_after_collision_free**: ::
68+
Maximum iterations to be performed after a collision-free path is found.
6669

67-
- *smoothness_cost_weight*: the smoothness_cost_weight parameters controls its weight in the final cost that CHOMP is actually optimizing over
70+
- **smoothness_cost_weight**: ::
71+
The smoothness_cost_weight parameters controls its weight in the final cost that CHOMP is actually optimizing over.
6872

69-
- *obstacle_cost_weight*: this controls the weight to be given to obstacles towards the final cost CHOMP optimizes over. e.g., 0.0 would have obstacles to be ignored, 1.0 would be a hard constraint
73+
- **obstacle_cost_weight**: ::
74+
This controls the weight to be given to obstacles towards the final cost CHOMP optimizes over. e.g., 0.0 would have obstacles to be ignored, 1.0 would be a hard constraint
7075

71-
- *learning_rate*: this is the learning rate used by the optimizer to find the local / global minima while reducing the total cost.
76+
- **learning_rate**: ::
77+
This is the learning rate used by the optimizer to find the local / global minima while reducing the total cost.
7278

73-
- *smoothness_cost_velocity, smoothness_cost_acceleration, smoothness_cost_jerk*: variables associated with the cost in velocity, acceleration and jerk.
79+
- **smoothness_cost_velocity, smoothness_cost_acceleration, smoothness_cost_jerk**: ::
80+
Variables associated with the cost in velocity, acceleration and jerk.
7481

75-
- *ridge_factor*: the noise added to the diagonal of the total :moveit_codedir:`quadratic cost matrix<moveit_planners/chomp/chomp_motion_planner/src/chomp_cost.cpp#L62/>` in the objective function. Addition of small noise (e.g., 0.001) allows CHOMP to avoid obstacles at the cost of smoothness in trajectory.
82+
- **ridge_factor**: ::
83+
The noise added to the diagonal of the total :moveit_codedir:`quadratic cost matrix<moveit_planners/chomp/chomp_motion_planner/src/chomp_cost.cpp#L62/>` in the objective function. Addition of small noise (e.g., 0.001) allows CHOMP to avoid obstacles at the cost of smoothness in trajectory.
7684

77-
- *use_pseudo_inverse*: enable pseudo inverse calculations or not.
85+
- **use_pseudo_inverse**: ::
86+
Enable pseudo inverse calculations or not.
7887

79-
- *pseudo_inverse_ridge_factor*: set the ridge factor if pseudo inverse is enabled.
88+
- **pseudo_inverse_ridge_factor**: ::
89+
Set the ridge factor if pseudo inverse is enabled.
8090

81-
- *joint_update_limit*: set the update limit for the robot joints
91+
- **joint_update_limit**: ::
92+
Set the update limit for the robot joints
8293

83-
- *collision_clearance*: the minimum distance that needs to be maintained to avoid obstacles.
94+
- **collision_clearance**: ::
95+
The minimum distance that needs to be maintained to avoid obstacles.
8496

85-
- *collision_threshold*: the collision threshold cost that needs to be maintained to avoid collisions
97+
- **collision_threshold**: ::
98+
The collision threshold cost that needs to be maintained to avoid collisions
8699

87-
- *use_stochastic_descent*: set this to true/false if you want to use stochastic descent while optimizing the cost. In stochastic descent, a random point from the trajectory is used, rather than all the trajectory points. This is faster and guaranteed to converge, but it may take more iterations in the worst case.
100+
- **use_stochastic_descent**: ::
101+
Set this to true/false if you want to use stochastic descent while optimizing the cost. In stochastic descent, a random point from the trajectory is used, rather than all the trajectory points. This is faster and guaranteed to converge, but it may take more iterations in the worst case.
88102

89-
- *enable failure recovery*: if this is set to true, CHOMP tweaks ceratin parameters in the hope to find a solution when one does not exist with the default paramters specified in the ``chomp_planning.yaml`` file.
103+
- **enable failure recovery**: ::
104+
If this is set to true, CHOMP tweaks ceratin parameters in the hope to find a solution when one does not exist with the default paramters specified in the ``chomp_planning.yaml`` file.
90105

91-
- *max_recovery_attempts*: this is the maximum times that CHOMP is run with a varied set of parameters after the first attempt with the default parameters.
106+
- **max_recovery_attempts**: ::
107+
This is the maximum times that CHOMP is run with a varied set of parameters after the first attempt with the default parameters.
92108

93-
- *trajectory_initializaiton_method*: the type of initialization of the trajectory can be supplied here for CHOMP, this can be ``quintic-spline``, ``linear``, ``cubic`` or ``fillTrajectory``. The first three options refer to the interpolation methods used for trajectory initialization between start and goal states. ``fillTrajectory`` provides an option of initializing the trajectory from path computed from an existing motion planner like OMPL.
109+
- **trajectory_initializaiton_method**: ::
110+
The type of initialization of the trajectory can be supplied here for CHOMP, this can be ``quintic-spline``, ``linear``, ``cubic`` or ``fillTrajectory``. The first three options refer to the interpolation methods used for trajectory initialization between start and goal states. ``fillTrajectory`` provides an option of initializing the trajectory from path computed from an existing motion planner like OMPL.
94111

95112
Choosing parameters for CHOMP requires some intuition that is informed by the planning environment. For instance, the default parameters for CHOMP work well in environments without obstacles; however, in environments with many obstacles the default parameters will likely cause CHOMP to get stuck in local minima. By tweaking parameters, we can improve the quality of plans generated by CHOMP.
96113

97-
Some of the unused/commented parameters are *hmc_stochasticity*, *hmc_annealing_factor*, *hmc_discretization*, *use_hamiltonian_montecarlo*, *animate_endeffector*, *animate_endeffector_segment*, *animate_path*, *random_jump_amount*, *add_randomness*.
114+
Some of the unused/commented parameters are:
115+
116+
* hmc\_stochasticity
117+
* hmc\_annealing\_factor
118+
* hmc\_discretization
119+
* use\_hamiltonian\_montecarlo
120+
* animate\_endeffector
121+
* animate\_endeffector\_segment
122+
* animate\_path
123+
* random\_jump\_amount
124+
* add\_randomness
98125

99126
Difference between plans obtained by CHOMP and OMPL
100127
---------------------------------------------------

doc/perception_pipeline/perception_pipeline_tutorial.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Perception Pipeline Tutorial
22
============================
33

44
MoveIt allows for seamless integration of 3D sensors using `Octomap <http://octomap.github.io/>`_.
5-
Once properly configured, you should see something like this in rviz:
5+
Once properly configured, you should see something like this in RViz:
66

77
.. image:: perception_configuration_demo.png
88
:width: 700px
@@ -153,7 +153,7 @@ Detecting and Adding Object as Collision Object
153153
In this section, we will demonstrate an example of extracting a cylinder from a pointcloud, computing relevant values and adding it as a collision object to the planning scene.
154154
We will be working with point clouds but it can be implemented similarly with depth maps.
155155

156-
After running the code, you should be able to see something like this in rviz:
156+
After running the code, you should be able to see something like this in RViz:
157157

158158
.. image:: cylinder_collision_object.png
159159
:width: 700px

0 commit comments

Comments
 (0)