*mechadjustjoint

Actuates a joint to reach a new value.

Syntax

*mechadjustjoint name direction value tolerance lock angle_step hold_angles

Type

HyperMesh Tcl Modify Command

Description

Actuates a joint to reach a new value.

The mechanism must have the enabled flag set to true for this to be possible.

Inputs

name
The name of the joint to adjust.
direction
The direction along which the new value will be applied:
0 - Translation along x-axis
1 - Translation along y-axis
2 - Translation along z-axis
3 - Rotation about x-axis
4 - Rotation about y-axis
5 - Rotation about z-axis
value
The desired value of the joint (double).
tolerance
The tolerance allowed when adjusting (double).
lock
If set to 1, all joints in the mechanism which are not part of the cycle of the given joint are locked.
angle_step
The size of the iterative steps used to solve for the new value of the joint. Only used for rotation.
hold_angles
If set to 1, this locks the rotation about axes other than the given direction. If 0, rotation occurs in a way such that the given axis doesn’t move. In this case the Euler angles about other axes can change. This is only for ball joints.

Example

To move a joint named TORSO_to_RIGHT_UPPER_LEG to x=20 y=0 z=0 with tolerance 0.001, locking other joints and angle step = 0:

*mechadjustjoint "TORSO_to_RIGHT_UPPER_LEG" 20.0 0.0 0.0 0.001 1 0

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}

Version History

14.0.120