Class Mechanism
A mechanism is a GraphicComponent that a number of joints controlling the movement of a number of links. A robot is the archetypal mechanism in RobotStudio, but it is not the only kind.
Inherited Members
Namespace: ABB.Robotics.RobotStudio.Stations
Assembly: ABB.Robotics.RobotStudio.Stations.dll
Syntax
[Persistent("MechanismInstance")]
public class Mechanism : GraphicComponent, IHasTransform, IHasFrames, IAttachableChild, ISupportCopy, IHasGraphicComponents
Constructors
View SourceMechanism(PimDocument)
Declaration
protected Mechanism(PimDocument doc)
Parameters
| Type | Name | Description |
|---|---|---|
| PimDocument | doc |
Fields
View Source_jointValues
Declaration
[Undoable]
[Persistent("JointValues", Convert = PimConvert.NoConversion)]
[CLSCompliant(false)]
protected double[] _jointValues
Field Value
| Type | Description |
|---|---|
| double[] |
_numJoints
Declaration
[Undoable]
[Persistent("NumJoints")]
[CLSCompliant(false)]
protected int _numJoints
Field Value
| Type | Description |
|---|---|
| int |
Properties
View SourceAdditionalComponents
Gets a GraphicComponentCollection that contains child components that are not mechanism links.
Declaration
public GraphicComponentCollection AdditionalComponents { get; }
Property Value
| Type | Description |
|---|---|
| GraphicComponentCollection |
GraphicComponents
Gets a GraphicComponentCollection that contains all the links of the mechanism.
Declaration
public GraphicComponentCollection GraphicComponents { get; }
Property Value
| Type | Description |
|---|---|
| GraphicComponentCollection |
KinematicsFlags
Returns the kinematic type and other properties for a Mechanism of type Robot
Declaration
public KinematicsFlags KinematicsFlags { get; }
Property Value
| Type | Description |
|---|---|
| KinematicsFlags |
Mass
The mass of the mechanism. Used when the mechanism is used as a tool.
Declaration
public double Mass { get; }
Property Value
| Type | Description |
|---|---|
| double |
MechanismType
Gets the type.
Declaration
public MechanismType MechanismType { get; }
Property Value
| Type | Description |
|---|---|
| MechanismType |
ModelBaseFrame
Returns the nominal base frame of this model
Declaration
public Matrix4 ModelBaseFrame { get; }
Property Value
| Type | Description |
|---|---|
| Matrix4 |
ModelName
Gets the name of the model.
Declaration
public string ModelName { get; }
Property Value
| Type | Description |
|---|---|
| string |
MultiAxisRobot
Returns true if this is a multi axis robot (more than six active joints)
Declaration
public bool MultiAxisRobot { get; }
Property Value
| Type | Description |
|---|---|
| bool | True if multi axis robot. |
NumActiveJoints
Gets the number of active joints, i.e. joints that are not dependant on other joints. This equals the number of values in the array when getting or setting joint values.
Declaration
public int NumActiveJoints { get; }
Property Value
| Type | Description |
|---|---|
| int |
Task
Gets the associated RsTask.
Declaration
public RsTask Task { get; }
Property Value
| Type | Description |
|---|---|
| RsTask |
TraceColor
Gets or sets the color used to trace the TCP during simulation.
Declaration
public Color? TraceColor { get; set; }
Property Value
| Type | Description |
|---|---|
| Color? |
Remarks
This value is not persisted. If null, the color specified by the user in the TCP Trace dialog is used.
TraceTCP
Enables or disables a graphical trace of the active TCP during simulation.
Declaration
public bool TraceTCP { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
Only valid for TCP robots.
UsesCfx
Returns true if the Cfx parameter is used by this robot model, otherwise false. The performance of GetAllConfigurations is better for robots that does not use Cfx since the number of possible configurations are smaller.
Declaration
public bool UsesCfx { get; }
Property Value
| Type | Description |
|---|---|
| bool | True if Cfx is used, otherwise false. |
Methods
View SourceAfterLoad(PimDocument)
Declaration
protected override void AfterLoad(PimDocument doc)
Parameters
| Type | Name | Description |
|---|---|---|
| PimDocument | doc |
Overrides
View SourceAttachToFlange(IAttachableChild, bool)
Attaches the specified IAttachableChild to the flange of the Mechanism. The Mechansim must have exactly one flange.
Declaration
public bool AttachToFlange(IAttachableChild child, bool mount)
Parameters
| Type | Name | Description |
|---|---|---|
| IAttachableChild | child | The IAttachableChild to attach to the link of this flange. |
| bool | mount | Specifies if the position of the child shall be affected by the attachment or not. See Attachment for details. |
Returns
| Type | Description |
|---|---|
| bool | True on success. |
AttachToFlange(IAttachableChild, bool, Matrix4)
Attaches the specified IAttachableChild to the first flange of the Mechanism.
Declaration
public bool AttachToFlange(IAttachableChild child, bool mount, Matrix4 offset)
Parameters
| Type | Name | Description |
|---|---|---|
| IAttachableChild | child | The IAttachableChild to attach to the link of this flange. |
| bool | mount | Specifies if the position of the child shall be affected by the attachment or not. See Attachment for details. |
| Matrix4 | offset | Specifies the offset from the parent to the child. |
Returns
| Type | Description |
|---|---|
| bool | True on success. |
CalculateForwardKinematics(double[], out ForwardKinematicsResult)
Calculates forward kinematics for the mechanism. Given the specified mechanism joint values, the resulting TCP (tool0) transform is returned.
Declaration
public Matrix4 CalculateForwardKinematics(double[] jointValues, out ForwardKinematicsResult insideLimits)
Parameters
| Type | Name | Description |
|---|---|---|
| double[] | jointValues | Array of mechanism joint values, for which to calculate forward kinematics. |
| ForwardKinematicsResult | insideLimits | Out parameter that specifies if the forward kinematics calculation failed or succeded. |
Returns
| Type | Description |
|---|---|
| Matrix4 | The transform of the TCP (tool0) if the mechanism were positioned according to the specified joint values. |
Remarks
This method is thread-safe as long as no other RobotStudio API calls are made concurrently that may change the model. Exception: Mechanisms with closed kinematic loops such as the IRB360.
CalculateInverseKinematics(Matrix4, Matrix4, bool, out double[])
Declaration
[Obsolete("Use CalculateInverseKinematicsAsync() instead")]
public bool CalculateInverseKinematics(Matrix4 pose, Matrix4 toolMat, bool fixedObject, out double[] resultJointVector)
Parameters
| Type | Name | Description |
|---|---|---|
| Matrix4 | pose | |
| Matrix4 | toolMat | |
| bool | fixedObject | |
| double[] | resultJointVector |
Returns
| Type | Description |
|---|---|
| bool |
CalculateInverseKinematics(Matrix4, double[], double[], Matrix4, bool, out double[])
Calculate inverse kinematics given a pose and a starting set of joint values.
Declaration
public bool CalculateInverseKinematics(Matrix4 pose, double[] referenceJointValues, double[] integratedUnitsJointValues, Matrix4 toolMat, bool fixedObject, out double[] resultJointVector)
Parameters
| Type | Name | Description |
|---|---|---|
| Matrix4 | pose | |
| double[] | referenceJointValues | |
| double[] | integratedUnitsJointValues | |
| Matrix4 | toolMat | |
| bool | fixedObject | |
| double[] | resultJointVector | Out parameter containing the result. |
Returns
| Type | Description |
|---|---|
| bool | True on success. |
CalculateInverseKinematics(RsRobTarget, RsWorkObject, RsToolData, int[], out double[])
Calculates inverse kinematics for the mechanism given a RsTarget, RsWorkObject and RsToolData.
Declaration
public bool CalculateInverseKinematics(RsRobTarget robTarget, RsWorkObject workObject, RsToolData tool, int[] cfg, out double[] resultJointVector)
Parameters
| Type | Name | Description |
|---|---|---|
| RsRobTarget | robTarget | |
| RsWorkObject | workObject | |
| RsToolData | tool | |
| int[] | cfg | |
| double[] | resultJointVector | Out parameter that contains the joint values, the mechanism would have if it was moved to the target position. If this method returns false, the joint values are undefined. |
Returns
| Type | Description |
|---|---|
| bool | True, if the mechanism can move to the target position, otherwise false. |
CalculateInverseKinematics(RsTarget, RsToolData, bool, out double[])
Calculates inverse kinematics for the mechanism. Given the specified RsTarget and RsToolData, this method returns the joint values the mechanism would have if it was moved to the pose. A mechanism can often reach the specified pose with different arm configurations. Using the useConfiguration you force the arm configuration stored in the RsTarget to be used.
Declaration
public bool CalculateInverseKinematics(RsTarget target, RsToolData tool, bool useConfiguration, out double[] resultJointVector)
Parameters
| Type | Name | Description |
|---|---|---|
| RsTarget | target | The target position. This is the position that shall coincide with the tool. |
| RsToolData | tool | The tool that should coincide with the target. The RobotHold property is used to determince if the tool is stationary or held by the robot. |
| bool | useConfiguration | Specifies if the exact arm configuration stored in the target shall be used for the calculation. If set to true, the arm configuration is used. In this case this method returns true only if the mechanism can move to the specified target with its specified arm configuration. If the parameter is set to false, the arm configuration that is closes to the current mechanism joint values is returned, if the target is reachable. |
| double[] | resultJointVector | Out parameter that contains the joint values, the mechanism would have if it was moved to the target position. If this method returns false, the joint values are undefined. |
Returns
| Type | Description |
|---|---|
| bool | True, if the mechanism can move to the target position, otherwise false. |
Remarks
When using this overload the target position shall not be converted to to mechanism base frame coordinates.
CalculateInverseKinematicsAsync(Matrix4, Matrix4, bool)
Calculate inverse kinematics from a pose.
Declaration
public Task<double[]> CalculateInverseKinematicsAsync(Matrix4 pose, Matrix4 toolMat, bool fixedObject)
Parameters
| Type | Name | Description |
|---|---|---|
| Matrix4 | pose | |
| Matrix4 | toolMat | |
| bool | fixedObject |
Returns
| Type | Description |
|---|---|
| Task<double[]> |
CalculateInverseKinematicsAsync(Matrix4, double[], double[], Matrix4, bool)
Calculate inverse kinematics given a pose and a starting set of joint values.
Declaration
public Task<double[]> CalculateInverseKinematicsAsync(Matrix4 pose, double[] referenceJointValues, double[] integratedUnitsJointValues, Matrix4 toolMat, bool fixedObject)
Parameters
| Type | Name | Description |
|---|---|---|
| Matrix4 | pose | |
| double[] | referenceJointValues | |
| double[] | integratedUnitsJointValues | |
| Matrix4 | toolMat | |
| bool | fixedObject |
Returns
| Type | Description |
|---|---|
| Task<double[]> |
CalculateInverseKinematicsAsync(RsRobTarget, RsWorkObject, RsToolData, int[])
Calculates inverse kinematics for the mechanism given a RsTarget, RsWorkObject and RsToolData.
Declaration
public Task<double[]> CalculateInverseKinematicsAsync(RsRobTarget robTarget, RsWorkObject workObject, RsToolData tool, int[] cfg)
Parameters
| Type | Name | Description |
|---|---|---|
| RsRobTarget | robTarget | |
| RsWorkObject | workObject | |
| RsToolData | tool | |
| int[] | cfg |
Returns
| Type | Description |
|---|---|
| Task<double[]> | Joint values if the mechanism can move to the target position, otherwise null. |
CalculateInverseKinematicsAsync(RsTarget, RsToolData, bool)
Calculates inverse kinematics for the mechanism. Given the specified RsTarget and RsToolData, this method returns the joint values the mechanism would have if it was moved to the pose. A mechanism can often reach the specified pose with different arm configurations. Using the useConfiguration you force the arm configuration stored in the RsTarget to be used.
Declaration
public Task<double[]> CalculateInverseKinematicsAsync(RsTarget target, RsToolData tool, bool useConfiguration)
Parameters
| Type | Name | Description |
|---|---|---|
| RsTarget | target | The target position. This is the position that shall coincide with the tool. |
| RsToolData | tool | The tool that should coincide with the target. The RobotHold property is used to determince if the tool is stationary or held by the robot. |
| bool | useConfiguration | Specifies if the exact arm configuration stored in the target shall be used for the calculation. If set to true, the arm configuration is used. In this case this method returns true only if the mechanism can move to the specified target with its specified arm configuration. If the parameter is set to false, the arm configuration that is closes to the current mechanism joint values is returned, if the target is reachable. |
Returns
| Type | Description |
|---|---|
| Task<double[]> | Joint values if the mechanism can move to the target position, otherwise null. |
Remarks
When using this overload the target position shall not be converted to to mechanism base frame coordinates.
CanReach(Matrix4, Matrix4)
Declaration
[Obsolete("Use CanReachAsync() instead")]
public bool CanReach(Matrix4 pose, Matrix4 toolMat)
Parameters
| Type | Name | Description |
|---|---|---|
| Matrix4 | pose | |
| Matrix4 | toolMat |
Returns
| Type | Description |
|---|---|
| bool |
CanReach(RsRobTarget, RsWorkObject, RsToolData)
Declaration
[Obsolete("Use CanReachAsync() instead")]
public bool CanReach(RsRobTarget robTarget, RsWorkObject workObject, RsToolData tool)
Parameters
| Type | Name | Description |
|---|---|---|
| RsRobTarget | robTarget | |
| RsWorkObject | workObject | |
| RsToolData | tool |
Returns
| Type | Description |
|---|---|
| bool |
CanReachAsync(Matrix4, Matrix4)
Checks if the specified target position can be reached with the specified tool. A mechanism can often reach the specified target with different arm configurations. This method returns true as long as there is at least one arm configuration with which the robot can reach the target.
Declaration
public Task<bool> CanReachAsync(Matrix4 pose, Matrix4 toolMat)
Parameters
| Type | Name | Description |
|---|---|---|
| Matrix4 | pose | The target position. This is the position that shall coincide with the tool. |
| Matrix4 | toolMat | The tool frame that should coincide with the target. |
Returns
| Type | Description |
|---|---|
| Task<bool> | True, if the mechanism can move to the target position, otherwise false. |
CanReachAsync(RsRobTarget, RsWorkObject, RsToolData)
Checks if the specified target position can be reached with the specified tool. A mechanism can often reach the specified target with different arm configurations. This method returns true as long as there is at least one arm configuration with which the robot can reach the target.
Declaration
public Task<bool> CanReachAsync(RsRobTarget robTarget, RsWorkObject workObject, RsToolData tool)
Parameters
| Type | Name | Description |
|---|---|---|
| RsRobTarget | robTarget | The target position. This is the position that shall coincide with the tool. |
| RsWorkObject | workObject | The workobject to use. |
| RsToolData | tool | The tool that should coincide with the target. The RobotHold property is used to determine if the tool is stationary or held by the robot. |
Returns
| Type | Description |
|---|---|
| Task<bool> | True, if the mechanism can move to the target position, otherwise false. |
ClearTrace()
Removes the graphical trace of the TCP.
Declaration
public void ClearTrace()
CreateFromScript(string)
Declaration
[Obsolete("No longer supported")]
public static Mechanism CreateFromScript(string fileName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | fileName |
Returns
| Type | Description |
|---|---|
| Mechanism |
CreateFromScriptAsync(string)
This method is for internal use only.
Declaration
public static Task<Mechanism> CreateFromScriptAsync(string fileName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | fileName |
Returns
| Type | Description |
|---|---|
| Task<Mechanism> |
GetActiveJoints()
This method returns the (1-based) indices of the joints used by this mechanism, as an array of integers. The length of the array depends on how many joints are used. Some mechanism models have less than six axis. The indices can be used together with the result from GetJointValues()
Declaration
public int[] GetActiveJoints()
Returns
| Type | Description |
|---|---|
| int[] | An array containing the indices of each joint that is used by this mechanism. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | |
| ArgumentNullException |
See Also
View SourceGetAllConfigurations(RsMoveInstruction)
Declaration
[Obsolete("Use GetAllConfigurationsAsync() instead")]
public ConfigurationData[] GetAllConfigurations(RsMoveInstruction moveInstruction)
Parameters
| Type | Name | Description |
|---|---|---|
| RsMoveInstruction | moveInstruction |
Returns
| Type | Description |
|---|---|
| ConfigurationData[] |
GetAllConfigurations(RsMoveInstruction, bool)
Declaration
[Obsolete("Use GetAllConfigurationsAsync() instead")]
public ConfigurationData[] GetAllConfigurations(RsMoveInstruction moveInstruction, bool includeTurns)
Parameters
| Type | Name | Description |
|---|---|---|
| RsMoveInstruction | moveInstruction | |
| bool | includeTurns |
Returns
| Type | Description |
|---|---|
| ConfigurationData[] |
GetAllConfigurations(RsTarget, RsToolData)
Returns reachable arm configurations for the specified target.
Declaration
[Obsolete("Use GetAllConfigurationsAsync() instead")]
public ConfigurationData[] GetAllConfigurations(RsTarget target, RsToolData tool)
Parameters
| Type | Name | Description |
|---|---|---|
| RsTarget | target | The target for which to find reachable configurations. |
| RsToolData | tool | The tool that should coincide with the target. The RobotHold property is used to determince if the tool is stationary or held by the robot. |
Returns
| Type | Description |
|---|---|
| ConfigurationData[] | An array of ConfigurationData with which the mechanism can reach the specified target. |
GetAllConfigurations(RsTarget, RsToolData, bool)
Declaration
[Obsolete("Use GetAllConfigurationsAsync() instead")]
public ConfigurationData[] GetAllConfigurations(RsTarget target, RsToolData tool, bool includeTurns)
Parameters
| Type | Name | Description |
|---|---|---|
| RsTarget | target | |
| RsToolData | tool | |
| bool | includeTurns |
Returns
| Type | Description |
|---|---|
| ConfigurationData[] |
GetAllConfigurations(RsTarget, RsToolData, int[])
Declaration
[Obsolete("Use GetAllConfigurationsAsync() instead")]
public ConfigurationData[] GetAllConfigurations(RsTarget target, RsToolData tool, int[] cfxFilter)
Parameters
| Type | Name | Description |
|---|---|---|
| RsTarget | target | |
| RsToolData | tool | |
| int[] | cfxFilter |
Returns
| Type | Description |
|---|---|
| ConfigurationData[] |
GetAllConfigurations(RsTarget, RsToolData, int[], bool)
Declaration
[Obsolete("Use GetAllConfigurationsAsync() instead")]
public ConfigurationData[] GetAllConfigurations(RsTarget target, RsToolData tool, int[] cfxFilter, bool includeTurns)
Parameters
| Type | Name | Description |
|---|---|---|
| RsTarget | target | |
| RsToolData | tool | |
| int[] | cfxFilter | |
| bool | includeTurns |
Returns
| Type | Description |
|---|---|
| ConfigurationData[] |
GetAllConfigurations(bool)
Declaration
[Obsolete("Use GetAllConfigurationsAsync() instead")]
public ConfigurationData[] GetAllConfigurations(bool includeTurns)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | includeTurns |
Returns
| Type | Description |
|---|---|
| ConfigurationData[] |
GetAllConfigurationsAsync(RsMoveInstruction, bool)
Returns reachable arm configurations for the specified move instruction.
Declaration
public Task<ConfigurationData[]> GetAllConfigurationsAsync(RsMoveInstruction moveInstruction, bool includeTurns)
Parameters
| Type | Name | Description |
|---|---|---|
| RsMoveInstruction | moveInstruction | The move instruction for which to find reachable configurations. The target, tool and workobject specified in the instruction is used. |
| bool | includeTurns | Only the base configurations will be returned if this parameter is set to false. If true, the turns of the base configurations will be added. |
Returns
| Type | Description |
|---|---|
| Task<ConfigurationData[]> | An array of ConfigurationData with which the mechanism can reach the specified target. |
GetAllConfigurationsAsync(RsTarget, RsToolData, bool)
Returns reachable arm configurations for the specified target.
Declaration
public Task<ConfigurationData[]> GetAllConfigurationsAsync(RsTarget target, RsToolData tool, bool includeTurns)
Parameters
| Type | Name | Description |
|---|---|---|
| RsTarget | target | The target for which to find reachable arm configurations. |
| RsToolData | tool | The tool that should coincide with the target. The RobotHold property is used to determince if the tool is stationary or held by the robot. |
| bool | includeTurns | Only the base configurations will be returned if this parameter is set to false. If true, the turns of the base configurations will be added. |
Returns
| Type | Description |
|---|---|
| Task<ConfigurationData[]> | An array of ConfigurationData with which the mechanism can reach the specified target. |
GetAllConfigurationsAsync(RsTarget, RsToolData, int[], bool)
Returns reachable arm configurations for the specified target.
Declaration
public Task<ConfigurationData[]> GetAllConfigurationsAsync(RsTarget target, RsToolData tool, int[] cfxFilter, bool includeTurns)
Parameters
| Type | Name | Description |
|---|---|---|
| RsTarget | target | The target for which to find reachable configurations. |
| RsToolData | tool | The tool that should coincide with the target. The RobotHold property is used to determince if the tool is stationary or held by the robot. |
| int[] | cfxFilter | An array of integers which specifies Cfx values to be included in the resulting array. This parameter is only applicable for a bending bacwards robot. Cfx values which are not specified in the filter will not be considered, which will improve performance. Often you know that you are only interested in configurations where, for example, the wrist is in front of axis 1. , forRobotHold property is used to determince if the tool is stationary or held by the robot. |
| bool | includeTurns | Only the base configurations will be returned if this parameter is set to false. If true, the turns of the base configurations will be added. |
Returns
| Type | Description |
|---|---|
| Task<ConfigurationData[]> | An array of ConfigurationData with which the mechanism can reach the specified target. |
GetAllConfigurationsAsync(bool)
Returns reachable arm configurations for the current pose.
Declaration
public Task<ConfigurationData[]> GetAllConfigurationsAsync(bool includeTurns)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | includeTurns |
Returns
| Type | Description |
|---|---|
| Task<ConfigurationData[]> |
GetCalibrationPosition(int)
Returns the calibration transform for a joint.
Declaration
public Matrix4 GetCalibrationPosition(int jointIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| int | jointIndex |
Returns
| Type | Description |
|---|---|
| Matrix4 | Calibration transform (relative to model zero position) |
GetConfiguration()
Returns the current configuration.
Declaration
public ConfigurationData GetConfiguration()
Returns
| Type | Description |
|---|---|
| ConfigurationData |
GetConfiguration(double[])
Returns the configuration that corresponds to the given joint values.
Declaration
public ConfigurationData GetConfiguration(double[] jointValues)
Parameters
| Type | Name | Description |
|---|---|---|
| double[] | jointValues |
Returns
| Type | Description |
|---|---|
| ConfigurationData |
GetConfigurationAsync()
Returns the current configuration.
Declaration
public Task<ConfigurationData> GetConfigurationAsync()
Returns
| Type | Description |
|---|---|
| Task<ConfigurationData> |
GetConfigurationAsync(double[])
Returns the configuration that corresponds to the given joint values.
Declaration
public Task<ConfigurationData> GetConfigurationAsync(double[] jointValues)
Parameters
| Type | Name | Description |
|---|---|---|
| double[] | jointValues |
Returns
| Type | Description |
|---|---|
| Task<ConfigurationData> |
GetDenavitHartenbergParameters()
Gets the DenavitHartenbergParameters for all joints.
Declaration
public DenavitHartenbergParameters[] GetDenavitHartenbergParameters()
Returns
| Type | Description |
|---|---|
| DenavitHartenbergParameters[] | An array with all DenavitHartenbergParameters or null when none are available. |
Remarks
Denavit and Hartenberg parameters are only available for serial manipulators. The FlexPicker is an example of a cloosed loop manipulator for which the kinematics cannot be described using Denavit and Hartenberg parameters.
See Also
View SourceGetFlange(int)
Get a Flange to which other entities can be attached.
Declaration
public Flange GetFlange(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index of the flange to be retrieved. |
Returns
| Type | Description |
|---|---|
| Flange | A Flange |
GetFlanges()
Declaration
public Flange[] GetFlanges()
Returns
| Type | Description |
|---|---|
| Flange[] |
GetHomePosition()
Returns the defined home position in form of a collection of values. The number of values vary depending on the number of joints in the mechanism.
Declaration
public double[] GetHomePosition()
Returns
| Type | Description |
|---|---|
| double[] | An array of home position for each joint. |
GetJointLimits(double[], out double[], out double[])
Get joint limits given a set of joint values.
Declaration
public void GetJointLimits(double[] jointValues, out double[] minLimits, out double[] maxLimits)
Parameters
| Type | Name | Description |
|---|---|---|
| double[] | jointValues | Joint values to use when evaluating limits. Must have length equal to NumActiveJoints |
| double[] | minLimits | Out parameter giving the minimum limits. |
| double[] | maxLimits | Out parameter giving the maximum limits. |
GetJointLimits(out double[], out double[])
Get joint limits.
Declaration
public void GetJointLimits(out double[] minLimits, out double[] maxLimits)
Parameters
| Type | Name | Description |
|---|---|---|
| double[] | minLimits | Out parameter giving the minimum limits. |
| double[] | maxLimits | Out parameter giving the maximum limits. |
GetJointTransform(int)
Get the transform for a joint using the current joint values
The index of the joint for which the transform shall be retrieved. Must be a value between 0 and ABB.Robotics.RobotStudio.Declaration
public Matrix4 GetJointTransform(int jointIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| int | jointIndex |
Returns
| Type | Description |
|---|---|
| Matrix4 |
GetJointTransform(int, double[], out Matrix4)
Get the transform for a joint using specified joint values
The index of the joint for which the transform shall be retrieved. Must be a value between 0 and ABB.Robotics.RobotStudio.Declaration
public bool GetJointTransform(int jointIndex, double[] jointValues, out Matrix4 jointTransform)
Parameters
| Type | Name | Description |
|---|---|---|
| int | jointIndex | |
| double[] | jointValues | |
| Matrix4 | jointTransform |
Returns
| Type | Description |
|---|---|
| bool |
GetJointTypes()
Get an array containing the type for each contained joint. For a mechanism with ABB.Robotics.RobotStudio.
Declaration
public JointType[] GetJointTypes()
Returns
| Type | Description |
|---|---|
| JointType[] | An array with length 0 or an array with length equal to NumActiveJoints |
GetJointValues()
Returns the current joint values.
Declaration
public double[] GetJointValues()
Returns
| Type | Description |
|---|---|
| double[] |
GetParentJoint(GraphicComponent, out int)
Returns the joint index of a link, or -1.
Declaration
public bool GetParentJoint(GraphicComponent link, out int jointIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphicComponent | link | The link. |
| int | jointIndex | Zero-based joint index. |
Returns
| Type | Description |
|---|---|
| bool |
GetParentLink(int, out GraphicComponent)
Returns the parent link of a joint.
Declaration
public bool GetParentLink(int jointIndex, out GraphicComponent link)
Parameters
| Type | Name | Description |
|---|---|---|
| int | jointIndex | Zero-based joint index. Must be less than ABB.Robotics.RobotStudio. |
| GraphicComponent | link |
Returns
| Type | Description |
|---|---|
| bool |
GetStaticJointLimits(out double[], out double[])
Get static joint limits.
Declaration
public void GetStaticJointLimits(out double[] minLimits, out double[] maxLimits)
Parameters
| Type | Name | Description |
|---|---|---|
| double[] | minLimits | Out parameter giving the minimum limits. |
| double[] | maxLimits | Out parameter giving the maximum limits. |
GetSyncPosition()
Returns the defined sync position in form of a collection of values. The number of values are 0-6 depending on the number of joints used for corresponding mechanism.
Declaration
public double[] GetSyncPosition()
Returns
| Type | Description |
|---|---|
| double[] | An array of sync position for each joint. |
GetToolDataInfo()
Returns the tool datas for a mechanism that is a tool.
Declaration
public ToolDataInfo[] GetToolDataInfo()
Returns
| Type | Description |
|---|---|
| ToolDataInfo[] |
GetTransitionTimes()
Gets transition times.
Declaration
public Dictionary<string[], double> GetTransitionTimes()
Returns
| Type | Description |
|---|---|
| Dictionary<string[], double> | A dictionary mapping pairs of position names to transition times. |
GetUserDefinedJointPositions()
Get user defined joint positions.
Declaration
public Dictionary<string, double[]> GetUserDefinedJointPositions()
Returns
| Type | Description |
|---|---|
| Dictionary<string, double[]> | A dictionary containing user defined joint positions. |
InsideLimits(double[])
Evaluates if a set of joint values are inside the joint limits.
Declaration
public bool InsideLimits(double[] jointValues)
Parameters
| Type | Name | Description |
|---|---|---|
| double[] | jointValues | Joint values, must have length equal to NumActiveJoints |
Returns
| Type | Description |
|---|---|
| bool | Returns true if inside joint limits. |
MoveToPose(string)
Moves the mechanism to a named pose.
Declaration
public bool MoveToPose(string jointPosition)
Parameters
| Type | Name | Description |
|---|---|---|
| string | jointPosition | The name of the pose. |
Returns
| Type | Description |
|---|---|
| bool | True if successful. |
SetActiveJoints(int[])
This method sets the indices of the joints used by this mechanism, as an array of integers. The length of the array depends on how many joints are used. Some mechanism models has less than six axis.
Declaration
public void SetActiveJoints(int[] jointMask)
Parameters
| Type | Name | Description |
|---|---|---|
| int[] | jointMask | The indices of the joints used by this mechanism. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | |
| ArgumentNullException |
See Also
View SourceSetHomePosition(double[])
Declaration
public void SetHomePosition(double[] jointValues)
Parameters
| Type | Name | Description |
|---|---|---|
| double[] | jointValues |
SetJointLimits(int, double, double)
Sets the joint limits for a joint.
Declaration
public bool SetJointLimits(int jointIndex, double minLimit, double maxLimit)
Parameters
| Type | Name | Description |
|---|---|---|
| int | jointIndex | The index of the joint. |
| double | minLimit | The minimum limit. |
| double | maxLimit | The maximum limit. |
Returns
| Type | Description |
|---|---|
| bool |
SetJointModelOffset(int, double)
Sets an offset between the joint value and the nominal kinematic model for a joint. This can be used to modify the zero position of the mechanism.
Declaration
public void SetJointModelOffset(int jointIndex, double jointOffset)
Parameters
| Type | Name | Description |
|---|---|---|
| int | jointIndex | |
| double | jointOffset |
Remarks
This will only affect forward kinematics. Inverse kinematics uses the virtual controller which is assumed to take the offset into account internally. Joint limits are assumed to be adjusted accordingly by using SetJointLimits(int, double, double).
SetJointValues(double[], bool)
Sets the mechanism joint values and updates joint values in the VC.
Declaration
public bool SetJointValues(double[] jointValues, bool updateController)
Parameters
| Type | Name | Description |
|---|---|---|
| double[] | jointValues | |
| bool | updateController |
Returns
| Type | Description |
|---|---|
| bool | True if the joint values are valid. |
SetJointValues(double[], bool, bool)
ABB Internal use
Declaration
public bool SetJointValues(double[] jointValues, bool updateController, bool notify)
Parameters
| Type | Name | Description |
|---|---|---|
| double[] | jointValues | |
| bool | updateController | |
| bool | notify |
Returns
| Type | Description |
|---|---|
| bool |
SetJointValues(double[], bool, double)
ABB Internal use
Declaration
[Obsolete("No longer supported")]
public bool SetJointValues(double[] jointValues, bool updateController, double timeStamp)
Parameters
| Type | Name | Description |
|---|---|---|
| double[] | jointValues | |
| bool | updateController | |
| double | timeStamp |
Returns
| Type | Description |
|---|---|
| bool |
SetJointValuesAsync(double[], bool)
Sets the mechanism joint values and asynchronously updates joint values in the VC.
Declaration
public Task<bool> SetJointValuesAsync(double[] jointValues, bool updateController)
Parameters
| Type | Name | Description |
|---|---|---|
| double[] | jointValues | |
| bool | updateController |
Returns
| Type | Description |
|---|---|
| Task<bool> | True if the joint values are valid. |
SetJointValuesInternal(double[], double, bool)
ABB Internal use
Declaration
public bool SetJointValuesInternal(double[] jointValues, double timeStamp, bool notify)
Parameters
| Type | Name | Description |
|---|---|---|
| double[] | jointValues | |
| double | timeStamp | |
| bool | notify |
Returns
| Type | Description |
|---|---|
| bool |
SetSyncPosition(double[])
Sets the defined sync position in form of a collection of values. The number of values are 0-6 depending on the number of joints used for corresponding mechanism.
Declaration
public void SetSyncPosition(double[] jointValues)
Parameters
| Type | Name | Description |
|---|---|---|
| double[] | jointValues |
SetTransitionTimes(Dictionary<string[], double>)
Sets transition times.
Declaration
public void SetTransitionTimes(Dictionary<string[], double> value)
Parameters
| Type | Name | Description |
|---|---|---|
| Dictionary<string[], double> | value | A dictionary mapping pairs of position names to transition times. |
SetUserDefinedJointPositions(Dictionary<string, double[]>)
Sets user defined joint positions.
Declaration
public void SetUserDefinedJointPositions(Dictionary<string, double[]> value)
Parameters
| Type | Name | Description |
|---|---|---|
| Dictionary<string, double[]> | value | A dictionary containing user defined joint positions. Each array should have the same length as NumActiveJoints |
Events
View SourceAnyJointValuesChanged
Declaration
public static event EventHandler AnyJointValuesChanged
Event Type
| Type | Description |
|---|---|
| EventHandler |
JointValuesChanged
Declaration
public event EventHandler JointValuesChanged
Event Type
| Type | Description |
|---|---|
| EventHandler |
TargetReachEvent
Declaration
[Obsolete("No longer supported")]
public event EventHandler TargetReachEvent
Event Type
| Type | Description |
|---|---|
| EventHandler |