User Tools

Site Tools


visual3d:documentation:partners:xsens:xsens_prop

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:partners:xsens:xsens_prop [2024/06/19 12:49] sgrangervisual3d:documentation:partners:xsens:xsens_prop [2024/07/12 13:29] (current) – removed sgranger
Line 1: Line 1:
-{{{{{{====== introduction ====== 
  
-\\ 
-visual3dv2020.## supports reading mvnx files with one prop sensor. the sensor will be loaded automatically as a segment (ex. pr1). if more props are required to process your data, please contact c-motion. **when using an xsens prop in visual3d, all information is loaded automatically and no further steps are required.**\\ 
-\\ 
-you can however choose to load a graphics object or adjust the location of the prop segment. **this wiki page will explain the steps in the pipeline so that you can modify the script for your own data.**\\ 
- 
- 
-===== sample data ===== 
- 
-**[[https://www.has-motion.com/download/examples/xsens/xsens_prop_example.zip|sample data can be downloaded here]].** 
- 
-  - save the sword.obj file in your [[visual3d:tutorials:modeling:fun_with_graphics#finding_your_graphics_folder|models folder]] 
-  - open the mvnx file: 
-    - file -> open 
-    - browse for mvnx file 
-      - notice all the information for the prop signal is loaded and the segment coordinate system is displayed in the 3d viewer 
-  - run the pipeline: 
-    - pipeline -> workshop 
-    - open pipeline 
-    - browse for sword.v3s 
-    - execute pipeline 
- 
-**the pipeline will:** 
- 
-  * adjust the position of the prop so that it is fixed to the center of mass of the hand 
-  * load the sword graphic object 
-  * color the sword red 
- 
-===== segment properties ===== 
- 
-the graphics object and kinetic segment properties can be defined using the segment properties command. in this example, the sword graphic object is being associated with the prop: 
- 
-<code> 
-set_segment_properties 
-/calibration_file= 
-/segment_name=pr1 
-! /kinematic_only= 
-! /mass= 
-! /cg_from_prox_axial= 
-! /cg_from_prox_ml= 
-! /cg_from_prox_ap= 
-! /inertia_xx= 
-! /inertia_yy= 
-! /inertia_zz= 
-! /ap_direction= 
-! /axial_direction= 
-/model_file=sword.obj 
-! /material_file= 
-! /graphics_rot_x= 
-! /graphics_rot_y= 
-! /graphics_rot_z= 
-/graphics_scale_x=2.5 
-/graphics_scale_y=2.5 
-/graphics_scale_z=2.5 
-! /graphics_translate_x= 
-! /graphics_translate_y= 
-! /graphics_translate_z= 
-; 
-</code> 
- 
-==== graphics object ==== 
- 
-in visual3d graphics objects are just for visual affect and can be adjusted as needed. [[visual3d:tutorials:modeling:fun_with_graphics|graphics objects are described here, which will also explain how to store the graphics object in the correct location on your computer]]. 
- 
-==== kinetic properties ==== 
- 
-set the segment to kinetic (/kinmeatic_only=false), set the segment mass, and inertial properties. these settings will be specific to whatever your prop segment represents. 
- 
-===== adjusted position ===== 
- 
-**a.** by default, visual3d uses the position data from the mvnx file. in this example, you will notice that the hand and the sword are close at frame 1.\\ 
-**b.** however, at the end of the file there is an offset between the the sword and the hand segment.\\ 
-**c.** by overwriting the sword position with the hand center of gravity signal, the sword position is then moved to the hand, which may be a more realistic location since the prop is in the person's hand.\\ 
- 
- 
-|  __**a. frame 1:**__\\ \\ xsens_proppos_frame1.png  |  __**b. last frame:**__\\ \\ xsens_proppos_framelast.png  |  __**c. last frame adjusted:**__\\ \\ xsens_proppos_framelastadjusted.png  | 
- 
-the position data for the prop is stored in body::original::pr1_pos. by storing data in body::processed::pr1_pos, the processed signal will be used instead. an example of using the hand center of gravity instead of the data original signal would be: 
- 
-<code> 
-evaluate_expression 
-/expression=kinetic_kinematic::rha::cgpos 
-! /signal_types= 
-! /signal_folder=original 
-! /signal_names= 
-/result_types=body 
- /result_folders=processed 
- /result_name=pr1_pos 
-! /apply_as_suffix_to_signal_name=false 
-; 
-</code> 
- 
-===== adjust graphics object color within visual3d ===== 
- 
-this step would be done just for graphics. typically an obj file has a corresponding mtl file which contains the color information. however, you can also add color to a segment graphic in visual3d using the [[visual3d:documentation:pipeline:other_commands:map_object_color_to_signal_value|map_object_color_to_signal_value]] command. the example below colors the sword graphic red: 
- 
-<code> 
-map_object_color_to_signal_value 
-/object_name=pr1 
-/signal_types=kinetic_kinematic 
-/signal_folder=pr1 
-/signal_names=cgpos 
-! /component_sequence=x 
-/min_colors=red 
-/inner_colors=red 
-/max_colors=red 
-! /inner_color_index=127 
-/max_color_index=256 
-/min_values=0 
-/max_values=200 
-! /remove_existing_colorizations=false 
-! /color_map_file_names= 
-! /color_map_files= 
-; 
-</code> 
- 
- 
-}}}}}} 
visual3d/documentation/partners/xsens/xsens_prop.1718801368.txt.gz · Last modified: 2024/06/19 12:49 by sgranger