rofunc.devices.xsens.src.mvnx_file_accessor#

1.  Module Contents#

1.1.  Classes#

MvnxFileAccessor

1.2.  API#

class rofunc.devices.xsens.src.mvnx_file_accessor.MvnxFileAccessor[source]#

Initialization

property original_file_name#
property actor_name#
property actor_color#
property profile#
property configuration#
property comments#
property quality#
property frame_count#
property segment_count#
property joint_count#
property finger_joint_count#
property ergo_joint_count#
property sensor_count#
property frame_rate: int#
property recording_date: str#
property version#
create_index_to_segment_dict()[source]#
create_index_to_joint_dict()[source]#
create_index_to_sensor_dict()[source]#
create_index_to_ergo_joint_dict()[source]#
set_frame_window(first_frame, last_frame)[source]#
reset_frame_window()[source]#
window_profile()[source]#

This method determines the filter profile (aka scenario) for the currently selected window on the data. :return: The profile name (singleLevel, multiLevel, …) or ‘mixed’ if different profiles ere applied to the window.

frame_to_mapped_slice(frame)[source]#
segment_name_from_index(segment_index)[source]#
joint_name_from_index(joint_index)[source]#
sensor_name_from_index(sensor_index)[source]#
ergo_joint_name_from_index(ergo_joint_index)[source]#
point_name_from_indices(segment_index, point_index)[source]#
identity_pose_is_valid()[source]#
identity_pose_segment_pos(segment)[source]#
identity_pose_segment_ori(segment)[source]#
t_pose_is_valid()[source]#
t_pose_segment_pos(segment)[source]#
t_pose_segment_ori(segment)[source]#
identity_pose()[source]#
t_pose()[source]#
get_segment_pos(segment, frame=mvn.FRAMES_ALL, axis=mvn.AXIS_ALL)[source]#

Get the position information for a segment

Parameters:
  • segment – The index of the segment to return the data for (Mvn.SEGMENT_…. )

  • frame – Can be the index of the frame to return, a slice to return a range of frames or Mvn.FRAMES_ALL (default) to return all frames

  • axis – The frame number to return the data for (Mvn.AXIS_… ALL for all axes)

Returns:

A single value, list, or list of lists with position values

get_segment_ori(segment, frame=mvn.FRAMES_ALL, axis=mvn.AXIS_ALL)[source]#

Get the orientation information for a segment

Parameters:
  • segment – The index of the segment to return the data for (Mvn.SEGMENT_…. )

  • frame – Can be the index of the frame to return, a slice to return a range of frames or Mvn.FRAMES_ALL (default) to return all frames

  • axis – The frame number to return the data for (Mvn.AXIS_… ALL for all axes)

Returns:

A single value, list, or list of lists with orientation values

get_segment_point_pos(segment, point)[source]#
get_point_pos(segment, point)[source]#
get_segment_vel(segment, frame=mvn.FRAMES_ALL, axis=mvn.AXIS_ALL)[source]#

Get the local velocity information for a segment

Parameters:
  • segment – The index of the segment to return the data for (Mvn.SEGMENT_…. )

  • frame – Can be the index of the frame to return, a slice to return a range of frames or Mvn.FRAMES_ALL (default) to return all frames

  • axis – The frame number to return the data for (Mvn.AXIS_… ALL for all axes)

Returns:

A single value, list, or list of lists with velocity values

get_segment_acc(segment, frame=mvn.FRAMES_ALL, axis=mvn.AXIS_ALL)[source]#

Get the acceleration information for a segment

Parameters:
  • segment – The index of the segment to return the data for (Mvn.SEGMENT_…. )

  • frame – Can be the index of the frame to return, a slice to return a range of frames or Mvn.FRAMES_ALL (default) to return all frames

  • axis – The frame number to return the data for (Mvn.AXIS_… ALL for all axes)

Returns:

A single value, list, or list of lists with acceleration values

get_segment_angular_vel(segment, frame=mvn.FRAMES_ALL, axis=mvn.AXIS_ALL)[source]#

Get the acceleration information for a segment

Parameters:
  • segment – The index of the segment to return the data for (Mvn.SEGMENT_…. )

  • frame – Can be the index of the frame to return, a slice to return a range of frames or Mvn.FRAMES_ALL (default) to return all frames

  • axis – The frame number to return the data for (Mvn.AXIS_… ALL for all axes)

Returns:

A single value, list, or list of lists with angular velocity values

get_segment_angular_acc(segment, frame=mvn.FRAMES_ALL, axis=mvn.AXIS_ALL)[source]#

Get the acceleration information for a segment

Parameters:
  • segment – The index of the segment to return the data for (Mvn.SEGMENT_…. )

  • frame – Can be the index of the frame to return, a slice to return a range of frames or Mvn.FRAMES_ALL (default) to return all frames

  • axis – The frame number to return the data for (Mvn.AXIS_… ALL for all axes)

