AndrejOrsula / pymoveit2

Basic Python interface for MoveIt 2 built on top of ROS 2 actions and services
BSD 3-Clause "New" or "Revised" License
124 stars 44 forks source link

Add Path Constraints #42

Closed amalnanavati closed 6 months ago

amalnanavati commented 6 months ago

Description

MoveIt2 allows planning with path constraints (e.g., see here) but pymoveit2 does not currently support it. This PR does the following:

  1. Separates the logic to create constraints from the logic to set goal constraints, so that the constraint creation functions can be reused.
  2. Extends the API to allow for setting orientation, position, and joint constraints as path constraints (in addition to the existing option of setting them as goal constraints).
  3. Adds an example showcasing the orientation path constraint capability.

Note that this PR is joint with panda_ign_moveit2#29, which enables OMPL Constrained Planning for efficient planning with orientation path constraints.

Testing

Config:

Testing:

Future Work

  1. Limiting position constraints to a sphere made sense for goal constraints, but no longer makes sense for path constraints (e.g., look at the tutorial, that uses a box as opposed to a sphere). Thus, future work should generalize position constraints to allow for any Solid Primitive.
  2. We currently don't have examples showcasing the use of position and joint path constraints. They should work in theory, given that they reuse the same code used for position/joint goal constraints and orientation path constraints, but that has not been tested. Future work includes adding examples for position and joint path constraints.