0
Answered
How to cancel IKPath to start another IKPath
Andreas 3 months ago
in realvirtual.io Starter and Professional
•
updated by Support 2 months ago •
3
Hello,
how can I properly cancel the currently running IKPath to start another Path. For example to force home positioning.
I want to cancel and start the paths by another script.
Best regards,
Andreas
Customer support service by UserEcho
Hi, for the moment canceling a running path is not implementet. You would need to change it in the scripts. I am adding it to the development list.
I made some pre-work and implemented this public function in IKPath.cs:
**********
//! Added by AF for canceling active paths
public void CancelPath()
{
if (CurrentTarget != null)
CurrentTarget.OnLeaveTarget();
LastTarget = null;
CurrentTarget = null;
NumTarget = 0;
PathIsActive = false;
WaitForSignal = false;
// Reset all Values for all motion types
drivesatposition.Clear();
linearpathspeed = 0;
linearpathacceleration = 0;
linearacceleration = false;
lineardeceleration = false;
LinearPathActive = false;
LinearPathPos = 0;
}
**********
I realized a problem though.
If the current path gets canceled and the next path starts with a linear movement to the target, the robot makes a "jump".
This is caused in RobotIK.cs
After picking the box the robot path gets canceled and another path starts with linear movement.
It might help you with your development work.