moveit / moveit_task_constructor

A hierarchical multi-stage manipulation planner
https://moveit.github.io/moveit_task_constructor
BSD 3-Clause "New" or "Revised" License
175 stars 150 forks source link

Action call in a stage #601

Open karanchahal opened 1 month ago

karanchahal commented 1 month ago

Hi, I want to run a custom stage called attach object which runs things externally to MTC/Move it.

So I want to run this action call when task is being executed and robot is in the correct position, but when I add this stage into MTC (the stage is inherited from PropogatingForward stage), in the task.plan() stage it is being executed and the rest of my stack fails since robot is not in the correct position.

How do I add the constraint of only running code in the custom stage during task.execute() ?

rhaschke commented 1 month ago

Currently, MTC doesn't allow for running code during task execution: it is primarily a framework planning trajectories. Side-effects cannot be transmitted to the move_group node for execution. If you just want to attach a collision object to the robot, use the ModifyPlanningScene stage.