Returns:

A single value, list, or list of lists with acceleration values

get_segment_data(data_field, segment, frame=mvn.FRAMES_ALL, axis=mvn.AXIS_ALL)[source]#
get_finger_segment_pos(hand_idx, segment_name, frame=mvn.FRAMES_ALL, axis=mvn.AXIS_ALL)[source]#
get_finger_segment_ori(hand_idx, segment_name, frame=mvn.FRAMES_ALL, axis=mvn.AXIS_ALL)[source]#
get_finger_segment_data(data_field, hand_idx, segment_name, frame=mvn.FRAMES_ALL, axis=mvn.AXIS_ALL)[source]#
get_joint_angle(joint, frame=mvn.FRAMES_ALL, angle=mvn.ANGLE_ALL)[source]#
get_joint_angle_xzy(joint, frame=mvn.FRAMES_ALL, angle=mvn.ANGLE_ALL)[source]#
get_ergo_joint_angle(joint, frame=mvn.FRAMES_ALL, angle=mvn.ANGLE_ALL)[source]#
get_center_of_mass_pos(frame=mvn.FRAMES_ALL, axis=mvn.AXIS_ALL)[source]#

Get the position information for center of mass

Parameters:
  • frame – Can be the index of the frame to return, a slice to return a range of frames or Mvn.FRAMES_ALL (default) to return all frames

  • axis – The axis to return the data for (Mvn.AXIS_… ALL for all axes)

Returns:

A single value, list, or list of lists with position values

get_center_of_mass_vel(frame=mvn.FRAMES_ALL, axis=mvn.AXIS_ALL)[source]#

Get the velocity information for center of mass

Parameters:
  • frame – Can be the index of the frame to return, a slice to return a range of frames or Mvn.FRAMES_ALL (default) to return all frames

  • axis – The axis to return the data for (Mvn.AXIS_… ALL for all axes)

Returns:

A single value, list, or list of lists with position values

get_center_of_mass_acc(frame=mvn.FRAMES_ALL, axis=mvn.AXIS_ALL)[source]#

Get the acceleration information for center of mass

Parameters:
  • frame – Can be the index of the frame to return, a slice to return a range of frames or Mvn.FRAMES_ALL (default) to return all frames

  • axis – The axis to return the data for (Mvn.AXIS_… ALL for all axes)

Returns:

A single value, list, or list of lists with position values

get_sensor_ori(segment, frame=mvn.FRAMES_ALL, axis=mvn.AXIS_ALL)[source]#

Get the orientation information for a sensor

Parameters:
  • segment – The index of the segment to return the sensor data for (Mvn.SEGMENT_…. )

  • frame – Can be the index of the frame to return, a slice to return a range of frames or Mvn.FRAMES_ALL (default) to return all frames

  • axis – The frame number to return the data for (Mvn.AXIS_… ALL for all axes)

Returns:

A single value, list, or list of lists with orientation values

get_sensor_free_acc(segment, frame=mvn.FRAMES_ALL, axis=mvn.AXIS_ALL)[source]#

Get the free acceleration information for a sensor

Parameters:
  • segment – The index of the segment to return the sensor data for (Mvn.SEGMENT_…. )

  • frame – Can be the index of the frame to return, a slice to return a range of frames or Mvn.FRAMES_ALL (default) to return all frames

  • axis – The frame number to return the data for (Mvn.AXIS_… ALL for all axes)

Returns:

A single value, list, or list of lists with acceleration values

get_sensor_data(data_field, sensor_segment, frame=mvn.FRAMES_ALL, axis=mvn.AXIS_ALL)[source]#
get_foot_contacts(frame)[source]#

Get the contacts for a frame :param frame: The frame, or a range of frames to retrieve the contacts for. :return: The contacts

has_foot_contact(frame, foot_contact_flags=0)[source]#

Find out if the frame has a contact, optionally for a specific segment/point combo

Parameters:
  • frame – The frame (or range) to retrieve the contacts for.

  • foot_contact_flags

    The specific contact to check for:

    mvn.FOOT_CONTACT_LEFT_HEEL, mvn.FOOT_CONTACT_LEFT_TOE, mvn.FOOT_CONTACT_RIGHT_HEEL or mvn.FOOT_CONTACT_RIGHT_TOE

    It is possible to combine contacts by summing the values, eg:

    mvn.FOOT_CONTACT_LEFT_HEEL + mvn.FOOT_CONTACT_LEFT_TOE

    This will return a contact if either of the flags has a contact

    Passing 0 (or nothing) will return True if there is any contact

Returns:

Per frame True if a contact was found, False otherwise.

get_data(data_set, data_field, segment, frame=mvn.FRAMES_ALL, axis=mvn.AXIS_ALL)[source]#