Child pages
  • z_*OBSOLETE* Calculate Rigid Body Motion in Matlab

This page was moved to

Click in the link above if you are not automatically redirected in 10 seconds.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 36 Next »

Note that this step used to be called "Smart Smoothing" and was based on a different algorithm. Make sure that you have the most current SVDRigidBodyMotion MATLAB scripts and Maya MEL scripts for this step.

what you need:

  1. a markercoordinates.csv file 3 columns for each marker (xyz coordinates)
  2. an *xyzpts.csv file from digitized data

Note: The number of columns must be a perfect match between the two files.
if you have 10 markers - you must have 30 columns in both files.

what to do:

You may want to filter *xyzpts data prior to calculating rigid body motion

Filter Procedure

  1. type butterBatch at the matlab prompt
  2. enter the cutoff frequency, recording frequency, and filter type
    (default 25, 250, low - other filter types are high, stop, pass)
  3. select 1 or more files to process
  4. Original and filtered data will be plotted for the first data file
  5. files are saved in the original directory with BUTTER## appended to the
    end of the original file name. The ## specifies the cutoff frequency

Calculate Rigid Body Motion Procedure

  1. type rigidBody at the MATLAB prompt
  2. select *xyzpts.csv file
  3. select markercoords.csv file
  4. type the number of bones in the input box
  5. select the markers associated with each bone (omit any markers with all NaNs)
  6. save the file output.

what you get:

A (yourfilename)BoneTforms.csv file with the translations and rotations to drive your bones (in a Maya-friendly, framex16 matrix format)

  • To use this file in maya, you will
    • select the bones in the same order used above.
    • type impMatrix at the command prompt
    • select the file saved in step6

Note: After you run through steps 1-6 in matlab, the variables markerIdx and ct are stored in the workspace. If you need to do subsequent reconstructions, simply type rigidBodyMotionFromMarkers(markerIdx,ct) at the matlab prompt. This will elimate steps 3-5.

Other details:

rigidBody calls 2 additional scripts: svdrigid and mayaMatrixFormat

svdrigid takes marker data for a single bone and outputs rotations and translations
mayaMatrixFormat converts the framex3x3 rotation matrices and framex3 translations and converts them to a framex16 rotation matrix in a Maya-friendly format

  • No labels