AutomaticInitialPositionOfBody#
Set the initial position of body parts based on the position of the markers in the C3D file.
#include "<AMMR_TOOLS>\AnyMocap/AutomaticInitialPositionOfBody.any"`
#SegmentPosFromMarkers#
This templates is used to calculate the intial postion and rotaiton of segment from MoCap markers on the segment at a given time step.
By default it is configured to look work for the pelvis segment, but this can be overwritten by setting the SEGMENT and FRAME arguments.
For example
SegmentPosFromMarkers AutoPelvisPos = (
SEGMENT = Main.HumanModel.BodyModel.Trunk.Segments.PelvisSeg,
FRAME = AnatomicalFrameTrunk,
) = {
PelvisMarkers = {"RASI", "LASI", "RPSIS", "LPSIS"};
// The class calcuates the Position and Euler angles of the
// SEGMENT.FRAME coordinate system with respect to global.
// Hence we can use these values to set the initial position
// of the pelvis:
Main.HumanModel.Mannequin.Posture.PelvisPosX = PosX;
Main.HumanModel.Mannequin.Posture.PelvisPosY = PosY;
Main.HumanModel.Mannequin.Posture.PelvisPosZ = PosZ;
Main.HumanModel.Mannequin.Posture.PelvisRotX = RotX;
Main.HumanModel.Mannequin.Posture.PelvisRotY = RotY;
Main.HumanModel.Mannequin.Posture.PelvisRotZ = RotZ;
};
Full signature
SegmentPosFromMarkers <ObjectName>(
SEGMENT=Main.HumanModel.BodyModel.Trunk.Segments.PelvisSeg,
FRAME=AnatomicalFrameTrunk,
C3D_OBJECT=Main.ModelSetup.C3DFileData,
) = {
Markers = <Required>;
};
Arguments
- __CLASS__:
AnyFolder
- SEGMENT:
(Optional) The pelvis segment. Default is Main.HumanModel.BodyModel.Trunk.Segments.PelvisSeg. (Default: Main.HumanModel.BodyModel.Trunk.Segments.PelvisSeg)
- FRAME:
(Optional) The reference frame within the segment for which the positions/rotations are calculated. Default is AnatomicalFrameTrunk. This can also be set to “” to return the position and rotations of the segment it self. (Default: AnatomicalFrameTrunk)
- C3D_OBJECT:
(Optional) The C3D object where markers are found. Default is Main.ModelSetup.C3DFileData. (Default: Main.ModelSetup.C3DFileData)
Required initialization members
Markers = <Required>;
- class type:
AnyString
The pelvis marker labels used when calulating the pelvis position. The labels must be in the C3D file, and a minimum of 4 markers are required.
Optional initialization members
Time = Main.Studies.MarkerTracking.tStart;
- class type:
AnyFloat
The time at which the pelvis position is calculated.