Check coordinates in workspace robot

Hi all,

In Python, is there an easy way to check if a certain x,y,z,rx,ry,rz coordinate is within the workspace of a robot? I checked vcHelpers.Robot2 but can’t seem to find any methods.

I’m working on a model in which I have to move the underlaying product constantly, but it has to speed up if the robot does not have any actions in its workspace and speed down if it has many actions in its workspace.

1 Like

Does anyone know if there is a function for this?

from vcScript import *
import vcMatrix

comp = getComponent()
controller = comp.findBehaviour("Controller")
matrix = vcMatrix.new()
matrix.translateRel(1000.0, 0.0, 1400.0)
matrix.setWPR(0.0, 0.0, 90.0)
target = controller.createTarget(matrix)
print target.getConfigWarnings()

print VC_MOTIONTARGET_KW_OK
print VC_MOTIONTARGET_KW_UNREACHABLE
print VC_MOTIONTARGET_KW_JOINTLIMIT
print VC_MOTIONTARGET_KW_SINGULAR

3 Likes

Thank you!! I will try it