Execute subtrajectories with MTC Python API #628
-
Hi, is there a possibility to execute subtrajectories directly over MTC task.execute method? My current workaround is to publish the solution to an moveit_py node (with Introspection enabled, for accessing the solution infos), access the subtrajectories and execute it. Isn't there a more elegant solution without this "overhead" of starting another node, which sends the (sub)solutions to the move_group node? Why do I need this: I want to realize automatic and step mode and I have some external IOs which have to be set in between the subtrajectories, related to #194 and #626. Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
Of course, you can send a subsolution for execution as well. The Task::execute() method takes any solution as argument: moveit_task_constructor/core/src/task.cpp Line 285 in dc8399f I guess, you already tried that. What issues did you run into? Don't know how to access subtrajectories? or Maybe your problem is that you are running python code and those classes are not yet wrapped? |
Beta Was this translation helpful? Give feedback.
I figured out the problem: toMsg() requires the task's introspection object passed as an extra argument.
I pushed a commit allowing to do so:
task.solutions[0].toMsg(task.introspection())
.