visual3d:documentation:modeling:virtual_lab:virtual_lab_direction_of_progression_method_3
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
visual3d:documentation:modeling:virtual_lab:virtual_lab_direction_of_progression_method_3 [2024/06/26 20:04] – removed sgranger | visual3d:documentation:modeling:virtual_lab:virtual_lab_direction_of_progression_method_3 [2024/07/17 15:45] (current) – created sgranger | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Virtual Lab Direction of Progression Method 3 ====== | ||
+ | |||
+ | This script is explained in the Virtual Lab Direction of Progression tutorial. This script outlines [[Visual3D: | ||
+ | |||
+ | Before running this script: | ||
+ | |||
+ | * A static trial must be loaded into the workspace | ||
+ | * A model template (with modified virtual lab) must be loaded into the workspace | ||
+ | * A dynamic trial must be loaded into the workspace | ||
+ | |||
+ | \\ | ||
+ | |||
+ | |||
+ | < | ||
+ | **__Add_a_Comment__** | ||
+ | ! /COMMENT= Step 1: Direction of Progression | ||
+ | ; | ||
+ | |||
+ | ! Find the location of the model' | ||
+ | Event_Explicit | ||
+ | / | ||
+ | /FRAME=50 | ||
+ | ! /TIME= | ||
+ | ; | ||
+ | |||
+ | Event_Explicit | ||
+ | / | ||
+ | / | ||
+ | ! /TIME= | ||
+ | ; | ||
+ | |||
+ | Compute_Model_Based_Data | ||
+ | / | ||
+ | / | ||
+ | /SEGMENT= | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! /AXIS1=X | ||
+ | ! /AXIS2=Y | ||
+ | ! /AXIS3=Z | ||
+ | ; | ||
+ | |||
+ | Metric_Signal_Value_At_Event | ||
+ | / | ||
+ | ! / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ; | ||
+ | |||
+ | Metric_Signal_Value_At_Event | ||
+ | / | ||
+ | ! / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ; | ||
+ | |||
+ | Evaluate_Expression | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | ! Create a unit vector of the differences | ||
+ | ! There should be no progression in the vertical direction so set Z=0 | ||
+ | |||
+ | Evaluate_Expression | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | **__Add_a_Comment__** | ||
+ | ! /COMMENT= Step 3: Define the trunk angle relative to the virtual lab | ||
+ | ; | ||
+ | |||
+ | ! Define rotation from Lab to VLab | ||
+ | ! Z component is perpendicular to the ground | ||
+ | ! Y component is the direction of progression | ||
+ | ! X component is Y cross Z | ||
+ | |||
+ | ! The rotation from Lab to VLab is defined using the direction of progression define in Step 1 and these values will be used to define the joint angles | ||
+ | |||
+ | ! Define rotation from Lab to Trunk | ||
+ | ! Using Compute Model Based Data command select the Joint_Rotation function and resolve the Thorax/Ab rotation in the Lab coordinate system | ||
+ | |||
+ | Compute_Model_Based_Data | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! /AXIS1=X | ||
+ | ! /AXIS2=Y | ||
+ | ! /AXIS3=Z | ||
+ | ; | ||
+ | |||
+ | **__Add_a_Comment__** | ||
+ | ! /COMMENT= | ||
+ | ; | ||
+ | |||
+ | ! Solve for the rotation between VLab and the trunk segment | ||
+ | |||
+ | Evaluate_Expression | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | Evaluate_Expression | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | Evaluate_Expression | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | Evaluate_Expression | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | Evaluate_Expression | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | ! Solve for the joint angles: | ||
+ | ! Solve for Theta X | ||
+ | ! Solve for Theta Y | ||
+ | ! Solve for Theta Z | ||
+ | |||
+ | Evaluate_Expression | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | Evaluate_Expression | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | Evaluate_Expression | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | ! Convert from radians to degrees | ||
+ | |||
+ | Multiply_Signals_By_Constant | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | /CONSTANT= ( 180 / pi() ) | ||
+ | ; | ||
+ | </ | ||
+ | |||
+ | |||
visual3d/documentation/modeling/virtual_lab/virtual_lab_direction_of_progression_method_3.1719432277.txt.gz · Last modified: 2024/06/26 20:04 by sgranger