# Traversing multiple known poses using movement callbacks

**URL:** <https://forum.universal-robots.com/t/traversing-multiple-known-poses-using-movement-callbacks/42020>\
**Category:** URCap Development\
**Created:** [January 7, 2026, 2:47am UTC](https://forum.universal-robots.com/t/traversing-multiple-known-poses-using-movement-callbacks/42020 "2026-01-07T02:47:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mat.elwarth](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@mat.elwarth](https://forum.universal-robots.com/u/mat.elwarth)\
**Post date:** [January 7, 2026, 2:47am UTC](https://forum.universal-robots.com/t/traversing-multiple-known-poses-using-movement-callbacks/42020/1 "2026-01-07T02:47:33Z")

</div>

Hi All,

I’m wondering if there is a way to, from a single action, jog a robot through multiple (in my application case, two) known poses. For instance, I have a button which when pressed I want to cause two requestUserToMoveRobot() calls.

Currently I’ve nested the second call within the onComplete() function of the first RobotMovementCallback, my reasoning being that once the first callback is complete, another will be pulled up; but when I use my button the robot only jogs to the first pose.

```java
...requestUserToMoveRobot(approachPose, new RobotMovementCallback() {
    @Override
    public void onComplete(MovementCompleteEvent event) {
    // after reaching approach, request move to target

        ...requestUserToMoveRobot(targetPose, new RobotMovementCallback(){
            @Override
            public void onComplete(MovementCompleteEvent event) {
                return;
            }

        });
    }
});

```

Is what I’m trying to achieve possible with my current approach? Or is there another way to achieve what I want?

Thanks

---

<div class="post-metadata">

**Author:** ![eric.feldmann](https://avatars.discourse-cdn.com/v4/letter/e/94ad74/32.png) [@eric.feldmann](https://forum.universal-robots.com/u/eric.feldmann)\
**Post date:** [January 7, 2026, 5:44pm UTC](https://forum.universal-robots.com/t/traversing-multiple-known-poses-using-movement-callbacks/42020/2 "2026-01-07T17:44:51Z")

</div>

Huh. That’s what I would have advised doing. Can you confirm that the “onComplete” callback is functioning properly? Put a print statement in there and check the console maybe? And is the second call to move passing in a different position for sure? It doesn’t think they are the same, does it?

---

<div class="post-metadata">

**Author:** ![mat.elwarth](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@mat.elwarth](https://forum.universal-robots.com/u/mat.elwarth)\
**Post date:** [January 7, 2026, 7:50pm UTC](https://forum.universal-robots.com/t/traversing-multiple-known-poses-using-movement-callbacks/42020/3 "2026-01-07T19:50:41Z")

</div>

It’s weird. The robot only traverses to the first point, then you press complete and nothing further happens. If you press the ‘test’ button again (after traversing to the first point), then the robot will move to the second point, whose call is nested in the onComplete of the first movement callback.

I’m certain the points are not the same.

---

<div class="post-metadata">

**Author:** ![mat.elwarth](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@mat.elwarth](https://forum.universal-robots.com/u/mat.elwarth)\
**Post date:** [January 9, 2026, 12:27am UTC](https://forum.universal-robots.com/t/traversing-multiple-known-poses-using-movement-callbacks/42020/4 "2026-01-09T00:27:33Z")

</div>

Have you done what I tried before to the desired effect?

---

<div class="post-metadata">

**Author:** ![eric.feldmann](https://avatars.discourse-cdn.com/v4/letter/e/94ad74/32.png) [@eric.feldmann](https://forum.universal-robots.com/u/eric.feldmann)\
**Post date:** [January 9, 2026, 2:36pm UTC](https://forum.universal-robots.com/t/traversing-multiple-known-poses-using-movement-callbacks/42020/5 "2026-01-09T14:36:05Z")

</div>

I have not. What you tried doing is exactly what I would have thought to do as well. Now you’re in the not-so-fun position of trying to hack your way around some Polyscope nuance that isn’t documented anywhere. Do a Thread.Sleep() after the first completion then fire your next movementRequest. Or launch a thread first and run the first movement, then signal to the thread that it’s done and have the thread call the next movement request.

---

<div class="post-metadata">

**Author:** ![mat.elwarth](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@mat.elwarth](https://forum.universal-robots.com/u/mat.elwarth)\
**Post date:** [January 11, 2026, 7:49pm UTC](https://forum.universal-robots.com/t/traversing-multiple-known-poses-using-movement-callbacks/42020/6 "2026-01-11T19:49:14Z")

</div>

Sweet as. I’ve tried the first one already, so I’ll see about the second now.

---

<div class="post-metadata">

**Author:** ![mat.elwarth](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@mat.elwarth](https://forum.universal-robots.com/u/mat.elwarth)\
**Post date:** [January 11, 2026, 8:37pm UTC](https://forum.universal-robots.com/t/traversing-multiple-known-poses-using-movement-callbacks/42020/7 "2026-01-11T20:37:54Z")

</div>

@eric.feldmann ‘s suggestion worked.

```java
final CountDownLatch approachDone = new CountDownLatch(1);
Thread moverThread = new Thread(new Runnable() {
    @Override
    public void run() {
    // Request user to move to approach pose; signal when complete
    apiProvider_.getUserInterfaceAPI().getUserInteraction().getRobotMovement()
    .requestUserToMoveRobot(approachPose, new RobotMovementCallback() {
        @Override
        public void onComplete(MovementCompleteEvent event) {
            approachDone.countDown();
        }
    });

    // Wait for approach to complete (signalled by callback)
    try {
        approachDone.await();
    } catch (InterruptedException e) {
        Thread.currentThread().interrupt();
        return;
    }

    apiProvider_.getUserInterfaceAPI().getUserInteraction().getRobotMovement()
        .requestUserToMoveRobot(targetPose, new RobotMovementCallback() {
        @Override
        public void onComplete(MovementCompleteEvent event) {
            // completed target move
            return;
        }
    });
}
}, "TestNodeMover-thread");
moverThread.start();

```

This is not super clean, because having two movement callbacks brings up to windows, but it works.
