vcMotionTarget
vcMotionTarget is a motion target for a robot, which may include joint and tool behavior as well as speed and configuration settings for orientation solutions.
Properties
Name | Type | Access | Description |
AccuracyMethod | Enumeration | RW | Defines the zone of accuracy type to use for the target, for example distance, time or velocity.
See Motion Target Constants for more information. |
AccuracyValue | Real | RW | Defines the limit used in AccuracyMethod. |
AngularSpeed | Real | RW | Defines the rate of target rotation (degrees/s), which is only used for non-joint motions. |
BaseMatrix | vcMatrix | RW | Defines a matrix referenced by the target as robot base frame. If set, this property overrides BaseName. |
BaseName | String | RW | Defines base frame in robot controller referenced by the target. |
CartesianAcceleration | Real | RW | Defines the maximum Cartesian acceleration (units/s^2) of linear motion to target. |
CartesianDeceleration | Real | RW | Defines the maximum Cartesian deceleration (units/s^2) of linear motion to target. |
CartesianSpeed | Real | RW | Defines the maximum Cartesian speed (units/s) of linear motion to target. |
ConfigCount | Integer | R | Gets the number of available configurations in robot. |
ConfigurationMode | Enumeration | RW | Defines the robot's joint configuration during linear interpolation, which can be fixed, an attempt to maintain current configuration or one interpolated using joint values.
See Motion Target Constants for more information. |
JointSpeedFactor | Real | RW | Defines the joint speed at the target, as a factor of maximum speed determined in robot controller. |
JointTurnMode | Enumeration | RW | Defines the turn mode for joints in the target.
The default mode is for joints to turn nearest within their set limits. See Motion Target Constants for more information. |
JointValues | List of Real | RW | Defines joints values of target if using joint interpolation.
To read and write joint values, first get a handle for this property, edit the values of that handle, and then assign that handle as the value of this property. See Example. Edit joint values in motion target for more information. |
MotionType | Enumeration | RW | Defines the motion type of the target, which is either linear or point-to-point/joint.
See Motion Target Constants for more information. |
OrientationInterpolationMode | Enumeration | RW | Defines the orientation interpolation mode for linear movement.
See Orientation Interpolation Mode Constants for more information. |
PositionerIndex | Integer | RW | Defines current positioner used by robot to reach target. |
RobotConfig | Integer | RW | Defines robot configuration at target, which is dependent on the kinematic structure. |
Target | vcMatrix | RW | Defines position matrix of target relative to its base frame or matrix. |
TargetMode | Enumeration | RW | Defines how position matrix of target relates to robot.
See Motion Target Constants for more information. |
ToolMatrix | vcMatrix | RW | Defines a matrix referenced by the target as the robot tool frame. If set, this property overrides ToolName. |
ToolName | String | RW | Defines tool frame in robot referenced by target. |
UseJoints | Boolean | RW | Defines if JointValues property is used to define target or its Target property. That is, whether the target is defined using joint values or a position matrix that is used to calculate joint values.
If you set JointValues, this property is automaticaly set to True. If you set Target, this property is automatically set to False. |
Methods
Name | Return Type | Parameters | Description |
getConfigWarning | Enumeration | Integer configuration | Tests a robot configuration for any potential issues associated with target.
The returned value indicates singularity (S), joint limits (J) and unreachable (U) errors using a format of SJU. 0 = 000 1 = 001 2 = 010 3 = 011 4 = 100 5 = 101 6 = 110 7 = 111 See Motion Target Constants for more information. |
getConfigWarnings | List of Enumeration | None | Tests all configurations in kinematic structure for potentials errors related to target.
See getConfigWarning() method for more information on possible returned values. |
getPositionerRootToPositionerFlange | vcMatrix | None | Returns the offset from robot positioner root node to its flange node. |
getRootNodeToPositionerRoot | vcMatrix | None | Returns the offset from root node to robot positioner root node. |
getRootNodeToRobotRoot | vcMatrix | None | Returns the offset from root node to robot root node. |
getRobotRootToRobotFlange | vcMatrix | None | Returns the offset from robot root node to robot flange node. |
getSimWorldToRootNode | vcMatrix | None | Returns the offset from 3D world origin to root node. |
getSimWorldToRobotTool | vcMatrix | None | Returns the offset from 3D world origin to tool frame active in robot. |
getSimWorldToRobotWorld | vcMatrix | None | Returns the offset from 3D world origin to Robot World Frame. |
getWorldToRootNode | vcMatrix | None | Returns the offset from 3D world origin to root node. (Deprecated) |
getWorldToRobotTool | vcMatrix | None | Returns the offset from 3D world origin to tool frame active in robot. (Deprecated) |
Examples
Example. Edit joint values in motion target
from vcScript import * #this example uses a generic articulated robot from webcat def OnRun(): comp = getComponent() rc = comp.findBehaviour("Controller") mt = rc.createTarget() mt.MotionType = VC_MOTIONTARGET_MT_JOINT mt.UseJoints = True #one way to adjust joint values jv = mt.JointValues for i in xrange(len(jv)): jv[i] = 0 mt.JointValues = jv rc.addTarget(mt) #another way jv[2] = 90.0 mt.JointValues = jv rc.addTarget(mt) rc.move() |