moveit_task_constructor
moveit_task_constructor copied to clipboard
[ros2] How to specify a controller to use when executing a trajectory through the ExecuteTaskSolutionCapability ROS interface?
This is similar to this MoveIt2 issue I posted: https://github.com/ros-planning/moveit2/issues/1182
When the ExecuteTaskSolutionCapability converts the solution message into a series of ExecutableTrajectory
objects, it does not have a way to set the names of the controllers that should be used to execute each trajectory segment. This results in the TrajectoryExecutionManager having to figure out on its own what controller to use for each set of joints, which (as described in the linked issue) doesn't always work correctly if there are multiple controllers to choose from.
One solution is to add new fields to the MTC Solution or SubTrajectory messages to define what controllers should be used for each segment. I think this is an important supporting piece to this suggestion by @v4hn about adding additional properties to MTC Stages to set the controller to use during execution. This would be an API change, though, so I wanted to get feedback from others about the best path forward.
There is already a pending PR for this: https://github.com/ros-planning/moveit_task_constructor/pull/123
Thank you for linking that! I submitted #355 as a ROS 2 version of #123, with some additional updates to add suggestions from #123's review.