Provides industrial robot inverse kinematics for 6-axis robotic arms with advanced path planning and motion control. More...
Public Member Functions | |
| Vector3 | GetTCPPosGlobal () |
| Quaternion | GetTCPRotGlobal () |
| void | SetExternalControl (bool enabled) |
| Enable or disable external control mode for all robot axes. | |
| void | TargetMoveEditMode (bool active) |
| void | MoveEditMode () |
| void | ToHomePos () |
| void | SetTCP (GameObject tcp) |
| void | SetTargetProperties (IKTarget target) |
| void | SolveIK (IKTarget target) |
| bool | PositionRobotGlobal (Vector3 globalpos, Quaternion globalrot, int sortedSolutionIndex, bool TurnCorrection) |
| JobHandle | SchedulePositionRobotGlobal (Vector3 globalpos, Quaternion globalrot, int solution, bool turnCorrection) |
| Schedule IK calculation asynchronously. | |
| bool | CompletePositionRobotGlobal () |
| Complete the scheduled IK job and position drives. | |
| void | SetReferenceAngles (float[] referenceAngles) |
| Sets the reference angles used for sorting IK solutions. | |
| void | SetReferenceAnglesToCurrentPosition () |
| Sets the reference angles from the current robot joint positions. | |
| void | SolveIKWithReference (IKTarget target, float[] referenceAngles) |
| Solves IK for the target and uses referenceAngles to sort reachable solutions. | |
Public Member Functions inherited from realvirtual.realvirtualBehavior | |
| virtual void | OnOwnershipChanged (bool isOwner) |
| Called when network ownership changes. | |
| void | SetNetworkOwner (bool isOwner) |
| Sets IsNetworkOwner and triggers OnOwnershipChanged callback. | |
| void | PreStartSim () |
| Is called by the realvirtualController before the component is started. | |
| void | StartSim () |
| Is called by the realvirtualController to start or stop the component. | |
| void | StopSim () |
| Vector3 | DirectionToVector (DIRECTION direction) |
| Transfers the direction enumeration to a vector. | |
| DIRECTION | VectorToDirection (bool torotatoin, Vector3 vector) |
| Transfers a vector to the direction enumeration. | |
| float | GetLocalScale (Transform thetransform, DIRECTION direction) |
| List< BehaviorInterfaceConnection > | UpdateConnectionInfo () |
| List< Signal > | GetConnectedSignals () |
| void | SetVisibility (bool visibility) |
| Sets the visibility of this object including all subobjects. | |
| List< BehaviorInterfaceConnection > | GetConnections () |
| List< Signal > | GetSignals () |
| GameObject | GetChildByName (string name) |
| Gets a child by name. | |
| List< GameObject > | GetChildsByName (string name) |
| Gets all child by name. | |
| GameObject | GetChildByNameAlsoHidden (string name) |
| List< GameObject > | GetAllMeshesWithGroup (string group) |
| List< GameObject > | GetAllWithGroup (string group) |
| List< GameObject > | GetAllWithGroups (List< string > groups) |
| List< GameObject > | GetAllMeshesWithGroups (List< string > groups) |
| List< string > | GetMyGroups () |
| List< GameObject > | GetMeshesWithSameGroups () |
| List< GameObject > | GetAllWithSameGroups () |
| MeshRenderer | GetMeshRenderer () |
| Gets the mesh renderers in the childrens. | |
| void | SetCollider (bool enabled, bool includeTriggers=true) |
| sets the collider in all child objects | |
| void | ErrorMessage (string message) |
| Displays an error message. | |
| void | ChangeConnectionMode (bool isconnected) |
| void | Log (string message) |
| Logs a message. | |
| void | Log (string message, object obj) |
| Logs a message with a relation to an object. | |
| void | Warning (string message, object obj) |
| Logs a warning with a relation to an object. | |
| void | Error (string message, object obj) |
| Logs an error with a relation to an object. | |
| void | Error (string message) |
| Logs an error. | |
| GameObject | DebugPosition (string debugname, Vector3 position, Quaternion quaternation, float scale) |
| Displays a gizmo for debugging positions. | |
| void | SetFreezePosition (bool enabled) |
| Freezes all child components to the current poosition. | |
| void | SetRbConstraints (RigidbodyConstraints constraints) |
| virtual void | AwakeAlsoDeactivated () |
Public Attributes | |
| int | Solution |
| The current raw IK solution index used for positioning drives. | |
| string[] | Solutions |
| The sorted reachable solutions of the IK calculation (index 0 = closest to reference angles) | |
| int[] | SolutionRawIndices |
| Maps sorted display position to raw IK solution index. | |
| bool | MoveInEditMode |
| Move the robot in edit mode. | |
| bool | FollowTarget |
| Follow the target in edit mode. | |
| IKTarget | Target |
| The target to follow in edit mode. | |
| Vector3 | TargetPosRightHanded |
| The target position in right handed coordinates. | |
| Vector3 | TargetRotRightHanded |
| The target rotation in right handed coordinates. | |
| bool | DrawGizmos |
| Draw TCP marker, axis directions and limit arcs in scene view. | |
| bool | ShowElbowDirection |
| Show elbow direction arrow at robot base. | |
| bool | ShowKinematicChain |
| Show DH kinematic chain with segment lengths. | |
| bool | ShowJointPositions |
| Show current joint positions as needles within limit arcs. | |
| bool | ShowAxisFrames |
| Show local coordinate frames and rotation direction at each axis. | |
| bool | ShowWristType |
| Show wrist type indicator (sphere for spherical, offsets for non-spherical) | |
| bool | ElbowInUnityX |
| The elbow is in the Unity X direction. | |
| Drive[] | Axis |
| The drives of the robot. | |
| GameObject | TCP |
| The TCP of the robot. | |
| IKTarget | HomePosOnStart |
| The home position of the robot on start. | |
| RobotWristType | WristType |
| Wrist kinematic type: Spherical for standard robots, NonSpherical (BETA) for cobots with wrist offsets. | |
| SolutionSelectionMode | SolutionSelection |
| Strategy for selecting among valid IK solutions when the requested one is unreachable. | |
| bool | MirrorSeeds |
| Generate 8 mirrored wrist-flip seeds from the 4 Pieper base configurations to find additional solutions. | |
| int | HaltonSeedCount |
| Number of Halton low-discrepancy fallback seeds (0 = disabled); adds random joint-space seeds for hard-to-reach poses. | |
| float | NRAngularWeight |
| Weight for orientation vs position in NR solver. | |
| float | NROrientationTolerance |
| Orientation convergence tolerance in radians (0.57 degrees) | |
| bool | NRDiagnostics |
| Enable NR convergence logging to Unity console. | |
| double | d4 |
| Wrist offset from axis 3 to axis 4 in millimeters (auto-calculated) | |
| double | d5 |
| Wrist offset from axis 4 to axis 5 in millimeters (auto-calculated) | |
| double | a5 |
| Wrist length parameter of axis 5 in millimeters (auto-calculated) | |
| double | a6 |
| Wrist length parameter of axis 6 in millimeters (auto-calculated) | |
| Vector3 | ToolOffset |
| The tool offset of the TCP. | |
| double | a1 |
| The a1 parameter of the robot. | |
| double | a2 |
| double | b |
| double | c1 |
| double | c2 |
| double | c3 |
| double | c4 |
| The a2, b, c1, c2, c3, c4 parameter of the robot. | |
Public Attributes inherited from realvirtual.realvirtualBehavior | |
| string | Name |
| The name of the component if it should be different from the GameObject name. | |
| ActiveOnly | Active |
| GameObject | FromTemplate |
| realvirtualController | realvirtualController |
| bool | HideNonG44Components |
| bool | SceneIsAdditive |
| bool | ForceStop |
| bool | IsNetworkOwner |
| True when this component owns its simulation (local authority). Set to false by MultiplayerWEB on remote clients. | |
Properties | |
| bool | IsNonSphericalWrist [get] |
| Returns true when WristType is NonSpherical. Used by NaughtyAttributes [ShowIf] to conditionally display solver parameters. | |
| bool | HasScheduledJob [get] |
| Check if an IK job is currently scheduled. | |
Additional Inherited Members | |
Public Types inherited from realvirtual.realvirtualBehavior | |
| enum | ActiveOnly { Always , Connected , Disconnected , Never , DontChange } |
Static Public Member Functions inherited from realvirtual.realvirtualBehavior | |
| static bool | DirectionIsLinear (DIRECTION direction) |
| Gets back if the direction is linear or a rotation. | |
Protected Member Functions inherited from realvirtual.realvirtualBehavior | |
| bool | hidename () |
| bool | hideactiveonly () |
| virtual void | OnStopSim () |
| virtual void | OnPreStartSim () |
| virtual void | OnStartSim () |
| MU | GetTopOfMu (GameObject obj) |
| Gets the top of an MU component (the first MU script going up in the hierarchy) | |
| void | InitGame4Automation () |
| Initialiates the components and gets the reference to the realvirtualController in the scene. | |
| virtual void | AfterAwake () |
| void | Awake () |
Detailed Description
Provides industrial robot inverse kinematics for 6-axis robotic arms with advanced path planning and motion control.
This professional component enables precise robot control through inverse kinematics calculations, supporting multiple IK solutions, TCP management, and seamless integration with drive systems. Used for virtual commissioning of robotic cells, path validation, and cycle time optimization in industrial automation scenarios.
Member Function Documentation
◆ CompletePositionRobotGlobal()
| bool realvirtual.RobotIK.CompletePositionRobotGlobal | ( | ) |
Complete the scheduled IK job and position drives.
Returns true if position is reachable.
◆ SchedulePositionRobotGlobal()
| JobHandle realvirtual.RobotIK.SchedulePositionRobotGlobal | ( | Vector3 | globalpos, |
| Quaternion | globalrot, | ||
| int | solution, | ||
| bool | turnCorrection | ||
| ) |
Schedule IK calculation asynchronously.
Call CompletePositionRobotGlobal() to get results. This allows other work to run while IK calculates on a worker thread. Returns the JobHandle for combining with other IK jobs for parallel execution.
◆ SetExternalControl()
| void realvirtual.RobotIK.SetExternalControl | ( | bool | enabled | ) |
Enable or disable external control mode for all robot axes.
When enabled, axes skip their normal FixedUpdate calculations (IK sets position directly). Call with true when IKPath starts, false when it ends.
◆ SetReferenceAngles()
| void realvirtual.RobotIK.SetReferenceAngles | ( | float[] | referenceAngles | ) |
Sets the reference angles used for sorting IK solutions.
Call before SolveIK() to enable MinimalAngleChange-based solution sorting. Angles are in degrees.
◆ SetReferenceAnglesToCurrentPosition()
| void realvirtual.RobotIK.SetReferenceAnglesToCurrentPosition | ( | ) |
Sets the reference angles from the current robot joint positions.
Used as fallback when no previous path target exists.
◆ SetTargetProperties()
| void realvirtual.RobotIK.SetTargetProperties | ( | IKTarget | target | ) |
Don't display / update on playing because of NaughtyAttributes bug
◆ SolveIKWithReference()
| void realvirtual.RobotIK.SolveIKWithReference | ( | IKTarget | target, |
| float[] | referenceAngles | ||
| ) |
Solves IK for the target and uses referenceAngles to sort reachable solutions.
If referenceAngles is null, uses current robot joint positions as reference.
Member Data Documentation
◆ a1
| double realvirtual.RobotIK.a1 |
The a1 parameter of the robot.
◆ a5
| double realvirtual.RobotIK.a5 |
Wrist length parameter of axis 5 in millimeters (auto-calculated)
◆ a6
| double realvirtual.RobotIK.a6 |
Wrist length parameter of axis 6 in millimeters (auto-calculated)
◆ Axis
| Drive [] realvirtual.RobotIK.Axis |
The drives of the robot.
◆ c4
| double realvirtual.RobotIK.c4 |
The a2, b, c1, c2, c3, c4 parameter of the robot.
◆ d4
| double realvirtual.RobotIK.d4 |
Wrist offset from axis 3 to axis 4 in millimeters (auto-calculated)
◆ d5
| double realvirtual.RobotIK.d5 |
Wrist offset from axis 4 to axis 5 in millimeters (auto-calculated)
◆ DrawGizmos
| bool realvirtual.RobotIK.DrawGizmos |
Draw TCP marker, axis directions and limit arcs in scene view.
◆ ElbowInUnityX
| bool realvirtual.RobotIK.ElbowInUnityX |
The elbow is in the Unity X direction.
◆ FollowTarget
| bool realvirtual.RobotIK.FollowTarget |
Follow the target in edit mode.
◆ HaltonSeedCount
| int realvirtual.RobotIK.HaltonSeedCount |
Number of Halton low-discrepancy fallback seeds (0 = disabled); adds random joint-space seeds for hard-to-reach poses.
◆ HomePosOnStart
| IKTarget realvirtual.RobotIK.HomePosOnStart |
The home position of the robot on start.
◆ MirrorSeeds
| bool realvirtual.RobotIK.MirrorSeeds |
Generate 8 mirrored wrist-flip seeds from the 4 Pieper base configurations to find additional solutions.
◆ MoveInEditMode
| bool realvirtual.RobotIK.MoveInEditMode |
Move the robot in edit mode.
◆ NRAngularWeight
| float realvirtual.RobotIK.NRAngularWeight |
Weight for orientation vs position in NR solver.
◆ NRDiagnostics
| bool realvirtual.RobotIK.NRDiagnostics |
Enable NR convergence logging to Unity console.
◆ NROrientationTolerance
| float realvirtual.RobotIK.NROrientationTolerance |
Orientation convergence tolerance in radians (0.57 degrees)
◆ ShowAxisFrames
| bool realvirtual.RobotIK.ShowAxisFrames |
Show local coordinate frames and rotation direction at each axis.
◆ ShowElbowDirection
| bool realvirtual.RobotIK.ShowElbowDirection |
Show elbow direction arrow at robot base.
◆ ShowJointPositions
| bool realvirtual.RobotIK.ShowJointPositions |
Show current joint positions as needles within limit arcs.
◆ ShowKinematicChain
| bool realvirtual.RobotIK.ShowKinematicChain |
Show DH kinematic chain with segment lengths.
◆ ShowWristType
| bool realvirtual.RobotIK.ShowWristType |
Show wrist type indicator (sphere for spherical, offsets for non-spherical)
◆ Solution
| int realvirtual.RobotIK.Solution |
The current raw IK solution index used for positioning drives.
◆ SolutionRawIndices
| int [] realvirtual.RobotIK.SolutionRawIndices |
Maps sorted display position to raw IK solution index.
◆ Solutions
| string [] realvirtual.RobotIK.Solutions |
The sorted reachable solutions of the IK calculation (index 0 = closest to reference angles)
◆ SolutionSelection
| SolutionSelectionMode realvirtual.RobotIK.SolutionSelection |
Strategy for selecting among valid IK solutions when the requested one is unreachable.
◆ Target
| IKTarget realvirtual.RobotIK.Target |
The target to follow in edit mode.
◆ TargetPosRightHanded
| Vector3 realvirtual.RobotIK.TargetPosRightHanded |
The target position in right handed coordinates.
◆ TargetRotRightHanded
| Vector3 realvirtual.RobotIK.TargetRotRightHanded |
The target rotation in right handed coordinates.
◆ TCP
| GameObject realvirtual.RobotIK.TCP |
The TCP of the robot.
◆ ToolOffset
| Vector3 realvirtual.RobotIK.ToolOffset |
The tool offset of the TCP.
◆ WristType
| RobotWristType realvirtual.RobotIK.WristType |
Wrist kinematic type: Spherical for standard robots, NonSpherical (BETA) for cobots with wrist offsets.
Property Documentation
◆ HasScheduledJob
|
get |
Check if an IK job is currently scheduled.
◆ IsNonSphericalWrist
|
get |
Returns true when WristType is NonSpherical. Used by NaughtyAttributes [ShowIf] to conditionally display solver parameters.
Public Member Functions inherited from