Click or drag to resize
Mechanism Class
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.
Inheritance Hierarchy

Namespace:  ABB.Robotics.RobotStudio.Stations
Assembly:  ABB.Robotics.RobotStudio.Stations (in ABB.Robotics.RobotStudio.Stations.dll) Version: 7.0.8747.636
Syntax
C#
public class Mechanism : GraphicComponent, IHasGraphicComponents

The Mechanism type exposes the following members.

Constructors
  NameDescription
Protected methodMechanism
Initializes a new instance of the Mechanism class
Top
Properties
  NameDescription
Public propertyAdditionalComponents
Gets a GraphicComponentCollection that contains child components that are not mechanism links.
Public propertyAttributes
Returns a collection of dynamic attributes attached to the object
(Inherited from ProjectObject.)
Public propertyChildren
Enumerates all child objects.
(Inherited from ProjectObject.)
Public propertyClipPlane
Gets or sets a ClipPlane that will hide all geometry in the negative z space of its transform.
(Inherited from GraphicComponent.)
Public propertyCode exampleColor
Gets or sets the color of the object in the graphics.
(Inherited from GraphicComponent.)
Public propertyContainingProject
Returns the Project that this object is a part of, or null if it is not part of a Project.
(Inherited from ProjectObject.)
Public propertyDetectable
Gets or sets a value indicating the the component can be detected by sensors.
(Inherited from GraphicComponent.)
Public propertyDisplayName
Gets the name of the the object that should be displayed in the GUI.
(Inherited from ProjectObject.)
Public propertyFrames
Gets a FrameCollection object that represents all the Frames on this object.
(Inherited from GraphicComponent.)
Protected propertyGfxData (Inherited from GraphicComponent.)
Public propertyGraphicComponents
Gets a GraphicComponentCollection that contains all the links of the mechanism.
Protected propertyInternalChildren (Inherited from ProjectObject.)
Protected propertyInternalParent (Inherited from ProjectObject.)
Public propertyLibrary
Returns the GraphicComponentLibrary that contains the definition of this component, or null.
(Inherited from GraphicComponent.)
Public propertyMass
The mass of the mechanism. Used when the mechanism is used as a tool.
Public propertyMechanismType
Gets the type.
Public propertyModelBaseFrame
Returns the nominal base frame of this model
Public propertyModelName
Gets the name of the model.
Public propertyMultiAxisRobot
Returns true if this is a multi axis robot (more than six active joints)
Public propertyName
Gets or sets the name of the object
(Inherited from ProjectObject.)
Public propertyNumActiveJoints
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.
Public propertyOpacity
Gets or sets the opacity of the object.
(Inherited from GraphicComponent.)
Public propertyCode exampleParent
The Parent property returns a reference to the parent GraphicComponent object.
(Inherited from GraphicComponent.)
Public propertyCode examplePickingEnabled
Gets or sets if the component can be picked and selected in 3D graphic windows.
(Inherited from GraphicComponent.)
Public propertyTask
Gets the associated RsTask.
Public propertyTraceColor
Gets or sets the color used to trace the TCP during simulation.
Public propertyTraceTCP
Enables or disables a graphical trace of the active TCP during simulation.
Public propertyCode exampleTransform
Gets the Transform of the object.
(Inherited from GraphicComponent.)
Public propertyTypeDisplayName
Gets a localized name for the type of this object.
(Inherited from ProjectObject.)
Public propertyUIVisible
Gets or sets a value that indicates if this object should be displayed in GUI such as an object browser.
(Inherited from ProjectObject.)
Public propertyUniqueId
Gets a persisted, globally unique identifier for this object, that can be used to find the object using the GetObjectFromUniqueId(String) method.
(Inherited from ProjectObject.)
Public propertyUsesCfx
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.
Public propertyCode exampleVisible
Gets or sets whether the object should be displayed in the graphics or not.
(Inherited from GraphicComponent.)
Top
Methods
  NameDescription
