rofunc.learning.RofuncRL.tasks.isaacgymenv.hotu.motion_lib#

1.  Module Contents#

1.1.  Classes#

DeviceCache

MotionLib

ObjectMotionLib

1.2.  Data#

USE_CACHE

1.3.  API#

rofunc.learning.RofuncRL.tasks.isaacgymenv.hotu.motion_lib.USE_CACHE = True#
class rofunc.learning.RofuncRL.tasks.isaacgymenv.hotu.motion_lib.DeviceCache(obj, device)[source]#

Initialization

class rofunc.learning.RofuncRL.tasks.isaacgymenv.hotu.motion_lib.MotionLib(motion_file, dof_body_ids, dof_offsets, key_body_ids, device)[source]#

Initialization

Args:

motion_file: dof_body_ids: dof_offsets: key_body_ids: device:

num_motions()[source]#
get_total_length()[source]#
get_motion(motion_id)[source]#
sample_motions(n)[source]#
sample_time(motion_ids, truncate_time=None)[source]#
get_motion_length(motion_ids)[source]#
get_object_pose(frame_id)[source]#

Return object pose at frame=id, where id is recorded in motion_ids

Args:

frame_id [list]: Same frame id * num_envs, where num_envs is the environment number.

Returns:

get_motion_state(motion_ids, motion_times)[source]#
Args:

motion_ids: motion_times:

Returns:

class rofunc.learning.RofuncRL.tasks.isaacgymenv.hotu.motion_lib.ObjectMotionLib(object_motion_file, object_names, device, humanoid_start_time=None, height_offset=0.0)[source]#

Initialization

Object motion library for the IsaacGym humanoid series environments and process the motion data from Optitrack.

Parameters:
  • object_motion_file – optitrack motion file path, should be .csv files, can be a list of files or a single file

  • object_names – list of object names you want to load

  • device – device same as the env/task device

  • humanoid_start_time – start time of the humanoid motion, for the temporal synchronization

  • height_offset – height offset of the object, for the spatial alignment

get_motion_state(motion_ids, motion_times)[source]#

Get the object pose at the given time

Parameters:
  • motion_ids – the id indicating which motion file to use

  • motion_times – the time to get the object pose

Returns: