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!
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:
MoveL
β 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:
For example by modifying the previous program like this:
MoveL
β 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 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.
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:
moveP:
start pose
end pose
Thread
pushpose:=get_actual_tcp_pose()
tolerance:=0.01
Loop
currentpose:=get_actual_tcp_pose
if pose_dist(currentpose,pushpose)>tolerance
wait 2.0
pushpose:=get_actual_tcp_pose
sync()
Thanks!