Protected methodAfterLoad (Overrides GraphicComponentAfterLoad(PimDocument).)
Public methodAttachToFlange(IAttachableChild, Boolean)
Attaches the specified IAttachableChild to the flange of the Mechanism. The Mechansim must have exactly one flange.
Public methodAttachToFlange(IAttachableChild, Boolean, Matrix4)
Attaches the specified IAttachableChild to the first flange of the Mechanism.
Protected methodBackup (Inherited from ProjectObject.)
Protected methodBeforeSave (Inherited from ProjectObject.)
Public methodCalculateForwardKinematics
Calculates forward kinematics for the mechanism. Given the specified mechanism joint values, the resulting TCP (tool0) transform is returned.
Public methodCalculateInverseKinematics(Matrix4, Matrix4, Boolean, Double) Obsolete.
Public methodCalculateInverseKinematics(RsTarget, RsToolData, Boolean, 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.
Public methodCalculateInverseKinematics(RsRobTarget, RsWorkObject, RsToolData, Int32, Double)
Calculates inverse kinematics for the mechanism given a RsTarget, RsWorkObject and RsToolData.
Public methodCalculateInverseKinematics(Matrix4, Double, Double, Matrix4, Boolean, Double)
Calculate inverse kinematics given a pose and a starting set of joint values.
Public methodCalculateInverseKinematicsAsync(Matrix4, Matrix4, Boolean)
Calculate inverse kinematics from a pose.
Public methodCalculateInverseKinematicsAsync(RsTarget, RsToolData, Boolean)
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.
Public methodCalculateInverseKinematicsAsync(RsRobTarget, RsWorkObject, RsToolData, Int32)
Calculates inverse kinematics for the mechanism given a RsTarget, RsWorkObject and RsToolData.
Public methodCalculateInverseKinematicsAsync(Matrix4, Double, Double, Matrix4, Boolean)
Calculate inverse kinematics given a pose and a starting set of joint values.
Public methodCanReach(Matrix4, Matrix4) Obsolete.
Public methodCanReach(RsRobTarget, RsWorkObject, RsToolData) Obsolete.
Public methodCanReachAsync(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.
Public methodCanReachAsync(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.
Public methodClearTrace
Removes the graphical trace of the TCP.
Public methodCode exampleCopy
Creates a deep copy of the object.
(Inherited from GraphicComponent.)
Public methodCode exampleCopyInstance
Creates a copy but keeps a connection to the definition of the GraphicComponent, typically in a Library definition.
(Inherited from GraphicComponent.)
Public methodStatic memberCreateFromScript Obsolete.
Public methodStatic memberCreateFromScriptAsync
This method is for internal use only.
Public methodDelete
Deletes this object permanently.
(Inherited from GraphicComponent.)
Public methodCode exampleDeleteGeometry
Recursively deletes all CAD geometry.
(Inherited from GraphicComponent.)
Public methodDeleteGeometry(Boolean) Obsolete. (Inherited from GraphicComponent.)
Public methodCode exampleDisconnectFromLibrary
Moves the definition to the Station or Project. This causes the Library property to return Null.
(Inherited from GraphicComponent.)
Public methodEquals (Inherited from Object.)
Public methodExportXml(String)
Exports this to an XML file
(Inherited from GraphicComponent.)
Public methodExportXml(String, String)
Exports this to an XML file
(Inherited from GraphicComponent.)
Protected methodFinalize (Inherited from Object.)
Public methodFindObjects
Recursively finds object that satisfy a condition.
(Inherited from ProjectObject.)
Public methodGetActiveJoints
This method returns 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 mechnism models have less than six axis. The indices can be used together with the result from GetJointValues
Public methodGetAllConfigurations(Boolean) Obsolete.
Public methodGetAllConfigurations(RsMoveInstruction) Obsolete.
Returns reachable arm configurations for the specified move instruction.
Public methodGetAllConfigurations(RsMoveInstruction, Boolean) Obsolete.
Public methodGetAllConfigurations(RsTarget, RsToolData) Obsolete.
Returns reachable arm configurations for the specified target.
Public methodGetAllConfigurations(RsTarget, RsToolData, Boolean) Obsolete.
Public methodGetAllConfigurations(RsTarget, RsToolData, Int32) Obsolete.
Public methodGetAllConfigurations(RsTarget, RsToolData, Int32, Boolean) Obsolete.
Public methodGetAllConfigurationsAsync(Boolean)
Returns reachable arm configurations for the current pose.
Public methodGetAllConfigurationsAsync(RsMoveInstruction, Boolean)
Returns reachable arm configurations for the specified move instruction.
Public methodGetAllConfigurationsAsync(RsTarget, RsToolData, Boolean)
Returns reachable arm configurations for the specified target.
Public methodGetAllConfigurationsAsync(RsTarget, RsToolData, Int32, Boolean)
Returns reachable arm configurations for the specified target.
Public methodGetBoundingBox(Boolean)
Computes the (axis-aligned) bounding box for this object.
(Inherited from GraphicComponent.)
Public methodCode exampleGetBoundingBox(Boolean, Vector3, Vector3) Obsolete.
Computes the (axis-aligned) bounding box for this object.
(Inherited from GraphicComponent.)
Public methodGetBoundingBox(Boolean, IntPtr, IntPtr) Obsolete. (Inherited from GraphicComponent.)
Public methodGetCalibrationPosition
Returns the calibration transform for a joint.
Public methodGetConfiguration
Returns the current configuration.
Public methodGetConfiguration(Double)
Returns the configuration that corresponds to the given joint values.
Public methodGetDenavitHartenbergParameters
Gets the DenavitHartenbergParameters for all joints.
Public methodGetFlange
Get a Flange to which other entities can be attached.
Public methodGetFlanges
Protected methodGetGfxChildren (Inherited from GraphicComponent.)
Protected methodGetGfxMatrix (Inherited from GraphicComponent.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetHomePosition
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.
Public methodGetJointLimits(Double, Double)
Get joint limits.
Public methodGetJointLimits(Double, Double, Double)
Get joint limits given a set of joint values.
Public methodGetJointTransform(Int32)
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 NumTotalJoints.

Return Value

Type: 
Returns the transform of the specified joint, in Mechanism coordinates.
Public methodGetJointTransform(Int32, Double, 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 NumTotalJoints - 1.Returns the transform of the specified joint, in Mechanism coordinates.

Return Value

Type: 
True on success
Public methodGetJointTypes
Get an array containing the type for each contained joint. For a mechanism with MechDef equal to null or without forward kinematics an empty array is returned.
Public methodGetJointValues
Returns the current joint values.
Protected methodGetMatrix (Inherited from GraphicComponent.)
Public methodCode exampleGetNormalToSurface Obsolete.
Calculates the closest point and the corresponding normal.
(Inherited from GraphicComponent.)
Public methodGetParentJoint
Returns the joint index of a link, or -1.
Public methodGetParentLink
Returns the parent link of a joint.
Public methodGetStaticJointLimits
Get static joint limits.
Public methodGetSyncPosition
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.
Public methodGetToolDataInfo
Returns the tool datas for a mechanism that is a tool.
Public methodGetTransitionTimes
Gets transition times.
Public methodGetType (Inherited from Object.)
Public methodGetUserDefinedJointPositions
Get user defined joint positions.
Public methodCode exampleHighlight(Boolean)
Highlights the object using the default highlight style and color.
(Inherited from GraphicComponent.)
Public methodHighlight(Boolean, Color)
Highlights the object using a specified color.
(Inherited from GraphicComponent.)
Public methodInsideLimits
Evaluates if a set of joint values are inside the joint limits.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodCode exampleMoveDefinitionToLibrary
Moves the definition to a new Library.
(Inherited from GraphicComponent.)
Public methodMoveToPose
Moves the mechanism to a named pose.
Protected methodNotifyChange (Inherited from ProjectObject.)
Protected methodNotifyChange(ProjectObjectChangeType) (Inherited from ProjectObject.)
Protected methodOnCreatingObject (Inherited from GraphicComponent.)
Protected methodOnDelete (Inherited from GraphicComponent.)
Protected methodOnUndoRedo (Inherited from GraphicComponent.)
Public methodSetActiveJoints
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.
Public methodSetHomePosition
Public methodSetJointLimits
Sets the joint limits for a joint.
Public methodSetJointModelOffset
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.
Public methodSetJointValues(Double, Boolean)
Sets the mechanism joint values and updates joint values in the VC.
Public methodSetJointValues(Double, Boolean, Boolean)
ABB Internal use
Public methodSetJointValues(Double, Boolean, Double) Obsolete.
ABB Internal use
Public methodSetJointValuesAsync
Sets the mechanism joint values and asynchronously updates joint values in the VC.
Public methodSetJointValuesInternal
ABB Internal use
Public methodSetMaterial
Sets the material of the object.
(Inherited from GraphicComponent.)
Protected methodSetMatrix (Inherited from GraphicComponent.)
Public methodSetSyncPosition
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.
Public methodSetTransitionTimes
Sets transition times.
Public methodSetUserDefinedJointPositions
Sets user defined joint positions.
Public methodToString (Inherited from ProjectObject.)
Public methodCode exampleTryGetNormalToSurface
Calculates the closest point and the corresponding normal.
(Inherited from GraphicComponent.)
Top
Events
Fields
  NameDescription
Protected field_childInstances (Inherited from GraphicComponent.)
Protected field_clipPlane (Inherited from GraphicComponent.)
Protected field_curUndoDeltaState (Inherited from ProjectObject.)
Protected field_definition (Inherited from GraphicComponent.)
Protected field_detectable (Inherited from GraphicComponent.)
Protected field_frames (Inherited from GraphicComponent.)
Protected field_jointValues
Protected field_numJoints
Protected field_pickingEnabled (Inherited from GraphicComponent.)
Protected field_source (Inherited from GraphicComponent.)
Protected field_sourceFileTime (Inherited from GraphicComponent.)
Protected field_transformMat (Inherited from GraphicComponent.)
Top
Version Information

Supported in: 1.0.0.0
See Also