User Tools

Site Tools


visual3d:documentation:modeling:virtual_lab:virtual_lab_direction_of_progression_method_3

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
visual3d:documentation:modeling:virtual_lab:virtual_lab_direction_of_progression_method_3 [2024/06/19 12:49] sgrangervisual3d:documentation:modeling:virtual_lab:virtual_lab_direction_of_progression_method_3 [2024/07/17 15:45] (current) – created sgranger
Line 1: Line 1:
-this script is explained in the virtual lab direction of progression tutorial. this script outlines [[visual3d:documentation:modeling:virtual_lab:virtual_lab_direction_of_progression#method_3|method 3]].+====== Virtual Lab Direction of Progression Method ======
  
-before running this script:+This script is explained in the Virtual Lab Direction of Progression tutorial. This script outlines [[Visual3D:Documentation:Modeling:Virtual_Lab:Virtual_Lab_Direction_of_Progression#Method_3|Method 3]].
  
-  static trial must be loaded into the workspace +Before running this script: 
-  * model template (with modified virtual lab) must be loaded into the workspace + 
-  * dynamic trial must be loaded into the workspace+  static trial must be loaded into the workspace 
 +  * model template (with modified virtual lab) must be loaded into the workspace 
 +  * dynamic trial must be loaded into the workspace
  
 \\ \\
Line 11: Line 13:
  
 <code> <code>
-**__add_a_comment__** +**__Add_a_Comment__** 
-! /commentstep 1: direction of progression+! /COMMENTStep 1: Direction of Progression
 ; ;
  
-!  find the location of the model's center of mass at the beginning of the trial +!  Find the location of the model's center of mass at the beginning of the trial 
-event_explicit +Event_Explicit 
-/event_name=trial_start +/EVENT_NAME=TRIAL_START 
-/frame=50 +/FRAME=50 
-! /time=+! /TIME=
 ; ;
  
-event_explicit +Event_Explicit 
-/event_name=trial_end +/EVENT_NAME=TRIAL_END 
-/frame=eof-40 +/FRAME=EOF-40 
-! /time=+! /TIME=
 ; ;
  
-compute_model_based_data +Compute_Model_Based_Data 
-/result_name=model_cog +/RESULT_NAME=MODEL_COG 
-/function=model_cog +/FUNCTION=MODEL_COG 
-/segment+/SEGMENT
-/reference_segment+/REFERENCE_SEGMENT
-! /resolution_coordinate_system=lab +! /RESOLUTION_COORDINATE_SYSTEM=LAB 
-! /use_cardan_sequence=false +! /USE_CARDAN_SEQUENCE=FALSE 
-! /normalization=false +! /NORMALIZATION=FALSE 
-! /normalization_method+! /NORMALIZATION_METHOD
-! /normalization_metric+! /NORMALIZATION_METRIC
-! /negatex=false +! /NEGATEX=FALSE 
-! /negatey=false +! /NEGATEY=FALSE 
-! /negatez=false +! /NEGATEZ=FALSE 
-! /axis1=x +! /AXIS1=X 
-! /axis2=y +! /AXIS2=Y 
-! /axis3=z+! /AXIS3=Z
 ; ;
  
-metric_signal_value_at_event +Metric_Signal_Value_At_Event 
-/signal_types=link_model_based +/SIGNAL_TYPES=LINK_MODEL_BASED 
-! /signal_folder=original +! /SIGNAL_FOLDER=ORIGINAL 
-/signal_names=model_cog +/SIGNAL_NAMES=MODEL_COG 
-/result_metric_folder=prog +/RESULT_METRIC_FOLDER=PROG 
-/result_metric_name=model_cog_start +/RESULT_METRIC_NAME=MODEL_COG_START 
-! /apply_as_suffix_to_signal_name=false +! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE 
-! /signal_components+! /SIGNAL_COMPONENTS
-/component_sequence=all +/COMPONENT_SEQUENCE=ALL 
-/event_name=trial_start +/EVENT_NAME=TRIAL_START 
-/generate_mean_and_stddev=false +/GENERATE_MEAN_AND_STDDEV=FALSE 
-! /append_to_existing_values=false +! /APPEND_TO_EXISTING_VALUES=FALSE 
-! /generate_vector_length_metric=false +! /GENERATE_VECTOR_LENGTH_METRIC=FALSE 
-! /retain_no_data_values=false+! /RETAIN_NO_DATA_VALUES=FALSE
 ; ;
  
-metric_signal_value_at_event +Metric_Signal_Value_At_Event 
-/signal_types=link_model_based +/SIGNAL_TYPES=LINK_MODEL_BASED 
-! /signal_folder=original +! /SIGNAL_FOLDER=ORIGINAL 
-/signal_names=model_cog +/SIGNAL_NAMES=MODEL_COG 
-/result_metric_folder=prog +/RESULT_METRIC_FOLDER=PROG 
-/result_metric_name=model_cog_end +/RESULT_METRIC_NAME=MODEL_COG_END 
-! /apply_as_suffix_to_signal_name=false +! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE 
-! /signal_components+! /SIGNAL_COMPONENTS
-/component_sequence=all +/COMPONENT_SEQUENCE=ALL 
-/event_name=trial_end +/EVENT_NAME=TRIAL_END 
-/generate_mean_and_stddev=false +/GENERATE_MEAN_AND_STDDEV=FALSE 
-! /append_to_existing_values=false +! /APPEND_TO_EXISTING_VALUES=FALSE 
-! /generate_vector_length_metric=false +! /GENERATE_VECTOR_LENGTH_METRIC=FALSE 
-! /retain_no_data_values=false+! /RETAIN_NO_DATA_VALUES=FALSE
 ; ;
  
-evaluate_expression +Evaluate_Expression 
-/expression= ( metric::prog::model_cog_end metric::prog::model_cog_start +/EXPRESSION= ( METRIC::PROG::MODEL_COG_END METRIC::PROG::MODEL_COG_START 
-/result_type=metric +/RESULT_TYPE=METRIC 
-/result_folder=prog +/RESULT_FOLDER=PROG 
-/result_name=dir_prog_y_2+/RESULT_NAME=DIR_PROG_Y_2
 ; ;
  
-create a unit vector of the differences +Create a unit vector of the differences 
-!   there should be no progression in the vertical direction so set z=0+!   There should be no progression in the vertical direction so set Z=0
  
-evaluate_expression +Evaluate_Expression 
-/expressionunit_vector metric::prog::dir_prog_y_2::metric::prog::dir_prog_y_2::, 0 ) +/EXPRESSIONUNIT_VECTOR METRIC::PROG::DIR_PROG_Y_2::METRIC::PROG::DIR_PROG_Y_2::, 0 ) 
-/result_type=metric +/RESULT_TYPE=METRIC 
-/result_folder=prog +/RESULT_FOLDER=PROG 
-/result_name=dir_prog+/RESULT_NAME=DIR_PROG
 ; ;
  
-**__add_a_comment__** +**__Add_a_Comment__** 
-! /commentstep 3: define the trunk angle relative to the virtual lab+! /COMMENTStep 3: Define the trunk angle relative to the virtual lab
 ; ;
  
-define rotation from lab to vlab +Define rotation from Lab to VLab 
-!    component is perpendicular to the ground +!    component is perpendicular to the ground 
-!    component is the direction of progression +!    component is the direction of progression 
-!    component is cross +!    component is cross 
  
-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+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 +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 +!    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 +Compute_Model_Based_Data 
-/result_name=trunk_rot +/RESULT_NAME=TRUNK_ROT 
-/function=joint_rotation +/FUNCTION=JOINT_ROTATION 
-/segment=rta +/SEGMENT=RTA 
-! /reference_segment=lab +! /REFERENCE_SEGMENT=LAB 
-/resolution_coordinate_system+/RESOLUTION_COORDINATE_SYSTEM
-! /use_cardan_sequence=false +! /USE_CARDAN_SEQUENCE=FALSE 
-! /normalization=false +! /NORMALIZATION=FALSE 
-! /normalization_method+! /NORMALIZATION_METHOD
-! /normalization_metric+! /NORMALIZATION_METRIC
-! /negatex=false +! /NEGATEX=FALSE 
-! /negatey=false +! /NEGATEY=FALSE 
-! /negatez=false +! /NEGATEZ=FALSE 
-! /axis1=x +! /AXIS1=X 
-! /axis2=y +! /AXIS2=Y 
-! /axis3=z+! /AXIS3=Z
 ; ;
  
-**__add_a_comment__** +**__Add_a_Comment__** 
-! /comment=+! /COMMENT=
 ; ;
  
-!  solve for the rotation between vlab and the trunk segment +!  Solve for the rotation between VLab and the trunk segment 
  
-evaluate_expression +Evaluate_Expression 
-/expression= ( metric::prog::dir_prog::1 * link_model_based::original::trunk_rot::7 ) + ( metric::prog::dir_prog::2 * link_model_based::original::trunk_rot::8 ) +/EXPRESSION= ( METRIC::PROG::DIR_PROG::1 * LINK_MODEL_BASED::ORIGINAL::TRUNK_ROT::7 ) + ( METRIC::PROG::DIR_PROG::2 * LINK_MODEL_BASED::ORIGINAL::TRUNK_ROT::8 ) 
-/result_type=derived +/RESULT_TYPE=DERIVED 
-/result_folder=trunk_angle +/RESULT_FOLDER=TRUNK_ANGLE 
-/result_name=r32+/RESULT_NAME=R32
 ; ;
  
-evaluate_expression +Evaluate_Expression 
-/expressionlink_model_based::original::trunk_rot::9 +/EXPRESSIONLINK_MODEL_BASED::ORIGINAL::TRUNK_ROT::9 
-/result_type=derived +/RESULT_TYPE=DERIVED 
-/result_folder=trunk_angle +/RESULT_FOLDER=TRUNK_ANGLE 
-/result_name=r33+/RESULT_NAME=R33
 ; ;
  
-evaluate_expression +Evaluate_Expression 
-/expression= ( metric::prog::dir_prog::2 * link_model_based::original::trunk_rot::7 ) - ( metric::prog::dir_prog::1 * link_model_based::original::trunk_rot::8 ) +/EXPRESSION= ( METRIC::PROG::DIR_PROG::2 * LINK_MODEL_BASED::ORIGINAL::TRUNK_ROT::7 ) - ( METRIC::PROG::DIR_PROG::1 * LINK_MODEL_BASED::ORIGINAL::TRUNK_ROT::8 ) 
-/result_type=derived +/RESULT_TYPE=DERIVED 
-/result_folder=trunk_angle +/RESULT_FOLDER=TRUNK_ANGLE 
-/result_name=r31+/RESULT_NAME=R31
 ; ;
  
-evaluate_expression +Evaluate_Expression 
-/expression= ( metric::prog::dir_prog::2 * link_model_based::original::trunk_rot::1 ) - ( metric::prog::dir_prog::1 * link_model_based::original::trunk_rot::2 ) +/EXPRESSION= ( METRIC::PROG::DIR_PROG::2 * LINK_MODEL_BASED::ORIGINAL::TRUNK_ROT::1 ) - ( METRIC::PROG::DIR_PROG::1 * LINK_MODEL_BASED::ORIGINAL::TRUNK_ROT::2 ) 
-/result_type=derived +/RESULT_TYPE=DERIVED 
-/result_folder=trunk_angle +/RESULT_FOLDER=TRUNK_ANGLE 
-/result_name=r11+/RESULT_NAME=R11
 ; ;
  
-evaluate_expression +Evaluate_Expression 
-/expression= ( metric::prog::dir_prog::2 * link_model_based::original::trunk_rot::4 ) - ( metric::prog::dir_prog::1 * link_model_based::original::trunk_rot::5 ) +/EXPRESSION= ( METRIC::PROG::DIR_PROG::2 * LINK_MODEL_BASED::ORIGINAL::TRUNK_ROT::4 ) - ( METRIC::PROG::DIR_PROG::1 * LINK_MODEL_BASED::ORIGINAL::TRUNK_ROT::5 ) 
-/result_type=derived +/RESULT_TYPE=DERIVED 
-/result_folder=trunk_angle +/RESULT_FOLDER=TRUNK_ANGLE 
-/result_name=r21+/RESULT_NAME=R21
 ; ;
  
-solve for the joint angles: +Solve for the joint angles: 
-!    solve for theta x +!    Solve for Theta X 
-!    solve for theta y +!    Solve for Theta Y 
-!    solve for theta z +!    Solve for Theta Z 
  
-evaluate_expression +Evaluate_Expression 
-/expressionatan ( - derived::trunk_angle::r32 derived::trunk_angle::r33 +/EXPRESSIONATAN ( - DERIVED::TRUNK_ANGLE::R32 DERIVED::TRUNK_ANGLE::R33 
-/result_type=derived +/RESULT_TYPE=DERIVED 
-/result_folder=trunk_angle +/RESULT_FOLDER=TRUNK_ANGLE 
-/result_name=theta_x+/RESULT_NAME=THETA_X
 ; ;
  
-evaluate_expression +Evaluate_Expression 
-/expressionatan derived::trunk_angle::r31 sqrt ( (derived::trunk_angle::r11 ^ 2) + (derived::trunk_angle::r21 ^ 2) ) ) +/EXPRESSIONATAN DERIVED::TRUNK_ANGLE::R31 SQRT ( (DERIVED::TRUNK_ANGLE::R11 ^ 2) + (DERIVED::TRUNK_ANGLE::R21 ^ 2) ) ) 
-/result_type=derived +/RESULT_TYPE=DERIVED 
-/result_folder=trunk_angle +/RESULT_FOLDER=TRUNK_ANGLE 
-/result_name=theta_y+/RESULT_NAME=THETA_Y
 ; ;
  
-evaluate_expression +Evaluate_Expression 
-/expressionatan ( - derived::trunk_angle::r21 derived::trunk_angle::r11 +/EXPRESSIONATAN ( - DERIVED::TRUNK_ANGLE::R21 DERIVED::TRUNK_ANGLE::R11 
-/result_type=derived +/RESULT_TYPE=DERIVED 
-/result_folder=trunk_angle +/RESULT_FOLDER=TRUNK_ANGLE 
-/result_name=theta_z+/RESULT_NAME=THETA_Z
 ; ;
  
-convert from radians to degrees+Convert from radians to degrees
  
-multiply_signals_by_constant +Multiply_Signals_By_Constant 
-/signal_types=derived+derived+derived +/SIGNAL_TYPES=DERIVED+DERIVED+DERIVED 
-/signal_folder=trunk_angle+trunk_angle+trunk_angle +/SIGNAL_FOLDER=TRUNK_ANGLE+TRUNK_ANGLE+TRUNK_ANGLE 
-/signal_names=theta_x+theta_y+theta_z +/SIGNAL_NAMES=THETA_X+THETA_Y+THETA_Z 
-! /result_types+! /RESULT_TYPES
-/result_folder=trunk_angle +/RESULT_FOLDER=TRUNK_ANGLE 
-/result_names=++ +/RESULT_NAMES=++ 
-/result_suffix=_deg +/RESULT_SUFFIX=_DEG 
-! /signal_components+! /SIGNAL_COMPONENTS
-/constant= ( 180 / pi() )+/CONSTANT= ( 180 / pi() )
 ; ;
 </code> </code>
visual3d/documentation/modeling/virtual_lab/virtual_lab_direction_of_progression_method_3.1718801359.txt.gz · Last modified: 2024/06/19 12:49 by sgranger