readASF: Read and Parse a AFS file

Description Usage Arguments Value Note References Examples

View source: R/readASF.R

Description

This function reads in and parses a AFS Motion Capture file and returns several useful objects

Usage

1
readASF(asfFilePath, in2cm = TRUE)

Arguments

asfFilePath

path to a .asf file

in2cm

a boolean indicating whether to convert inches to centimeters, defaults to TRUE

Value

a list containing:

skeleton

a data frame containing the details for each bone, e.g. DOF, length, direction, angle - DO NOT USE, use the one returned from readAMC

childs

a named list containing a vector of "children" bones for each "parent" bone

CMatList

a named list with the C and Cinv angle-axis matrices for each bone

len

the length parameter in the ASF file, scaling factor all lengths, in CMU files always 0.45

angleType

the angle parameter in the ASF file, "deg" or "rad", in CMU files always "deg"

Note

Only ASF/AMC files from the CMU Graphics Lab Motion Capture Database have been tested.

References

A blog post describing the package with more examples: http://giorasimchoni.com/2017/08/08/2017-08-08-lambada-the-mocap-package/

The CMU Graphics Lab Motion Capture Database: http://mocap.cs.cmu.edu/

Examples

1
2
asfFilePath <- system.file("extdata", "lambada.asf", package = "mocap")
asf <- readASF(asfFilePath)

gsimchoni/mocap documentation built on May 14, 2019, 11:16 a.m.