How do I set the start position for the group.asyncMove() command?

asked 2017-01-11 14:01:54 -0600

matl gravatar image

updated 2017-01-17 04:36:34 -0600

gvdhoorn gravatar image

Hello all,

I am writing a script in C++ to move a universal robot with linear or ptp movements depending on paramters set in a configuration file. For example I want to move between Points 1,2,3 linear and then switch to ptp for points 4,5,6 and then switch back to lin again for 7,8,9.

The basic script is working but there is one big problem I could not solve yet. In order to move from 3 to 4 and 6 to 7 I have to tell the planner that the start state of the robot has been changed. That works for "group.computeCartesianPath" with "group.setStartStateToCurrentState();" but the same command does not work with "group.asyncMove()".

Also group.setStartState(*group.getCurrentState()) as well as another command I found in a example script (but I can not remember it) don't work.

I did not even receive a error message like "Motion Planning should always start at the current position of the robot. Ignoring new start State and planning from current state".

My next try was to create a plan and use group.execute() after setting the new start state with something like plan.start_state_=group.getCurrentState() but I got some new error messages and before I spend some hours on solving these I wanted to know beforehand if the "plan" approach is going to work eventually and if there is a simpler solution.

So my question: How do I set the start position for the group.asyncMove() command?

Thank you.

edit retag flag offensive close merge delete

Comments

I could really use a idea or hint on where the problem might be. If the question is to vague i can gladly try to explain myself in more detail. Any suggestion will do. Thank you!

matl gravatar image matl  ( 2017-01-17 04:20:19 -0600 )edit