moveit_task_constructor
moveit_task_constructor copied to clipboard
Rework execution
This is a draft I had lying around for a while to rework MTC solution execution. Instead of calling the move_group's capability, the idea is to directly interface MoveIt's TrajectoryExecutionManager
and thus allow callbacks for each sub-trajectory segment. To this end, this PR reimplements MoveIt's PlanExecution
to:
- allow for both start and end callbacks for each segment in an
ExecutableMotionPlan
(the original PlanExecution only allowed for end effects) Of course, in principle it would suffice to have start or end effects only. However, I found it simpler to define preparatory and cleanup tasks of a specific segment within that segment instead of shifting one or the other to the previous/next segment. - to run a sequence of related trajectories without risking interference with another caller
The latter functionality was also implemented by https://github.com/ros-planning/moveit/pull/3243 meanwhile.
The old Task::execute() method was moved into a free function execute()
, still calling the move_group capability.
However, a new free function executableMotionPlan(SolutionBase)
is provided to create the ExecutableMotionPlan
for use with the new PlanExecution
.
This needs to be consolidated with https://github.com/ros-planning/moveit/pull/3243. @cambel and @v4hn: Can we organize a video conference to discuss open TODOs?