How do I add serval pause during a motion

Hi everyone,

I am trying to add several pauses for 1 second during one motion from point A to point B, there are constant distance between each pause.

How can I do that?

Thanks in advance!

In Polyscope add a β€œWAIT” node between the waypoints and set the time to 1 second.

That would not answer their needs.
In a program like:

– Waypoint_1
– Wait 1s
– Waypoint_2

What will happen is that the program will stop for one second at the position of Waypoint_1 and will then move towards Waypoint_2.

If I understood correctly @zongyao.chen , they would like to set a wait in the middle of the motion.
There are 2 ways to do it:

  • If the number of pauses is little, it could be possible to add a couple of:
    – newWaypoint
    – Wait 1s

For example by modifying the previous program like this:
– Waypoint_1
– newWaypoint_1
– Wait 1s
– newWaypoint_2
– Wait 1s
– Waypoint_2

The program would now stop for 1 second at newWaypoint_1 and newWaypoint_2, effectively adding 2 pauses inbetween the motion from Waypoint_1 to Waypoint_2.

  • The other way consists on knowing the total distance and movement vector between Waypoint_1 and Waypoint_2 and using a Move direction until X amount of millimeters have been traversed inside a loop that is iterated Y times where Y is the number of pauses in the movement.

The second method is more complex and requires some small amount of programming to obtain the total distance, distance between pauses and movement vector.
I would definately prefer the first method if the option is available.

Hope it helped!

Thanks for the answer. @chio999
In fact, the pause positions depends on the initial start point and the final end point.
The method two you mentioned may works.
Sometimes we want to perform a circular motion, and pause for 1 second after moving an constant distance,
How can i calculated the distance I had travelled.

Different application but same basic process. You need to store the two positions then use some maths to find the mid point.

1 Like

As you said, I had the programed circler motion, and I check the distance between the current pose and the starting pose, if it exceed the tolerance, I want to pause for a second, and continue running the unfinished circle. I set the pause for a second in a thread, but it kept running without pause when it exceed? how do I pause the motion in main program.
here are my code:
start pose
end pose
if pose_dist(currentpose,pushpose)>tolerance
wait 2.0