this is possible by setting the setStateFeasibilityPredicate
User-defined constraints:
User defined constraints can also be specified to the PlanningScene class. This is done by specifying a callback using the setStateFeasibilityPredicate function. Here’s a simple example of a user-defined callback that checks whether the “r_shoulder_pan” of the PR2 robot is at a positive or negative angle:
Note that all the planners available through MoveIt! and OMPL will currently perform collision checking, constraint checking and feasibility checking using user-defined callbacks.
``
However there is no way to access the planning scene in the task constructor, is there another way to do this?
Many thanks
There is currently no way to set a user-defined feasibility callback. You just can configure a Constraint msg. However, this doesn't allow for complex joint dependencies to be checked.
I am trying to make the planner to generate a trajectory such that respects a relation between two joints min_angle <= joint2 _angle - joint3_angle <= max_angle according to this https://moveit.readthedocs.io/en/latest/doc/pr2_tutorials/planning/src/doc/planning_scene_tutorial.html#checking-kinematic-constraints
this is possible by setting the setStateFeasibilityPredicate
`` However there is no way to access the planning scene in the task constructor, is there another way to do this? Many thanks