sync multiple movements

I remote control MRL with a python task using the REST API of MRL.

Seen that  "moveToBlocking" also works with the REST API so my program waits for the movement to finish - GREAT!!

But how can I initiate multiple movements and wait for the last one to finish?

moz4r's picture

If you are using Inmoov

If you are using Inmoov service there is maybe some magic.

2 approach : 

- Multiple different servo

lefthand.thumb.moveTo(90)
head.rothead.moveTo(180)
i01.waitTargetPos()

 

- Skeleton group, moveToBlocking

i01.moveTorsoBlocking(90,90,90)

 

Please note if velocity is not set to 1 servo of the queue, the global wait is fixed to ( if I remember 15 seconds )

juerg's picture

nice to see that you already

nice to see that you already have existing solutions for this - thought I might have to loop over all the involved servos and check on their move state.

the i01.waitTargetPos() looks to be the thing I was looking for. So in my python thask I can do e.g. a

requests.get(http://192.168.0.17:8888/api/service/i01/waitTargetPos)

thanks!!