You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/how_to_guides/using_ompl_constrained_planning/ompl_constrained_planning.rst
+46-2Lines changed: 46 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,8 +91,16 @@ You can see the trajectory animated if planning succeeds. Finally, press Next to
91
91
OMPL constrained planning orientation constraint example
92
92
</video>
93
93
94
-
This example may take longer to plan. Press Next to remove all markers and end the example. If planning fails, you can start at the beginning of the section to try again.
94
+
This example may take longer to plan. If planning fails, you can start at the beginning of the section to try again. Press Next to try mixed constraints,
OMPL constrained planning orientation constraint example
101
+
</video>
102
+
103
+
Press Next to remove all markers and end the example.
96
104
97
105
How to Set Constraints
98
106
^^^^^^^^^^^^^^^^^^^^^^
@@ -250,7 +258,7 @@ Building on the previous constraint, we can make it a line by also reducing the
250
258
Orientation Constraints
251
259
-----------------------
252
260
253
-
Finally, we can place constraints on orientation. We set the target pose to be the other side of the robot for a more drastic move as we are no longer constrained by position.
261
+
We can place constraints on orientation. We set the target pose to be the other side of the robot for a more drastic move as we are no longer constrained by position.
254
262
255
263
.. code-block:: c++
256
264
@@ -289,3 +297,39 @@ Set up the planning problem as before and plan.
289
297
move_group_interface.setPoseTarget(target_pose);
290
298
move_group_interface.setPlanningTime(10.0);
291
299
move_group_interface.plan(plan);
300
+
301
+
302
+
Mixed Constraints
303
+
-----------------
304
+
305
+
Finally, we can set both a position and an orientation constraint. We will use the same target pose that we used for the orientation constraint.
306
+
307
+
.. code-block:: c++
308
+
309
+
target_pose = get_relative_pose(-0.6, 0.1, 0);
310
+
311
+
We will also reuse our orientation constraint - but this time, the original box constraint won't work as the target pose is outside of our original box. Let's modify the box pose and dimensions such that the goal pose is reachable. Be aware that having a both a position and orientation constraint can drastically shrink the reachable area - the target pose not only needs to be within the box constraint as mentioned, but needs to be reachable while satisfying the orientation constriant, which is more difficult to visualize.
0 commit comments