0
Wird überprüft

How to cancel IKPath to start another IKPath

Andreas vor 2 Wochen in realvirtual.io Starter and Professional aktualisiert vor 5 Tagen 2

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

+1
Wird überprüft

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

Image 1238


After picking the box the robot path gets canceled and another path starts with linear movement.


It might help you with your development work.