diff --git a/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/environments/locomanipulation/__init__.py b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/environments/locomanipulation/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bf2e332bd8a434b7e77e8fa5d3f2699ff57d2719 --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/environments/locomanipulation/__init__.py @@ -0,0 +1,13 @@ +""" +Full list of loco-manipulation tasks. + +GroundOnly - ground only environments + +locomanip_pnp - factory environments, pick and place tasks: +LMBottlePnP +LMBoxPnP +""" + +from .base import REGISTERED_LOCOMANIPULATION_ENVS + +ALL_LOCOMANIPULATION_ENVIRONMENTS = REGISTERED_LOCOMANIPULATION_ENVS.keys() diff --git a/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/environments/locomanipulation/base.py b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/environments/locomanipulation/base.py new file mode 100644 index 0000000000000000000000000000000000000000..fde74e9d7324dfb625d9848957a4eb7e27f29226 --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/environments/locomanipulation/base.py @@ -0,0 +1,1658 @@ +from copy import deepcopy +import os +from typing import Optional, Type +import warnings +import xml.etree.ElementTree as ET + +import mujoco +import numpy as np +import robosuite +from robosuite.environments.base import EnvMeta +from robosuite.environments.manipulation.manipulation_env import ManipulationEnv +from robosuite.models.arenas import Arena +from robosuite.models.tasks import ManipulationTask +from robosuite.utils.mjcf_utils import array_to_string, find_elements, xml_path_completion +from robosuite.utils.observables import Observable, sensor + +import robocasa +from robocasa.models.objects.objects import MJCFObject +from robocasa.models.scenes import GroundArena +import robocasa.utils.camera_utils as CamUtils +from robocasa.utils.dexmg_utils import DexMGConfigHelper +from robocasa.utils.object_utils import check_obj_upright +from robocasa.utils.visuals_utls import Gradient, randomize_materials_rgba + +REGISTERED_LOCOMANIPULATION_ENVS = {} + + +def register_locomanipulation_env(target_class): + REGISTERED_LOCOMANIPULATION_ENVS[target_class.__name__] = target_class + + +class LocoManipulationEnvMeta(EnvMeta): + """Metaclass for registering robocasa environments""" + + def __new__(meta, name, bases, class_dict): + cls = super().__new__(meta, name, bases, class_dict) + register_locomanipulation_env(cls) + return cls + + +class CameraPoseRandomizer: + @staticmethod + def randomize_cameras( + env: "LocoManipulationEnv", + cam_names: list[str], + pos_range: tuple[np.ndarray, np.ndarray], + euler_range: tuple[np.ndarray, np.ndarray], + ): + """ + Randomize camera poses while maintaining their relative transforms. + + Args: + env: The environment instance + cam_names: List of camera names to randomize together + pos_range: Tuple of (min_pos, max_pos) as 3D arrays for position randomization + euler_range: Tuple of (min_euler, max_euler) as 3D arrays for euler angle randomization (in radians) + """ + if len(cam_names) == 0: + return + + # Sample random transform offset + random_pos_offset = env.rng.uniform(pos_range[0], pos_range[1]) + random_euler_offset = env.rng.uniform(euler_range[0], euler_range[1]) + + # Convert euler offset to quaternion + quat_offset = np.zeros(4, dtype=float) + mujoco.mju_euler2Quat(quat_offset, random_euler_offset, "xyz") + + # Apply the same transform to all specified cameras + for cam_name in cam_names: + if cam_name not in env._cam_configs: + warnings.warn(f"Camera {cam_name} not found in camera configs. Skipping.") + continue + + cam_config = env._cam_configs[cam_name] + + # Get original position and quaternion + original_pos = np.array(cam_config["pos"], dtype=float) + original_quat = np.array(cam_config["quat"], dtype=float) + + # Apply rotation offset to position (rotate position offset by the random rotation) + rotated_offset = np.zeros(3, dtype=float) + mujoco.mju_rotVecQuat(rotated_offset, random_pos_offset, original_quat) + new_pos = original_pos + rotated_offset + + # Compose quaternions: new_quat = quat_offset * original_quat + new_quat = np.zeros(4, dtype=float) + mujoco.mju_mulQuat(new_quat, quat_offset, original_quat) + + # Update camera config + cam_config["pos"] = new_pos.tolist() + cam_config["quat"] = new_quat.tolist() + + # Update in simulation if already created + if hasattr(env, "sim") and env.sim is not None: + try: + cam_id = env.sim.model.camera_name2id(cam_name) + env.sim.model.cam_pos[cam_id] = new_pos + env.sim.model.cam_quat[cam_id] = new_quat + except: + # Camera might not be in the model yet + pass + + +class RobotPoseRandomizer: + @staticmethod + def set_pose( + env: "LocoManipulationEnv", + x_range: [tuple[float, float]], + y_range: [tuple[float, float]], + yaw_range: [tuple[float, float]], + ): + new_x = env.rng.uniform(*x_range) + new_y = env.rng.uniform(*y_range) + new_yaw = env.rng.uniform(*yaw_range) + + if env.robots[0].name == "G1": + base_offset = env.ROBOT_POS_OFFSETS[env.robots[0].robot_model.__class__.__name__] + target_pos = np.array([new_x, new_y, base_offset[2]], dtype=float) + quat = np.zeros(4, dtype=float) + mujoco.mju_euler2Quat(quat, np.array([0.0, 0.0, new_yaw]), "xyz") + base_freejoint = f"{env.robots[0].robot_model.naming_prefix}base" + if base_freejoint in env.sim.model.joint_names: + env.sim.data.set_joint_qpos(base_freejoint, np.concatenate([target_pos, quat])) + else: + warnings.warn(f"Base joint {base_freejoint} not found in the model.") + else: + base_joint_pos = np.array([new_x, new_y, new_yaw]) + base_joint_names = [ + "mobilebase0_joint_mobile_forward", + "mobilebase0_joint_mobile_side", + "mobilebase0_joint_mobile_yaw", + ] + for i, base_joint_name in enumerate(base_joint_names): + if base_joint_name not in env.sim.model.joint_names: + warnings.warn( + f"Base joint {base_joint_name} not found in the model. " + f"Skipping randomization of {base_joint_name}." + ) + else: + env.sim.data.set_joint_qpos(base_joint_name, base_joint_pos[i]) + + @staticmethod + def set_arm(env: ManipulationEnv, elbow_qpos: float, shoulder_pitch_qpos: float): + """Helper function to reinitialize G1 robot arm configuration.""" + robot = env.robots[0] + if "G1" not in robot.name: + # avoid reinitializing arm configuration for non-G1 robots + return + + joint_names = robot.robot_joints + joint_pos_indices = robot._ref_joint_pos_indexes + for joint_name, pos_idx in zip(joint_names, joint_pos_indices): + if "elbow" in joint_name: + print(f"reinitializing G1 {joint_name} with idx {pos_idx} to {elbow_qpos}") + env.sim.data.qpos[pos_idx] = elbow_qpos + elif "shoulder_pitch" in joint_name: + print(f"reinitializing G1 {joint_name} with idx {pos_idx} to {shoulder_pitch_qpos}") + env.sim.data.qpos[pos_idx] = shoulder_pitch_qpos + + +class LocoManipulationEnv(ManipulationEnv, metaclass=LocoManipulationEnvMeta): + """ + Initialized a Base Ground Standing environment. + """ + + MUJOCO_ARENA_CLS: Type[Arena] = GroundArena + + ROBOT_POS_OFFSETS: dict[str, list[float]] = { + "PandaOmron": [0, 0, 0], + "GR1FloatingBody": [0, 0, 0.97], + "GR1": [0, 0, 0.97], + "GR1FixedLowerBody": [0, 0, 0.97], + "GR1FixedLowerBodyInspireHands": [0, 0, 0.97], + "GR1FixedLowerBodyFourierHands": [0, 0, 0.97], + "GR1ArmsOnly": [0, 0, 0.97], + "GR1ArmsOnlyInspireHands": [0, 0, 0.97], + "GR1ArmsOnlyFourierHands": [0, 0, 0.97], + "GR1ArmsAndWaistFourierHands": [0, 0, 0.97], + "G1": [0, 0, 0.793], + "G1FixedBase": [0, 0, 0.793], + "G1FixedLowerBody": [0, 0, 0.793], + "G1ArmsOnly": [0, 0, 0.793], + "G1ArmsOnlyFloating": [0, 0, 0.793], + "G1FloatingBody": [0, 0, 0.793], + "G1FloatingBodyWithVertical": [0, 0, 0.793], + } + + def __init__( + self, + translucent_robot: bool = False, + use_object_obs: bool = False, + randomize_cameras: bool = False, + *args, + **kwargs, + ): + self.mujoco_objects = [] + self.randomize_cameras = randomize_cameras + + super().__init__( + *args, + **kwargs, + ) + + self.translucent_robot = translucent_robot + + def _load_model(self): + super()._load_model() + + self.mujoco_arena = self.MUJOCO_ARENA_CLS() + self.mujoco_arena.set_origin([0, 0, 0]) + self.set_cameras() + + self.model = ManipulationTask( + mujoco_arena=self.mujoco_arena, + mujoco_robots=[robot.robot_model for robot in self.robots], + mujoco_objects=self.mujoco_objects, + ) + + robot_base_pos = self.ROBOT_POS_OFFSETS[self.robots[0].robot_model.__class__.__name__] + robot_model = self.robots[0].robot_model + robot_model.set_base_xpos(robot_base_pos) + # robot_model.set_base_ori(robot_base_ori) + + def set_cameras(self): + """ + Adds new tabletop-relevant cameras to the environment. Will randomize cameras if specified. + """ + + self._cam_configs = deepcopy(CamUtils.CAM_CONFIGS) + + for robot in self.robots: + if hasattr(robot.robot_model, "get_camera_configs"): + self._cam_configs.update(robot.robot_model.get_camera_configs()) + + for cam_name, cam_cfg in self._cam_configs.items(): + if cam_cfg.get("parent_body", None) is not None: + continue + + self.mujoco_arena.set_camera( + camera_name=cam_name, + pos=cam_cfg["pos"], + quat=cam_cfg["quat"], + camera_attribs=cam_cfg.get("camera_attribs", None), + ) + + self.mujoco_arena.set_camera( + camera_name="egoview", + pos=[0.078, 0, 1.308], + quat=[0.66491268, 0.24112495, -0.24112507, -0.66453637], + camera_attribs=dict(fovy="90"), + ) + + def visualize(self, vis_settings): + """ + In addition to super call, make the robot semi-transparent + + Args: + vis_settings (dict): Visualization keywords mapped to T/F, determining whether that specific + component should be visualized. Should have "grippers" keyword as well as any other relevant + options specified. + """ + # Run superclass method first + super().visualize(vis_settings=vis_settings) + + visual_geom_names = [] + + for robot in self.robots: + robot_model = robot.robot_model + visual_geom_names += robot_model.visual_geoms + + for name in visual_geom_names: + rgba = self.sim.model.geom_rgba[self.sim.model.geom_name2id(name)] + if self.translucent_robot: + rgba[-1] = 0.10 + else: + rgba[-1] = 1.0 + + def reward(self, action=None): + """ + Reward function for the task. The reward function is based on the task + and to be implemented in the subclasses. Returns 0 by default. + + Returns: + float: Reward for the task + """ + reward = 0 + if self._check_success(): + reward = 1.0 + return reward + + def _check_success(self): + """ + Checks if the task has been successfully completed. + Success condition is based on the task and to be implemented in the + subclasses. Returns False by default. + + Returns: + bool: True if the task is successfully completed, False otherwise + """ + return False + + def edit_model_xml(self, xml_str): + """ + This function postprocesses the model.xml collected from a MuJoCo demonstration + for retrospective model changes. + + Args: + xml_str (str): Mujoco sim demonstration XML file as string + + Returns: + str: Post-processed xml file as string + """ + xml_str = super().edit_model_xml(xml_str) + + tree = ET.fromstring(xml_str) + root = tree + worldbody = root.find("worldbody") + actuator = root.find("actuator") + asset = root.find("asset") + meshes = asset.findall("mesh") + textures = asset.findall("texture") + all_elements = meshes + textures + + robosuite_path_split = os.path.split(robosuite.__file__)[0].split("/") + robocasa_path_split = os.path.split(robocasa.__file__)[0].split("/") + + # replace robocasa-specific asset paths + for elem in all_elements: + old_path = elem.get("file") + if old_path is None: + continue + + old_path_split = old_path.split("/") + # maybe replace all paths to robosuite assets + if "models/assets" in old_path: + if "/robosuite/" in old_path: + check_lst = [ + loc for loc, val in enumerate(old_path_split) if val == "robosuite" + ] + ind = max(check_lst) # last occurrence index + new_path_split = robosuite_path_split + old_path_split[ind + 1 :] + elif "/robocasa/" in old_path: + check_lst = [loc for loc, val in enumerate(old_path_split) if val == "robocasa"] + ind = max(check_lst) # last occurrence index + new_path_split = robocasa_path_split + old_path_split[ind + 1 :] + else: + raise ValueError + + new_path = "/".join(new_path_split) + elem.set("file", new_path) + + # set cameras + for cam_name, cam_config in self._cam_configs.items(): + parent_body = cam_config.get("parent_body", None) + + cam_root = worldbody + if parent_body is not None: + cam_root = find_elements(root=worldbody, tags="body", attribs={"name": parent_body}) + if cam_root is None: + # camera config refers to body that doesnt exist on the robot + continue + + cam = find_elements(root=cam_root, tags="camera", attribs={"name": cam_name}) + + if cam is None: + old_cam = find_elements(root=worldbody, tags="camera", attribs={"name": cam_name}) + if old_cam is not None: + # old camera associated with different body + continue + + cam = ET.Element("camera") + cam.set("mode", "fixed") + cam.set("name", cam_name) + cam_root.append(cam) + + cam.set("pos", array_to_string(cam_config["pos"])) + cam.set("quat", array_to_string(cam_config["quat"])) + for k, v in cam_config.get("camera_attribs", {}).items(): + cam.set(k, v) + + # replace base -> mobilebase (this is needed for old PandaOmron demos) + for elem in find_elements( + root=worldbody, tags=["geom", "site", "body", "joint"], return_first=False + ): + if elem.get("name") is None: + continue + if elem.get("name").startswith("base0_"): + old_name = elem.get("name") + new_name = "mobilebase0_" + old_name[6:] + elem.set("name", new_name) + for elem in find_elements( + root=actuator, + tags=["velocity", "position", "motor", "general"], + return_first=False, + ): + if elem.get("name") is None: + continue + if elem.get("name").startswith("base0_"): + old_name = elem.get("name") + new_name = "mobilebase0_" + old_name[6:] + elem.set("name", new_name) + for elem in find_elements( + root=actuator, + tags=["velocity", "position", "motor", "general"], + return_first=False, + ): + if elem.get("joint") is None: + continue + if elem.get("joint").startswith("base0_"): + old_joint = elem.get("joint") + new_joint = "mobilebase0_" + old_joint[6:] + elem.set("joint", new_joint) + + # result = ET.tostring(root, encoding="utf8").decode("utf8") + result = ET.tostring(root).decode("utf8") + + # # replace with generative textures + # if (self.generative_textures is not None) and ( + # self.generative_textures is not False + # ): + # # sample textures + # assert self.generative_textures == "100p" + # self._curr_gen_fixtures = get_random_textures(self.rng) + + # cab_tex = self._curr_gen_fixtures["cab_tex"] + # counter_tex = self._curr_gen_fixtures["counter_tex"] + # wall_tex = self._curr_gen_fixtures["wall_tex"] + # floor_tex = self._curr_gen_fixtures["floor_tex"] + + # result = replace_cab_textures( + # self.rng, result, new_cab_texture_file=cab_tex + # ) + # result = replace_counter_top_texture( + # self.rng, result, new_counter_top_texture_file=counter_tex + # ) + # result = replace_wall_texture( + # self.rng, result, new_wall_texture_file=wall_tex + # ) + # result = replace_floor_texture( + # self.rng, result, new_floor_texture_file=floor_tex + # ) + + return result + + def _setup_references(self): + super()._setup_references() + + self.obj_body_id = {} + + def _randomize_robot_cameras(self): + """Randomize the poses of robot-mounted cameras while preserving their relative transforms.""" + cam_names = ["robot0_oak_egoview", "robot0_oak_left_monoview", "robot0_oak_right_monoview"] + + # Define randomization ranges + pos_range = ( + np.array([-0.02, -0.02, -0.02]), # min position offset [x, y, z] in meters + np.array([0.02, 0.02, 0.02]), # max position offset [x, y, z] in meters + ) + euler_range = ( + np.array([-0.1, -0.1, -0.1]), # min euler angles [roll, pitch, yaw] in radians + np.array([0.1, 0.1, 0.1]), # max euler angles [roll, pitch, yaw] in radians + ) + + CameraPoseRandomizer.randomize_cameras( + env=self, cam_names=cam_names, pos_range=pos_range, euler_range=euler_range + ) + + def _reset_internal(self): + super()._reset_internal() + + if self.randomize_cameras: + self._randomize_robot_cameras() + + def _reset_observables(self): + if self.hard_reset: + self._observables = self._setup_observables() + + # these sensors need a lot of computation, so we disable them by default for speed up simulation + disabled_sensors = [ + "base_to_left_eef_pos", + "base_to_left_eef_quat", + "base_to_left_eef_quat_site", + "base_to_right_eef_pos", + "base_to_right_eef_quat", + "base_to_right_eef_quat_site", + ] + for name in disabled_sensors: + for robot in self.robots: + robot_name_prefix = robot.robot_model.naming_prefix + if f"{robot_name_prefix}{name}" in self._observables: + self._observables[f"{robot_name_prefix}{name}"].set_enabled(False) + self._observables[f"{robot_name_prefix}{name}"].set_active(False) + + def get_state(self): + return {"states": self.sim.get_state().flatten()} + + +class GroundOnly(LocoManipulationEnv): + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + + +class PrimitiveBottle: + DEFAULT_RGB = [0.3, 0.7, 0.8] + + def __init__( + self, + name="bottle", + radius: float = 0.03, + half_height: float = 0.075, + rgb: Optional[list[float]] = None, + ): + self.name = name + self.assets = [ + ET.Element( + "texture", + type="2d", + name=f"{name}_tex", + builtin="flat", + rgb1=" ".join(map(str, self.DEFAULT_RGB if rgb is None else rgb)), + width="512", + height="512", + ), + ET.Element( + "material", + name=f"{name}_mat", + texture=f"{name}_tex", + texuniform="true", + reflectance="0.1", + ), + ] + + self.body = ET.Element("body", name=f"{self.name}_body", pos="0.35 0 0.8") + bottle_vis_geom = ET.Element( + "geom", + name=f"{name}_vis", + pos="0 0 0", + size=f"{radius} {half_height}", + type="cylinder", + material=f"{name}_mat", + group="1", + conaffinity="0", + contype="0", + ) + self.body.append(bottle_vis_geom) + + # Cylinder collider approximation for stable contacts + self.contact_geoms = [] + n_sides = 3 + half_width = radius * np.tan(np.pi / n_sides / 2) + for i in range(n_sides): + coll_name = f"{self.name}_collider_{i}" + angle = np.pi / n_sides * i + quat = np.zeros(4) + euler = np.array([0, 0, angle]) + mujoco.mju_euler2Quat(quat, euler, "xyz") + box_geom = ET.Element( + "geom", + name=coll_name, + type="box", + pos="0 0 0", + size=f"{radius} {half_width} {half_height}", + quat=" ".join(map(str, quat)), + solimp="0.998 0.998 0.001", + solref="0.001 2", + density="100", + friction="0.95 0.3 0.1", + ) + self.body.append(box_geom) + self.contact_geoms.append(coll_name) + + bottle_joint = ET.Element( + "joint", + name=f"{self.name}_joint", + type="free", + damping="0.0005", + ) + self.body.append(bottle_joint) + + +class PrimitiveFixture: + DEFAULT_RGB = [0.8, 0.8, 0.8] + + def __init__( + self, + name: str, + pos: np.ndarray = np.array([0.0, 0.0, 0.8]), + half_size: np.ndarray = np.array([0.1, 0.1, 0.001]), + rgb: Optional[str] = None, + ): + """ + A simple primitive fixture as a flat box. + + Args: + half_size: Half-sizes in [x, y, z] directions. Default creates a 20cm x 20cm x 2mm box. + """ + self.half_size = half_size + + self.assets = [ + ET.Element( + "texture", + type="2d", + name=f"{name}", + builtin="flat", + rgb1=" ".join(map(str, self.DEFAULT_RGB if rgb is None else rgb)), + width="512", + height="512", + ), + ET.Element( + "material", + name=f"{name}", + texture=f"{name}", + texuniform="true", + reflectance="0.05", # Less reflective than bottle + ), + ] + + self.body = ET.Element("body", name=f"{name}_body", pos=array_to_string(pos)) + + # Visual geometry + fixture_vis_geom = ET.Element( + "geom", + name=f"{name}_vis", + pos="0 0 0", + size=f"{half_size[0]} {half_size[1]} {half_size[2]}", + type="box", + material=f"{name}", + group="1", + conaffinity="0", + contype="0", + ) + self.body.append(fixture_vis_geom) + + # Collision geometry - just a single box since it's already a simple shape + self.contact_geoms = [] + fixture_collider = ET.Element( + "geom", + name=f"{name}_collider", + type="box", + pos="0 0 0", + size=f"{half_size[0]} {half_size[1]} {half_size[2]}", + solimp="0.998 0.998 0.001", + solref="0.001 2", + density="100", + friction="0.6 0.01 0.001", # Similar to add_fixture_body friction + ) + self.body.append(fixture_collider) + self.contact_geoms.append("fixture_collider") + + +class PnPBottle(LocoManipulationEnv, DexMGConfigHelper): + TABLE_GRADIENT: Gradient = Gradient( + np.array([0.68, 0.34, 0.07, 1.0]), np.array([1.0, 1.0, 1.0, 1.0]) + ) + DEFAULT_BOTTLE_POS: np.ndarray = np.array([0.4, 0, 0.77]) + BOTTLE_POS_RANGE_X = (-0.08, 0.04) + BOTTLE_POS_RANGE_Y = (-0.08, 0.08) + + def __init__(self, *args, **kwargs): + self.objects = {} + super().__init__(*args, **kwargs) + + def _load_model(self): + self.mujoco_objects = [self._create_table("table_body", [0.5, 0, 0], [0, 0, np.pi / 2])] + + super()._load_model() + + self.bottle = self._create_bottle() + + @staticmethod + def _create_table(name: str, position: list[float], euler: list[float]) -> MJCFObject: + table = MJCFObject( + name=name, + mjcf_path=xml_path_completion( + "objects/omniverse/locomanip/lab_table/model.xml", root=robocasa.models.assets_root + ), + scale=1.0, + solimp=(0.998, 0.998, 0.001), + solref=(0.001, 1), + density=10, + friction=(1, 1, 1), + static=True, + ) + table.set_pos(position) + table.set_euler(euler) + return table + + def _create_bottle( + self, name: str = "bottle", rgb: Optional[list[float]] = None + ) -> PrimitiveBottle: + bottle = PrimitiveBottle(name=name, radius=0.03, half_height=0.075, rgb=rgb) + self.model.asset.extend(bottle.assets) + self.model.worldbody.append(bottle.body) + self.objects[name] = {"name": f"{name}_body"} + return bottle + + def _reset_internal(self): + """ + Resets simulation internal configurations. + """ + super()._reset_internal() + + if not self.deterministic_reset: + self._randomize_bottle_placement() + self._randomize_table_texture() + + def _randomize_bottle_placement( + self, name: str = "bottle", base_pos: Optional[np.ndarray] = None + ): + if not self.deterministic_reset: + bottle_joint = f"{name}_joint" + base_pos = self.DEFAULT_BOTTLE_POS if base_pos is None else base_pos + + random_x = self.rng.uniform(*self.BOTTLE_POS_RANGE_X) + random_y = self.rng.uniform(*self.BOTTLE_POS_RANGE_Y) + new_pos = base_pos + np.array([random_x, random_y, 0]) + + current_qpos = self.sim.data.get_joint_qpos(bottle_joint) + new_qpos = current_qpos.copy() + new_qpos[:3] = new_pos + + self.sim.data.set_joint_qpos(bottle_joint, new_qpos) + + def _randomize_table_texture(self): + table = self.mujoco_objects[0] + randomize_materials_rgba( + rng=self.rng, mjcf_obj=table, gradient=self.TABLE_GRADIENT, linear=True + ) + + def _setup_references(self): + super()._setup_references() + + self.obj_body_id = {} + for name, model in self.objects.items(): + self.obj_body_id[name] = self.sim.model.body_name2id(model["name"]) + + def _check_success(self): + check_grasp = self._check_grasp(self.robots[0].gripper["right"], self.bottle.contact_geoms) + + bottle_z = self.sim.data.body_xpos[self.obj_body_id["bottle"]][2] + table_z = self.mujoco_objects[0].top_offset[2] + check_bottle_in_air = bottle_z > table_z + 0.2 + # check bottle and table collision + # check_bottle_in_air = not self.check_contact("bottle", "table") + return check_grasp and check_bottle_in_air + + def get_object(self): + return dict( + bottle=dict(obj_name=self.objects["bottle"]["name"], obj_type="body"), + ) + + def get_subtask_term_signals(self): + signals = dict() + signals["grasp_bottle"] = int( + self._check_grasp(self.robots[0].gripper["right"], self.bottle.contact_geoms) + ) + return signals + + @staticmethod + def task_config(): + task = DexMGConfigHelper.AttrDict() + task.task_spec_0.subtask_1 = dict( + object_ref="bottle", + subtask_term_signal=None, + subtask_term_offset_range=None, + selection_strategy="random", + selection_strategy_kwargs=None, + action_noise=0.05, + num_interpolation_steps=5, + num_fixed_steps=0, + apply_noise_during_interpolation=False, + ) + task.task_spec_1.subtask_1 = dict( + object_ref=None, + subtask_term_signal=None, + subtask_term_offset_range=None, + selection_strategy="random", + selection_strategy_kwargs=None, + action_noise=0.05, + num_interpolation_steps=5, + num_fixed_steps=0, + apply_noise_during_interpolation=False, + ) + return task.to_dict() + + +def create_shelf(pos: list[float], euler: list[float]) -> MJCFObject: + shelf = MJCFObject( + name="shelf_body", + mjcf_path=xml_path_completion( + "objects/aigc/shelf/model.xml", root=robocasa.models.assets_root + ), + scale=[1.0, 1.0, 1.0], + solimp=(0.998, 0.998, 0.001), + solref=(0.001, 1), + density=10, + friction=(1, 1, 1), + static=True, + ) + shelf.set_pos(pos) + shelf.set_euler(euler) + return shelf + + +class PickBottleShelf(PnPBottle): + def _load_model(self): + # Create both the original table and the target table + self.mujoco_objects = [create_shelf(pos=[0.8, 0.4, 0], euler=[0, 0, np.pi / 2])] + + LocoManipulationEnv._load_model(self) + + self.bottle = self._create_bottle() + + def _reset_internal(self): + """ + Resets simulation internal configurations. + """ + LocoManipulationEnv._reset_internal(self) + + if not self.deterministic_reset: + # Base position on ground (z=0.075 is bottle radius) + # Level 2 of shelf + self._randomize_bottle_placement(base_pos=np.array([0.7, 0.4, 0.376660 + 0.075 + 0.02])) + self._randomize_table_texture() + RobotPoseRandomizer.set_arm(self, elbow_qpos=-0.5, shoulder_pitch_qpos=0.5) + + +class PnPBottleHigh(PnPBottle): + def _load_model(self): + self.mujoco_objects = [self._create_table("table_body", [0.5, 0, 0.1], [0, 0, np.pi / 2])] + + LocoManipulationEnv._load_model(self) + + self.bottle = self._create_bottle() + + def _reset_internal(self): + """ + Resets simulation internal configurations. + """ + LocoManipulationEnv._reset_internal(self) + + # Randomize bottle position within +/- 0.1 range on x and y axes + if not self.deterministic_reset: + # Base position of the bottle + base_pos = np.array([0.4, 0, 0.875]) + + # Add random offset within +/- 0.1 range for x and y + random_x = np.random.uniform(-0.1, 0.1) + random_y = np.random.uniform(-0.1, 0.1) + # New randomized position (keep z constant) + new_pos = base_pos + np.array([random_x, random_y, 0]) + + # Set the bottle position using the free joint + # For free joints, qpos includes [x, y, z, qw, qx, qy, qz] + current_qpos = self.sim.data.get_joint_qpos("bottle_joint") + new_qpos = current_qpos.copy() + new_qpos[:3] = new_pos # Update position (x, y, z) + + self.sim.data.set_joint_qpos("bottle_joint", new_qpos) + + def _setup_observables(self): + observables = super()._setup_observables() + + @sensor(modality="object") + def obj_pos(obs_cache): + return self.sim.data.body_xpos[self.obj_body_id["bottle"]] + + @sensor(modality="object") + def obj_quat(obs_cache): + return self.sim.data.body_xquat[self.obj_body_id["bottle"]] + + @sensor(modality="object") + def obj_linear_vel(obs_cache): + return self.sim.data.get_body_xvelp("bottle_body") + + @sensor(modality="object") + def obj_angular_vel(obs_cache): + return self.sim.data.get_body_xvelr("bottle_body") + + sensors = [obj_pos, obj_quat, obj_linear_vel, obj_angular_vel] + names = [s.__name__ for s in sensors] + + for name, s in zip(names, sensors): + observables[name] = Observable( + name=name, + sensor=s, + sampling_rate=self.control_freq, + ) + + return observables + + def get_privileged_obs_keys(self): + return { + "obj_pos": (3,), + "obj_quat": (4,), + "obj_linear_vel": (3,), + "obj_angular_vel": (3,), + } + + +class NavPickBottle(PnPBottle): + """ + Pick-and-Place Bottle environment with robot position randomized at reset. + """ + + def _reset_internal(self): + super()._reset_internal() + + if not self.deterministic_reset: + RobotPoseRandomizer.set_pose(self, (-0.3, -0.16), (-0.2, 0.2), (-np.pi / 6, np.pi / 6)) + + +class PnPBottleRandRobotPose(NavPickBottle): + pass + + +class VisualReach(LocoManipulationEnv): + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + + def _load_model(self): + super()._load_model() + + self.create_visual_only_goal_cube() + + def create_visual_only_goal_cube(self): + cube_tex = ET.Element( + "texture", + type="2d", + name="cube", + builtin="flat", + rgb1="1.0 0.0 0.0", + width="512", + height="512", + ) + cube_mat = ET.Element( + "material", + name="cube", + texture="cube", + texuniform="true", + reflectance="0.1", + ) + self.model.asset.append(cube_tex) + self.model.asset.append(cube_mat) + + self.objects = {} + cube_body = ET.Element("body", name="cube_body", pos="0.4 0 0.875") + + cube_vis_geom = ET.Element( + "geom", + name="cube_vis", + pos="0 0 0", + size="0.0375 0.0375 0.0375", + type="box", + material="cube", + group="1", + conaffinity="0", + contype="0", + ) + + cube_body.append(cube_vis_geom) + self.model.worldbody.append(cube_body) + self.objects["cube"] = {"name": "cube_body"} + + def _setup_references(self): + super()._setup_references() + + self.obj_body_id = {} + for name, model in self.objects.items(): + self.obj_body_id[name] = self.sim.model.body_name2id(model["name"]) + + def _check_success(self): + # check_grasp = self._check_grasp(self.robots[0].gripper["right"], self.objects["bottle"]) + # check_reach = self._check_reach(self.objects["bottle"]) + return True + + def _check_reach(self, obj_name): + raise NotImplementedError + # To be implemented by the subclass + + def get_object(self): + return dict( + cube=dict(obj_name=self.objects["cube"].root_body, obj_type="body"), + ) + + def reset_obj_pos(self): + # reset object pos randomly around bottle_body pos="0.4 0 0.875" + init_pos = np.array([0.4, 0, 0.875]) + random_x = np.random.uniform(-0.3, 0.15) + random_y = np.random.uniform(-0.15, 0.15) + random_z = np.random.uniform(-0.15, 0.30) + self.sim.model.body_pos[self.obj_body_id["cube"]] = init_pos + np.array( + [random_x, random_y, random_z] + ) + + def set_cameras(self): + super().set_cameras() + self.mujoco_arena.set_camera( + camera_name="egoview", + pos=[0.078, 0, 1.308], + quat=[0.66491268, 0.24112495, -0.24112507, -0.66453637], + camera_attribs=dict(fovy="90"), + ) + + def _setup_observables(self): + observables = super()._setup_observables() + + @sensor(modality="object") + def obj_pos(obs_cache): + return self.sim.data.body_xpos[self.obj_body_id["cube"]] + + @sensor(modality="object") + def obj_quat(obs_cache): + return self.sim.data.body_xquat[self.obj_body_id["cube"]] + + @sensor(modality="object") + def obj_linear_vel(obs_cache): + return self.sim.data.get_body_xvelp("cube_body") + + @sensor(modality="object") + def obj_angular_vel(obs_cache): + return self.sim.data.get_body_xvelr("cube_body") + + sensors = [obj_pos, obj_quat, obj_linear_vel, obj_angular_vel] + names = [s.__name__ for s in sensors] + + for name, s in zip(names, sensors): + observables[name] = Observable( + name=name, + sensor=s, + sampling_rate=self.control_freq, + ) + + return observables + + def get_privileged_obs_keys(self): + return { + "obj_pos": (3,), + "obj_quat": (4,), + "obj_linear_vel": (3,), + "obj_angular_vel": (3,), + } + + +class PnPBottleFixtureToFixture(PnPBottle): + """ + Task: Robot picks up bottle and places it on a fixture. + + Initialization: bottle rests on a source fixture. + + Idea: by changing the location of the target fixture, we can change the data generation task layout for + these placement related tasks. + """ + + SEPARATION_THRESH_M: float = 0.0005 # 0.05 cm + DISTMAX_SCAN_M: float = 0.05 # 5 cm window for distance queries + _SRC_NAME = "start_fixture" + _TGT_NAME = "target_fixture" + _FIXTURE_HALF_SIZE = np.array([0.05, 0.05, 0.001]) + _BOTTLE_HALF_HEIGHT = 0.075 + _X_SRC_RANGE = (0.30, 0.55) + _X_TGT_RANGE = (0.30, 0.55) + _Y_SRC_RANGE = (-0.20, -0.05) + _Y_TGT_RANGE = (0.05, 0.20) + _SRC_FIXTURE_VISIBLE = False + _TGT_FIXTURE_VISIBLE = True + + def _load_model(self): + self.mujoco_objects = [self._create_table("table_body", [0.5, 0, 0], [0, 0, np.pi / 2])] + LocoManipulationEnv._load_model(self) + self.bottle = self._create_bottle() + self._create_fixture(self._SRC_NAME, visible=self._SRC_FIXTURE_VISIBLE, rgb="1 0 0") + self._create_fixture(self._TGT_NAME, visible=self._TGT_FIXTURE_VISIBLE, rgb="0 1 0") + self._src_body = f"{self._SRC_NAME}_body" + self._tgt_body = f"{self._TGT_NAME}_body" + self._src_coll = f"{self._SRC_NAME}_collider" + self._tgt_coll = f"{self._TGT_NAME}_collider" + + def _create_fixture(self, name: str, visible: bool, rgb: Optional[str] = None) -> None: + """Create a flat box fixture; add assets + body to the compiled model.""" + fx = PrimitiveFixture( + name=name, pos=np.array([0.0, 0.0, 0.0]), half_size=self._FIXTURE_HALF_SIZE, rgb=rgb + ) + + # Make source fixture invisible (keep collision only) + if not visible: + # Find the visual geom and hide it + for child in list(fx.body): + if child.tag == "geom" and child.get("name") == f"{name}_vis": + child.set("rgba", "0 0 0 0") # invisible visual + break + + # Register assets + body into the scene graph + self.model.asset.extend(fx.assets) + self.model.worldbody.append(fx.body) + + def _setup_references(self): + super()._setup_references() + # Table root body is "_main" (same convention as target_table above) + self.table_body_id = self.sim.model.body_name2id("table_body_main") + self.src_fixture_id = self.sim.model.body_name2id(self._src_body) + self.tgt_fixture_id = self.sim.model.body_name2id(self._tgt_body) + + def _check_success(self) -> bool: + """Bottle touches target fixture collider and is upright.""" + bottle_on_target = self.check_contact(self.bottle.contact_geoms, [self._tgt_coll]) + bottle_upright = check_obj_upright(self, "bottle", threshold=0.8, symmetric=True) + return bottle_on_target and bottle_upright + + # --- runtime table height --- + def _table_top_z(self) -> float: + base_z = float(self.sim.data.body_xpos[self.table_body_id][2]) + top_offset_z = float(self.mujoco_objects[0].top_offset[2]) + return base_z + top_offset_z + + def _reset_internal(self): + LocoManipulationEnv._reset_internal(self) + + if not self.deterministic_reset: + # Sample fixture XY, compute Z from current table pose + x_src = self.rng.uniform(*self._X_SRC_RANGE) + y_src = self.rng.uniform(*self._Y_SRC_RANGE) + + x_tgt = self.rng.uniform(*self._X_TGT_RANGE) + y_tgt = self.rng.uniform(*self._Y_TGT_RANGE) + # y_tgt = self.rng.uniform(*self._Y_TGT_RANGE) + + z_top = self._table_top_z() # dynamic table top + src_pos = np.array([x_src, y_src, z_top]) + tgt_pos = np.array([x_tgt, y_tgt, z_top]) + + # Reset fixture body poses (static bodies): write to model; MuJoCo will use it after forward() + self.sim.model.body_pos[self.src_fixture_id] = src_pos + self.sim.model.body_pos[self.tgt_fixture_id] = tgt_pos + + # Place bottle on source fixture: top of fixture + bottle half-height + tiny clearance + bottle_z = z_top + self._FIXTURE_HALF_SIZE[2] + self._BOTTLE_HALF_HEIGHT + 0.002 + qpos = self.sim.data.get_joint_qpos("bottle_joint").copy() + qpos[:3] = np.array([x_src, y_src, bottle_z]) + qpos[3:7] = np.array([1.0, 0.0, 0.0, 0.0]) # upright + self.sim.data.set_joint_qpos("bottle_joint", qpos) + + self._randomize_table_texture() + RobotPoseRandomizer.set_pose(self, (-0.3, -0.16), (-0.2, 0.2), (-np.pi / 6, np.pi / 6)) + + # --- distance via MuJoCo --- + def _min_signed_distance_mj(self, geoms_a: list[str], geoms_b: list[str]) -> float: + model, data = self.sim.model, self.sim.data + dmin = np.inf + fromto = np.empty(6, dtype=np.float64) + a_ids = [model.geom_name2id(n) for n in geoms_a] + b_ids = [model.geom_name2id(n) for n in geoms_b] + for ga in a_ids: + for gb in b_ids: + dist = mujoco.mj_geomDistance( + model._model, data._data, ga, gb, self.DISTMAX_SCAN_M + 0.01, fromto + ) + dmin = min(dmin, float(dist)) + return dmin + + def get_subtask_term_signals(self) -> dict[str, int]: + """ + 1 iff (no contact between bottle and source fixture) AND + (min signed distance > DISTMAX_SCAN_M). + """ + in_contact = self.check_contact(self.bottle.contact_geoms, [self._src_coll]) + min_dist = self._min_signed_distance_mj(self.bottle.contact_geoms, [self._src_coll]) + return { + "obj_off_source_fixture": int((not in_contact) and (min_dist > self.DISTMAX_SCAN_M)) + } + + def get_object(self) -> dict: + return dict( + bottle=dict(obj_name=self.objects["bottle"]["name"], obj_type="body"), + source_fixture=dict(obj_name=self._src_body, obj_type="body"), + target_fixture=dict(obj_name=self._tgt_body, obj_type="body"), + ) + + @staticmethod + def task_config() -> dict: + task = DexMGConfigHelper.AttrDict() + # Subtask 1: pick (leave source fixture) + task.task_spec_0.subtask_1 = dict( + object_ref="bottle", + subtask_term_signal="obj_off_source_fixture", + subtask_term_offset_range=(5, 10), + selection_strategy="random", + selection_strategy_kwargs=None, + action_noise=0.05, + num_interpolation_steps=5, + num_fixed_steps=0, + apply_noise_during_interpolation=False, + ) + # Subtask 2: place on target fixture + task.task_spec_0.subtask_2 = dict( + object_ref="target_fixture", + subtask_term_signal=None, + subtask_term_offset_range=None, + selection_strategy="random", + selection_strategy_kwargs=None, + action_noise=0.05, + num_interpolation_steps=5, + num_fixed_steps=0, + apply_noise_during_interpolation=False, + ) + # Default filler for task_spec_1, mirroring other tasks + task.task_spec_1.subtask_1 = dict( + object_ref=None, + subtask_term_signal=None, + subtask_term_offset_range=None, + selection_strategy="random", + selection_strategy_kwargs=None, + action_noise=0.05, + num_interpolation_steps=5, + num_fixed_steps=0, + apply_noise_during_interpolation=False, + ) + return task.to_dict() + + +class PnPBottleFixtureToFixtureSourceDemo(PnPBottleFixtureToFixture): + """ + Environment for collecting source demo for PnPBottleFixtureToFixture tasks. + """ + + _X_SRC_RANGE = (0.375, 0.375) + _X_TGT_RANGE = (0.375, 0.375) + _Y_SRC_RANGE = (-0.15, -0.15) + _Y_TGT_RANGE = (0.1, 0.1) + _SRC_FIXTURE_VISIBLE = False + _TGT_FIXTURE_VISIBLE = True + + +class PnPBottleShelfToTable(PnPBottleFixtureToFixture): + """ + Task: Robot picks up bottle from a fixture on a shelf and places it on a fixture on a table. + + Initialization: bottle rests on a source fixture on the shelf. + Target: place bottle on target fixture on the table. + """ + + # Adjust ranges for shelf-to-table layout + _X_SRC_RANGE = (-0.05, 0.05) # Shelf position range + _X_TGT_RANGE = (-0.05 - 0.2, 0.05 - 0.2) # Table position range + # TODO: could be better to have some 'center' specified here + _Y_SRC_RANGE = (-0.05, 0.05) # Shelf position range + _Y_TGT_RANGE = (-0.05, 0.05) # Table position range + _SRC_FIXTURE_VISIBLE = True + _TGT_FIXTURE_VISIBLE = True + _FIXTURE_HALF_SIZE = np.array([0.05, 0.05, 0.001]) + + # Shelf height constants (from PnPBottleShelf) + # _SHELF_HEIGHT = 0.386660 # Level 2 of shelf from the original shelf environment + _SHELF_HEIGHT = 0.753321 + 0.015 # Level 3 of shelf from the original shelf environment + + def _load_model(self): + # Create both shelf and table + self.mujoco_objects = [ + self._create_table("table_body", [0.5, 0.6, 0], [0, 0, np.pi / 2]), + create_shelf(pos=[0.8, -0.4, 0], euler=[0, 0, np.pi / 2]), + ] + + LocoManipulationEnv._load_model(self) + + self.bottle = self._create_bottle() + self._create_fixture(self._SRC_NAME, visible=self._SRC_FIXTURE_VISIBLE, rgb="1 0 0") + self._create_fixture(self._TGT_NAME, visible=self._TGT_FIXTURE_VISIBLE, rgb="0 1 0") + self._src_body = f"{self._SRC_NAME}_body" + self._tgt_body = f"{self._TGT_NAME}_body" + self._src_coll = f"{self._SRC_NAME}_collider" + self._tgt_coll = f"{self._TGT_NAME}_collider" + + def _setup_references(self): + super()._setup_references() + # Add reference to shelf + self.shelf_body_id = self.sim.model.body_name2id("shelf_body_main") + + def _shelf_top_z(self) -> float: + """Get the Z coordinate of the shelf top surface""" + # Use the same shelf height as in PnPBottleShelf + return self._SHELF_HEIGHT + + def _shelf_xy(self) -> tuple[float, float]: + """Get the XY coordinates of the shelf""" + return self.sim.data.body_xpos[self.shelf_body_id][:2] + + def _table_xy(self) -> tuple[float, float]: + """Get the XY coordinates of the table""" + return self.sim.data.body_xpos[self.table_body_id][:2] + + def _reset_internal(self): + LocoManipulationEnv._reset_internal(self) + + if not self.deterministic_reset: + # Sample fixture XY positions + x_src = self.rng.uniform(*self._X_SRC_RANGE) + y_src = self.rng.uniform(*self._Y_SRC_RANGE) + + x_tgt = self.rng.uniform(*self._X_TGT_RANGE) + y_tgt = self.rng.uniform(*self._Y_TGT_RANGE) + + # Source fixture on shelf + z_shelf = self._shelf_top_z() + x_shelf, y_shelf = self._shelf_xy() + src_pos = np.array([x_src, y_src, z_shelf]) + src_pos += np.array([x_shelf, y_shelf, 0]) + + # table pos + # Target fixture on table + z_table = self._table_top_z() + x_table, y_table = self._table_xy() + tgt_pos = np.array([x_tgt, y_tgt, z_table]) + tgt_pos += np.array([x_table, y_table, 0]) + + # Reset fixture body poses + self.sim.model.body_pos[self.src_fixture_id] = src_pos + self.sim.model.body_pos[self.tgt_fixture_id] = tgt_pos + + # Place bottle on source fixture (shelf): top of fixture + bottle half-height + clearance + bottle_z = z_shelf + self._FIXTURE_HALF_SIZE[2] + self._BOTTLE_HALF_HEIGHT + 0.002 + qpos = self.sim.data.get_joint_qpos("bottle_joint").copy() + qpos[:3] = np.array([src_pos[0], src_pos[1], bottle_z]) + qpos[3:7] = np.array([1.0, 0.0, 0.0, 0.0]) # upright + self.sim.data.set_joint_qpos("bottle_joint", qpos) + + self._randomize_table_texture() + RobotPoseRandomizer.set_pose(self, (-0.3, -0.16), (-0.2, 0.2), (-np.pi / 6, np.pi / 6)) + + def _randomize_table_texture(self): + """Randomize textures for the table (shelf texture is static)""" + # Only randomize the table texture (index 1), not the shelf + table = self.mujoco_objects[1] + randomize_materials_rgba( + rng=self.rng, mjcf_obj=table, gradient=self.TABLE_GRADIENT, linear=True + ) + + +class PnPBottleTableToTable(PnPBottle): + def _load_model(self): + # Create both the original table and the target table + self.mujoco_objects = [ + self._create_table("table_body", [0.5, 0, 0], [0, 0, np.pi / 2]), + self._create_table("target_table_body", [0.5, 1.2, 0], [0, 0, np.pi / 2]), + ] + + LocoManipulationEnv._load_model(self) + + self.bottle = self._create_bottle() + + def _setup_references(self): + super()._setup_references() + + # Add reference to target table - note the _main suffix + self.target_table_body_id = self.sim.model.body_name2id("target_table_body_main") + + def _check_success(self): + """Check if bottle is successfully placed on the target table""" + bottle_on_table = self.check_contact(self.bottle.contact_geoms, self.mujoco_objects[1]) + bottle_is_upright = check_obj_upright(self, "bottle", threshold=0.8, symmetric=True) + return bottle_on_table and bottle_is_upright + + def _randomize_table_texture(self): + """Randomize textures for both tables""" + # Randomize original table + original_table = self.mujoco_objects[0] + randomize_materials_rgba( + rng=self.rng, mjcf_obj=original_table, gradient=self.TABLE_GRADIENT, linear=True + ) + + # Randomize target table + target_table = self.mujoco_objects[1] + randomize_materials_rgba( + rng=self.rng, mjcf_obj=target_table, gradient=self.TABLE_GRADIENT, linear=True + ) + + def get_object(self): + return dict( + bottle=dict(obj_name=self.objects["bottle"]["name"], obj_type="body"), + target_table=dict(obj_name="target_table_body_main", obj_type="body"), + ) + + @staticmethod + def task_config(): + task = DexMGConfigHelper.AttrDict() + task.task_spec_0.subtask_1 = dict( + object_ref="bottle", + subtask_term_signal="obj_off_table", + subtask_term_offset_range=(5, 10), + selection_strategy="random", + selection_strategy_kwargs=None, + action_noise=0.05, + num_interpolation_steps=5, + num_fixed_steps=0, + apply_noise_during_interpolation=False, + ) + # Second subtask for placing on target table + task.task_spec_0.subtask_2 = dict( + object_ref="target_table", + subtask_term_signal=None, + subtask_term_offset_range=None, + selection_strategy="random", + selection_strategy_kwargs=None, + action_noise=0.05, + num_interpolation_steps=5, + num_fixed_steps=0, + apply_noise_during_interpolation=False, + ) + task.task_spec_1.subtask_1 = dict( + object_ref=None, + subtask_term_signal=None, + subtask_term_offset_range=None, + selection_strategy="random", + selection_strategy_kwargs=None, + action_noise=0.05, + num_interpolation_steps=5, + num_fixed_steps=0, + apply_noise_during_interpolation=False, + ) + return task.to_dict() + + def get_subtask_term_signals(self): + """ + Retrieve signals used to define subtask termination conditions. + + Returns: + dict: Dictionary mapping signal names to their current values + """ + signals = dict() + + obj_z = self.sim.data.body_xpos[self.obj_body_id["bottle"]][2] + target_table_pos = self.sim.data.body_xpos[self.target_table_body_id] + target_table_z = target_table_pos[2] + self.mujoco_objects[1].top_offset[2] + + th = 0.15 + signals["obj_off_table"] = int(obj_z - target_table_z > th) + + return signals + + +class PickBottleGround(PnPBottle): + """ + Pick-and-Place Bottle environment with bottle initialized on the ground. + """ + + def _reset_internal(self): + """ + Resets simulation internal configurations. + """ + LocoManipulationEnv._reset_internal(self) + + if not self.deterministic_reset: + # Base position on ground (z=0.075 is bottle radius) + self._randomize_bottle_placement(base_pos=np.ndarray([0.4, 0, 0.075])) + self._randomize_table_texture() + + def _randomize_table_texture(self): + pass + + def _check_success(self): + check_grasp = self._check_grasp(self.robots[0].gripper["right"], "bottle") + + bottle_z = self.sim.data.body_xpos[self.obj_body_id["bottle"]][2] + ground_z = 0 + check_bottle_in_air = bottle_z > ground_z + 0.2 + # check bottle and table collision + # check_bottle_in_air = not self.check_contact("bottle", "table") + return check_grasp and check_bottle_in_air + + def _load_model(self): + self.mujoco_objects = [] + + super(PnPBottle, self)._load_model() + self._create_bottle() + + +class PickBottles(PnPBottle): + BOTTLE_POS_RANGE_X = (-0.08, 0.04) + BOTTLE_POS_RANGE_Y = (-0.04, 0.04) + + COLOURS: list[list[float]] = [[0.3, 0.7, 0.8], [0.8, 0.4, 0.3]] + BOTTLES_COUNT = 2 + Y_OFFSET_STEP = 0.1 + + @staticmethod + def _get_bottle_names() -> list[str]: + return [f"bottle_{i}" for i in range(PickBottles.BOTTLES_COUNT)] + + def _load_model(self): + self.mujoco_objects = [self._create_table("table_body", [0.5, 0, 0], [0, 0, np.pi / 2])] + + LocoManipulationEnv._load_model(self) + + self.bottles = self._create_bottles() + + def _create_bottles(self) -> list[PrimitiveBottle]: + bottles = [] + for i, name in enumerate(self._get_bottle_names()): + rgb = self.COLOURS[i % len(self.COLOURS)] + bottles.append(self._create_bottle(name=name, rgb=rgb)) + return bottles + + def _reset_internal(self): + LocoManipulationEnv._reset_internal(self) + + n = len(self.bottles) + offsets = np.arange(n) - (n - 1) / 2.0 + for i, bottle in enumerate(self.bottles): + self._randomize_bottle_placement( + name=bottle.name, + base_pos=self.DEFAULT_BOTTLE_POS + + np.array([0, self.Y_OFFSET_STEP * offsets[i], 0]), + ) + self._randomize_table_texture() + + def _check_success(self): + for bottle in self.bottles: + check_grasp = self._check_grasp( + self.robots[0].gripper["right"], bottle.contact_geoms + ) or self._check_grasp(self.robots[0].gripper["left"], bottle.contact_geoms) + bottle_z = self.sim.data.body_xpos[self.obj_body_id[bottle.name]][2] + table_z = self.mujoco_objects[0].top_offset[2] + check_bottle_in_air = bottle_z > table_z + 0.2 + if check_grasp and check_bottle_in_air: + continue + return False + return True + + def get_object(self): + result = {} + for bottle in self.bottles: + result[bottle.name] = dict(obj_name=self.objects[bottle.name]["name"], obj_type="body") + return result + + def get_subtask_term_signals(self): + signals = dict() + for bottle in self.bottles: + signals[f"grasp_{bottle.name}"] = int( + self._check_grasp(self.robots[0].gripper["right"], bottle.contact_geoms) + or self._check_grasp(self.robots[0].gripper["left"], bottle.contact_geoms) + ) + return signals + + @staticmethod + def task_config(): + task = DexMGConfigHelper.AttrDict() + bottle_names = PickBottles._get_bottle_names() + assert len(bottle_names) == 2 + for i, name in enumerate(bottle_names): + subtask = dict( + object_ref=name, + subtask_term_signal=f"grasp_{name}", + subtask_term_offset_range=None, + selection_strategy="random", + selection_strategy_kwargs=None, + action_noise=0.05, + num_interpolation_steps=5, + num_fixed_steps=0, + apply_noise_during_interpolation=False, + ) + spec_attr = f"task_spec_{i}" + setattr(getattr(task, spec_attr), "subtask_1", subtask) + return task.to_dict() + + +class NavPickBottles(PickBottles): + """ + PickBottles environment with robot position randomized further from table at reset. + """ + + def _reset_internal(self): + super()._reset_internal() + + if not self.deterministic_reset: + RobotPoseRandomizer.set_pose(self, (-0.3, -0.16), (-0.2, 0.2), (-np.pi / 6, np.pi / 6)) + + +class PnPBottlesTableToTable(PickBottles): + def _load_model(self): + self.mujoco_objects = [ + self._create_table("table_body", [0.5, 0, 0], [0, 0, np.pi / 2]), + self._create_table("target_table_body", [0.5, 1.2, 0], [0, 0, np.pi / 2]), + ] + + LocoManipulationEnv._load_model(self) + + self.bottles = self._create_bottles() + + def _check_success(self): + """Check if bottles are successfully placed on the target table""" + for bottle in self.bottles: + bottle_on_table = self.check_contact(bottle.contact_geoms, self.mujoco_objects[1]) + bottle_is_upright = check_obj_upright(self, bottle.name, threshold=0.8, symmetric=True) + if bottle_on_table and bottle_is_upright: + continue + return False + return True + + def _setup_references(self): + super()._setup_references() + + # Add reference to target table - note the _main suffix + self.target_table_body_id = self.sim.model.body_name2id("target_table_body_main") + + def get_object(self): + result = super().get_object() + result["target_table"] = dict(obj_name="target_table_body_main", obj_type="body") + return result + + @staticmethod + def task_config(): + task = DexMGConfigHelper.AttrDict() + + bottle_names = PickBottles._get_bottle_names() + assert len(bottle_names) == 2 + for i, name in enumerate(bottle_names): + + # pick subtask per arm + subtask = dict( + object_ref=name, + subtask_term_signal=f"{name}_off_table", + subtask_term_offset_range=None, + selection_strategy="random", + selection_strategy_kwargs=None, + action_noise=0.05, + num_interpolation_steps=5, + num_fixed_steps=0, + apply_noise_during_interpolation=False, + ) + spec_attr = f"task_spec_{i}" + setattr(getattr(task, spec_attr), "subtask_1", subtask) + + # place subtask per arm + subtask = dict( + object_ref="target_table", + subtask_term_signal=None, + subtask_term_offset_range=None, + selection_strategy="random", + selection_strategy_kwargs=None, + action_noise=0.05, + num_interpolation_steps=5, + num_fixed_steps=0, + apply_noise_during_interpolation=False, + ) + spec_attr = f"task_spec_{i}" + setattr(getattr(task, spec_attr), "subtask_2", subtask) + + return task.to_dict() + + def get_subtask_term_signals(self): + signals = dict() + for bottle in self.bottles: + obj_z = self.sim.data.body_xpos[self.obj_body_id[bottle.name]][2] + target_table_pos = self.sim.data.body_xpos[self.target_table_body_id] + target_table_z = target_table_pos[2] + self.mujoco_objects[1].top_offset[2] + th = 0.15 + signals[f"{bottle.name}_off_table"] = int(obj_z - target_table_z > th) + return signals diff --git a/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/environments/locomanipulation/locomanip.py b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/environments/locomanipulation/locomanip.py new file mode 100644 index 0000000000000000000000000000000000000000..56661a306485ccaed6394e02cbcb6ac44d18a0a2 --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/environments/locomanipulation/locomanip.py @@ -0,0 +1,83 @@ +from abc import abstractmethod +from typing import Optional + +from robocasa.environments.locomanipulation.base import LocoManipulationEnv +from robocasa.models.scenes import GroundArena +from robocasa.models.scenes.factory_arena import FactoryArena +from robocasa.utils.scene.configs import SceneConfig, SceneScaleConfig +from robocasa.utils.scene.scene import Scene, SceneObject +from robocasa.utils.scene.success_criteria import SuccessCriteria + + +class LMEnvBase(LocoManipulationEnv): + SCENE_SCALE = SceneScaleConfig() + + def __init__( + self, + translucent_robot: bool = False, + use_object_obs: bool = False, + scene_scale: Optional[SceneScaleConfig] = None, + *args, + **kwargs, + ): + self.scene_scale = scene_scale or self.SCENE_SCALE + super().__init__(translucent_robot, use_object_obs, *args, **kwargs) + + def _load_model(self): + self.scene = Scene(self, self._get_env_config(), self.scene_scale) + self.mujoco_objects = self.scene.mujoco_objects + + super()._load_model() + + def _reset_internal(self): + """ + Resets simulation internal configurations. + """ + super()._reset_internal() + + if not self.deterministic_reset: + self.scene.reset() + + def _setup_references(self): + super()._setup_references() + + self.obj_body_id = {} + for obj in self.mujoco_objects: + self.obj_body_id[obj.name] = self.sim.model.body_name2id(obj.root_body) + + def _get_env_config(self) -> SceneConfig: + return SceneConfig( + objects=self._get_objects(), + success=self._get_success_criteria(), + instruction=self._get_instruction(), + ) + + @abstractmethod + def _get_objects(self) -> list[SceneObject]: + raise NotImplementedError + + @abstractmethod + def _get_success_criteria(self) -> SuccessCriteria: + raise NotImplementedError + + @abstractmethod + def _get_instruction(self) -> str: + raise NotImplementedError + + def _check_success(self): + return self.scene.success() + + def get_ep_meta(self): + ep_meta = super().get_ep_meta() + ep_meta["lang"] = self.scene.instruction + return ep_meta + + +# noinspection PyAbstractClass +class LMSimpleEnv(LMEnvBase): + MUJOCO_ARENA_CLS = GroundArena + + +# noinspection PyAbstractClass +class LMFactoryEnv(LMEnvBase): + MUJOCO_ARENA_CLS = FactoryArena diff --git a/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/environments/locomanipulation/locomanip_basic.py b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/environments/locomanipulation/locomanip_basic.py new file mode 100644 index 0000000000000000000000000000000000000000..1c6b5ab776abaa4555e39cc782f363dd46ab5727 --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/environments/locomanipulation/locomanip_basic.py @@ -0,0 +1,732 @@ +import numpy as np +from robocasa.environments.locomanipulation.base import RobotPoseRandomizer +from robocasa.environments.locomanipulation.locomanip import LMSimpleEnv +from robocasa.utils.dexmg_utils import DexMGConfigHelper +from robocasa.utils.scene.configs import ( + ObjectConfig, + ReferenceConfig, + SamplingConfig, + SceneScaleConfig, +) +from robocasa.utils.scene.scene import SceneObject +from robocasa.utils.scene.success_criteria import ( + AllCriteria, + AnyCriteria, + IsGrasped, + IsInContact, + IsPositionInRange, + IsRobotInRange, + IsUpright, + NotCriteria, + SuccessCriteria, +) +from robocasa.utils.visuals_utls import Gradient, randomize_materials_rgba + + +class LMPickBottle(LMSimpleEnv, DexMGConfigHelper): + SCENE_SCALE = SceneScaleConfig(planar_scale=1.0) + + TABLE_GRADIENT: Gradient = Gradient( + np.array([0.68, 0.34, 0.07, 1.0]), np.array([1.0, 1.0, 1.0, 1.0]) + ) + LIFT_OFFSET = 0.1 + + def _get_objects(self) -> list[SceneObject]: + self.table = SceneObject( + ObjectConfig( + name="table", + mjcf_path="objects/omniverse/locomanip/lab_table/model.xml", + scale=1.0, + static=True, + sampler_config=SamplingConfig( + x_range=np.array([-0.02, 0.02]), + y_range=np.array([-0.02, 0.02]), + reference_pos=np.array([0.5, 0, 0]), + rotation=np.array([np.pi * 0.5, np.pi * 0.5]), + ), + ) + ) + self.bottle = SceneObject( + ObjectConfig( + name="bottle", + mjcf_path="objects/omniverse/locomanip/jug_a01/model.xml", + static=False, + scale=0.6, + sampler_config=SamplingConfig( + x_range=np.array([-0.08, 0.04]), + y_range=np.array([-0.08, 0.08]), + rotation=np.array([-np.pi, np.pi]), + reference_pos=np.array([0.4, 0, self.table.mj_obj.top_offset[2]]), + ), + ) + ) + return [self.table, self.bottle] + + def _get_success_criteria(self) -> SuccessCriteria: + return AllCriteria( + IsGrasped(self.bottle, "right"), + IsPositionInRange(self.bottle, 2, self.table.mj_obj.top_offset[2] + self.LIFT_OFFSET), + ) + + def _get_instruction(self) -> str: + return "Pick up the bottle." + + def get_object(self): + return dict( + bottle=dict(obj_name=self.bottle.mj_obj.root_body, obj_type="body"), + ) + + def get_subtask_term_signals(self): + signals = dict() + signals["grasp_bottle"] = int( + self._check_grasp(self.robots[0].gripper["right"], self.bottle.mj_obj.contact_geoms) + ) + return signals + + @staticmethod + def task_config(): + task = DexMGConfigHelper.AttrDict() + task.task_spec_0.subtask_1 = dict( + object_ref="bottle", + subtask_term_signal=None, + subtask_term_offset_range=None, + selection_strategy="random", + selection_strategy_kwargs=None, + action_noise=0.05, + num_interpolation_steps=5, + num_fixed_steps=0, + apply_noise_during_interpolation=False, + ) + task.task_spec_1.subtask_1 = dict( + object_ref=None, + subtask_term_signal=None, + subtask_term_offset_range=None, + selection_strategy="random", + selection_strategy_kwargs=None, + action_noise=0.05, + num_interpolation_steps=5, + num_fixed_steps=0, + apply_noise_during_interpolation=False, + ) + return task.to_dict() + + def _reset_internal(self): + super()._reset_internal() + + if not self.deterministic_reset: + self._randomize_table_rgba() + + def _randomize_table_rgba(self): + randomize_materials_rgba( + rng=self.rng, mjcf_obj=self.table.mj_obj, gradient=self.TABLE_GRADIENT, linear=True + ) + + +class LMPickBottleHigh(LMPickBottle): + TABLE_OFFSET = 0.1 + + def _get_objects(self) -> list[SceneObject]: + self.table = SceneObject( + ObjectConfig( + name="table", + mjcf_path="objects/omniverse/locomanip/lab_table/model.xml", + scale=1.0, + static=True, + sampler_config=SamplingConfig( + x_range=np.array([-0.02, 0.02]), + y_range=np.array([-0.02, 0.02]), + reference_pos=np.array([0.5, 0, self.TABLE_OFFSET]), + rotation=np.array([np.pi * 0.5, np.pi * 0.5]), + ), + ) + ) + self.bottle = SceneObject( + ObjectConfig( + name="bottle", + mjcf_path="objects/omniverse/locomanip/jug_a01/model.xml", + static=False, + scale=0.6, + sampler_config=SamplingConfig( + x_range=np.array([-0.08, 0.04]), + y_range=np.array([-0.08, 0.08]), + rotation=np.array([-np.pi, np.pi]), + reference_pos=np.array( + [0.4, 0, self.TABLE_OFFSET + self.table.mj_obj.top_offset[2]] + ), + reference=ReferenceConfig(obj=self.table), + ), + ) + ) + return [self.table, self.bottle] + + +class LMNavPickBottle(LMPickBottle): + def _reset_internal(self): + super()._reset_internal() + + if not self.deterministic_reset: + RobotPoseRandomizer.set_pose(self, (-0.3, -0.16), (-0.2, 0.2), (-np.pi / 6, np.pi / 6)) + + def _get_instruction(self) -> str: + return "Walk forward and pick up the bottle from the table." + + +class LMPickBottleGround(LMPickBottle): + def _get_objects(self) -> list[SceneObject]: + self.bottle = SceneObject( + ObjectConfig( + name="bottle", + mjcf_path="objects/omniverse/locomanip/jug_a01/model.xml", + static=False, + scale=0.6, + sampler_config=SamplingConfig( + x_range=np.array([-0.08, 0.04]), + y_range=np.array([-0.08, 0.08]), + rotation=np.array([-np.pi, np.pi]), + reference_pos=np.array( + [0.4, 0, 0.075] + ), # Base position on ground (z=0.075 is bottle radius) + ), + ) + ) + return [self.bottle] + + def _get_success_criteria(self) -> SuccessCriteria: + return AllCriteria( + IsGrasped(self.bottle, "right"), + IsPositionInRange(self.bottle, 2, self.LIFT_OFFSET, 10), + ) + + def _randomize_table_rgba(self): + pass + + +class LMPnPBottle(LMPickBottle): + LIFT_OFFSET = 0.15 + + def _get_objects(self) -> list[SceneObject]: + super()._get_objects() + self.table_target = SceneObject( + ObjectConfig( + name="table_target", + mjcf_path="objects/omniverse/locomanip/lab_table/model.xml", + scale=1.0, + static=True, + sampler_config=SamplingConfig( + x_range=np.array([-0.02, 0.02]), + y_range=np.array([-0.02, 0.02]), + reference_pos=np.array([0.5, 1.2, 0]), + rotation=np.array([np.pi * 0.5, np.pi * 0.5]), + ), + ) + ) + return [self.table, self.table_target, self.bottle] + + def _get_success_criteria(self) -> SuccessCriteria: + return AllCriteria( + IsUpright(self.bottle, symmetric=True), IsInContact(self.bottle, self.table_target) + ) + + def _get_instruction(self) -> str: + return "Pick up the bottle and place it on the other table." + + def get_object(self): + return dict( + bottle=dict(obj_name=self.bottle.mj_obj.root_body, obj_type="body"), + target_table=dict(obj_name=self.table_target.mj_obj.root_body, obj_type="body"), + ) + + def get_subtask_term_signals(self): + obj_z = self.sim.data.body_xpos[self.obj_body_id(self.bottle.mj_obj.name)][2] + target_table_pos = self.sim.data.body_xpos[self.obj_body_id(self.table_target.mj_obj.name)] + target_table_z = target_table_pos[2] + self.table_target.mj_obj.top_offset[2] + return dict(obj_off_table=int(obj_z - target_table_z > self.LIFT_OFFSET)) + + @staticmethod + def task_config(): + task = DexMGConfigHelper.AttrDict() + task.task_spec_0.subtask_1 = dict( + object_ref="bottle", + subtask_term_signal="obj_off_table", + subtask_term_offset_range=(5, 10), + selection_strategy="random", + selection_strategy_kwargs=None, + action_noise=0.05, + num_interpolation_steps=5, + num_fixed_steps=0, + apply_noise_during_interpolation=False, + ) + # Second subtask for placing on target table + task.task_spec_0.subtask_2 = dict( + object_ref="target_table", + subtask_term_signal=None, + subtask_term_offset_range=None, + selection_strategy="random", + selection_strategy_kwargs=None, + action_noise=0.05, + num_interpolation_steps=5, + num_fixed_steps=0, + apply_noise_during_interpolation=False, + ) + task.task_spec_1.subtask_1 = dict( + object_ref=None, + subtask_term_signal=None, + subtask_term_offset_range=None, + selection_strategy="random", + selection_strategy_kwargs=None, + action_noise=0.05, + num_interpolation_steps=5, + num_fixed_steps=0, + apply_noise_during_interpolation=False, + ) + return task.to_dict() + + def _randomize_table_rgba(self): + for table in [self.table_target, self.table]: + randomize_materials_rgba( + rng=self.rng, mjcf_obj=table.mj_obj, gradient=self.TABLE_GRADIENT, linear=True + ) + + +class LMPickMultipleBottles(LMPickBottle): + BOTTLE_COLOURS = [(0.3, 0.7, 0.8, 1.0), (0.8, 0.4, 0.3, 1.0)] + BOTTLES_COUNT = 2 + Y_OFFSET_STEP = 0.1 + + def _get_objects(self) -> list[SceneObject]: + self.table = SceneObject( + ObjectConfig( + name="table", + mjcf_path="objects/omniverse/locomanip/lab_table/model.xml", + scale=1.0, + static=True, + sampler_config=SamplingConfig( + x_range=np.array([-0.02, 0.02]), + y_range=np.array([-0.02, 0.02]), + reference_pos=np.array([0.5, 0, 0]), + rotation=np.array([np.pi * 0.5, np.pi * 0.5]), + ), + ) + ) + + self.bottles = [] + offsets = np.arange(self.BOTTLES_COUNT) - (self.BOTTLES_COUNT - 1) / 2.0 + for i in range(self.BOTTLES_COUNT): + reference_pos = np.array([0.4, 0, self.table.mj_obj.top_offset[2]]) + reference_pos += np.array([0, self.Y_OFFSET_STEP * offsets[i], 0]) + bottle = SceneObject( + ObjectConfig( + name=f"bottle_{i}", + mjcf_path="objects/omniverse/locomanip/jug_a01/model.xml", + static=False, + scale=0.6, + sampler_config=SamplingConfig( + x_range=np.array([-0.08, 0.04]), + y_range=np.array([-0.04, 0.04]), + rotation=np.array([-np.pi, np.pi]), + reference_pos=reference_pos, + ), + rgba=self.BOTTLE_COLOURS[i % len(self.BOTTLE_COLOURS)], + ) + ) + self.bottles.append(bottle) + return [self.table, *self.bottles] + + def _get_success_criteria(self) -> SuccessCriteria: + criteria = [] + for bottle in self.bottles: + criteria.append(AnyCriteria(IsGrasped(bottle, "right"), IsGrasped(bottle, "left"))) + criteria.append( + IsPositionInRange(bottle, 2, self.table.mj_obj.top_offset[2] + self.LIFT_OFFSET, 10) + ) + return AllCriteria(*criteria) + + def _get_instruction(self) -> str: + return "Pick up bottles." + + def get_object(self): + return { + bottle.mj_obj.name: dict(obj_name=bottle.mj_obj.root_body, obj_type="body") + for bottle in self.bottles + } + + def get_subtask_term_signals(self): + return { + f"grasp_{bottle.mj_obj.name}": int( + self._check_grasp(self.robots[0].gripper["right"], bottle.mj_obj) + or self._check_grasp(self.robots[0].gripper["left"], bottle.mj_obj) + ) + for bottle in self.bottles + } + + @staticmethod + def task_config(): + task = DexMGConfigHelper.AttrDict() + for i in range(LMPickMultipleBottles.BOTTLES_COUNT): + subtask = dict( + object_ref=f"bottle_{i}", + subtask_term_signal=None, + subtask_term_offset_range=None, + selection_strategy="random", + selection_strategy_kwargs=None, + action_noise=0.05, + num_interpolation_steps=5, + num_fixed_steps=0, + apply_noise_during_interpolation=False, + ) + setattr(task.task_spec_0, f"subtask_{i+1}", subtask) + task.task_spec_1.subtask_1 = dict( + object_ref=None, + subtask_term_signal=None, + subtask_term_offset_range=None, + selection_strategy="random", + selection_strategy_kwargs=None, + action_noise=0.05, + num_interpolation_steps=5, + num_fixed_steps=0, + apply_noise_during_interpolation=False, + ) + return task.to_dict() + + +class LMPnPMultipleBottles(LMPickMultipleBottles): + def _get_objects(self) -> list[SceneObject]: + super()._get_objects() + self.table_target = SceneObject( + ObjectConfig( + name="table_target", + mjcf_path="objects/omniverse/locomanip/lab_table/model.xml", + scale=1.0, + static=True, + sampler_config=SamplingConfig( + x_range=np.array([-0.02, 0.02]), + y_range=np.array([-0.02, 0.02]), + reference_pos=np.array([0.5, 1.2, 0]), + rotation=np.array([np.pi * 0.5, np.pi * 0.5]), + ), + ) + ) + return [self.table, self.table_target, *self.bottles] + + def _get_success_criteria(self) -> SuccessCriteria: + criteria = [ + AllCriteria(IsInContact(bottle, self.table_target), IsUpright(bottle, symmetric=True)) + for bottle in self.bottles + ] + return AllCriteria(*criteria) + + def _get_instruction(self) -> str: + return "Pick up bottles from one table and place it on the other." + + @staticmethod + def task_config(): + task = DexMGConfigHelper.AttrDict() + for i in range(LMPnPMultipleBottles.BOTTLES_COUNT): + bottle_name = f"bottle_{i}" + subtask = dict( + object_ref=bottle_name, + subtask_term_signal=f"{bottle_name}_off_table", + subtask_term_offset_range=None, + selection_strategy="random", + selection_strategy_kwargs=None, + action_noise=0.05, + num_interpolation_steps=5, + num_fixed_steps=0, + apply_noise_during_interpolation=False, + ) + setattr(task.task_spec_0, f"subtask_{i+1}", subtask) + # Next subtask for placing on target table + task.task_spec_0.subtask_3 = dict( + object_ref="target_table", + subtask_term_signal=None, + subtask_term_offset_range=None, + selection_strategy="random", + selection_strategy_kwargs=None, + action_noise=0.05, + num_interpolation_steps=5, + num_fixed_steps=0, + apply_noise_during_interpolation=False, + ) + task.task_spec_1.subtask_1 = dict( + object_ref=None, + subtask_term_signal=None, + subtask_term_offset_range=None, + selection_strategy="random", + selection_strategy_kwargs=None, + action_noise=0.05, + num_interpolation_steps=5, + num_fixed_steps=0, + apply_noise_during_interpolation=False, + ) + return task.to_dict() + + def get_subtask_term_signals(self): + signals = dict() + for bottle in self.bottles: + obj_z = self.sim.data.body_xpos[self.obj_body_id(self.bottle.mj_obj.name)][2] + target_table_pos = self.sim.data.body_xpos[ + self.obj_body_id(self.table_target.mj_obj.name) + ] + target_table_z = target_table_pos[2] + self.table_target.mj_obj.top_offset[2] + signals[f"{bottle.mj_obj.name}_off_table"] = int( + obj_z - target_table_z > self.LIFT_OFFSET + ) + return signals + + def _randomize_table_rgba(self): + for table in [self.table_target, self.table]: + randomize_materials_rgba( + rng=self.rng, mjcf_obj=table.mj_obj, gradient=self.TABLE_GRADIENT, linear=True + ) + + +class LMPickBottleShelf(LMPickBottle): + def _get_objects(self) -> list[SceneObject]: + super()._get_objects() + self.shelf = SceneObject( + ObjectConfig( + name="shelf", + mjcf_path="objects/omniverse/locomanip/lab_shelf/model.xml", + static=True, + sampler_config=SamplingConfig( + rotation=np.array([np.pi / 2, np.pi / 2]), + reference_pos=np.array([0.9, 0, 0]), + ), + ) + ) + self.bottle = SceneObject( + ObjectConfig( + name="bottle", + mjcf_path="objects/omniverse/locomanip/jug_a01/model.xml", + static=False, + scale=0.6, + sampler_config=SamplingConfig( + x_range=np.array([-0.14, -0.06]), + y_range=np.array([-0.08, 0.08]), + rotation=np.array([-np.pi, np.pi]), + reference=ReferenceConfig(self.shelf, spawn_id=2), + ), + ) + ) + return [self.shelf, self.bottle] + + def _get_success_criteria(self) -> SuccessCriteria: + return AllCriteria( + IsGrasped(self.bottle, "right"), + NotCriteria(IsInContact(self.bottle, self.shelf)), + ) + + +class LMNavPickBottleShelf(LMPickBottleShelf): + ROBOT_DISTANCE_THRESHOLD = 1.0 + + def _reset_internal(self): + super()._reset_internal() + if not self.deterministic_reset: + RobotPoseRandomizer.set_pose(self, (-0.1, 0.1), (-0.1, 0.1), (-np.pi / 6, np.pi / 6)) + + def _get_success_criteria(self) -> SuccessCriteria: + return AllCriteria( + NotCriteria(IsRobotInRange(self.shelf, self.ROBOT_DISTANCE_THRESHOLD, True)), + IsGrasped(self.bottle, "right"), + NotCriteria(IsInContact(self.bottle, self.shelf)), + ) + + def _get_instruction(self) -> str: + return "Pick up the bottle from the shelf and move backward away from it." + + +class LMPickBottleShelfLow(LMPickBottleShelf): + def _get_objects(self) -> list[SceneObject]: + super()._get_objects() + self.bottle = SceneObject( + ObjectConfig( + name="bottle", + mjcf_path="objects/omniverse/locomanip/jug_a01/model.xml", + static=False, + scale=0.6, + sampler_config=SamplingConfig( + x_range=np.array([-0.14, -0.06]), + y_range=np.array([-0.08, 0.08]), + rotation=np.array([-np.pi, np.pi]), + reference=ReferenceConfig(self.shelf, spawn_id=1), + ), + ) + ) + return [self.shelf, self.bottle] + + +class LMNavPickBottleShelfLow(LMNavPickBottleShelf): + def _get_objects(self) -> list[SceneObject]: + super()._get_objects() + self.bottle = SceneObject( + ObjectConfig( + name="bottle", + mjcf_path="objects/omniverse/locomanip/jug_a01/model.xml", + static=False, + scale=0.6, + sampler_config=SamplingConfig( + x_range=np.array([-0.14, -0.06]), + y_range=np.array([-0.08, 0.08]), + rotation=np.array([-np.pi, np.pi]), + reference=ReferenceConfig(self.shelf, spawn_id=1), + ), + ) + ) + return [self.shelf, self.bottle] + + +class LMPnPBottleToPlate(LMPnPBottle): + def _get_objects(self) -> list[SceneObject]: + super()._get_objects() + self.plate = SceneObject( + ObjectConfig( + name="plate", + mjcf_path="objects/omniverse/locomanip/plate_1/model.xml", + scale=1.0, + static=True, + sampler_config=SamplingConfig( + x_range=np.array([-0.2 - 0.08, -0.2 + 0.04]), + y_range=np.array([-0.08, 0.08]), + rotation=np.array([-np.pi, np.pi]), + reference=ReferenceConfig(self.table_target), + ), + ) + ) + return [self.table, self.table_target, self.bottle, self.plate] + + def _get_success_criteria(self) -> SuccessCriteria: + return AllCriteria( + IsUpright(self.bottle, symmetric=True), IsInContact(self.bottle, self.plate) + ) + + def _get_instruction(self) -> str: + return "Pick up the bottle and place it on the plate." + + def get_object(self): + return dict( + bottle=dict(obj_name=self.bottle.mj_obj.root_body, obj_type="body"), + plate=dict(obj_name=self.plate.mj_obj.root_body, obj_type="body"), + ) + + def get_subtask_term_signals(self): + obj_z = self.sim.data.body_xpos[self.obj_body_id(self.bottle.mj_obj.name)][2] + target_table_pos = self.sim.data.body_xpos[self.obj_body_id(self.table_target.mj_obj.name)] + target_table_z = target_table_pos[2] + self.table_target.mj_obj.top_offset[2] + return dict(obj_off_table=int(obj_z - target_table_z > self.LIFT_OFFSET)) + + @staticmethod + def task_config(): + task = DexMGConfigHelper.AttrDict() + task.task_spec_0.subtask_1 = dict( + object_ref="bottle", + subtask_term_signal="obj_off_table", + subtask_term_offset_range=(5, 10), + selection_strategy="random", + selection_strategy_kwargs=None, + action_noise=0.05, + num_interpolation_steps=5, + num_fixed_steps=0, + apply_noise_during_interpolation=False, + ) + # Second subtask for placing on plate + task.task_spec_0.subtask_2 = dict( + object_ref="plate", + subtask_term_signal=None, + subtask_term_offset_range=None, + selection_strategy="random", + selection_strategy_kwargs=None, + action_noise=0.05, + num_interpolation_steps=5, + num_fixed_steps=0, + apply_noise_during_interpolation=False, + ) + task.task_spec_1.subtask_1 = dict( + object_ref=None, + subtask_term_signal=None, + subtask_term_offset_range=None, + selection_strategy="random", + selection_strategy_kwargs=None, + action_noise=0.05, + num_interpolation_steps=5, + num_fixed_steps=0, + apply_noise_during_interpolation=False, + ) + return task.to_dict() + + +class LMPnPAppleToPlate(LMPnPBottleToPlate): + def _get_objects(self) -> list[SceneObject]: + super()._get_objects() + self.apple = SceneObject( + ObjectConfig( + name="apple", + mjcf_path="objects/omniverse/locomanip/apple_0/model.xml", + static=False, + scale=1.0, + sampler_config=SamplingConfig( + x_range=np.array([-0.08, 0.04]), + y_range=np.array([-0.08, 0.08]), + rotation=np.array([-np.pi, np.pi]), + reference_pos=np.array([0.4, 0, self.table.mj_obj.top_offset[2]]), + ), + ) + ) + return [self.table, self.table_target, self.apple, self.plate] + + def _get_success_criteria(self) -> SuccessCriteria: + return IsInContact(self.apple, self.plate) + + def _get_instruction(self) -> str: + return "pick up the apple, walk left and place the apple on the plate." + + def get_object(self): + return dict( + apple=dict(obj_name=self.apple.mj_obj.root_body, obj_type="body"), + plate=dict(obj_name=self.plate.mj_obj.root_body, obj_type="body"), + ) + + def get_subtask_term_signals(self): + obj_z = self.sim.data.body_xpos[self.obj_body_id(self.apple.mj_obj.name)][2] + target_table_pos = self.sim.data.body_xpos[self.obj_body_id(self.table_target.mj_obj.name)] + target_table_z = target_table_pos[2] + self.table_target.mj_obj.top_offset[2] + return dict(obj_off_table=int(obj_z - target_table_z > self.LIFT_OFFSET)) + + @staticmethod + def task_config(): + task = DexMGConfigHelper.AttrDict() + task.task_spec_0.subtask_1 = dict( + object_ref="apple", + subtask_term_signal="obj_off_table", + subtask_term_offset_range=(5, 10), + selection_strategy="random", + selection_strategy_kwargs=None, + action_noise=0.05, + num_interpolation_steps=5, + num_fixed_steps=0, + apply_noise_during_interpolation=False, + ) + # Second subtask for placing on plate + task.task_spec_0.subtask_2 = dict( + object_ref="plate", + subtask_term_signal=None, + subtask_term_offset_range=None, + selection_strategy="random", + selection_strategy_kwargs=None, + action_noise=0.05, + num_interpolation_steps=5, + num_fixed_steps=0, + apply_noise_during_interpolation=False, + ) + task.task_spec_1.subtask_1 = dict( + object_ref=None, + subtask_term_signal=None, + subtask_term_offset_range=None, + selection_strategy="random", + selection_strategy_kwargs=None, + action_noise=0.05, + num_interpolation_steps=5, + num_fixed_steps=0, + apply_noise_during_interpolation=False, + ) + return task.to_dict() diff --git a/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/environments/locomanipulation/locomanip_dc.py b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/environments/locomanipulation/locomanip_dc.py new file mode 100644 index 0000000000000000000000000000000000000000..465df91a6b6a7c4e7791d263e61bff0959ee2103 --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/environments/locomanipulation/locomanip_dc.py @@ -0,0 +1,15 @@ +from robocasa import ( + LMNavPickBottle, + LMPnPAppleToPlate, +) +from robocasa.models.scenes.lab_arena import LabArena + + +class LabEnvMixin: + MUJOCO_ARENA_CLS = LabArena + + +class LMNavPickBottleDC(LabEnvMixin, LMNavPickBottle): ... + + +class LMPnPAppleToPlateDC(LabEnvMixin, LMPnPAppleToPlate): ... diff --git a/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/environments/locomanipulation/locomanip_pnp.py b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/environments/locomanipulation/locomanip_pnp.py new file mode 100644 index 0000000000000000000000000000000000000000..e526417c773b8ed3367bf3a065367582aa86517c --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/environments/locomanipulation/locomanip_pnp.py @@ -0,0 +1,99 @@ +import numpy as np +from robocasa.environments.locomanipulation.locomanip import LMFactoryEnv +from robocasa.utils.scene.configs import ( + ObjectConfig, + ReferenceConfig, + SamplingConfig, + SceneHandedness, + SceneScaleConfig, +) +from robocasa.utils.scene.scene import SceneObject +from robocasa.utils.scene.success_criteria import ( + AllCriteria, + IsInContact, + IsUpright, + SuccessCriteria, +) + + +class LMBottlePnP(LMFactoryEnv): + SCENE_SCALE = SceneScaleConfig(planar_scale=(1, 1), handedness=SceneHandedness.RIGHT) + + def _get_objects(self) -> list[SceneObject]: + self.table_target = SceneObject( + ObjectConfig( + name="table_target", + mjcf_path="objects/omniverse/locomanip/factory_ergo_table/model.xml", + static=True, + sampler_config=SamplingConfig( + x_range=np.array([-0.02, 0.02]), + y_range=np.array([-0.02, 0.02]), + reference_pos=np.array([1.2, 0.8, 0]), + rotation=np.array([np.pi, np.pi]), + ), + ) + ) + self.table_origin = SceneObject( + ObjectConfig( + name="table_origin", + mjcf_path="objects/omniverse/locomanip/factory_ergo_table/model.xml", + static=True, + sampler_config=SamplingConfig( + x_range=np.array([-0.02, 0.02]), + y_range=np.array([-0.02, 0.02]), + reference_pos=np.array([1.2, -0.8, 0]), + rotation=np.array([np.pi, np.pi]), + ), + ) + ) + self.bottle = SceneObject( + ObjectConfig( + name="obj", + mjcf_path="objects/omniverse/locomanip/jug_a01/model.xml", + static=False, + scale=0.6, + sampler_config=SamplingConfig( + x_range=np.array([-0.4, -0.35]), + y_range=np.array([-0.1, 0.1]), + rotation=np.array([-np.pi, np.pi]), + reference=ReferenceConfig(self.table_origin), + ), + ) + ) + return [self.table_origin, self.table_target, self.bottle] + + def _get_success_criteria(self) -> SuccessCriteria: + return AllCriteria(IsInContact(self.bottle, self.table_target), IsUpright(self.bottle)) + + def _get_instruction(self) -> str: + return "Pick up the bottle from one table and place it on the other." + + +class LMBoxPnP(LMBottlePnP): + SCENE_SCALE = SceneScaleConfig(planar_scale=(1, 1), handedness=SceneHandedness.RIGHT) + + def _get_objects(self) -> list[SceneObject]: + super()._get_objects() + self.box = SceneObject( + ObjectConfig( + name="obj", + mjcf_path="objects/omniverse/locomanip/cardbox_a1/model.xml", + static=False, + scale=0.7, + density=1, + friction=(2, 1, 1), + sampler_config=SamplingConfig( + x_range=np.array([-0.35, -0.3]), + y_range=np.array([-0.1, 0.1]), + rotation=np.array([np.pi * 0.9, np.pi * 1.1]), + reference=ReferenceConfig(self.table_origin), + ), + ) + ) + return [self.table_origin, self.table_target, self.box] + + def _get_success_criteria(self) -> SuccessCriteria: + return AllCriteria(IsInContact(self.box, self.table_target), IsUpright(self.box)) + + def _get_instruction(self) -> str: + return "Pick up the box from one table and place it on the other." diff --git a/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/examples/third_party_controller/__init__.py b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/examples/third_party_controller/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/examples/third_party_controller/default_mink_ik_g1_gear_wbc.json b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/examples/third_party_controller/default_mink_ik_g1_gear_wbc.json new file mode 100644 index 0000000000000000000000000000000000000000..bb76a83d4d54257bbb05d9542872da569deefacf --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/examples/third_party_controller/default_mink_ik_g1_gear_wbc.json @@ -0,0 +1,113 @@ +{ + "type": "HYBRID_WHOLE_BODY_MINK_IK", + "composite_controller_specific_configs": { + "ref_name": ["gripper0_right_grip_site", "gripper0_left_grip_site"], + "interpolation": null, + "actuation_part_names": ["torso", "left", "right"], + "external_part_names": ["legs"], + "max_dq": 4, + "ik_pseudo_inverse_damping": 5e-2, + "ik_integration_dt": 1e-1, + "ik_input_type": "absolute", + "ik_input_ref_frame": "base", + "ik_input_rotation_repr": "axis_angle", + "verbose": false, + "ik_posture_weights": { + "robot0_waist_yaw_joint": 100.0, + "robot0_waist_roll_joint": 200.0, + "robot0_waist_pitch_joint": 400.0, + "robot0_left_shoulder_pitch_joint": 4.0, + "robot0_left_shoulder_roll_joint": 3.0, + "robot0_left_shoulder_yaw_joint": 2.0, + "robot0_left_elbow_joint": 1.0, + "robot0_right_shoulder_pitch_joint": 4.0, + "robot0_right_shoulder_roll_joint": 3.0, + "robot0_right_shoulder_yaw_joint": 2.0, + "robot0_right_elbow_joint": 1.0 + }, + "ik_hand_pos_cost": 10.0, + "ik_hand_ori_cost": 5, + "use_joint_angle_action_input": false + }, + "body_parts": { + "legs": { + "type" : "JOINT_POSITION", + "input_max": 100, + "input_min": -100, + "input_type": "absolute", + "output_max": 100, + "output_min": -100, + "kd": [2, 2, 2, 4, 2, 2, 2, 2, 2, 4, 2, 2], + "kv": 0, + "kp": [150, 150, 150, 300, 40, 40, 150, 150, 150, 200, 40, 40], + "velocity_limits": [-1,1], + "kp_limits": [0, 1000], + "interpolation": null, + "ramp_ratio": 0.2, + "use_torque_compensation": false, + "desired_torque_as_acceleration": false + }, + "arms": { + "left": { + "type" : "JOINT_POSITION", + "input_max": 100, + "input_min": -100, + "input_type": "absolute", + "output_max": 100, + "output_min": -100, + "kd": [5.0, 5.0, 2.0, 2.0, 2.0, 2.0, 2.0], + "kp": [100, 100, 40, 40, 20, 20, 20], + "velocity_limits": [-1,1], + "kp_limits": [0, 1000], + "interpolation": null, + "ramp_ratio": 0.2, + "gripper": { + "type": "GRIP", + "use_action_scaling": false + }, + "use_torque_compensation": false, + "desired_torque_as_acceleration": false + }, + "right": { + "type" : "JOINT_POSITION", + "input_max": 100, + "input_min": -100, + "input_type": "absolute", + "output_max": 100, + "output_min": -100, + "kd": [5.0, 5.0, 2.0, 2.0, 2.0, 2.0, 2.0], + "kp": [100, 100, 40, 40, 20, 20, 20], + "velocity_limits": [-1,1], + "kp_limits": [0, 1000], + "interpolation": null, + "ramp_ratio": 0.2, + "gripper": { + "type": "GRIP", + "use_action_scaling": false + }, + "use_torque_compensation": false, + "desired_torque_as_acceleration": false + } + }, + "torso": { + "type" : "JOINT_POSITION", + "input_max": 100, + "input_min": -100, + "input_type": "absolute", + "output_max": 100, + "output_min": -100, + "kd": 5.0, + "kp": 250.0, + "velocity_limits": [-1,1], + "kp_limits": [0, 1000], + "interpolation": null, + "ramp_ratio": 0.2, + "use_torque_compensation": false, + "desired_torque_as_acceleration": false + }, + "base": { + "type": "JOINT_VELOCITY_AND_POSITION", + "interpolation": "null" + } + } +} diff --git a/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/examples/third_party_controller/default_mink_ik_g1_gear_wbc_gc.json b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/examples/third_party_controller/default_mink_ik_g1_gear_wbc_gc.json new file mode 100644 index 0000000000000000000000000000000000000000..7362f22594d89787177c096bce8cb947f21fa60a --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/examples/third_party_controller/default_mink_ik_g1_gear_wbc_gc.json @@ -0,0 +1,117 @@ +{ + "type": "HYBRID_WHOLE_BODY_MINK_IK", + "composite_controller_specific_configs": { + "ref_name": ["gripper0_right_grip_site", "gripper0_left_grip_site"], + "interpolation": null, + "actuation_part_names": ["torso", "left", "right"], + "external_part_names": ["legs"], + "max_dq": 4, + "ik_pseudo_inverse_damping": 5e-2, + "ik_integration_dt": 1e-1, + "ik_input_type": "absolute", + "ik_input_ref_frame": "base", + "ik_input_rotation_repr": "axis_angle", + "verbose": false, + "ik_posture_weights": { + "robot0_waist_yaw_joint": 100.0, + "robot0_waist_roll_joint": 200.0, + "robot0_waist_pitch_joint": 400.0, + "robot0_left_shoulder_pitch_joint": 4.0, + "robot0_left_shoulder_roll_joint": 3.0, + "robot0_left_shoulder_yaw_joint": 2.0, + "robot0_left_elbow_joint": 1.0, + "robot0_right_shoulder_pitch_joint": 4.0, + "robot0_right_shoulder_roll_joint": 3.0, + "robot0_right_shoulder_yaw_joint": 2.0, + "robot0_right_elbow_joint": 1.0 + }, + "ik_hand_pos_cost": 10.0, + "ik_hand_ori_cost": 5, + "use_joint_angle_action_input": false + }, + "body_parts": { + "legs": { + "type" : "JOINT_POSITION", + "input_max": 100, + "input_min": -100, + "input_type": "absolute", + "output_max": 100, + "output_min": -100, + "kd": [2, 2, 2, 4, 2, 2, 2, 2, 2, 4, 2, 2], + "kv": 0, + "kp": [150, 150, 150, 300, 40, 40, 150, 150, 150, 200, 40, 40], + "velocity_limits": [-1,1], + "kp_limits": [0, 1000], + "interpolation": null, + "ramp_ratio": 0.2, + "use_torque_compensation": false, + "use_external_torque_compensation": true, + "desired_torque_as_acceleration": false + }, + "arms": { + "left": { + "type" : "JOINT_POSITION", + "input_max": 100, + "input_min": -100, + "input_type": "absolute", + "output_max": 100, + "output_min": -100, + "kd": [5.0, 5.0, 2.0, 2.0, 2.0, 2.0, 2.0], + "kp": [100, 100, 40, 40, 20, 20, 20], + "velocity_limits": [-1,1], + "kp_limits": [0, 1000], + "interpolation": null, + "ramp_ratio": 0.2, + "gripper": { + "type": "GRIP", + "use_action_scaling": false + }, + "use_torque_compensation": false, + "use_external_torque_compensation": true, + "desired_torque_as_acceleration": false + }, + "right": { + "type" : "JOINT_POSITION", + "input_max": 100, + "input_min": -100, + "input_type": "absolute", + "output_max": 100, + "output_min": -100, + "kd": [5.0, 5.0, 2.0, 2.0, 2.0, 2.0, 2.0], + "kp": [100, 100, 40, 40, 20, 20, 20], + "velocity_limits": [-1,1], + "kp_limits": [0, 1000], + "interpolation": null, + "ramp_ratio": 0.2, + "gripper": { + "type": "GRIP", + "use_action_scaling": false + }, + "use_torque_compensation": false, + "use_external_torque_compensation": true, + "desired_torque_as_acceleration": false + } + }, + "torso": { + "type" : "JOINT_POSITION", + "input_max": 100, + "input_min": -100, + "input_type": "absolute", + "output_max": 100, + "output_min": -100, + "kd": 5.0, + "kp": 250.0, + "velocity_limits": [-1,1], + "kp_limits": [0, 1000], + "interpolation": null, + "ramp_ratio": 0.2, + "use_torque_compensation": false, + "use_external_torque_compensation": true, + "desired_torque_as_acceleration": false + }, + "base": { + "type": "JOINT_VELOCITY_AND_POSITION", + "interpolation": "null" + } + } +} diff --git a/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite/__init__.py b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1ac011def690701e1ba67ab06200f8a40600d8cc --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite/__init__.py @@ -0,0 +1,6 @@ +from .box_pattern_object import BoxPatternObject +from .needle import NeedleObject +from .ring_tripod import RingTripodObject +from .bin import Bin +from .lid import Lid +from .pot_with_handles import PotWithHandlesObject diff --git a/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite/bin.py b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite/bin.py new file mode 100644 index 0000000000000000000000000000000000000000..c7e95a6e1d0ec0a2f5beb146ab132b65e650644e --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite/bin.py @@ -0,0 +1,205 @@ +import numpy as np + +import robosuite.utils.transform_utils as T +from robosuite.models.objects import CompositeObject +from robosuite.utils.mjcf_utils import CustomMaterial, add_to_dict + + +class Bin(CompositeObject): + """ + Generates a four-walled bin container with an open top. + Args: + name (str): Name of this Bin object + bin_size (3-array): (x,y,z) full size of bin + wall_thickness (float): How thick to make walls of bin + transparent_walls (bool): If True, walls will be semi-translucent + friction (3-array or None): If specified, sets friction values for this bin. None results in default values + density (float): Density value to use for all geoms. Defaults to 1000 + use_texture (bool): If true, geoms will be defined by realistic textures and rgba values will be ignored + rgba (4-array or None): If specified, sets rgba values for all geoms. None results in default values + material: If specified, use this material + upside_down (bool): if True, construct and initialize the Bin so the bottom geom is at the top + """ + + def __init__( + self, + name, + bin_size=(0.3, 0.3, 0.15), + wall_thickness=0.01, + transparent_walls=True, + friction=None, + density=1000.0, + use_texture=True, + rgba=(0.2, 0.1, 0.0, 1.0), + material=None, + upside_down=False, + add_second_base=False, + transparent_base=False, + ): + # Set name + self._name = name + + # Set object attributes + self.bin_size = np.array(bin_size) + self.wall_thickness = wall_thickness + self.transparent_walls = transparent_walls + self.friction = friction if friction is None else np.array(friction) + self.density = density + self.use_texture = use_texture + self.rgba = rgba + self.bin_mat_name = "dark_wood_mat" + + # if box should be constructed and initialized upside down + self.upside_down = upside_down + + # if box should have a second base (so it will be a closed box) + self.add_second_base = add_second_base + if self.add_second_base: + assert not self.upside_down + + # if base(s) should be transparent + self.transparent_base = transparent_base + + self.has_material = material is not None + if self.has_material: + assert isinstance(material, CustomMaterial) + self.material = material + self.bin_mat_name = self.material.mat_attrib["name"] + else: + # default material + tex_attrib = { + "type": "cube", + } + mat_attrib = { + "texrepeat": "3 3", + "specular": "0.4", + "shininess": "0.1", + } + bin_mat = CustomMaterial( + texture="WoodDark", + tex_name="dark_wood", + mat_name=self.bin_mat_name, + tex_attrib=tex_attrib, + mat_attrib=mat_attrib, + ) + self.material = bin_mat + + # Element references + self._base_geom = "base" + if self.add_second_base: + self._second_base_geom = "base2" + + # Other private attributes + self._important_sites = {} + + # Create dictionary of values to create geoms for composite object and run super init + super().__init__(**self._get_geom_attrs()) + + # Define materials we want to use for this object + self.append_material(self.material) + + def _get_geom_attrs(self): + """ + Creates geom elements that will be passed to superclass CompositeObject constructor + Returns: + dict: args to be used by CompositeObject to generate geoms + """ + # Initialize dict of obj args that we'll pass to the CompositeObject constructor + base_args = { + "total_size": self.bin_size / 2.0, + "name": self.name, + "locations_relative_to_center": True, + "obj_types": "all", + "density": self.density, + } + obj_args = {} + + # Base(s) + base_geom_loc = (0, 0, -(self.bin_size[2] - self.wall_thickness) / 2) + if self.upside_down: + base_geom_loc = ( + base_geom_loc[0], + base_geom_loc[1], + -1.0 * base_geom_loc[2], + ) + if self.transparent_base: + base_rgba = (1.0, 1.0, 1.0, 0.3) + base_mat = None + else: + base_rgba = None if self.use_texture else self.rgba + base_mat = self.bin_mat_name if self.use_texture else None + + base_geom_names = [self._base_geom] + base_geom_locs = [base_geom_loc] + if self.add_second_base: + base_geom_names.append(self._second_base_geom) + base_geom_locs.append((base_geom_loc[0], base_geom_loc[1], -1.0 * base_geom_loc[2])) + + for base_g_name, base_g_loc in zip(base_geom_names, base_geom_locs): + add_to_dict( + dic=obj_args, + geom_types="box", + geom_locations=base_g_loc, + geom_quats=(1, 0, 0, 0), + geom_sizes=( + np.array((self.bin_size[0], self.bin_size[1], self.wall_thickness)) + - np.array((self.wall_thickness, self.wall_thickness, 0)) + ) + / 2, + geom_names=base_g_name, + geom_rgbas=base_rgba, + geom_materials=base_mat, + geom_frictions=self.friction, + ) + + # Walls + x_vals = np.array( + [ + 0, + -(self.bin_size[0] - self.wall_thickness) / 2, + 0, + (self.bin_size[0] - self.wall_thickness) / 2, + ] + ) + y_vals = np.array( + [ + -(self.bin_size[1] - self.wall_thickness) / 2, + 0, + (self.bin_size[1] - self.wall_thickness) / 2, + 0, + ] + ) + w_vals = np.array([self.bin_size[0], self.bin_size[1], self.bin_size[0], self.bin_size[1]]) + r_vals = np.array([np.pi / 2, 0, -np.pi / 2, np.pi]) + if self.transparent_walls: + wall_rgba = (1.0, 1.0, 1.0, 0.3) + wall_mat = None + else: + wall_rgba = None if self.use_texture else self.rgba + wall_mat = self.bin_mat_name if self.use_texture else None + for i, (x, y, w, r) in enumerate(zip(x_vals, y_vals, w_vals, r_vals)): + add_to_dict( + dic=obj_args, + geom_types="box", + geom_locations=(x, y, 0), + geom_quats=T.convert_quat(T.axisangle2quat(np.array([0, 0, r])), to="wxyz"), + geom_sizes=(self.wall_thickness / 2, w / 2, self.bin_size[2] / 2), + geom_names=f"wall{i}", + geom_rgbas=wall_rgba, + geom_materials=wall_mat, + geom_frictions=self.friction, + ) + + # Add back in base args and site args + obj_args.update(base_args) + + # Return this dict + return obj_args + + @property + def base_geoms(self): + """ + Returns: + list of str: geom names corresponding to bin base + """ + return [self.correct_naming(self._base_geom)] diff --git a/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite/box_pattern_object.py b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite/box_pattern_object.py new file mode 100644 index 0000000000000000000000000000000000000000..d9a3a2129a7ff3c7adf32b00557bacad423f633e --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite/box_pattern_object.py @@ -0,0 +1,124 @@ +import numpy as np + +from robosuite.models.objects import CompositeObject +from robosuite.utils.mjcf_utils import add_to_dict +import robosuite.utils.transform_utils as T + + +class BoxPatternObject(CompositeObject): + """ + Generates shapes by using a pattern of unit-size boxes. + + Args: + name (str): Name of this Needle object + """ + + def __init__( + self, + name, + unit_size, + pattern, + rgba=None, + material=None, + density=100.0, + # solref=[0.02, 1.], + # solimp=[0.9, 0.95, 0.001], + friction=None, + ): + """ + Args: + unit_size (3d array / list): size of each unit block in each dimension + + pattern (3d array / list): array of normalized sizes specifying the + geometry of the shape. A "0" indicates the absence of a cube and + a "1" indicates the presence of a full unit block. The dimensions + correspond to z, x, and y respectively. + """ + self._name = name + self.rgba = rgba + self.material = material + self.density = density + self.friction = friction + + # number of blocks in z, x, and y + self.pattern = np.array(pattern) + self.nz, self.nx, self.ny = self.pattern.shape + self.unit_size = unit_size + self.total_size = [ + self.nx * unit_size[0], + self.ny * unit_size[1], + self.nz * unit_size[2], + ] + + # Other private attributes + self._important_sites = {} + + # Create dictionary of values to create geoms for composite object and run super init + super().__init__(**self._get_geom_attrs()) + + # Define materials we want to use for this object + if self.material is not None: + self.append_material(self.material) + + def _get_geom_attrs(self): + """ + Creates geom elements that will be passed to superclass CompositeObject constructor + + Returns: + dict: args to be used by CompositeObject to generate geoms + """ + # Initialize dict of obj args that we'll pass to the CompositeObject constructor + base_args = { + "total_size": self.total_size, + "name": self.name, + "locations_relative_to_center": False, + "obj_types": "all", + "density": self.density, + } + obj_args = {} + + geom_locations = [] + geom_sizes = [] + geom_names = [] + nz, nx, ny = self.pattern.shape + for k in range(nz): + for i in range(nx): + for j in range(ny): + if self.pattern[k, i, j] > 0: + geom_sizes.append( + [ + self.unit_size[0], + self.unit_size[1], + self.unit_size[2], + ] + ) + geom_locations.append( + [ + i * 2.0 * self.unit_size[0], + j * 2.0 * self.unit_size[1], + k * 2.0 * self.unit_size[2], + ] + ) + geom_names.append("{}_{}_{}".format(k, i, j)) + + # geom_rgbas = [rgba for _ in geom_locations] + # geom_frictions = [friction for _ in geom_locations] + for i in range(len(geom_locations)): + add_to_dict( + dic=obj_args, + geom_types="box", + # needle geom needs to be offset from boundary in (x, z) + geom_locations=tuple(geom_locations[i]), + geom_quats=(1, 0, 0, 0), + geom_sizes=tuple(geom_sizes[i]), + geom_names=geom_names[i], + geom_rgbas=self.rgba, + geom_materials=self.material.name if self.material is not None else None, + geom_frictions=None, + ) + + # Add back in base args and site args + obj_args.update(base_args) + + # Return this dict + return obj_args diff --git a/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite/lid.py b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite/lid.py new file mode 100644 index 0000000000000000000000000000000000000000..3eb602bd9308bbe387e4648939d61c00c32f5520 --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite/lid.py @@ -0,0 +1,136 @@ +import numpy as np + +import robosuite.utils.transform_utils as T +from robosuite.models.objects import CompositeObject +from robosuite.utils.mjcf_utils import CustomMaterial, add_to_dict + + +class Lid(CompositeObject): + """ + Generates a square lid with a simple handle. + Args: + name (str): Name of this Lid object + lid_size (3-array): (length, width, thickness) of lid + handle_size (3-array): (thickness, length, height) of handle + transparent (bool): If True, lid will be semi-translucent + friction (3-array or None): If specified, sets friction values for this lid. None results in default values + density (float): Density value to use for all geoms. Defaults to 1000 + use_texture (bool): If true, geoms will be defined by realistic textures and rgba values will be ignored + rgba (4-array or None): If specified, sets rgba values for all geoms. None results in default values + """ + + def __init__( + self, + name, + lid_size=(0.3, 0.3, 0.01), + handle_size=(0.02, 0.08, 0.03), + transparent=True, + friction=None, + density=250.0, + use_texture=True, + rgba=(0.2, 0.1, 0.0, 1.0), + ): + # Set name + self._name = name + + # Set object attributes + self.lid_size = np.array(lid_size) + self.handle_size = np.array(handle_size) + self.transparent = transparent + self.friction = friction if friction is None else np.array(friction) + self.density = density + self.use_texture = use_texture + self.rgba = rgba + self.lid_mat_name = "dark_wood_mat" + + # Element references + self._handle_geom = "handle" + + # Other private attributes + self._important_sites = {} + + # Create dictionary of values to create geoms for composite object and run super init + super().__init__(**self._get_geom_attrs()) + + # Define materials we want to use for this object + tex_attrib = { + "type": "cube", + } + mat_attrib = { + "texrepeat": "3 3", + "specular": "0.4", + "shininess": "0.1", + } + lid_mat = CustomMaterial( + texture="WoodDark", + tex_name="dark_wood", + mat_name=self.lid_mat_name, + tex_attrib=tex_attrib, + mat_attrib=mat_attrib, + ) + self.append_material(lid_mat) + + def _get_geom_attrs(self): + """ + Creates geom elements that will be passed to superclass CompositeObject constructor + Returns: + dict: args to be used by CompositeObject to generate geoms + """ + full_height = self.lid_size[2] + self.handle_size[2] + full_size = np.array([self.lid_size[0], self.lid_size[1], full_height]) + # Initialize dict of obj args that we'll pass to the CompositeObject constructor + base_args = { + "total_size": full_size / 2.0, + "name": self.name, + "locations_relative_to_center": True, + "obj_types": "all", + } + obj_args = {} + + # Top + if self.transparent: + top_rgba = (1.0, 1.0, 1.0, 0.3) + top_mat = None + else: + top_rgba = None if self.use_texture else self.rgba + top_mat = self.lid_mat_name if self.use_texture else None + add_to_dict( + dic=obj_args, + geom_types="box", + geom_locations=(0, 0, (-full_size[2] + self.lid_size[2]) / 2), + geom_quats=(1, 0, 0, 0), + geom_sizes=np.array((full_size[0], full_size[1], self.lid_size[2])) / 2, + geom_names="top", + geom_rgbas=top_rgba, + geom_materials=top_mat, + geom_frictions=self.friction, + density=self.density, + ) + + # Handle + add_to_dict( + dic=obj_args, + geom_types="box", + geom_locations=(0, 0, (full_size[2] - self.handle_size[2]) / 2), + geom_quats=(1, 0, 0, 0), + geom_sizes=self.handle_size / 2, + geom_names=self._handle_geom, + geom_rgbas=None if self.use_texture else self.rgba, + geom_materials=self.lid_mat_name if self.use_texture else None, + geom_frictions=self.friction, + density=self.density * 2, + ) + + # Add back in base args and site args + obj_args.update(base_args) + + # Return this dict + return obj_args + + @property + def handle_geoms(self): + """ + Returns: + list of str: geom names corresponding to lid handle + """ + return [self.correct_naming(self._handle_geom)] diff --git a/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite/needle.py b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite/needle.py new file mode 100644 index 0000000000000000000000000000000000000000..9dc6bb1fea50a76ba8c681643354596a7676e797 --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite/needle.py @@ -0,0 +1,109 @@ +import numpy as np + +from robosuite.models.objects import CompositeObject +from robosuite.utils.mjcf_utils import add_to_dict, CustomMaterial +import robosuite.utils.transform_utils as T + + +class NeedleObject(CompositeObject): + """ + Generates a needle with a handle (used in Threading task) + + Args: + name (str): Name of this Needle object + """ + + def __init__( + self, + name, + ): + + ### TODO: make this object more general (with more args and configuration options) later ### + + # Set object attributes + self._name = name + self.needle_mat_name = "darkwood_mat" + + # Other private attributes + self._important_sites = {} + + # Create dictionary of values to create geoms for composite object and run super init + super().__init__(**self._get_geom_attrs()) + + # Define materials we want to use for this object + tex_attrib = { + "type": "cube", + } + mat_attrib = { + "texrepeat": "1 1", + "specular": "0.4", + "shininess": "0.1", + } + needle_mat = CustomMaterial( + texture="WoodDark", + tex_name="darkwood", + mat_name="darkwood_mat", + tex_attrib=tex_attrib, + mat_attrib=mat_attrib, + ) + self.append_material(needle_mat) + + def _get_geom_attrs(self): + """ + Creates geom elements that will be passed to superclass CompositeObject constructor + + Returns: + dict: args to be used by CompositeObject to generate geoms + """ + # Initialize dict of obj args that we'll pass to the CompositeObject constructor + base_args = { + "total_size": [0.02, 0.08, 0.02], + "name": self.name, + "locations_relative_to_center": False, + "obj_types": "all", + "density": 100.0, + } + obj_args = {} + + # make a skinny needle object with a large handle + needle_size = [0.005, 0.06, 0.005] + handle_size = [0.02, 0.02, 0.02] + + # Needle + add_to_dict( + dic=obj_args, + geom_types="box", + # needle geom needs to be offset from boundary in (x, z) + geom_locations=( + (handle_size[0] - needle_size[0]), + 0.0, + (handle_size[2] - needle_size[2]), + ), + geom_quats=(1, 0, 0, 0), + geom_sizes=tuple(needle_size), + geom_names="needle", + geom_rgbas=None, + geom_materials=self.needle_mat_name, + # make the needle low friction to ensure easy insertion + geom_frictions=(0.3, 5e-3, 1e-4), + ) + + # Handle + add_to_dict( + dic=obj_args, + geom_types="box", + # handle geom needs to be offset in y + geom_locations=(0.0, 2.0 * needle_size[1], 0.0), + geom_quats=(1, 0, 0, 0), + geom_sizes=tuple(handle_size), + geom_names="handle", + geom_rgbas=None, + geom_materials=self.needle_mat_name, + geom_frictions=None, + ) + + # Add back in base args and site args + obj_args.update(base_args) + + # Return this dict + return obj_args diff --git a/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite/pot_with_handles.py b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite/pot_with_handles.py new file mode 100644 index 0000000000000000000000000000000000000000..0aebf356375f01a1847043fff262b9eecd32204e --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite/pot_with_handles.py @@ -0,0 +1,396 @@ +import numpy as np + +import robosuite.utils.transform_utils as T +from robosuite.models.objects import CompositeObject +from robosuite.utils.mjcf_utils import ( + BLUE, + GREEN, + RED, + CustomMaterial, + add_to_dict, + array_to_string, +) + + +class PotWithHandlesObject(CompositeObject): + """ + Generates the Pot object with side handles (used in TwoArmLift) + + Args: + name (str): Name of this Pot object + + body_half_size (3-array of float): If specified, defines the (x,y,z) half-dimensions of the main pot + body. Otherwise, defaults to [0.07, 0.07, 0.07] + + handle_radius (float): Determines the pot handle radius + + handle_length (float): Determines the pot handle length + + handle_width (float): Determines the pot handle width + + handle_friction (float): Friction value to use for pot handles. Defauls to 1.0 + + density (float): Density value to use for all geoms. Defaults to 1000 + + use_texture (bool): If true, geoms will be defined by realistic textures and rgba values will be ignored + + rgba_body (4-array or None): If specified, sets pot body rgba values + + rgba_handle_0 (4-array or None): If specified, sets handle 0 rgba values + + rgba_handle_1 (4-array or None): If specified, sets handle 1 rgba values + + solid_handle (bool): If true, uses a single geom to represent the handle + + thickness (float): How thick to make the pot body walls + """ + + def __init__( + self, + name, + body_half_size=(0.07, 0.07, 0.07), + handle_radius=0.01, + handle_length=0.09, + handle_width=0.09, + handle_friction=1.0, + density=1000, + use_texture=True, + rgba_body=None, + rgba_handle_0=None, + rgba_handle_1=None, + solid_handle=False, + thickness=0.01, # For body + ): + # Set name + self._name = name + + # Set object attributes + self.body_half_size = np.array(body_half_size) + self.thickness = thickness + self.handle_radius = handle_radius + self.handle_length = handle_length + self.handle_width = handle_width + self.handle_friction = handle_friction + self.density = density + self.use_texture = use_texture + self.rgba_body = np.array(rgba_body) if rgba_body else RED + self.rgba_handle_0 = np.array(rgba_handle_0) if rgba_handle_0 else GREEN + self.rgba_handle_1 = np.array(rgba_handle_1) if rgba_handle_1 else BLUE + self.solid_handle = solid_handle + + # Element references to be filled when generated + self._handle0_geoms = None + self._handle1_geoms = None + self.pot_base = None + + # Other private attributes + self._important_sites = {} + + # Create dictionary of values to create geoms for composite object and run super init + super().__init__(**self._get_geom_attrs()) + + # Define materials we want to use for this object + tex_attrib = { + "type": "cube", + } + mat_attrib = { + "texrepeat": "1 1", + "specular": "0.4", + "shininess": "0.1", + } + redwood = CustomMaterial( + texture="WoodRed", + tex_name="redwood", + mat_name="pot_mat", + tex_attrib=tex_attrib, + mat_attrib=mat_attrib, + ) + greenwood = CustomMaterial( + texture="WoodGreen", + tex_name="greenwood", + mat_name="handle0_mat", + tex_attrib=tex_attrib, + mat_attrib=mat_attrib, + ) + bluewood = CustomMaterial( + texture="WoodBlue", + tex_name="bluewood", + mat_name="handle1_mat", + tex_attrib=tex_attrib, + mat_attrib=mat_attrib, + ) + self.append_material(redwood) + self.append_material(greenwood) + self.append_material(bluewood) + + def _get_geom_attrs(self): + """ + Creates geom elements that will be passed to superclass CompositeObject constructor + + Returns: + dict: args to be used by CompositeObject to generate geoms + """ + full_size = np.array( + ( + self.body_half_size, + self.body_half_size + self.handle_length * 2, + self.body_half_size, + ) + ) + # Initialize dict of obj args that we'll pass to the CompositeObject constructor + base_args = { + "total_size": full_size / 2.0, + "name": self.name, + "locations_relative_to_center": True, + "obj_types": "all", + } + site_attrs = [] + obj_args = {} + + # Initialize geom lists + self._handle0_geoms = [] + self._handle1_geoms = [] + + # Add main pot body + # Base geom + name = f"base" + self.pot_base = [name] + add_to_dict( + dic=obj_args, + geom_types="box", + geom_locations=(0, 0, -self.body_half_size[2] + self.thickness / 2), + geom_quats=(1, 0, 0, 0), + geom_sizes=np.array( + [self.body_half_size[0], self.body_half_size[1], self.thickness / 2] + ), + geom_names=name, + geom_rgbas=None if self.use_texture else self.rgba_body, + geom_materials="pot_mat" if self.use_texture else None, + geom_frictions=None, + density=self.density, + ) + + # Walls + x_off = np.array( + [ + 0, + -(self.body_half_size[0] - self.thickness / 2), + 0, + self.body_half_size[0] - self.thickness / 2, + ] + ) + y_off = np.array( + [ + -(self.body_half_size[1] - self.thickness / 2), + 0, + self.body_half_size[1] - self.thickness / 2, + 0, + ] + ) + w_vals = np.array( + [ + self.body_half_size[0], + self.body_half_size[1], + self.body_half_size[0], + self.body_half_size[1], + ] + ) + r_vals = np.array([np.pi / 2, 0, -np.pi / 2, np.pi]) + for i, (x, y, w, r) in enumerate(zip(x_off, y_off, w_vals, r_vals)): + add_to_dict( + dic=obj_args, + geom_types="box", + geom_locations=(x, y, 0), + geom_quats=T.convert_quat(T.axisangle2quat(np.array([0, 0, r])), to="wxyz"), + geom_sizes=np.array([self.thickness / 2, w, self.body_half_size[2]]), + geom_names=f"body{i}", + geom_rgbas=None if self.use_texture else self.rgba_body, + geom_materials="pot_mat" if self.use_texture else None, + geom_frictions=None, + density=self.density, + ) + + # Add handles + main_bar_size = np.array( + [ + self.handle_width / 2 + self.handle_radius, + self.handle_radius, + self.handle_radius, + ] + ) + side_bar_size = np.array([self.handle_radius, self.handle_length / 2, self.handle_radius]) + handle_z = self.body_half_size[2] - self.handle_radius + for i, (g_list, handle_side, rgba) in enumerate( + zip( + [self._handle0_geoms, self._handle1_geoms], + [1.0, -1.0], + [self.rgba_handle_0, self.rgba_handle_1], + ) + ): + handle_center = np.array( + ( + 0, + handle_side * (self.body_half_size[1] + self.handle_length), + handle_z, + ) + ) + # Solid handle case + if self.solid_handle: + handle_center = np.array( + ( + 0, + handle_side * (self.body_half_size[1] + self.handle_length / 2), + handle_z, + ) + ) + name = f"handle{i}" + g_list.append(name) + add_to_dict( + dic=obj_args, + geom_types="box", + geom_locations=handle_center, + geom_quats=(1, 0, 0, 0), + geom_sizes=np.array( + [ + self.handle_width / 2, + self.handle_length / 2, + self.handle_radius, + ] + ), + geom_names=name, + geom_rgbas=None if self.use_texture else rgba, + geom_materials=f"handle{i}_mat" if self.use_texture else None, + geom_frictions=(self.handle_friction, 0.005, 0.0001), + density=self.density, + ) + # Hollow handle case + else: + # Center bar + name = f"handle{i}_c" + g_list.append(name) + add_to_dict( + dic=obj_args, + geom_types="box", + geom_locations=handle_center, + geom_quats=(1, 0, 0, 0), + geom_sizes=main_bar_size, + geom_names=name, + geom_rgbas=None if self.use_texture else rgba, + geom_materials=f"handle{i}_mat" if self.use_texture else None, + geom_frictions=(self.handle_friction, 0.005, 0.0001), + density=self.density, + ) + # Side bars + for bar_side, suffix in zip([-1.0, 1.0], ["-", "+"]): + name = f"handle{i}_{suffix}" + g_list.append(name) + add_to_dict( + dic=obj_args, + geom_types="box", + geom_locations=( + bar_side * self.handle_width / 2, + handle_side * (self.body_half_size[1] + self.handle_length / 2), + handle_z, + ), + geom_quats=(1, 0, 0, 0), + geom_sizes=side_bar_size, + geom_names=name, + geom_rgbas=None if self.use_texture else rgba, + geom_materials=f"handle{i}_mat" if self.use_texture else None, + geom_frictions=(self.handle_friction, 0.005, 0.0001), + density=self.density, + ) + # Add relevant site + handle_site = self.get_site_attrib_template() + handle_name = f"handle{i}" + handle_site.update( + { + "name": handle_name, + "pos": array_to_string(handle_center - handle_side * np.array([0, 0.005, 0])), + "size": "0.005", + "rgba": rgba, + } + ) + site_attrs.append(handle_site) + # Add to important sites + self._important_sites[f"handle{i}"] = self.naming_prefix + handle_name + + # Add pot body site + pot_site = self.get_site_attrib_template() + center_name = "center" + pot_site.update( + { + "name": center_name, + "size": "0.005", + } + ) + site_attrs.append(pot_site) + # Add to important sites + self._important_sites["center"] = self.naming_prefix + center_name + + # Add back in base args and site args + obj_args.update(base_args) + obj_args["sites"] = site_attrs # All sites are part of main (top) body + + # Return this dict + return obj_args + + @property + def handle_distance(self): + """ + Calculates how far apart the handles are + + Returns: + float: handle distance + """ + return self.body_half_size[1] * 2 + self.handle_length * 2 + + @property + def handle0_geoms(self): + """ + Returns: + list of str: geom names corresponding to handle0 (green handle) + """ + return self.correct_naming(self._handle0_geoms) + + @property + def handle1_geoms(self): + """ + Returns: + list of str: geom names corresponding to handle1 (blue handle) + """ + return self.correct_naming(self._handle1_geoms) + + @property + def handle_geoms(self): + """ + Returns: + list of str: geom names corresponding to both handles + """ + return self.handle0_geoms + self.handle1_geoms + + @property + def important_sites(self): + """ + Returns: + dict: In addition to any default sites for this object, also provides the following entries + + :`'handle0'`: Name of handle0 location site + :`'handle1'`: Name of handle1 location site + """ + # Get dict from super call and add to it + dic = super().important_sites + dic.update(self._important_sites) + return dic + + @property + def bottom_offset(self): + return np.array([0, 0, -1 * self.body_half_size[2]]) + + @property + def top_offset(self): + return np.array([0, 0, self.body_half_size[2]]) + + @property + def horizontal_radius(self): + return np.sqrt(2) * (max(self.body_half_size) + self.handle_length) diff --git a/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite/ring_tripod.py b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite/ring_tripod.py new file mode 100644 index 0000000000000000000000000000000000000000..339c56e4926a87e9ffe2937ed4412a00989b4c11 --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite/ring_tripod.py @@ -0,0 +1,194 @@ +import numpy as np + +from robosuite.models.objects import CompositeObject +from robosuite.utils.mjcf_utils import add_to_dict +from robosuite.utils.mjcf_utils import CustomMaterial +import robosuite.utils.transform_utils as T + + +class RingTripodObject(CompositeObject): + """ + Generates a tripod base with a small ring for threading a needle through it (used in Threading task) + + Args: + name (str): Name of this RingTripod object + """ + + def __init__( + self, + name, + ): + + ### TODO: make this object more general (with more args and configuration options) later ### + + # Set object attributes + self._name = name + self.tripod_mat_name = "lightwood_mat" + + # Other private attributes + self._important_sites = {} + + # Create dictionary of values to create geoms for composite object and run super init + super().__init__(**self._get_geom_attrs()) + + # Define materials we want to use for this object + tex_attrib = { + "type": "cube", + } + mat_attrib = { + "texrepeat": "1 1", + "specular": "0.4", + "shininess": "0.1", + } + tripod_mat = CustomMaterial( + texture="WoodLight", + tex_name="lightwood", + mat_name="lightwood_mat", + tex_attrib=tex_attrib, + mat_attrib=mat_attrib, + ) + self.append_material(tripod_mat) + + def _get_geom_attrs(self): + """ + Creates geom elements that will be passed to superclass CompositeObject constructor + + Returns: + dict: args to be used by CompositeObject to generate geoms + """ + # Initialize dict of obj args that we'll pass to the CompositeObject constructor + total_size = (0.05, 0.05, 0.1) + base_args = { + "total_size": total_size, + "name": self.name, + "locations_relative_to_center": False, + "obj_types": "all", + "density": 100.0, + # NOTE: this lower value of solref allows the thin hole wall to avoid penetration through it + "solref": (0.02, 1.0), + "solimp": (0.9, 0.95, 0.001), + } + obj_args = {} + + # pattern for threading ring + unit_size = [0.005, 0.002, 0.002] + pattern = np.ones((6, 1, 6)) + for i in range(1, 5): + pattern[i][0][1:5] = np.zeros(4) + ring_size = [ + unit_size[0] * pattern.shape[1], + unit_size[1] * pattern.shape[2], + unit_size[2] * pattern.shape[0], + ] + self.ring_size = np.array(ring_size) + + # ring offset for where the ring is located relative to the (0, 0, 0) corner + ring_offset = [ + total_size[0] - ring_size[0], + total_size[1] - ring_size[1], + 2.0 * (total_size[2] - ring_size[2]), + ] + + # RING-GEOMS: use the pattern to instantiate geoms corresponding to the threading ring + nz, nx, ny = pattern.shape + self.num_ring_geoms = 0 + for k in range(nz): + for i in range(nx): + for j in range(ny): + if pattern[k, i, j] > 0: + add_to_dict( + dic=obj_args, + geom_types="box", + # needle geom needs to be offset from boundary in (x, z) + geom_locations=( + (i * 2.0 * unit_size[0]) + ring_offset[0], + (j * 2.0 * unit_size[1]) + ring_offset[1], + (k * 2.0 * unit_size[2]) + ring_offset[2], + ), + geom_quats=(1, 0, 0, 0), + geom_sizes=tuple(unit_size), + geom_names="ring_{}".format(self.num_ring_geoms), + geom_rgbas=None, + geom_materials=self.tripod_mat_name, + # make the ring low friction to ensure easy insertion + geom_frictions=(0.3, 5e-3, 1e-4), + ) + self.num_ring_geoms += 1 + + # TRIPOD-GEOMS: legs of the tripod + tripod_capsule_r = 0.01 + tripod_capsule_h = 0.03 + tripod_geom_locations = [ + (0.0, 0.0, 0.0), + (0.0, 2.0 * total_size[1] - 2.0 * tripod_capsule_r, 0.0), + ( + 2.0 * total_size[0] - 2.0 * tripod_capsule_r, + total_size[1] - tripod_capsule_r, + 0.0, + ), + ] + # rotate the legs to resemble a tripod + tripod_center = np.array([total_size[0], total_size[1], 0.0]) + xy_offset = np.array([tripod_capsule_r, tripod_capsule_r, 0.0]) + rotation_angle = -np.pi / 6.0 # 30 degrees + tripod_geom_quats = [] + for i in range(3): + capsule_loc = np.array(tripod_geom_locations[i]) + xy_offset + capsule_loc[2] = 0.0 # only care about location in x-y plane + vec_to_center = tripod_center - capsule_loc + vec_to_center = vec_to_center / np.linalg.norm(vec_to_center) + # cross-product with z unit vector to get vector to rotate about + rot_vec = np.cross(vec_to_center, np.array([0.0, 0.0, 1.0])) + rot_quat = T.mat2quat(T.rotation_matrix(angle=rotation_angle, direction=rot_vec)) + tripod_geom_quats.append(T.convert_quat(rot_quat, to="wxyz")) + + for i in range(3): + add_to_dict( + dic=obj_args, + geom_types="capsule", + geom_locations=tripod_geom_locations[i], + geom_quats=tripod_geom_quats[i], + geom_sizes=(tripod_capsule_r, tripod_capsule_h), + geom_names="tripod_{}".format(i), + geom_rgbas=None, + geom_materials=self.tripod_mat_name, + geom_frictions=None, + ) + + # POST-GEOMS: mounted base + post + base_thickness = 0.005 + post_size = 0.005 + post_geom_sizes = [ + (total_size[0], total_size[1], base_thickness), + ( + post_size, + post_size, + total_size[2] - ring_size[2] - base_thickness - tripod_capsule_r - tripod_capsule_h, + ), + ] + post_geom_locations = [ + (0.0, 0.0, 2.0 * (tripod_capsule_r + tripod_capsule_h)), + ( + total_size[0] - post_size, + total_size[1] - post_size, + 2.0 * (tripod_capsule_r + tripod_capsule_h + base_thickness), + ), + ] + for i in range(2): + add_to_dict( + dic=obj_args, + geom_types="box", + geom_locations=post_geom_locations[i], + geom_quats=(1, 0, 0, 0), + geom_sizes=post_geom_sizes[i], + geom_names="post_{}".format(i), + geom_rgbas=None, + geom_materials=self.tripod_mat_name, + geom_frictions=None, + ) + + # Add back in base args and site args + obj_args.update(base_args) + + # Return this dict + return obj_args diff --git a/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite_body/bin_with_handles.py b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite_body/bin_with_handles.py new file mode 100644 index 0000000000000000000000000000000000000000..ef35b5e9f2f0a3e1615572596b399f9c1d6c6cdd --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite_body/bin_with_handles.py @@ -0,0 +1,162 @@ +from robosuite.models.objects import CompositeBodyObject, BoxObject, Bin +import numpy as np + +import robosuite.utils.transform_utils as T +from robosuite.utils.mjcf_utils import array_to_string +from robosuite.utils.mjcf_utils import RED, BLUE, CustomMaterial + + +class BinWithHandles(CompositeBodyObject): + """ + Bin with simple square handles on each side. + """ + + def __init__( + self, + name, + bin_size, + bin_wall_thickness, + bin_transparent_walls, + bin_upside_down, + center_handle_size, + adjacent_handle_size, + joints="default", + rgba=(0.2, 0.1, 0.0, 1.0), + material=None, + density=1000.0, + friction=None, + ): + + # Object properties + + # FULL size of bin + self.bin_size = list(bin_size) + self.bin_wall_thickness = bin_wall_thickness + self.bin_transparent_walls = bin_transparent_walls + self.bin_upside_down = bin_upside_down + + # half-sizes of box geom used for center part of handle (which you grab) + self.center_handle_size = list(center_handle_size) + + # half-sizes of box geoms used for adjacent parts of handle (not grabbed) + self.adjacent_handle_size = list(adjacent_handle_size) + + # Create objects + objects = [] + object_locations = [] + object_quats = [] + object_parents = [] + + # bin + self.bin = Bin( + name="bin", + bin_size=self.bin_size, + wall_thickness=self.bin_wall_thickness, + transparent_walls=self.bin_transparent_walls, + rgba=rgba, + material=material, + density=density, + friction=friction, + upside_down=bin_upside_down, + ) + objects.append(self.bin) + object_locations.append([0.0, 0.0, 0.0]) + object_quats.append([1.0, 0.0, 0.0, 0.0]) + object_parents.append(None) + + # handles on each side + + left_handle_1_loc = [ + 0.0, + -( + self.bin_size[1] / 2.0 + + 2.0 * self.adjacent_handle_size[1] + + self.center_handle_size[1] + ), + 0.0, + ] + left_handle_1_size = self.center_handle_size + + left_handle_2_loc = [ + (self.center_handle_size[0] - self.adjacent_handle_size[0]), + -(self.bin_size[1] / 2.0 + self.adjacent_handle_size[1]), + 0.0, + ] + left_handle_2_size = self.adjacent_handle_size + + left_handle_3_loc = [ + -(self.center_handle_size[0] - self.adjacent_handle_size[0]), + -(self.bin_size[1] / 2.0 + self.adjacent_handle_size[1]), + 0.0, + ] + left_handle_3_size = self.adjacent_handle_size + + right_handle_1_loc = [ + 0.0, + ( + self.bin_size[1] / 2.0 + + 2.0 * self.adjacent_handle_size[1] + + self.center_handle_size[1] + ), + 0.0, + ] + right_handle_1_size = self.center_handle_size + + right_handle_2_loc = [ + (self.center_handle_size[0] - self.adjacent_handle_size[0]), + (self.bin_size[1] / 2.0 + self.adjacent_handle_size[1]), + 0.0, + ] + right_handle_2_size = self.adjacent_handle_size + + right_handle_3_loc = [ + -(self.center_handle_size[0] - self.adjacent_handle_size[0]), + (self.bin_size[1] / 2.0 + self.adjacent_handle_size[1]), + 0.0, + ] + right_handle_3_size = self.adjacent_handle_size + + handle_locs = [ + left_handle_1_loc, + left_handle_2_loc, + left_handle_3_loc, + right_handle_1_loc, + right_handle_2_loc, + right_handle_3_loc, + ] + handle_sizes = [ + left_handle_1_size, + left_handle_2_size, + left_handle_3_size, + right_handle_1_size, + right_handle_2_size, + right_handle_3_size, + ] + handle_ind = 1 + for b_loc, b_size in zip(handle_locs, handle_sizes): + this_handle = BoxObject( + name="handle_{}".format(handle_ind), + size=b_size, + rgba=rgba, + material=material, + density=density, + friction=friction, + joints=None, + ) + objects.append(this_handle) + object_locations.append(b_loc) + object_quats.append([1.0, 0.0, 0.0, 0.0]) + object_parents.append(None) + handle_ind += 1 + + # Run super init + super().__init__( + name=name, + objects=objects, + object_locations=object_locations, + object_quats=object_quats, + object_parents=object_parents, + joints=joints, + # total_size=body_total_size, + # locations_relative_to_corner=True, + ) diff --git a/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite_body/coffee_machine.py b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite_body/coffee_machine.py new file mode 100644 index 0000000000000000000000000000000000000000..d3a457086f3b346446a9b7e5860c42d8bf2099d1 --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite_body/coffee_machine.py @@ -0,0 +1,244 @@ +from robosuite.models.objects import CompositeBodyObject, BoxObject +from robocasa.models.objects.composite_body.cup import ( + CupObject, +) +from robocasa.models.objects.xml_objects import ( + CoffeeMachineBodyObject, + CoffeeMachineLidObject, + CoffeeMachineBaseObject, +) +import numpy as np + +from robosuite.utils.mjcf_utils import array_to_string +from robosuite.utils.mjcf_utils import RED, BLUE, CustomMaterial + + +class CoffeeMachineObject(CompositeBodyObject): + """ + Coffee machine object with a lid fixed on a hinge joint. + """ + + def __init__( + self, + name, + add_cup=True, + pod_holder_friction=None, + joints="default", + density=1000.0, + ): + + # pieces of the coffee machine + body = CoffeeMachineBodyObject(name="body") + body_size = body.get_bounding_box_half_size() + body_location = [0.0, 0.0, 0.0] + + lid = CoffeeMachineLidObject(name="lid") + lid_size = self.lid_size = lid.get_bounding_box_half_size() + # add tolerance to allow lid to open fully + lid_location = [ + body_size[0] - lid_size[0], + 2.0 * body_size[1] + 0.01, + 2.0 * (body_size[2] - lid_size[2]) + 0.005, + ] + + # add in hinge joint to lid + hinge_pos = [0.0, -lid_size[1], 0.0] + hinge_joint = dict( + type="hinge", + axis="1 0 0", + pos=array_to_string(hinge_pos), + limited="true", + range="{} {}".format(0, 2.0 * np.pi / 3.0), + damping="0.005", + ) + body_joints = dict(lid_main=[hinge_joint]) # note: "main" gets appended to body name + lid = CoffeeMachineLidObject(name="lid") + + base = CoffeeMachineBaseObject(name="base") + base_size = base.get_bounding_box_half_size() + base_location = [body_size[0] - base_size[0], 2.0 * body_size[1], 0.0] + + pod_holder_holder = BoxObject( + name="pod_holder_holder", + size=[ + 0.01, + # tolerance for having the lid stick out a little from the holder + 0.9 * (lid_size[1] - lid_size[0]), + 0.005, + ], + rgba=[0.839, 0.839, 0.839, 1], # silver + joints=None, + ) + pod_holder_holder_size = pod_holder_holder.get_bounding_box_half_size() + pod_holder_holder_location = [ + body_size[0] - pod_holder_holder_size[0], + 2.0 * body_size[1], + # put right underneath lid + 2.0 * (body_size[2] - lid_size[2] - pod_holder_holder_size[2]), + ] + + pod_holder = CupObject( + name="pod_holder", + outer_cup_radius=lid_size[0], + inner_cup_radius=0.028, + cup_height=0.028, + cup_ngeoms=64, # 8, + cup_base_height=0.005, + cup_base_offset=0.002, + add_handle=False, + rgba=[1, 0, 0, 1], + density=density, + joints=None, + friction=pod_holder_friction, + ) + pod_holder_size = self.pod_holder_size = pod_holder.get_bounding_box_half_size() + # pod_holder_size = self.pod_holder_size = np.array([0.0295, 0.0295, 0.028 ]) + pod_holder_location = [ + body_size[0] - pod_holder_size[0], + 2.0 * (body_size[1] + pod_holder_holder_size[1]), + # put right underneath lid + 2.0 * (body_size[2] - lid_size[2] - pod_holder_size[2]), + ] + + total_size = [ + body_size[0], + body_size[1] + base_size[1], + body_size[2], + ] + + objects = [ + body, + lid, + base, + pod_holder_holder, + pod_holder, + ] + + object_locations = [ + body_location, + lid_location, + base_location, + pod_holder_holder_location, + pod_holder_location, + ] + + object_quats = [ + [0.0, 0.0, 0.0, 1.0], # z-rotate body and base by 180 + [1.0, 0.0, 0.0, 0.0], + [0.0, 0.0, 0.0, 1.0], + [1.0, 0.0, 0.0, 0.0], + [1.0, 0.0, 0.0, 0.0], + ] + + # add a rigidly mounted cup to the base + self.add_cup = add_cup + if self.add_cup: + cup = CupObject( + name="cupppp", + outer_cup_radius=0.03, + inner_cup_radius=0.025, + cup_height=0.025, + cup_ngeoms=64, # 8, + cup_base_height=0.005, + cup_base_offset=0.005, + add_handle=True, + handle_outer_radius=0.015, + handle_inner_radius=0.010, + handle_thickness=0.003, + handle_ngeoms=64, + rgba=[0.839, 0.839, 0.839, 1], + density=1000.0, + joints=None, + ) + cup_total_size = cup.get_bounding_box_half_size() + # cup_total_size = np.array([0.03 , 0.045, 0.025]) + objects.append(cup) + object_locations.append( + [ + body_size[0] - cup_total_size[0], + 2.0 * (body_size[1] + pod_holder_holder_size[1]) + + pod_holder_size[1] + - cup_total_size[1], + 2.0 * base_size[2], + ] + ) + rot_angle = -np.pi / 2.0 + object_quats.append([np.cos(rot_angle / 2), 0, 0, np.sin(rot_angle / 2)]) + + object_parents = [None] * len(objects) + + """ + Variables to compare: + + objects + [, + , + , + , + , + ] + + object_locations + [[0.0, 0.0, 0.0], + [0.056999999999999995, 0.21100000000000002, 0.20700000000000002], + [0.04449999999999999, 0.201, 0.0], + [0.0765, 0.201, 0.192], + [0.056999999999999995, 0.22710000000000002, 0.14600000000000002], + [0.056499999999999995, 0.21160000000000007, 0.01]] + + object_quats + [[0.0, 0.0, 0.0, 1.0], + [1.0, 0.0, 0.0, 0.0], + [0.0, 0.0, 0.0, 1.0], + [1.0, 0.0, 0.0, 0.0], + [1.0, 0.0, 0.0, 0.0], + [0.7071067811865476, 0, 0, -0.7071067811865475]] + + body_size + array([0.0865, 0.1005, 0.1105]) + + lid_size + array([0.0295, 0.044 , 0.0095]) + + lid_location + [0.056999999999999995, 0.21100000000000002, 0.20700000000000002] + + base_size + array([0.042, 0.05 , 0.005]) + + base_location + [0.04449999999999999, 0.201, 0.0] + + pod_holder_holder_size + array([0.01 , 0.01305, 0.005 ]) + + pod_holder_holder_location + [0.0765, 0.201, 0.192] + + pod_holder_size + array([0.0295, 0.0295, 0.028 ]) + + pod_holder_location + [0.056999999999999995, 0.22710000000000002, 0.14600000000000002] + + total_size + [0.0865, 0.15050000000000002, 0.1105] + + cup.total_size + array([0.03 , 0.045, 0.025]) + """ + + # Run super init + super().__init__( + name=name, + objects=objects, + object_locations=object_locations, + object_quats=object_quats, + object_parents=object_parents, + body_joints=body_joints, # make sure hinge joint is added + joints=joints, + # joints="default", # coffee machine can move + # joints=None, # coffee machine does not move + total_size=total_size, + locations_relative_to_corner=True, + ) diff --git a/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite_body/inverse_stacked_cylinder.py b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite_body/inverse_stacked_cylinder.py new file mode 100644 index 0000000000000000000000000000000000000000..13ce6f1bee0e466452e168128beea1446128e738 --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite_body/inverse_stacked_cylinder.py @@ -0,0 +1,139 @@ +from robosuite.models.objects import ( + CompositeBodyObject, + BoxObject, + CylinderObject, + HollowCylinderObject, +) +import numpy as np + +import robosuite.utils.transform_utils as T +from robosuite.utils.mjcf_utils import array_to_string +from robosuite.utils.mjcf_utils import RED, BLUE, CustomMaterial + + +class InverseStackedCylinderObject(CompositeBodyObject): + """ + Inverse of stacked cylinder object, where the top piece is a hollow cylinder object + and the bottom piece is a cylinder object. Optionally add a square base for stability. + """ + + def __init__( + self, + name, + radius_1, + radius_2, + height_1, + height_2, + ngeoms=64, + joints="default", + rgba=None, + material=None, + density=100.0, + friction=None, + square_base_width=None, + square_base_height=None, + ): + + # Object properties + + # radius of first (bottom) cylinder and inner radius of second (top) hollow cylinder + self.r1 = radius_1 + self.r2 = radius_2 + + # half-height of first (bottom) cylinder and second (top) hollow cylinder + self.h1 = height_1 + self.h2 = height_2 + + # num geoms to approximate the hollow cylinder + self.ngeoms = ngeoms + + # whether to add square base + self.add_square_base = (square_base_width is not None) and (square_base_height is not None) + + # half-width and half-height for square base + self.square_base_width = square_base_width + self.square_base_height = square_base_height + + # Create objects + objects = [] + object_locations = [] + object_quats = [] + object_parents = [] + + # NOTE: we will place the object frame at the vertical center of the two stacked cylinders + z_center = (self.h1 + self.h2) / 2.0 + c1_offset = self.h1 - z_center + c2_offset = 2.0 * self.h1 + self.h2 - z_center + + # first (bottom) cylinder + self.cylinder_1 = CylinderObject( + name="cylinder_1", + size=[self.r1, self.h1], + rgba=rgba, + material=material, + density=density, + friction=friction, + solref=[0.02, 1.0], + # solimp=[0.998, 0.998, 0.001], + solimp=[0.9, 0.95, 0.001], + joints=None, + ) + objects.append(self.cylinder_1) + object_locations.append([0.0, 0.0, c1_offset]) + object_quats.append([1.0, 0.0, 0.0, 0.0]) + object_parents.append(None) + + # second (top) hollow cylinder + self.cylinder_2 = HollowCylinderObject( + name="cylinder_2", + outer_radius=self.r1, # match radius of first cylinder + inner_radius=self.r2, + height=self.h2, + ngeoms=self.ngeoms, + rgba=rgba, + material=material, + density=density, + friction=friction, + # TODO: maybe tune solimp and try (0.998, 0.998, 0.001) + solref=[0.02, 1.0], + solimp=[0.9, 0.95, 0.001], + # solimp=(0.998, 0.998, 0.001), + ) + objects.append(self.cylinder_2) + object_locations.append([0.0, 0.0, c2_offset]) + object_quats.append([1.0, 0.0, 0.0, 0.0]) + object_parents.append(None) + + # # total size of object + # max_r = max(self.r1, self.r2) + # body_total_size = [max_r, max_r, self.h1 + self.h2] + + if self.add_square_base: + # add square base underneath bottom cylinder + s1_offset = c1_offset - (self.square_base_height + self.h1) + self.square_base = BoxObject( + name="square_base", + size=[ + self.square_base_width, + self.square_base_width, + self.square_base_height, + ], + rgba=rgba, + material=material, + ) + objects.append(self.square_base) + object_locations.append([0.0, 0.0, s1_offset]) + object_quats.append([1.0, 0.0, 0.0, 0.0]) + object_parents.append(None) + + # Run super init + super().__init__( + name=name, + objects=objects, + object_locations=object_locations, + object_quats=object_quats, + object_parents=object_parents, + joints=joints, + # total_size=body_total_size, + # locations_relative_to_corner=True, + ) diff --git a/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite_body/lightbulb.py b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite_body/lightbulb.py new file mode 100644 index 0000000000000000000000000000000000000000..7d8d58461ee54baeb5e13cd477f2a7d50994da4b --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite_body/lightbulb.py @@ -0,0 +1,153 @@ +from robosuite.models.objects import ( + CompositeBodyObject, + BoxObject, + CylinderObject, + BallObject, +) +import numpy as np + +import robosuite.utils.transform_utils as T +from robosuite.utils.mjcf_utils import array_to_string, new_site +from robosuite.utils.mjcf_utils import RED, BLUE, CustomMaterial + + +class BallObjectWithSite(BallObject): + """ + A ball object with a inner site (used for the bulb). + """ + + def _get_object_subtree(self): + # tree = super()._get_object_subtree() + tree = self._get_object_subtree_(ob_type="sphere") + site_element_attr = self.get_site_attrib_template() + + site_element_attr["pos"] = "0 0 0.1" + site_element_attr["name"] = "center_site" + site_element_attr["size"] = "{} {} {}".format( + 2.0 * self.size[0], 2.0 * self.size[0], 2.0 * self.size[0] + ) + site_element_attr["rgba"] = "1.0 0.0 0.0 1.0" + site_element_attr["group"] = "1" + # site_element_attr["rgba"] = "1.0 0.976 0.839 0.9" + # site_element_attr["rgba"] = "1.0 0.976 0.839 0.0" + tree.append(new_site(**site_element_attr)) + return tree + + +class LightbulbObject(CompositeBodyObject): + """ + A simple lightbulb constructed out of a base of alternating radius cylinders + and a sphere on top. + """ + + def __init__( + self, + name, + radius_low, + radius_high, + cylinder_height, + num_cylinders, + sphere_radius, + joints="default", + density=100.0, + friction=None, + ): + + # Object properties + + # radii of alternating cylinders for base + self.radius_low = radius_low + self.radius_high = radius_high + + # half-height of each cylinder + self.cylinder_height = cylinder_height + + # number of cylinders for base + self.num_cylinders = num_cylinders + + # radius of sphere at top + self.sphere_radius = sphere_radius + + # toggle between translucent and yellow + self.translucent_rgba = (1.0, 1.0, 1.0, 0.3) + self.yellow_rgba = (1.0, 0.976, 0.839, 0.7) + # self.yellow_rgba = (0.0, 0.0, 0.0, 0.0) + + # Create objects + objects = [] + object_locations = [] + object_quats = [] + object_parents = [] + + # NOTE: we will place the object frame at the vertical center of all the stacked objects + self.z_center = ( + (2.0 * self.cylinder_height) * self.num_cylinders + 2.0 * self.sphere_radius + ) / 2.0 + + metal = CustomMaterial( + texture="Metal", + tex_name="metal", + mat_name="MatMetal", + tex_attrib={"type": "cube"}, + mat_attrib={"specular": "1", "shininess": "0.3", "rgba": "0.9 0.9 0.9 1"}, + ) + + # we will define all objects relative to the bottom of the object, and then subtract the z_center value + for cylinder_ind in range(self.num_cylinders): + r = self.radius_low if ((cylinder_ind % 2) == 0) else self.radius_high + cyl_obj = CylinderObject( + name="cylinder_{}".format(cylinder_ind), + size=[r, self.cylinder_height], + rgba=None, + material=metal, + density=density, + friction=friction, + solref=[0.02, 1.0], + solimp=[0.9, 0.95, 0.001], + joints=None, + ) + objects.append(cyl_obj) + z_cyl = (2.0 * cylinder_ind + 1) * self.cylinder_height + object_locations.append([0.0, 0.0, z_cyl]) + object_quats.append([1.0, 0.0, 0.0, 0.0]) + object_parents.append(None) + + # then add translucent sphere at top + self.bulb = BallObject( + name="bulb", + size=[self.sphere_radius], + density=density, + friction=friction, + rgba=self.translucent_rgba, + material=None, + joints=None, + ) + objects.append(self.bulb) + z_bulb = object_locations[-1][2] + self.cylinder_height + self.sphere_radius + object_locations.append([0.0, 0.0, z_bulb]) + object_quats.append([1.0, 0.0, 0.0, 0.0]) + object_parents.append(None) + + # do frame conversion from bottom of object to z_center + object_locations = [[loc[0], loc[1], loc[2] - self.z_center] for loc in object_locations] + + # add site that can be toggled to turn lightbulb on + sites = [ + dict( + name="bulb_on", + pos=array_to_string(object_locations[-1]), + size="{}".format(0.95 * self.sphere_radius), + rgba=array_to_string(self.yellow_rgba), + ) + ] + + # Run super init + super().__init__( + name=name, + objects=objects, + object_locations=object_locations, + object_quats=object_quats, + object_parents=object_parents, + joints=joints, + sites=sites, + ) diff --git a/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite_body/sliding_box.py b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite_body/sliding_box.py new file mode 100644 index 0000000000000000000000000000000000000000..0e6542b615457918a9ab869b62f54eb1923db5d5 --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite_body/sliding_box.py @@ -0,0 +1,132 @@ +import numpy as np + +from robosuite.models.objects import BoxObject, CompositeBodyObject, CylinderObject +from robosuite.utils.mjcf_utils import BLUE, RED, CustomMaterial, array_to_string + + +class SlidingBoxObject(CompositeBodyObject): + """ + An example object that demonstrates the CompositeBodyObject functionality. This object consists of two cube bodies + joined together by a slide joint allowing one box to slide on top of the other. + + Args: + name (str): Name of this object + + box1_size (3-array): (L, W, H) half-sizes for the first box + + box2_size (3-array): (L, W, H) half-sizes for the second box + + use_texture (bool): set True if using wood textures for the blocks + """ + + def __init__( + self, + name, + box1_size=(0.1, 0.1, 0.02), + box2_size=(0.02, 0.02, 0.02), + use_texture=True, + ): + # Set box sizes + self.box1_size = np.array(box1_size) + self.box2_size = np.array(box2_size) + + # Set box densities + self.box1_density = 10000.0 + self.box2_density = 100.0 + + # Set texture attributes + self.use_texture = use_texture + self.box1_material = None + self.box2_material = None + self.box1_rgba = RED + self.box2_rgba = BLUE + + # Define materials we want to use for this object + if self.use_texture: + # Remove RGBAs + self.box1_rgba = None + self.box2_rgba = None + + # Set materials for each box + tex_attrib = { + "type": "cube", + } + mat_attrib = { + "texrepeat": "3 3", + "specular": "0.4", + "shininess": "0.1", + } + self.box1_material = CustomMaterial( + texture="WoodRed", + tex_name="box1_tex", + mat_name="box1_mat", + tex_attrib=tex_attrib, + mat_attrib=mat_attrib, + ) + self.box2_material = CustomMaterial( + texture="WoodBlue", + tex_name="box2_tex", + mat_name="box2_mat", + tex_attrib=tex_attrib, + mat_attrib=mat_attrib, + ) + + # Create objects + objects = [] + for i, (size, mat, rgba, density) in enumerate( + zip( + (self.box1_size, self.box2_size), + (self.box1_material, self.box2_material), + (self.box1_rgba, self.box2_rgba), + (self.box1_density, self.box2_density), + ) + ): + objects.append( + BoxObject( + name=f"box{i + 1}", + size=size, + rgba=rgba, + material=mat, + ) + ) + + # Define slide joint + rel_joint_pos = [0, 0, 0] # at second box + joint_lim = self.box1_size[1] - self.box2_size[1] + slide_joint = { + "name": "box_slide", + "type": "slide", + "axis": "0 1 0", # y-axis slide + "pos": array_to_string(rel_joint_pos), + "springref": "0", + "springdamper": "0.1 1.0", # mass-spring system with 0.1 time constant, 1.0 damping ratio + "limited": "true", + "range": "{} {}".format(-joint_lim, joint_lim), + } + + # Define positions -- second box should lie on top of first box + positions = [ + np.zeros(3), # First box is centered at top-level body anyways + np.array([0, 0, self.box1_size[2] + self.box2_size[2]]), + ] + + quats = [ + None, # Default quaternion for box 1 + None, # Default quaternion for box 2 + ] + + # Define parents -- which body each is aligned to + parents = [ + None, # box 1 attached to top-level body + objects[0].root_body, # box 2 attached to box 1 + ] + + # Run super init + super().__init__( + name=name, + objects=objects, + object_locations=positions, + object_quats=quats, + object_parents=parents, + body_joints={objects[1].root_body: [slide_joint]}, + ) diff --git a/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite_body/stacked_box.py b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite_body/stacked_box.py new file mode 100644 index 0000000000000000000000000000000000000000..c2c7991c3a6056531e7758586df1f6a5538e3d45 --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite_body/stacked_box.py @@ -0,0 +1,111 @@ +from robosuite.models.objects import CompositeBodyObject, BoxObject, CylinderObject, Bin +import numpy as np + +import robosuite.utils.transform_utils as T +from robosuite.utils.mjcf_utils import array_to_string +from robosuite.utils.mjcf_utils import RED, BLUE, CustomMaterial + + +class StackedBoxObject(CompositeBodyObject): + """ + Two boxes - one stacked on top of the other. + """ + + def __init__( + self, + name, + box_1_size, + box_2_size, + joints="default", + box_1_rgba=None, + box_2_rgba=None, + box_1_material=None, + box_2_material=None, + density=100.0, + friction=None, + make_box_2_transparent=False, + ): + + # Object properties + + # half-sizes of first (bottom) box + self.box_1_size = list(box_1_size) + + # half-sizes of second (top) box + self.box_2_size = list(box_2_size) + + # maybe make box 2 have transparent top and bottom walls + self.make_box_2_transparent = make_box_2_transparent + + # Create objects + objects = [] + object_locations = [] + object_quats = [] + object_parents = [] + + # NOTE: we will place the object frame at the vertical center of the two stacked boxes + z_center = (self.box_1_size[2] + self.box_2_size[2]) / 2.0 + b1_offset = self.box_1_size[2] - z_center + b2_offset = 2.0 * self.box_1_size[2] + self.box_2_size[2] - z_center + + # first (bottom) box + self.box_1 = BoxObject( + name="box_1", + size=self.box_1_size, + rgba=box_1_rgba, + material=box_1_material, + density=density, + friction=friction, + joints=None, + ) + objects.append(self.box_1) + object_locations.append([0.0, 0.0, b1_offset]) + object_quats.append([1.0, 0.0, 0.0, 0.0]) + object_parents.append(None) + + # second (top) box + if self.make_box_2_transparent: + self.box_2 = Bin( + name="box_2", + bin_size=( + 2.0 * self.box_2_size[0], + 2.0 * self.box_2_size[1], + 2.0 * self.box_2_size[2], + ), + wall_thickness=0.01, + transparent_walls=False, + friction=friction, + density=density, + use_texture=True, + rgba=box_2_rgba, + material=box_2_material, + upside_down=False, + add_second_base=True, + transparent_base=True, + ) + else: + self.box_2 = BoxObject( + name="box_2", + size=self.box_2_size, + rgba=box_2_rgba, + material=box_2_material, + density=density, + friction=friction, + joints=None, + ) + objects.append(self.box_2) + object_locations.append([0.0, 0.0, b2_offset]) + object_quats.append([1.0, 0.0, 0.0, 0.0]) + object_parents.append(None) + + # Run super init + super().__init__( + name=name, + objects=objects, + object_locations=object_locations, + object_quats=object_quats, + object_parents=object_parents, + joints=joints, + # total_size=body_total_size, + # locations_relative_to_corner=True, + ) diff --git a/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite_body/stacked_cylinder.py b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite_body/stacked_cylinder.py new file mode 100644 index 0000000000000000000000000000000000000000..cf8cf143dd483f32697707b29eb1c5eadcc08323 --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite_body/stacked_cylinder.py @@ -0,0 +1,127 @@ +from robosuite.models.objects import CompositeBodyObject, BoxObject, CylinderObject +import numpy as np + +import robosuite.utils.transform_utils as T +from robosuite.utils.mjcf_utils import array_to_string +from robosuite.utils.mjcf_utils import RED, BLUE, CustomMaterial + + +class StackedCylinderObject(CompositeBodyObject): + """ + Two cylinders - one stacked on top of the other. + Optionally add a square base for stability. + """ + + def __init__( + self, + name, + radius_1, + radius_2, + height_1, + height_2, + joints="default", + rgba=None, + material=None, + density=100.0, + friction=None, + square_base_width=None, + square_base_height=None, + ): + + # Object properties + + # radius of first (bottom) cylinder and second (top) cylinder + self.r1 = radius_1 + self.r2 = radius_2 + + # half-height of first (bottom) cylinder and second (top) cylinder + self.h1 = height_1 + self.h2 = height_2 + + # whether to add square base + self.add_square_base = (square_base_width is not None) and (square_base_height is not None) + + # half-width and half-height for square base + self.square_base_width = square_base_width + self.square_base_height = square_base_height + + # Create objects + objects = [] + object_locations = [] + object_quats = [] + object_parents = [] + + # NOTE: we will place the object frame at the vertical center of the two stacked cylinders + z_center = (self.h1 + self.h2) / 2.0 + c1_offset = self.h1 - z_center + c2_offset = 2.0 * self.h1 + self.h2 - z_center + + # first (bottom) cylinder + self.cylinder_1 = CylinderObject( + name="cylinder_1", + size=[self.r1, self.h1], + rgba=rgba, + material=material, + density=density, + friction=friction, + solref=[0.02, 1.0], + solimp=[0.9, 0.95, 0.001], + # solimp=[0.998, 0.998, 0.001], + joints=None, + ) + objects.append(self.cylinder_1) + object_locations.append([0.0, 0.0, c1_offset]) + object_quats.append([1.0, 0.0, 0.0, 0.0]) + object_parents.append(None) + + # second (top) cylinder + self.cylinder_2 = CylinderObject( + name="cylinder_2", + size=[self.r2, self.h2], + rgba=rgba, + material=material, + density=density, + friction=friction, + solref=[0.02, 1.0], + # solimp=[0.998, 0.998, 0.001], + solimp=[0.9, 0.95, 0.001], + joints=None, + ) + objects.append(self.cylinder_2) + object_locations.append([0.0, 0.0, c2_offset]) + object_quats.append([1.0, 0.0, 0.0, 0.0]) + object_parents.append(None) + + # # total size of object + # max_r = max(self.r1, self.r2) + # body_total_size = [max_r, max_r, self.h1 + self.h2] + + if self.add_square_base: + # add square base underneath bottom cylinder + s1_offset = c1_offset - (self.square_base_height + self.h1) + self.square_base = BoxObject( + name="square_base", + size=[ + self.square_base_width, + self.square_base_width, + self.square_base_height, + ], + rgba=rgba, + material=material, + ) + objects.append(self.square_base) + object_locations.append([0.0, 0.0, s1_offset]) + object_quats.append([1.0, 0.0, 0.0, 0.0]) + object_parents.append(None) + + # Run super init + super().__init__( + name=name, + objects=objects, + object_locations=object_locations, + object_quats=object_quats, + object_parents=object_parents, + joints=joints, + # total_size=body_total_size, + # locations_relative_to_corner=True, + ) diff --git a/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite_body/stove_plug.py b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite_body/stove_plug.py new file mode 100644 index 0000000000000000000000000000000000000000..4f71ef952fd721ec3e330fc09f150423a4f3151d --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/dexmg/gr00trobocasa/robocasa/models/objects/composite_body/stove_plug.py @@ -0,0 +1,396 @@ +from robosuite.models.objects import CompositeBodyObject, BoxObject, CylinderObject +import numpy as np + +import robosuite.utils.transform_utils as T +from robosuite.utils.mjcf_utils import array_to_string +from robosuite.utils.mjcf_utils import RED, BLUE, CustomMaterial +from .inverse_stacked_cylinder import InverseStackedCylinderObject +from .lightbulb import LightbulbObject + +import robosuite_task_zoo +from robosuite_task_zoo.models.kitchen import StoveObject + + +class StoveObjectNew(StoveObject): + """ + Override some offsets for placement sampler. + """ + + @property + def bottom_offset(self): + # unused since we directly hardcode z + return np.array([0, 0, -0.02]) + + @property + def top_offset(self): + # unused since we directly hardcode z + return np.array([0, 0, 0.02]) + + @property + def horizontal_radius(self): + return 0.1 + + +class StovePlugObject(CompositeBodyObject): + """ + Stove on wooden block with chain (plug) connected. Optionally replace the stove + with a lightbulb if @lightbulb_args is provided. + """ + + def __init__( + self, + name, + joints="default", + rgba=None, + material=None, + density=100.0, + friction=None, + stove_base_size=(0.12, 0.12, 0.01), + stove_z_half_size=0.025, + wire_box_geom_size=(0.005, 0.02, 0.005), + wire_box_geom_rgba=(0.0, 0.0, 0.0, 1.0), + num_box_geoms_left=5, + num_box_geoms_vert=8, + num_box_geoms_right=8, + merge_box_geoms=False, + merge_size=1, + cylinder_args=None, + lightbulb_args=None, + ): + + # Object properties + + # half sizes for stove base box object + # self.stove_base_size = (0.1, 0.1, 0.02) + self.stove_base_size = stove_base_size + self.stove_z_half_size = stove_z_half_size # note: estimated approximately + + # box geoms used for wire + self.wire_box_geom_size = wire_box_geom_size + self.wire_box_geom_rgba = wire_box_geom_rgba + + # wire parameters - number of geoms to use for left, down, and right portions + self.num_box_geoms_left = num_box_geoms_left + self.num_box_geoms_vert = num_box_geoms_vert + self.num_box_geoms_right = num_box_geoms_right + + # if true, merge the box geoms along each direction of the wire into a single box geom + self.merge_box_geoms = merge_box_geoms + + # number of box geoms to use for each merged size (set to higher than 1 to merge the geoms into more + # than one box geom) + self.merge_size = merge_size + + if cylinder_args is None: + # default cylinder args + cylinder_args = dict( + # bottom cylinder radius and half-height + radius_1=0.03, + height_1=0.01, + # top hollow cylinder inner radius and half-height + radius_2=0.025, + height_2=0.025, + # NOTE: reduce to 8 geoms if desired + ngeoms=64, + rgba=[0.839, 0.839, 0.839, 1], + density=1000.0, + # add square base + square_base_width=0.03, + square_base_height=0.005, + ) + self.cylinder_args = dict(cylinder_args) + self.cylinder_args["joints"] = None + + self.use_lightbulb = lightbulb_args is not None + if self.use_lightbulb: + self.lightbulb_args = dict(lightbulb_args) + self.lightbulb_args["joints"] = None + + # materials + box_geom_material = CustomMaterial( + texture="Metal", + tex_name="metal", + mat_name="MatMetal", + tex_attrib={"type": "cube"}, + mat_attrib={"specular": "1", "shininess": "0.3", "rgba": "0.9 0.9 0.9 1"}, + ) + stove_base_material = CustomMaterial( + texture="WoodLight", + tex_name="lightwood", + mat_name="lightwood_mat", + tex_attrib={"type": "cube"}, + mat_attrib={"texrepeat": "1 1", "specular": "0.4", "shininess": "0.1"}, + ) + + # params for ball joints used + + # + ball_joint_spec = { + "type": "ball", + "pos": "0 {} 0".format(self.wire_box_geom_size[1]), + "springref": "0", + "springdamper": "0.1 1.0", # mass-spring system with 0.1 time constant, 1.0 damping ratio + "limited": "true", + "range": "0 {}".format(np.pi / 4), + } + + # Create objects + objects = [] + object_locations = [] + object_quats = [] + object_parents = [] + object_joints = dict() + + # NOTE: For absolute object locations (objects not defined relative to parent) we will use the stove base frame + # as a frame of reference, and add an offset from the center of the object (approximated via full width) + # to it. + + # get an approximate x-y bounding box below, and place the center there, and define offset relative to stove base cente + approx_full_width = self.num_box_geoms_left * (2.0 * self.wire_box_geom_size[1]) + ( + 2.0 * self.stove_base_size[1] + ) + approx_full_height = (self.num_box_geoms_vert + 2) * (2.0 * self.wire_box_geom_size[1]) + + stove_base_x_off = -(approx_full_height / 2.0) + self.stove_base_size[0] + stove_base_y_off = (approx_full_width / 2.0) - self.stove_base_size[1] + + # base of stove + self.stove_base = BoxObject( + name="stove_base", + size=list(self.stove_base_size), + rgba=rgba, + material=stove_base_material, + joints=None, + ) + objects.append(self.stove_base) + object_locations.append([stove_base_x_off, stove_base_y_off, 0.0]) + object_quats.append([1.0, 0.0, 0.0, 0.0]) + object_parents.append(None) + + if self.use_lightbulb: + # lightbulb + self.lightbulb = LightbulbObject( + name="lightbulb", + **self.lightbulb_args, + ) + objects.append(self.lightbulb) + object_locations.append( + [ + stove_base_x_off, + stove_base_y_off, + (self.stove_base_size[2] + self.lightbulb.z_center), + ] + ) + object_quats.append([1.0, 0.0, 0.0, 0.0]) + object_parents.append(None) + else: + # stove + self.stove = StoveObjectNew( + name="new_stove", + joints=None, + ) + objects.append(self.stove) + object_locations.append( + [ + stove_base_x_off, + stove_base_y_off, + (self.stove_base_size[2] + self.stove_z_half_size), + ] + ) + object_quats.append([1.0, 0.0, 0.0, 0.0]) + object_parents.append(None) + + # chain to the left of stove base + chain_ind = 0 + left_chain_size = list(self.wire_box_geom_size) + num_geoms_iter = self.num_box_geoms_left - 1 + if self.merge_box_geoms: + # only one big geom instead of chain of geoms + left_chain_size[1] *= self.num_box_geoms_left + left_chain_size[1] /= self.merge_size + # number of additional geoms to add + num_geoms_iter = self.merge_size - 1 + left_chain_obj = BoxObject( + name="chain_{}".format(chain_ind), + size=list(left_chain_size), + rgba=list(self.wire_box_geom_rgba), + material=box_geom_material, + joints=None, + ) + chain_ind += 1 + objects.append(left_chain_obj) + object_locations.append( + [ + stove_base_x_off - 0.75 * self.stove_base_size[0], + stove_base_y_off - (self.stove_base_size[1] + left_chain_size[1]), + 0.0, + ] + ) + # object_locations.append([0., -(self.stove_base_size[1] + left_chain_size[1]), 0.]) + object_quats.append([1.0, 0.0, 0.0, 0.0]) + object_parents.append(None) + if self.merge_box_geoms: + # add ball joint and make sure to place it at the edge of the geom + ball_joint = dict(ball_joint_spec) + ball_joint["name"] = "ball_joint_{}".format(chain_ind) + ball_joint["pos"] = "0 {} 0".format(left_chain_size[1]) + object_joints[left_chain_obj.root_body] = [ball_joint] + for i in range(num_geoms_iter): + left_chain_obj = BoxObject( + name="chain_{}".format(chain_ind), + size=list(left_chain_size), + rgba=list(self.wire_box_geom_rgba), + material=box_geom_material, + joints=None, + ) + chain_ind += 1 + parent = objects[-1].root_body + objects.append(left_chain_obj) + object_locations.append([0.0, -2.0 * left_chain_size[1], 0.0]) + object_quats.append([1.0, 0.0, 0.0, 0.0]) + object_parents.append(parent) + + # add ball joint and make sure to place it at the edge of the geom + ball_joint = dict(ball_joint_spec) + ball_joint["name"] = "ball_joint_{}".format(chain_ind) + ball_joint["pos"] = "0 {} 0".format(left_chain_size[1]) + object_joints[left_chain_obj.root_body] = [ball_joint] + + # add chain in downward direction + rot_quat = T.convert_quat( + T.axisangle2quat(np.array([0.0, 0.0, 1.0]) * (np.pi / 2.0)), to="wxyz" + ) + vert_chain_size = list(self.wire_box_geom_size) + num_geoms_iter = self.num_box_geoms_vert - 1 + if self.merge_box_geoms: + # only one big geom instead of chain of geoms + vert_chain_size[1] *= self.num_box_geoms_vert + vert_chain_size[1] /= self.merge_size + # number of additional geoms to add + num_geoms_iter = self.merge_size - 1 + vert_chain_obj = BoxObject( + name="chain_{}".format(chain_ind), + size=list(vert_chain_size), + rgba=list(self.wire_box_geom_rgba), + material=box_geom_material, + joints=None, + ) + chain_ind += 1 + parent = objects[-1].root_body + objects.append(vert_chain_obj) + object_locations.append([vert_chain_size[1], -left_chain_size[1], 0.0]) + object_quats.append(rot_quat) + object_parents.append(parent) + + ball_joint = dict(ball_joint_spec) + ball_joint["name"] = "ball_joint_{}".format(chain_ind) + ball_joint["pos"] = "0 {} 0".format(vert_chain_size[1]) + object_joints[vert_chain_obj.root_body] = [ball_joint] + + for i in range(num_geoms_iter): + vert_chain_obj = BoxObject( + name="chain_{}".format(chain_ind), + size=list(vert_chain_size), + rgba=list(self.wire_box_geom_rgba), + material=box_geom_material, + joints=None, + ) + chain_ind += 1 + parent = objects[-1].root_body + objects.append(vert_chain_obj) + object_locations.append([0.0, -2.0 * vert_chain_size[1], 0.0]) + object_quats.append([1.0, 0.0, 0.0, 0.0]) + object_parents.append(parent) + + ball_joint = dict(ball_joint_spec) + ball_joint["name"] = "ball_joint_{}".format(chain_ind) + ball_joint["pos"] = "0 {} 0".format(vert_chain_size[1]) + object_joints[vert_chain_obj.root_body] = [ball_joint] + + # add chain in rightward direction + rot_quat = T.convert_quat( + T.axisangle2quat(np.array([0.0, 0.0, 1.0]) * (np.pi / 2.0)), to="wxyz" + ) + right_chain_size = list(self.wire_box_geom_size) + num_geoms_iter = self.num_box_geoms_right - 1 + if self.merge_box_geoms: + # only one big geom instead of chain of geoms + right_chain_size[1] *= self.num_box_geoms_right + right_chain_size[1] /= self.merge_size + # number of additional geoms to add + num_geoms_iter = self.merge_size - 1 + right_chain_obj = BoxObject( + name="chain_{}".format(chain_ind), + size=list(right_chain_size), + rgba=list(self.wire_box_geom_rgba), + material=box_geom_material, + joints=None, + ) + chain_ind += 1 + parent = objects[-1].root_body + objects.append(right_chain_obj) + object_locations.append([right_chain_size[1], -vert_chain_size[1], 0.0]) + object_quats.append(rot_quat) + object_parents.append(parent) + + ball_joint = dict(ball_joint_spec) + ball_joint["name"] = "ball_joint_{}".format(chain_ind) + ball_joint["pos"] = "0 {} 0".format(right_chain_size[1]) + object_joints[right_chain_obj.root_body] = [ball_joint] + + for i in range(num_geoms_iter): + right_chain_obj = BoxObject( + name="chain_{}".format(chain_ind), + size=list(right_chain_size), + rgba=list(self.wire_box_geom_rgba), + material=box_geom_material, + joints=None, + ) + chain_ind += 1 + parent = objects[-1].root_body + objects.append(right_chain_obj) + object_locations.append([0.0, -2.0 * right_chain_size[1], 0.0]) + object_quats.append([1.0, 0.0, 0.0, 0.0]) + object_parents.append(parent) + + ball_joint = dict(ball_joint_spec) + ball_joint["name"] = "ball_joint_{}".format(chain_ind) + ball_joint["pos"] = "0 {} 0".format(right_chain_size[1]) + object_joints[right_chain_obj.root_body] = [ball_joint] + + # add cylinder object + self.cylinder_obj = InverseStackedCylinderObject( + name="cylinder_obj", + **self.cylinder_args, + ) + + x_off = 0.0 + y_off = -(right_chain_size[1] + self.cylinder_obj.square_base_width) + z_off = ((self.cylinder_obj.h1 + self.cylinder_obj.h2) / 2.0) - right_chain_size[2] + parent = objects[-1].root_body + objects.append(self.cylinder_obj) + object_locations.append([x_off, y_off, z_off]) + object_quats.append([1.0, 0.0, 0.0, 0.0]) + object_parents.append(parent) + + # # add debug site to see object center + # sites = [ + # dict( + # name="TMP", + # pos=array_to_string([0., 0., 0.]), + # size="{}".format(0.1), + # rgba=array_to_string([1., 0., 0., 1.]), + # ) + # ] + + # Run super init + super().__init__( + name=name, + objects=objects, + object_locations=object_locations, + object_quats=object_quats, + object_parents=object_parents, + joints=joints, + body_joints=object_joints, + # sites=sites, + ) diff --git a/GR00T-WholeBodyControl/decoupled_wbc/docker/entrypoint/bash.sh b/GR00T-WholeBodyControl/decoupled_wbc/docker/entrypoint/bash.sh new file mode 100644 index 0000000000000000000000000000000000000000..4ff46bf02bc792f607c62aff076a8a2d4b055a4c --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/docker/entrypoint/bash.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e # Exit on error + +echo "Dependencies installed successfully. Starting interactive bash shell..." +exec /bin/bash diff --git a/GR00T-WholeBodyControl/decoupled_wbc/docker/entrypoint/deploy.sh b/GR00T-WholeBodyControl/decoupled_wbc/docker/entrypoint/deploy.sh new file mode 100644 index 0000000000000000000000000000000000000000..b624c6b2c6ccb8947989c1a6b6d9113beafb06c0 --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/docker/entrypoint/deploy.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -e # Exit on error + +# Run the deployment script +# Check for script existence before running +DEPLOY_SCRIPT="decoupled_wbc/scripts/deploy_g1.py" +if [ -f "$DEPLOY_SCRIPT" ]; then + echo "Running deployment script at $DEPLOY_SCRIPT" + echo "Using python from $(which python)" + echo "Deploy args: $@" + exec python "$DEPLOY_SCRIPT" "$@" +else + echo "ERROR: Deployment script not found at $DEPLOY_SCRIPT" + echo "Current directory structure:" + find . -type f -name "*.py" | grep -i deploy + echo "Available script options:" + find . -type f -name "*.py" | sort + echo "Starting a bash shell for troubleshooting..." + exec /bin/bash +fi diff --git a/GR00T-WholeBodyControl/decoupled_wbc/docker/entrypoint/install_deps.sh b/GR00T-WholeBodyControl/decoupled_wbc/docker/entrypoint/install_deps.sh new file mode 100644 index 0000000000000000000000000000000000000000..fd7280db3a5e8e5ed8a65bde7befea62cc585126 --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/docker/entrypoint/install_deps.sh @@ -0,0 +1,23 @@ +#!/bin/bash +set -e + +# Source virtual environment and ROS2 +source ${HOME}/venv/bin/activate +source /opt/ros/humble/setup.bash +export ROS_LOCALHOST_ONLY=1 + +# Install external dependencies +echo "Current directory: $(pwd)" +echo "Installing dependencies..." + +# Install Unitree SDK and LeRobot +if [ -d "external_dependencies/unitree_sdk2_python" ]; then + cd external_dependencies/unitree_sdk2_python/ + uv pip install -e . --no-deps + cd ../.. +fi + +# Install project packages +if [ -f "decoupled_wbc/pyproject.toml" ]; then + UV_GIT_LFS=1 uv pip install -e "decoupled_wbc[full,dev]" -e "gear_sonic[sim]" +fi diff --git a/GR00T-WholeBodyControl/decoupled_wbc/tests/control/__init__.py b/GR00T-WholeBodyControl/decoupled_wbc/tests/control/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/decoupled_wbc/tests/control/main/__init__.py b/GR00T-WholeBodyControl/decoupled_wbc/tests/control/main/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/decoupled_wbc/tests/control/main/teleop/__init__.py b/GR00T-WholeBodyControl/decoupled_wbc/tests/control/main/teleop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/decoupled_wbc/tests/control/main/teleop/test_g1_control_loop.py b/GR00T-WholeBodyControl/decoupled_wbc/tests/control/main/teleop/test_g1_control_loop.py new file mode 100644 index 0000000000000000000000000000000000000000..15ab9c42416cb500e0140901df6c220e84e714e2 --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/tests/control/main/teleop/test_g1_control_loop.py @@ -0,0 +1,469 @@ +import argparse +import os +from pathlib import Path +import signal +import subprocess +import threading +import time + +import numpy as np +import pytest +import rclpy +from scipy.spatial.transform import Rotation as R +from std_msgs.msg import String as RosStringMsg + +from decoupled_wbc.control.main.constants import ( + CONTROL_GOAL_TOPIC, + KEYBOARD_INPUT_TOPIC, + STATE_TOPIC_NAME, +) +from decoupled_wbc.control.utils.ros_utils import ROSMsgPublisher, ROSMsgSubscriber +from decoupled_wbc.control.utils.term_color_constants import GREEN_BOLD, RESET, YELLOW_BOLD +from decoupled_wbc.data.viz.rerun_viz import RerunViz + + +class KeyboardPublisher: + def __init__(self, topic_name: str = KEYBOARD_INPUT_TOPIC): + assert rclpy.ok(), "Expected ROS2 to be initialized in this process..." + executor = rclpy.get_global_executor() + self.node = executor.get_nodes()[0] + self.publisher = self.node.create_publisher(RosStringMsg, topic_name, 1) + + def publish(self, key: str): + msg = RosStringMsg() + msg.data = key + self.publisher.publish(msg) + + +def is_robot_fallen_from_quat(mujoco_quat): + # Convert MuJoCo [w, x, y, z] → SciPy [x, y, z, w] + w, x, y, z = mujoco_quat + scipy_quat = [x, y, z, w] + + r = R.from_quat(scipy_quat) + roll, pitch, _ = r.as_euler("xyz", degrees=False) + + MAX_ROLL_PITCH = np.radians(60) + print(f"[Fall Check] roll={roll:.3f} rad, pitch={pitch:.3f} rad") + return abs(roll) > MAX_ROLL_PITCH or abs(pitch) > MAX_ROLL_PITCH + + +class LocomotionRunner: + def __init__(self, test_mode: str = "squat"): + self.test_mode = test_mode + if not rclpy.ok(): + rclpy.init(args=None) + self.node = rclpy.create_node(f"EvalDriver_{test_mode}_{int(time.time())}") + + # gracefully shutdown the spin thread when the test is done + self._stop_event = threading.Event() + + self.spin_thread = threading.Thread(target=self._spin_loop, daemon=False) + self.spin_thread.start() + + self.keyboard_event_publisher = KeyboardPublisher(KEYBOARD_INPUT_TOPIC) + self.control_publisher = ROSMsgPublisher(CONTROL_GOAL_TOPIC) + self.state_subscriber = ROSMsgSubscriber(STATE_TOPIC_NAME) + print(f"{test_mode} test initialized...") + + def _spin_loop(self): + try: + while rclpy.ok() and not self._stop_event.is_set(): + rclpy.spin_once(self.node) + except rclpy.executors.ExternalShutdownException: + print("[INFO] Spin thread exiting due to shutdown.") + finally: + print("spin loop stopped...") + + def warm_up(self): + """Stabilize and release the robot.""" + print("waiting for 2 seconds...") + time.sleep(2) + print(f"running {self.test_mode} test...") + self.activate() + print("activated...") + time.sleep(1) + self.release() + print("released...") + time.sleep(5) + + def _run_walk_test(self): + self.walk_forward() # speed up to 0.2 m/s + time.sleep(1) + self.walk_forward() # speed up to 0.4 m/s + + rate = self.node.create_rate(0.5) + start_time = time.time() + while rclpy.ok() and (time.time() - start_time) < 10.0: + obs = self.state_subscriber.get_msg() + + if is_robot_fallen_from_quat(obs["torso_quat"]): + print("robot fallen...") + return 0 + elif self._check_success_condition(obs): + print(f"robot reaching target ({self.test_mode})...") + return 1, {} + else: + rate.sleep() + + print("test timed out after 10 seconds...") + return 0, {} + + def _run_squat_test(self): + rate = self.node.create_rate(0.5) + start_time = time.time() + while rclpy.ok() and (time.time() - start_time) < 10.0: + obs = self.state_subscriber.get_msg() + + if is_robot_fallen_from_quat(obs["torso_quat"]): + print("robot fallen...") + return 0, {} + elif self._check_success_condition(obs): + print(f"robot reaching target ({self.test_mode})...") + return 1, {} + else: + self.go_down() + rate.sleep() + + print("test timed out after 10 seconds...") + return 0, {} + + def cmd_to_velocity(self, cmd_list): + cmd_to_velocity = { + "w": np.array([0.2, 0.0, 0.0]), + "s": np.array([-0.2, 0.0, 0.0]), + "q": np.array([0.0, 0.2, 0.0]), + "e": np.array([0.0, -0.2, 0.0]), + "z": np.array([0.0, 0.0, 0.0]), + } + + accumulated_velocity = np.array([0.0, 0.0, 0.0]) + velocity_list = [] + for cmd in cmd_list: + if cmd == "z": + accumulated_velocity = [0.0, 0.0, 0.0] + elif cmd in ["CHECK", "SKIP"]: + accumulated_velocity = velocity_list[-1] + else: + accumulated_velocity += cmd_to_velocity[cmd] + velocity_list.append(accumulated_velocity.copy()) + + return velocity_list + + def _run_stop_test(self): + base_vel_thres = 0.25 + + cmd_list = ( + ["w", "w", "w", "w", "s", "s", "s", "z", "SKIP", "CHECK"] + + ["s", "s", "q", "w", "w", "w", "e", "s", "s", "z", "SKIP", "CHECK"] + + ["q", "q", "w", "q", "e", "s", "s", "e", "w", "z", "SKIP", "CHECK"] + + ["w", "w", "w", "w", "w", "s", "s", "s", "s", "z", "SKIP", "CHECK"] + ) + + success_flag = 1 + + statistics = { + "floating_base_pose": {"state": []}, + "floating_base_vel": {"state": [], "cmd": []}, + "timestamp": [], + } + for cmd in cmd_list: + self.keyboard_event_publisher.publish(cmd) + time.sleep(0.5) + obs = self.state_subscriber.get_msg() + statistics["floating_base_pose"]["state"].append( + np.linalg.norm(obs["floating_base_pose"]) + ) + statistics["floating_base_vel"]["state"].append( + np.linalg.norm(obs["floating_base_vel"]) + ) + statistics["timestamp"].append(time.time()) + + if cmd == "CHECK" and np.linalg.norm(obs["floating_base_vel"]) > base_vel_thres: + print( + f" [{YELLOW_BOLD}WARNING{RESET}] robot is not stopped fully. " + f"Current base velocity: {np.linalg.norm(obs['floating_base_vel']):.3f} > {base_vel_thres:.3f}" + ) + # success_flag = 0 # robot is not stopped + + time.sleep(0.5) + + vel_cmd = self.cmd_to_velocity(cmd_list) + vel_cmd = [np.linalg.norm(v) for v in vel_cmd] + statistics["floating_base_vel"]["cmd"] = vel_cmd + return success_flag, statistics + + def _run_eef_track_test(self): + from decoupled_wbc.control.policy.lerobot_replay_policy import LerobotReplayPolicy + + parquet_path = ( + Path(__file__).parent.parent.parent.parent / "replay_data" / "g1_pnpbottle.parquet" + ) + replay_policy = LerobotReplayPolicy(parquet_path=str(parquet_path)) + + freq = 50 + rate = self.node.create_rate(freq) + + statistics = { + # "floating_base_pose": {"state": [], "cmd": []}, + "eef_base_pose": {"state": [], "cmd": []}, + "timestamp": [], + } + + for ii in range(500): + action = replay_policy.get_action() + action = replay_policy.action_to_cmd(action) + action["timestamp"] = time.monotonic() + action["target_time"] = time.monotonic() + ii / freq + self.control_publisher.publish(action) + obs = self.state_subscriber.get_msg() + if obs is None: + print("no obs...") + continue + gt_obs = replay_policy.get_observation() + + # statistics["floating_base_pose"]["state"].append(obs["floating_base_pose"]) + # statistics["floating_base_pose"]["cmd"].append(np.zeros_like(obs["floating_base_pose"])) + statistics["eef_base_pose"]["state"].append(obs["wrist_pose"]) + statistics["eef_base_pose"]["cmd"].append(gt_obs["wrist_pose"]) + statistics["timestamp"].append(time.time()) + + pos_err = np.linalg.norm(obs["wrist_pose"][:3] - gt_obs["wrist_pose"][:3]) + if pos_err > 1e-1: + print( + f" [{YELLOW_BOLD}WARNING{RESET}] robot failed to track the eef, " + f"error: {pos_err:.3f} ({self.test_mode})..." + ) + return 0, statistics + + if is_robot_fallen_from_quat(obs["torso_quat"]): + print("robot fallen...") + return 0, statistics + else: + rate.sleep() + + return 1, statistics + + def run(self): + self.warm_up() + + test_mode_to_func = { + "squat": self._run_squat_test, + "walk": self._run_walk_test, + "stop": self._run_stop_test, + "eef_track": self._run_eef_track_test, + } + + result, statistics = test_mode_to_func[self.test_mode]() + + self.post_process(statistics) + return result + + def _check_success_condition(self, obs): + if self.test_mode == "squat": + return obs["floating_base_pose"][2] < 0.4 + elif self.test_mode == "walk": + return np.linalg.norm(obs["floating_base_pose"][0:2]) > 1.0 + return False + + def activate(self): + self.keyboard_event_publisher.publish("]") + + def release(self): + self.keyboard_event_publisher.publish("9") + + def go_down(self): + self.keyboard_event_publisher.publish("2") + + def walk_forward(self): + self.keyboard_event_publisher.publish("w") + + def walk_stop(self): + self.keyboard_event_publisher.publish("z") + + def post_process(self, statistics): + if len(statistics) == 0: + return + + # plot the statistics + plot_keys = [key for key in statistics.keys() if key != "timestamp"] + viz = RerunViz( + image_keys=[], + tensor_keys=plot_keys, + window_size=10.0, + app_name=f"{self.test_mode}_test", + ) + + for ii in range(len(statistics[plot_keys[0]]["state"])): + tensor_data = {} + for k in plot_keys: + if "state" in statistics[k] and "cmd" in statistics[k]: + tensor_data[k] = np.array( + (statistics[k]["state"][ii], statistics[k]["cmd"][ii]) + ).reshape(2, -1) + else: + tensor_data[k] = np.asarray(statistics[k]["state"][ii]).reshape(1, -1) + viz.plot_tensors( + tensor_data, + statistics["timestamp"][ii], + ) + + if self.test_mode == "stop": + base_velocity = statistics["floating_base_vel"]["state"] + base_velocity_cmd = statistics["floating_base_vel"]["cmd"] + + base_velocity_tracking_err = [] + for v_cmd, v in zip(base_velocity_cmd, base_velocity): # TODO: check if this is correct + if v_cmd.max() < 1e-4: + base_velocity_tracking_err.append(v) + print( + f" [{GREEN_BOLD}INFO{RESET}] Base velocity tracking when stopped: " + f"{np.mean(base_velocity_tracking_err):.3f}" + ) + + if self.test_mode == "eef_track": + eef_pose = statistics["eef_base_pose"]["state"] + eef_pose_cmd = statistics["eef_base_pose"]["cmd"] + eef_pose_tracking_err = [] + for p_cmd, p in zip(eef_pose_cmd, eef_pose): + eef_pose_tracking_err.append(np.linalg.norm(p - p_cmd)) + print( + f" [{GREEN_BOLD}INFO{RESET}] Eef pose tracking error: {np.mean(eef_pose_tracking_err):.3f}" + ) + + def shutdown(self): + self._stop_event.set() + self.spin_thread.join() + del self.state_subscriber + del self.keyboard_event_publisher + # Don't shutdown ROS between tests - let pytest handle it + + +def start_g1_control_loop(): + proc = subprocess.Popen( + [ + "python3", + "decoupled_wbc/control/main/teleop/run_g1_control_loop.py", + "--keyboard_dispatcher_type", + "ros", + "--enable-offscreen", + ], + preexec_fn=os.setsid, + ) + time.sleep(10) + return proc + + +def run_test(test_mode: str): + """Run a single test with the specified mode.""" + proc = start_g1_control_loop() + print(f"G1 control loop started for {test_mode} test...") + + test = LocomotionRunner(test_mode) + result = test.run() + + print("Shutting down...") + test.shutdown() + proc.send_signal(signal.SIGKILL) + proc.wait() + + return result + + +def test_squat(): + """Pytest function for squat test.""" + result = run_test("squat") + assert result == 1, "Squat test failed - robot either fell or didn't reach target height" + + +def test_walk(): + """Pytest function for walk test.""" + result = run_test("walk") + assert result == 1, "Walk test failed - robot either fell or didn't reach target distance" + + +@pytest.mark.skip(reason="skipping test for now, cicd test always gets killed") +def test_stop(): + """Pytest function for walking to a nearby position and stop test.""" + result = run_test("stop") + assert result == 1, "Stop test failed - robot either fell or didn't reach target distance" + + +@pytest.mark.skip(reason="skipping test for now, cicd test always gets killed") +def test_eef_track(): + """Pytest function for eef track test.""" + result = run_test("eef_track") + assert result == 1, "Eef track test failed - robot either fell or didn't reach target distance" + + +def main(): + parser = argparse.ArgumentParser(description="Run locomotion tests") + parser.add_argument("--squat", action="store_true", help="Run squat test only") + parser.add_argument("--walk", action="store_true", help="Run walk test only") + parser.add_argument("--stop", action="store_true", help="Run stop test only") + parser.add_argument("--eef_track", action="store_true", help="Run eef track test only") + + args = parser.parse_args() + + if args.squat and args.walk: + print("Error: Cannot specify both --squat and --walk") + return 1 + + if args.squat: + print("Running squat test only...") + result = run_test("squat") + if result == 1: + print("✓ Squat test PASSED") + return 0 + else: + print("✗ Squat test FAILED") + return 1 + + elif args.walk: + print("Running walk test only...") + result = run_test("walk") + if result == 1: + print("✓ Walk test PASSED") + return 0 + else: + print("✗ Walk test FAILED") + return 1 + + elif args.stop: + print("Running stop test only...") + result = run_test("stop") + if result == 1: + print("✓ Stop test PASSED") + return 0 + else: + print("✗ Stop test FAILED") + return 1 + + elif args.eef_track: + print("Running eef track test only...") + result = run_test("eef_track") + if result == 1: + print("✓ Eef track test PASSED") + return 0 + else: + print("✗ Eef track test FAILED") + return 1 + + else: + print("Running both tests...") + squat_result = run_test("squat") + walk_result = run_test("walk") + + if squat_result == 1 and walk_result == 1: + print("✓ All tests PASSED") + return 0 + else: + print( + f"✗ Test results: squat={'PASSED' if squat_result == 1 else 'FAILED'}, " + f"walk={'PASSED' if walk_result == 1 else 'FAILED'}" + ) + return 1 + + +if __name__ == "__main__": + exit(main()) diff --git a/GR00T-WholeBodyControl/decoupled_wbc/tests/control/main/test_data_exporter_loop.py b/GR00T-WholeBodyControl/decoupled_wbc/tests/control/main/test_data_exporter_loop.py new file mode 100644 index 0000000000000000000000000000000000000000..827747382f40e0b863d7a65d7ae258c4ec684cb3 --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/tests/control/main/test_data_exporter_loop.py @@ -0,0 +1,403 @@ +import glob +import os +import tempfile +from unittest.mock import MagicMock, patch + +import numpy as np +import pytest + +try: + from decoupled_wbc.control.main.teleop.run_g1_data_exporter import Gr00tDataCollector + from decoupled_wbc.control.robot_model.instantiation.g1 import instantiate_g1_robot_model + from decoupled_wbc.data.constants import RS_VIEW_CAMERA_HEIGHT, RS_VIEW_CAMERA_WIDTH + from decoupled_wbc.data.exporter import Gr00tDataExporter + from decoupled_wbc.data.utils import get_dataset_features +except ModuleNotFoundError as e: + if "No module named 'rclpy'" in str(e): + pytestmark = pytest.mark.skip(reason="ROS (rclpy) is not installed") + else: + raise e + + +import json + +# How does mocking ROS work? +# +# This test file uses mocking to simulate a ROS environment without requiring actual ROS hardware: +# +# 1. ros_ok_side_effect: Controls how long the ROS loop runs by returning a sequence of +# True/False values. [True, True, False] means "run for 2 iterations then stop" +# +# 2. MockROSMsgSubscriber: Simulates sensors (camera/state) by returning pre-defined data: +# +# 3. MockKeyboardListenerSubscriber: Simulates user input: +# - 'c' = start/stop recording +# - 'd' = discard episode +# - KeyboardInterrupt = simulate Ctrl+C +# - None = no input +# +# 4. MockROSEnvironment: A context manager that patches all ROS dependencies to use our mocks, +# allowing us to test ROS-dependent code without actual ROS running. + + +class MockROSMsgSubscriber: + def __init__(self, return_value: list[dict]): + self.return_value = return_value + self.counter = 0 + + def get_image(self): + if self.counter < len(self.return_value): + self.counter += 1 + return self.return_value[self.counter - 1] + else: + return None + + def get_msg(self): + if self.counter < len(self.return_value): + self.counter += 1 + return self.return_value[self.counter - 1] + else: + return None + + +class MockKeyboardListenerSubscriber: + def __init__(self, return_value: list[str]): + self.return_value = return_value + self.counter = 0 + + def get_keyboard_input(self): + return self.return_value[self.counter] + + def read_msg(self): + if self.counter < len(self.return_value): + result = self.return_value[self.counter] + if isinstance(result, KeyboardInterrupt): + raise result + self.counter += 1 + return result + return None + + +class MockROSEnvironment: + """Context manager for mocking ROS environment and subscribers.""" + + def __init__(self, ok_side_effect, keyboard_listener, img_subscriber, state_subscriber): + self.ok_side_effect = ok_side_effect + self.keyboard_listener = keyboard_listener + self.img_subscriber = img_subscriber + self.state_subscriber = state_subscriber + self.patches = [] + + def __enter__(self): + self.patches = [ + patch("rclpy.init"), + patch("rclpy.create_node"), + patch("rclpy.spin"), + patch("rclpy.ok", side_effect=self.ok_side_effect), + patch("rclpy.shutdown"), + patch( + "decoupled_wbc.control.main.teleop.run_g1_data_exporter.KeyboardListenerSubscriber", + return_value=self.keyboard_listener, + ), + patch( + "decoupled_wbc.control.main.teleop.run_g1_data_exporter.ROSImgMsgSubscriber", + return_value=self.img_subscriber, + ), + patch( + "decoupled_wbc.control.main.teleop.run_g1_data_exporter.ROSMsgSubscriber", + return_value=self.state_subscriber, + ), + ] + + for p in self.patches: + p.start() + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + for p in reversed(self.patches): + p.stop() + return False + + +def verify_parquet_files_exist(file_path: str, num_episodes: int): + parquet_files = glob.glob(os.path.join(file_path, "data/chunk-*/episode_*.parquet")) + assert ( + len(parquet_files) == num_episodes + ), f"Expected {num_episodes} parquet files, but found {len(parquet_files)}" + + +def verify_video_files_exist(file_path: str, observation_keys: list[str], num_episodes: int): + for observation_key in observation_keys: + video_files = glob.glob( + os.path.join(file_path, f"videos/chunk-*/{observation_key}/episode_*.mp4") + ) + assert ( + len(video_files) == num_episodes + ), f"Expected {num_episodes} video files, but found {len(video_files)}" + + +def verify_metadata_files(file_path: str): + files_to_check = ["episodes.jsonl", "info.json", "tasks.jsonl", "modality.json"] + for file in files_to_check: + assert os.path.exists(os.path.join(file_path, "meta", file)), f"meta/{file} not created" + + +@pytest.fixture +def lerobot_features(): + robot_model = instantiate_g1_robot_model() + return get_dataset_features(robot_model) + + +@pytest.fixture +def modality_config(): + return { + "state": {"feature1": {"start": 0, "end": 4}, "feature2": {"start": 4, "end": 9}}, + "action": {"feature1": {"start": 0, "end": 4}, "feature2": {"start": 4, "end": 9}}, + "video": {"rs_view": {"original_key": "observation.images.ego_view"}}, + "annotation": {"human.task_description": {"original_key": "task_index"}}, + } + + +def _get_image_stream_data(episode_length: int, frame_rate: int, img_height: int, img_width: int): + return [ + { + "image": np.zeros((img_height, img_width, 3), dtype=np.uint8), + "timestamp": (i * 1 / frame_rate), + } + for i in range(episode_length) + ] + + +def _get_state_act_stream_data( + episode_length: int, frame_rate: int, state_dim: int, action_dim: int +): + return [ + { + "q": np.zeros(state_dim), + "action": np.zeros(action_dim), + "timestamp": (i * 1 / frame_rate), + "navigate_command": np.zeros(3, dtype=np.float64), + "base_height_command": 0.0, + "wrist_pose": np.zeros(14, dtype=np.float64), + "action.eef": np.zeros(14, dtype=np.float64), + } + for i in range(episode_length) + ] + + +def test_control_loop_happy_path_workflow(lerobot_features, modality_config): + """ + This test records a single episode and saves it to disk. + """ + episode_length = 10 + frame_rate = 20 + img_stream_data = _get_image_stream_data( + episode_length, frame_rate, RS_VIEW_CAMERA_HEIGHT, RS_VIEW_CAMERA_WIDTH + ) + robot_model = instantiate_g1_robot_model() + state_act_stream_data = _get_state_act_stream_data( + episode_length, frame_rate, robot_model.num_joints, robot_model.num_joints + ) + + keyboard_sub_output = [None for _ in range(episode_length)] + keyboard_sub_output[0] = "c" # Start recording + keyboard_sub_output[-1] = "c" # Stop recording and save + + # --------- Save the first episode --------- + mock_img_sub = MockROSMsgSubscriber(img_stream_data) + mock_state_sub = MockROSMsgSubscriber(state_act_stream_data) + mock_keyboard_listner = MockKeyboardListenerSubscriber(keyboard_sub_output) + + with tempfile.TemporaryDirectory() as temp_dir: + dataset_dir = os.path.join(temp_dir, "dataset") + + data_exporter = Gr00tDataExporter.create( + save_root=dataset_dir, + fps=frame_rate, + features=lerobot_features, + modality_config=modality_config, + task="test", + ) + + ros_ok_side_effect = [True] * (episode_length + 1) + [False] + with MockROSEnvironment( + ros_ok_side_effect, mock_keyboard_listner, mock_img_sub, mock_state_sub + ): + data_collector = Gr00tDataCollector( + camera_topic_name="mock_camera_topic", + state_topic_name="mock_state_topic", + data_exporter=data_exporter, + frequency=frame_rate, + ) + + # mocking to avoid actual sleeping + data_collector.rate = MagicMock() + + data_collector.run() + + verify_parquet_files_exist(dataset_dir, 1) + verify_video_files_exist(dataset_dir, data_exporter.meta.video_keys, 1) + verify_metadata_files(dataset_dir) + + # --------- Save the second episode --------- + # we reset the mock subscribers and re-run the control loop + # This immitates the case where the user starts recording a new episode on an existing dataset + mock_img_sub = MockROSMsgSubscriber(img_stream_data) + mock_state_sub = MockROSMsgSubscriber(state_act_stream_data) + ros_ok_side_effect = [True] * (episode_length + 1) + [False] + mock_keyboard_listner = MockKeyboardListenerSubscriber(keyboard_sub_output) + with MockROSEnvironment( + ros_ok_side_effect, mock_keyboard_listner, mock_img_sub, mock_state_sub + ): + data_collector = Gr00tDataCollector( + camera_topic_name="mock_camera_topic", + state_topic_name="mock_state_topic", + data_exporter=data_exporter, + frequency=frame_rate, + ) + + # mocking to avoid actual sleeping + data_collector.rate = MagicMock() + + data_collector.run() + + # now there should be 2 episodes in the dataset + verify_parquet_files_exist(dataset_dir, 2) + verify_video_files_exist(dataset_dir, data_exporter.meta.video_keys, 2) + verify_metadata_files(dataset_dir) + + +def test_control_loop_keyboard_interrupt_workflow(lerobot_features, modality_config): + """ + This test simulates a keyboard interruption in the middle of recording. + Expected behavior: + - The episode is saved to disk + - The episode is marked as discarded + """ + episode_length = 15 + frame_rate = 20 + img_stream_data = _get_image_stream_data( + episode_length, frame_rate, RS_VIEW_CAMERA_HEIGHT, RS_VIEW_CAMERA_WIDTH + ) + robot_model = instantiate_g1_robot_model() + state_act_stream_data = _get_state_act_stream_data( + episode_length, frame_rate, robot_model.num_joints, robot_model.num_joints + ) + + keyboard_sub_output = [None for _ in range(episode_length)] + keyboard_sub_output[0] = "c" # Start recording + keyboard_sub_output[5] = KeyboardInterrupt() # keyboard interruption in the middle of recording + + mock_img_sub = MockROSMsgSubscriber(img_stream_data) + mock_state_sub = MockROSMsgSubscriber(state_act_stream_data) + mock_keyboard_listener = MockKeyboardListenerSubscriber(keyboard_sub_output) + + with tempfile.TemporaryDirectory() as temp_dir: + dataset_dir = os.path.join(temp_dir, "dataset") + + data_exporter = Gr00tDataExporter.create( + save_root=dataset_dir, + fps=frame_rate, + features=lerobot_features, + modality_config=modality_config, + task="test", + ) + + ros_ok_side_effect = [True] * episode_length + [False] + with MockROSEnvironment( + ros_ok_side_effect, mock_keyboard_listener, mock_img_sub, mock_state_sub + ): + data_collector = Gr00tDataCollector( + camera_topic_name="mock_camera_topic", + state_topic_name="mock_state_topic", + data_exporter=data_exporter, + frequency=frame_rate, + ) + + data_collector.rate = MagicMock() + # try: + data_collector.run() + # except KeyboardInterrupt: + # pass + + verify_parquet_files_exist(dataset_dir, 1) + verify_video_files_exist(dataset_dir, data_exporter.meta.video_keys, 1) + verify_metadata_files(dataset_dir) + + # verify that the episode is marked as discarded + ep_info = json.load(open(os.path.join(dataset_dir, "meta", "info.json"))) + assert ep_info["discarded_episode_indices"][0] == 0 + assert ep_info["total_frames"] == 5 + assert ep_info["total_episodes"] == 1 + + +def test_discarded_episode_workflow(lerobot_features, modality_config): + """ + This test simulates a case where the user discards an episode in the middle of recording. + Expected behavior: + - Record 3 episodes, discard episode 0 and 2 + - There should be 3 episodes saved to disk + - Episode 0 and 2 should be flagged as discarded + """ + episode_length = 17 + frame_rate = 20 + robot_model = instantiate_g1_robot_model() + state_dim = robot_model.num_joints + action_dim = robot_model.num_joints + img_stream_data = _get_image_stream_data( + episode_length, frame_rate, RS_VIEW_CAMERA_HEIGHT, RS_VIEW_CAMERA_WIDTH + ) + state_act_stream_data = _get_state_act_stream_data( + episode_length, frame_rate, state_dim, action_dim + ) + + keyboard_sub_output = [None for _ in range(episode_length)] + keyboard_sub_output[0] = "c" # Start recording episode index 0 + keyboard_sub_output[5] = "x" # Discard episode index 0 + keyboard_sub_output[7] = "c" # Start recording episode index 1 + keyboard_sub_output[10] = "c" # stop recording and save episode index 1 + keyboard_sub_output[12] = "c" # start recording episode index 2 + keyboard_sub_output[15] = "x" # discard episode index 2 + + mock_img_sub = MockROSMsgSubscriber(img_stream_data) + mock_state_sub = MockROSMsgSubscriber(state_act_stream_data) + mock_keyboard_listener = MockKeyboardListenerSubscriber(keyboard_sub_output) + + with tempfile.TemporaryDirectory() as temp_dir: + dataset_dir = os.path.join(temp_dir, "dataset") + + data_exporter = Gr00tDataExporter.create( + save_root=dataset_dir, + fps=frame_rate, + features=lerobot_features, + modality_config=modality_config, + task="test", + ) + + ros_ok_side_effect = [True] * episode_length + [False] + with MockROSEnvironment( + ros_ok_side_effect, mock_keyboard_listener, mock_img_sub, mock_state_sub + ): + data_collector = Gr00tDataCollector( + camera_topic_name="mock_camera_topic", + state_topic_name="mock_state_topic", + data_exporter=data_exporter, + frequency=frame_rate, + ) + + data_collector.rate = MagicMock() + try: + data_collector.run() + except Exception: + pass + + # vrify if the episode is marked as discarded + ep_info = json.load(open(os.path.join(dataset_dir, "meta", "info.json"))) + assert len(ep_info["discarded_episode_indices"]) == 2 + assert ep_info["discarded_episode_indices"][0] == 0 + assert ep_info["discarded_episode_indices"][1] == 2 + + # verify that all episodes are saved regardless of being discarded + verify_parquet_files_exist(dataset_dir, 3) + verify_video_files_exist(dataset_dir, data_exporter.meta.video_keys, 3) + verify_metadata_files(dataset_dir) diff --git a/GR00T-WholeBodyControl/decoupled_wbc/tests/control/policy/__init__.py b/GR00T-WholeBodyControl/decoupled_wbc/tests/control/policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/decoupled_wbc/tests/control/policy/interpolation_policy/__init__.py b/GR00T-WholeBodyControl/decoupled_wbc/tests/control/policy/interpolation_policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/decoupled_wbc/tests/control/policy/interpolation_policy/test_interpolation_policy.py b/GR00T-WholeBodyControl/decoupled_wbc/tests/control/policy/interpolation_policy/test_interpolation_policy.py new file mode 100644 index 0000000000000000000000000000000000000000..bb5cbf08ac1f0a46589a96808c686f972c4ba12e --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/tests/control/policy/interpolation_policy/test_interpolation_policy.py @@ -0,0 +1,47 @@ +from pathlib import Path +import pickle + +import numpy as np +import pytest + +from decoupled_wbc.control.policy.interpolation_policy import ( + InterpolationPolicy, +) + + +def get_test_data_path(filename: str) -> str: + """Get the absolute path to a test data file.""" + test_dir = Path(__file__).parent + return str(test_dir / ".." / ".." / ".." / "replay_data" / filename) + + +@pytest.fixture +def logged_data(): + """Load the logged data from file.""" + data_path = get_test_data_path("interpolation_data.pkl") + with open(data_path, "rb") as f: + return pickle.load(f) + + +def test_replay_logged_data(logged_data): + """Test that the wrapper produces the same pose commands as logged data.""" + init_args = logged_data["init_args"] + interp = InterpolationPolicy( + init_time=init_args["curr_t"], + init_values={"target_pose": init_args["curr_pose"]}, + max_change_rate=np.inf, + ) + + # Test all data points including the first one + for c in logged_data["calls"]: + # Get the action from wrapper + if c["type"] == "get_action": + action = interp.get_action(**c["args"]) + expected_action = c["result"] + np.testing.assert_allclose( + action["target_pose"], expected_action["q"], rtol=1e-9, atol=1e-9 + ) + # print(action, expected_action) + + else: + interp.set_goal(**c["args"]) diff --git a/GR00T-WholeBodyControl/decoupled_wbc/tests/control/policy/interpolation_policy/test_interpolation_ramp_up.py b/GR00T-WholeBodyControl/decoupled_wbc/tests/control/policy/interpolation_policy/test_interpolation_ramp_up.py new file mode 100644 index 0000000000000000000000000000000000000000..2c35e7261cdaa07a9e218761a200ed380d0558b8 --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/tests/control/policy/interpolation_policy/test_interpolation_ramp_up.py @@ -0,0 +1,78 @@ +import numpy as np +import pytest + +from decoupled_wbc.control.policy.interpolation_policy import ( + InterpolationPolicy, +) + + +def test_trajectory_interpolation(): + """ + Test that the InterpolationPolicy correctly interpolates between waypoints. + + Initial pose is at all zeros. + At t=4sec, the index 27 position (right_shoulder_yaw_joint) should be -1.5. + We run at 100Hz to see all intermediate waypoints. + + Notes: + - The trajectory data is at 'trajectory_data.npy' in the current directory + - The visualization is at 'trajectory.png' in the current directory + """ + # Create a pose with 32 joints (all zeros initially) + num_joints = 32 + initial_pose = np.zeros(num_joints) + + # Initial time (use a fixed value for reproducibility) + initial_time = 0.0 + + # Create the wrapper with initial pose + interpolator = InterpolationPolicy( + init_time=initial_time, + init_values={"target_pose": initial_pose}, + max_change_rate=np.inf, + ) + + # Target pose: all zeros except index 27 which should be -1.5 + target_pose = np.zeros(num_joints) + target_pose[27] = -1.5 # right_shoulder_yaw_joint + target_time = 4.0 # 4 seconds from now + + # Set the planner command to schedule the waypoint + interpolator.set_goal( + { + "target_pose": target_pose, + "target_time": target_time, + "interpolation_garbage_collection_time": initial_time, + } + ) + + # Sample the trajectory at 100Hz + frequency = 100 + dt = 1.0 / frequency + sample_times = np.arange(initial_time, target_time + dt, dt) + + # Collect the interpolated poses + sampled_poses = [] + for t in sample_times: + action = interpolator.get_action(t) + sampled_poses.append(action["target_pose"]) + + # Convert to numpy array for easier analysis + sampled_poses = np.array(sampled_poses) + + # Check specific requirements + # Verify we actually moved from 0 to -1.5 + joint_27_positions = sampled_poses[:, 27] + assert joint_27_positions[0] == pytest.approx(0.0) + assert joint_27_positions[-1] == pytest.approx(-1.5) + + # Calculate the absolute changes between each step + changes = np.abs(np.diff(joint_27_positions)) + assert np.all(changes < 0.004), "Joint 27 position should change by less than 0.004" + + # Print some statistics about the trajectory + print(f"Total time steps: {len(sample_times)}") + print(f"Joint 27 trajectory start: {joint_27_positions[0]}") + print(f"Joint 27 trajectory end: {joint_27_positions[-1]}") + print(f"Joint 27 max velocity: {np.max(np.abs(np.diff(joint_27_positions) / dt))}") + print(f"Max velocity timestep: {np.argmax(np.abs(np.diff(joint_27_positions) / dt))}") diff --git a/GR00T-WholeBodyControl/decoupled_wbc/tests/control/policy/interpolation_policy/trajectory.png b/GR00T-WholeBodyControl/decoupled_wbc/tests/control/policy/interpolation_policy/trajectory.png new file mode 100644 index 0000000000000000000000000000000000000000..8304544bebbe71db7f5b481b28931f974021c252 Binary files /dev/null and b/GR00T-WholeBodyControl/decoupled_wbc/tests/control/policy/interpolation_policy/trajectory.png differ diff --git a/GR00T-WholeBodyControl/decoupled_wbc/tests/control/robot_model/__init__.py b/GR00T-WholeBodyControl/decoupled_wbc/tests/control/robot_model/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/decoupled_wbc/tests/control/robot_model/robot_model_test.py b/GR00T-WholeBodyControl/decoupled_wbc/tests/control/robot_model/robot_model_test.py new file mode 100644 index 0000000000000000000000000000000000000000..ac1aa8ae582255db1b1ef93c42a66f5f9aae46fe --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/tests/control/robot_model/robot_model_test.py @@ -0,0 +1,911 @@ +# test_robot_model.py + +import numpy as np +import pinocchio as pin +import pytest + +from decoupled_wbc.control.robot_model import ReducedRobotModel +from decoupled_wbc.control.robot_model.instantiation.g1 import instantiate_g1_robot_model + + +@pytest.fixture +def g1_robot_model(): + """ + Fixture that creates and returns a G1 RobotModel instance. + """ + return instantiate_g1_robot_model() + + +def test_robot_model_initialization(g1_robot_model): + """ + Test initialization of the RobotModel and its main attributes. + """ + for robot_model in [g1_robot_model]: + # Check that the Pinocchio wrapper exists + assert robot_model.pinocchio_wrapper is not None + + # Check number of degrees of freedom (nq) + assert robot_model.num_dofs > 0 + + # Check we have the expected number of joints beyond the floating base + assert len(robot_model.joint_names) > 0 + + # Check that supplemental info is present + assert robot_model.supplemental_info is not None + + +def test_robot_model_joint_names(g1_robot_model): + """ + Test that joint_names is populated correctly + and that dof_index works. + """ + for robot_model in [g1_robot_model]: + # Extract joint names + joint_names = robot_model.joint_names + + # Pick the first joint name and get its index + first_joint_name = joint_names[0] + idx = robot_model.dof_index(first_joint_name) + assert idx >= 0 + + # Test that an unknown joint name raises an error + with pytest.raises(ValueError, match="Unknown joint name"): + _ = robot_model.dof_index("non_existent_joint") + + +def test_robot_model_forward_kinematics_valid_q(g1_robot_model): + """ + Test that cache_forward_kinematics works with a valid q. + """ + for robot_model in [g1_robot_model]: + nq = robot_model.num_dofs + + # Construct a valid configuration (e.g., zero vector) + q_valid = np.zeros(nq) + + # Should not raise any exception + robot_model.cache_forward_kinematics(q_valid) + + +def test_robot_model_forward_kinematics_invalid_q(g1_robot_model): + """ + Test that cache_forward_kinematics raises an error with an invalid q. + """ + for robot_model in [g1_robot_model]: + nq = robot_model.num_dofs + + # Construct an invalid configuration (wrong size) + q_invalid = np.zeros(nq + 1) + + with pytest.raises(ValueError, match="Expected q of length"): + robot_model.cache_forward_kinematics(q_invalid) + + +def test_robot_model_frame_placement(g1_robot_model): + """ + Test the frame_placement method with a valid and invalid frame name. + Also test that frame placements change with different configurations. + """ + for robot_model in [g1_robot_model]: + # Skip if no supplemental info + if robot_model.supplemental_info is None: + pytest.skip("No supplemental info available for testing") + + # Use the hand frame from supplemental info + test_frame = robot_model.supplemental_info.hand_frame_names["left"] + + # Test with zero configuration + q_zero = np.zeros(robot_model.num_dofs) + robot_model.cache_forward_kinematics(q_zero) + placement_zero = robot_model.frame_placement(test_frame) + assert isinstance(placement_zero, pin.SE3) + + # Test with non-zero configuration + q_non_zero = np.zeros(robot_model.num_dofs) + root_nq = 7 if robot_model.is_floating_base_model else 0 + + # Set a more significant configuration change + # Use π/2 for all joints to create a more noticeable difference + q_non_zero[root_nq:] = np.pi / 2 # 90 degrees for all joints + + robot_model.cache_forward_kinematics(q_non_zero) + placement_non_zero = robot_model.frame_placement(test_frame) + + # Verify that frame placements are different with different configurations + assert not np.allclose( + placement_zero.translation, placement_non_zero.translation + ) or not np.allclose(placement_zero.rotation, placement_non_zero.rotation) + + # Should raise an error for an invalid frame + with pytest.raises(ValueError, match="Unknown frame"): + robot_model.frame_placement("non_existent_frame") + + +# Tests for ReducedRobotModel +def test_reduced_robot_model_initialization(g1_robot_model): + """ + Test initialization of the ReducedRobotModel. + """ + for robot_model in [g1_robot_model]: + # Create a reduced model by fixing some actual joints from the robot + fixed_joints = robot_model.joint_names[:2] # Use first two joints from the robot + reduced_robot = ReducedRobotModel(robot_model, fixed_joints) + + # Check that the full robot is stored + assert reduced_robot.full_robot is robot_model + + # Check that fixed joints are stored correctly + assert reduced_robot.fixed_joints == fixed_joints + assert len(reduced_robot.fixed_values) == len(fixed_joints) + + # Check that the number of dofs is reduced + assert reduced_robot.num_dofs == robot_model.num_dofs - len(fixed_joints) + + +def test_reduced_robot_model_joint_names(g1_robot_model): + """ + Test that joint_names in ReducedRobotModel excludes fixed joints. + """ + for robot_model in [g1_robot_model]: + # Use actual joints from the robot + fixed_joints = robot_model.joint_names[:2] # Use first two joints from the robot + reduced_robot = ReducedRobotModel(robot_model, fixed_joints) + + # Check that fixed joints are not in the reduced model's joint names + for joint in fixed_joints: + assert joint not in reduced_robot.joint_names + + # Check that other joints are still present + for joint in robot_model.joint_names: + if joint not in fixed_joints: + assert joint in reduced_robot.joint_names + + +def test_reduced_robot_model_configuration_conversion(g1_robot_model): + """ + Test conversion between reduced and full configurations. + """ + for robot_model in [g1_robot_model]: + # Use actual joints from the robot + fixed_joints = robot_model.joint_names[:2] # Use first two joints from the robot + fixed_values = [0.5, 1.0] + reduced_robot = ReducedRobotModel(robot_model, fixed_joints, fixed_values) + + # Create a reduced configuration + q_reduced = np.zeros(reduced_robot.num_dofs) + q_reduced[0] = 0.3 # Set some value for testing + + # Convert to full configuration + q_full = reduced_robot.reduced_to_full_configuration(q_reduced) + + # Check that fixed joints have the correct values + for joint_name, value in zip(fixed_joints, fixed_values): + full_idx = robot_model.dof_index(joint_name) + assert q_full[full_idx] == value + + # Convert back to reduced configuration + q_reduced_back = reduced_robot.full_to_reduced_configuration(q_full) + + # Check that the conversion is reversible + np.testing.assert_array_almost_equal(q_reduced, q_reduced_back) + + +def test_reduced_robot_model_forward_kinematics(g1_robot_model): + """ + Test forward kinematics with the reduced model. + """ + for robot_model in [g1_robot_model]: + # Use actual joints from the robot + fixed_joints = robot_model.joint_names[:2] # Use first two joints from the robot + reduced_robot = ReducedRobotModel(robot_model, fixed_joints) + + # Create a reduced configuration + q_reduced = np.zeros(reduced_robot.num_dofs) + + # Should not raise any exception + reduced_robot.cache_forward_kinematics(q_reduced) + + # Check that frame placement works + model = robot_model.pinocchio_wrapper.model + if len(model.frames) > 1: + valid_frame = model.frames[1].name + placement = reduced_robot.frame_placement(valid_frame) + assert isinstance(placement, pin.SE3) + + +def test_robot_model_clip_configuration(g1_robot_model): + """ + Test that clip_configuration properly clips values to joint limits. + """ + for robot_model in [g1_robot_model]: + # Create a configuration with some values outside limits + q = np.zeros(robot_model.num_dofs) + root_nq = 7 if robot_model.is_floating_base_model else 0 + # Create extreme values for all joints + q[root_nq:] = np.array([100.0, -100.0, 50.0, -50.0] * (robot_model.num_joints // 4 + 1))[ + : robot_model.num_joints + ] + + # Clip the configuration + q_clipped = robot_model.clip_configuration(q) + + # Check that values are within limits + assert np.all(q_clipped[root_nq:] <= robot_model.upper_joint_limits) + assert np.all(q_clipped[root_nq:] >= robot_model.lower_joint_limits) + + +def test_robot_model_get_actuated_joints(g1_robot_model): + """ + Test getting body and hand actuated joints from configuration. + """ + for robot_model in [g1_robot_model]: + # Skip if no supplemental info + if robot_model.supplemental_info is None: + pytest.skip("No supplemental info available for testing actuated joints") + + # Create a test configuration + q = np.zeros(robot_model.num_dofs) + root_nq = 7 if robot_model.is_floating_base_model else 0 + q[root_nq:] = np.arange(robot_model.num_joints) # Set some values for joints + + # Test body actuated joints + body_joints = robot_model.get_body_actuated_joints(q) + assert len(body_joints) == len(robot_model.get_body_actuated_joint_indices()) + + # Test hand actuated joints + hand_joints = robot_model.get_hand_actuated_joints(q) + assert len(hand_joints) == len(robot_model.get_hand_actuated_joint_indices()) + + # Test left hand joints + left_hand_joints = robot_model.get_hand_actuated_joints(q, side="left") + assert len(left_hand_joints) == len(robot_model.get_hand_actuated_joint_indices("left")) + + # Test right hand joints + right_hand_joints = robot_model.get_hand_actuated_joints(q, side="right") + assert len(right_hand_joints) == len(robot_model.get_hand_actuated_joint_indices("right")) + + +def test_robot_model_get_configuration_from_actuated_joints(g1_robot_model): + """ + Test creating full configuration from actuated joint values. + """ + for robot_model in [g1_robot_model]: + # Skip if no supplemental info + if robot_model.supplemental_info is None: + pytest.skip("No supplemental info available for testing actuated joints") + + # Create test values for body and hands + body_values = np.ones(len(robot_model.get_body_actuated_joint_indices())) + hand_values = np.ones(len(robot_model.get_hand_actuated_joint_indices())) + left_hand_values = np.ones(len(robot_model.get_hand_actuated_joint_indices("left"))) + right_hand_values = np.ones(len(robot_model.get_hand_actuated_joint_indices("right"))) + + # Test with combined hand values + q = robot_model.get_configuration_from_actuated_joints( + body_actuated_joint_values=body_values, hand_actuated_joint_values=hand_values + ) + assert q.shape == (robot_model.num_dofs,) + + # Test with separate hand values + q = robot_model.get_configuration_from_actuated_joints( + body_actuated_joint_values=body_values, + left_hand_actuated_joint_values=left_hand_values, + right_hand_actuated_joint_values=right_hand_values, + ) + assert q.shape == (robot_model.num_dofs,) + + +def test_robot_model_reset_forward_kinematics(g1_robot_model): + """ + Test resetting forward kinematics to default configuration. + """ + for robot_model in [g1_robot_model]: + # Skip if no supplemental info + if robot_model.supplemental_info is None: + pytest.skip("No supplemental info available for testing") + + # Create a more significant configuration change + q = np.zeros(robot_model.num_dofs) + root_nq = 7 if robot_model.is_floating_base_model else 0 + # Set some extreme joint angles + q[root_nq:] = np.pi / 2 # 90 degrees for all joints + robot_model.cache_forward_kinematics(q) + + # Use a hand frame from supplemental info + test_frame = robot_model.supplemental_info.hand_frame_names["left"] + + # Reset to default + robot_model.reset_forward_kinematics() + # Get frame placement after reset + placement_default = robot_model.frame_placement(test_frame) + + # Check that frame placement matches what we get with q_zero + robot_model.cache_forward_kinematics(robot_model.q_zero) + placement_q_zero = robot_model.frame_placement(test_frame) + np.testing.assert_array_almost_equal( + placement_default.translation, placement_q_zero.translation + ) + np.testing.assert_array_almost_equal(placement_default.rotation, placement_q_zero.rotation) + + +# Additional tests for ReducedRobotModel +def test_reduced_robot_model_clip_configuration(g1_robot_model): + """ + Test that clip_configuration works in reduced space. + """ + for robot_model in [g1_robot_model]: + fixed_joints = robot_model.joint_names[:2] + reduced_robot = ReducedRobotModel(robot_model, fixed_joints) + + # Create a configuration with some values outside limits + q_reduced = np.zeros(reduced_robot.num_dofs) + root_nq = 7 if reduced_robot.full_robot.is_floating_base_model else 0 + # Create extreme values for all joints + q_reduced[root_nq:] = np.array( + [100.0, -100.0, 50.0, -50.0] * (reduced_robot.num_joints // 4 + 1) + )[: reduced_robot.num_joints] + + # Clip the configuration + q_clipped = reduced_robot.clip_configuration(q_reduced) + + # Check that values are within limits + assert np.all(q_clipped[root_nq:] <= reduced_robot.upper_joint_limits) + assert np.all(q_clipped[root_nq:] >= reduced_robot.lower_joint_limits) + + +def test_reduced_robot_model_get_actuated_joints(g1_robot_model): + """ + Test getting body and hand actuated joints from reduced configuration. + """ + for robot_model in [g1_robot_model]: + # Skip if no supplemental info + if robot_model.supplemental_info is None: + pytest.skip("No supplemental info available for testing actuated joints") + + fixed_joints = robot_model.joint_names[:2] + reduced_robot = ReducedRobotModel(robot_model, fixed_joints) + + # Create a test configuration + q_reduced = np.zeros(reduced_robot.num_dofs) + root_nq = 7 if reduced_robot.full_robot.is_floating_base_model else 0 + q_reduced[root_nq:] = np.arange(reduced_robot.num_joints) + + # Test body actuated joints + body_joints = reduced_robot.get_body_actuated_joints(q_reduced) + assert len(body_joints) == len(reduced_robot.get_body_actuated_joint_indices()) + + # Test hand actuated joints + hand_joints = reduced_robot.get_hand_actuated_joints(q_reduced) + assert len(hand_joints) == len(reduced_robot.get_hand_actuated_joint_indices()) + + +def test_reduced_robot_model_get_configuration_from_actuated_joints(g1_robot_model): + """ + Test creating reduced configuration from actuated joint values. + """ + for robot_model in [g1_robot_model]: + # Skip if no supplemental info + if robot_model.supplemental_info is None: + pytest.skip("No supplemental info available for testing actuated joints") + + fixed_joints = robot_model.joint_names[:2] + reduced_robot = ReducedRobotModel(robot_model, fixed_joints) + + # Create test values for body and hands + body_values = np.ones(len(reduced_robot.get_body_actuated_joint_indices())) + hand_values = np.ones(len(reduced_robot.get_hand_actuated_joint_indices())) + left_hand_values = np.ones(len(reduced_robot.get_hand_actuated_joint_indices("left"))) + right_hand_values = np.ones(len(reduced_robot.get_hand_actuated_joint_indices("right"))) + + # Test with combined hand values + q_reduced = reduced_robot.get_configuration_from_actuated_joints( + body_actuated_joint_values=body_values, hand_actuated_joint_values=hand_values + ) + assert q_reduced.shape == (reduced_robot.num_dofs,) + + # Test with separate hand values + q_reduced = reduced_robot.get_configuration_from_actuated_joints( + body_actuated_joint_values=body_values, + left_hand_actuated_joint_values=left_hand_values, + right_hand_actuated_joint_values=right_hand_values, + ) + assert q_reduced.shape == (reduced_robot.num_dofs,) + + # Verify that the values were set correctly in the reduced configuration + # Check body actuated joints + body_indices = reduced_robot.get_body_actuated_joint_indices() + np.testing.assert_array_almost_equal(q_reduced[body_indices], body_values) + + # Check left hand actuated joints + left_hand_indices = reduced_robot.get_hand_actuated_joint_indices("left") + np.testing.assert_array_almost_equal(q_reduced[left_hand_indices], left_hand_values) + + # Check right hand actuated joints + right_hand_indices = reduced_robot.get_hand_actuated_joint_indices("right") + np.testing.assert_array_almost_equal(q_reduced[right_hand_indices], right_hand_values) + + +def test_reduced_robot_model_reset_forward_kinematics(g1_robot_model): + """ + Test resetting forward kinematics in reduced model. + """ + for robot_model in [g1_robot_model]: + # Skip if no supplemental info + if robot_model.supplemental_info is None: + pytest.skip("No supplemental info available for testing") + + fixed_joints = robot_model.joint_names[:2] + reduced_robot = ReducedRobotModel(robot_model, fixed_joints) + + # Create a more significant configuration change + q_reduced = np.zeros(reduced_robot.num_dofs) + root_nq = 7 if reduced_robot.full_robot.is_floating_base_model else 0 + # Set some extreme joint angles + q_reduced[root_nq:] = np.pi / 2 # 90 degrees for all joints + reduced_robot.cache_forward_kinematics(q_reduced) + + # Reset to default + reduced_robot.reset_forward_kinematics() + + # Check that frame placement matches what we get with q_zero + reduced_robot.cache_forward_kinematics(reduced_robot.q_zero) + placement_q_zero = reduced_robot.frame_placement( + reduced_robot.supplemental_info.hand_frame_names["left"] + ) + placement_reset = reduced_robot.frame_placement( + reduced_robot.supplemental_info.hand_frame_names["left"] + ) + np.testing.assert_array_almost_equal( + placement_reset.translation, placement_q_zero.translation + ) + np.testing.assert_array_almost_equal(placement_reset.rotation, placement_q_zero.rotation) + + +def test_reduced_robot_model_from_fixed_groups(g1_robot_model): + """ + Test creating reduced model from fixed joint groups. + """ + for robot_model in [g1_robot_model]: + # Skip if no supplemental info + if robot_model.supplemental_info is None: + pytest.skip("No supplemental info available for testing joint groups") + + # Get a group name from the supplemental info + group_name = next(iter(robot_model.supplemental_info.joint_groups.keys())) + group_info = robot_model.supplemental_info.joint_groups[group_name] + + # Get all joints that should be fixed (including those from subgroups) + expected_fixed_joints = set() + # Add direct joints + expected_fixed_joints.update(group_info["joints"]) + # Add joints from subgroups + for subgroup_name in group_info["groups"]: + subgroup_joints = robot_model.get_joint_group_indices(subgroup_name) + expected_fixed_joints.update([robot_model.joint_names[idx] for idx in subgroup_joints]) + + # Test from_fixed_groups + reduced_robot = ReducedRobotModel.from_fixed_groups(robot_model, [group_name]) + assert reduced_robot.full_robot is robot_model + + # Verify that fixed joints are not in reduced model's joint names + for joint in expected_fixed_joints: + assert joint not in reduced_robot.joint_names + + # Verify that fixed joints maintain their values in configuration + q_reduced = np.ones(reduced_robot.num_dofs) # Set some non-zero values + q_full = reduced_robot.reduced_to_full_configuration(q_reduced) + + # Get the fixed values from the reduced model + fixed_values = dict(zip(reduced_robot.fixed_joints, reduced_robot.fixed_values)) + + # Check that all expected fixed joints have their values preserved + for joint in expected_fixed_joints: + full_idx = robot_model.dof_index(joint) + assert q_full[full_idx] == fixed_values[joint] + + # Test from_fixed_group (convenience method) + reduced_robot = ReducedRobotModel.from_fixed_group(robot_model, group_name) + assert reduced_robot.full_robot is robot_model + + # Verify that fixed joints are not in reduced model's joint names + for joint in expected_fixed_joints: + assert joint not in reduced_robot.joint_names + + # Verify that fixed joints maintain their values in configuration + q_reduced = np.ones(reduced_robot.num_dofs) # Set some non-zero values + q_full = reduced_robot.reduced_to_full_configuration(q_reduced) + + # Get the fixed values from the reduced model + fixed_values = dict(zip(reduced_robot.fixed_joints, reduced_robot.fixed_values)) + + # Check that all expected fixed joints have their values preserved + for joint in expected_fixed_joints: + full_idx = robot_model.dof_index(joint) + assert q_full[full_idx] == fixed_values[joint] + + +def test_reduced_robot_model_from_active_groups(g1_robot_model): + """ + Test creating reduced model from active joint groups. + """ + for robot_model in [g1_robot_model]: + # Skip if no supplemental info + if robot_model.supplemental_info is None: + pytest.skip("No supplemental info available for testing joint groups") + + # Get a group name from the supplemental info + group_name = next(iter(robot_model.supplemental_info.joint_groups.keys())) + group_info = robot_model.supplemental_info.joint_groups[group_name] + + # Get all joints that should be active (including those from subgroups) + expected_active_joints = set() + # Add direct joints + expected_active_joints.update(group_info["joints"]) + # Add joints from subgroups + for subgroup_name in group_info["groups"]: + subgroup_joints = robot_model.get_joint_group_indices(subgroup_name) + expected_active_joints.update([robot_model.joint_names[idx] for idx in subgroup_joints]) + + # Get all joints from the model + all_joints = set(robot_model.joint_names) + # The fixed joints should be all joints minus the active joints + expected_fixed_joints = all_joints - expected_active_joints + + # Test from_active_groups + reduced_robot = ReducedRobotModel.from_active_groups(robot_model, [group_name]) + assert reduced_robot.full_robot is robot_model + + # Verify that active joints are in reduced model's joint names + for joint in expected_active_joints: + assert joint in reduced_robot.joint_names + + # Verify that fixed joints are not in reduced model's joint names + for joint in expected_fixed_joints: + assert joint not in reduced_robot.joint_names + + # Verify that fixed joints maintain their values in configuration + q_reduced = np.ones(reduced_robot.num_dofs) # Set some non-zero values + q_full = reduced_robot.reduced_to_full_configuration(q_reduced) + + # Get the fixed values from the reduced model + fixed_values = dict(zip(reduced_robot.fixed_joints, reduced_robot.fixed_values)) + + # Check that all expected fixed joints have their values preserved + for joint in expected_fixed_joints: + full_idx = robot_model.dof_index(joint) + assert q_full[full_idx] == fixed_values[joint] + + # Test from_active_group (convenience method) + reduced_robot = ReducedRobotModel.from_active_group(robot_model, group_name) + assert reduced_robot.full_robot is robot_model + + # Verify that active joints are in reduced model's joint names + for joint in expected_active_joints: + assert joint in reduced_robot.joint_names + + # Verify that fixed joints are not in reduced model's joint names + for joint in expected_fixed_joints: + assert joint not in reduced_robot.joint_names + + # Verify that fixed joints maintain their values in configuration + q_reduced = np.ones(reduced_robot.num_dofs) # Set some non-zero values + q_full = reduced_robot.reduced_to_full_configuration(q_reduced) + + # Get the fixed values from the reduced model + fixed_values = dict(zip(reduced_robot.fixed_joints, reduced_robot.fixed_values)) + + # Check that all expected fixed joints have their values preserved + for joint in expected_fixed_joints: + full_idx = robot_model.dof_index(joint) + assert q_full[full_idx] == fixed_values[joint] + + +def test_reduced_robot_model_frame_placement(g1_robot_model): + """ + Test the frame_placement method in reduced model with a valid and invalid frame name. + Also test that frame placements change with different configurations. + """ + for robot_model in [g1_robot_model]: + # Skip if no supplemental info + if robot_model.supplemental_info is None: + pytest.skip("No supplemental info available for testing") + + # Create a reduced model by fixing some joints + fixed_joints = robot_model.joint_names[:2] + reduced_robot = ReducedRobotModel(robot_model, fixed_joints) + + # Use the hand frame from supplemental info + test_frame = reduced_robot.supplemental_info.hand_frame_names["left"] + + # Test with zero configuration + q_reduced_zero = np.zeros(reduced_robot.num_dofs) + reduced_robot.cache_forward_kinematics(q_reduced_zero) + placement_zero = reduced_robot.frame_placement(test_frame) + assert isinstance(placement_zero, pin.SE3) + + # Test with non-zero configuration + q_reduced_non_zero = np.zeros(reduced_robot.num_dofs) + root_nq = 7 if reduced_robot.full_robot.is_floating_base_model else 0 + + # Set a valid non-zero value for each joint + for i in range(root_nq, reduced_robot.num_dofs): + # Use a value that's within the joint limits + q_reduced_non_zero[i] = 0.5 # 0.5 radians is within most joint limits + + reduced_robot.cache_forward_kinematics(q_reduced_non_zero) + placement_non_zero = reduced_robot.frame_placement(test_frame) + + # Verify that frame placements are different with different configurations + assert not np.allclose( + placement_zero.translation, placement_non_zero.translation + ) or not np.allclose(placement_zero.rotation, placement_non_zero.rotation) + + # Should raise an error for an invalid frame + with pytest.raises(ValueError, match="Unknown frame"): + reduced_robot.frame_placement("non_existent_frame") + + +def test_robot_model_gravity_compensation_basic(g1_robot_model): + """ + Test basic gravity compensation functionality. + """ + for robot_model in [g1_robot_model]: + # Skip if no supplemental info + if robot_model.supplemental_info is None: + pytest.skip("No supplemental info available for testing gravity compensation") + + # Create a valid configuration + q = np.zeros(robot_model.num_dofs) + if robot_model.is_floating_base_model: + # Set floating base to upright position + q[:7] = [0, 0, 1.0, 0, 0, 0, 1] # [x, y, z, qx, qy, qz, qw] + + # Test gravity compensation for all joints + gravity_torques = robot_model.compute_gravity_compensation_torques(q) + + # Check output shape + assert gravity_torques.shape == (robot_model.num_dofs,) + + # For a humanoid robot with arms, there should be some non-zero gravity torques + assert np.any(np.abs(gravity_torques) > 1e-6), "Expected some non-zero gravity torques" + + +def test_robot_model_gravity_compensation_joint_groups(g1_robot_model): + """ + Test gravity compensation with different joint group specifications. + """ + for robot_model in [g1_robot_model]: + # Skip if no supplemental info + if robot_model.supplemental_info is None: + pytest.skip("No supplemental info available for testing gravity compensation") + + # Create a valid configuration + q = np.zeros(robot_model.num_dofs) + if robot_model.is_floating_base_model: + q[:7] = [0, 0, 1.0, 0, 0, 0, 1] + + # Get available joint groups + available_groups = list(robot_model.supplemental_info.joint_groups.keys()) + if not available_groups: + pytest.skip("No joint groups available for testing") + + test_group = available_groups[0] # Use first available group + + # Test with string input + gravity_str = robot_model.compute_gravity_compensation_torques(q, test_group) + assert gravity_str.shape == (robot_model.num_dofs,) + + # Test with list input + gravity_list = robot_model.compute_gravity_compensation_torques(q, [test_group]) + np.testing.assert_array_equal(gravity_str, gravity_list) + + # Test with set input + gravity_set = robot_model.compute_gravity_compensation_torques(q, {test_group}) + np.testing.assert_array_equal(gravity_str, gravity_set) + + # Test that compensation is selective (some joints should be zero) + group_indices = robot_model.get_joint_group_indices(test_group) + if len(group_indices) < robot_model.num_dofs: + # Check that only specified joints have compensation + non_zero_mask = np.abs(gravity_str) > 1e-6 + compensated_indices = np.where(non_zero_mask)[0] + # The compensated indices should be a subset of the group indices + assert len(compensated_indices) <= len(group_indices) + + +def test_robot_model_gravity_compensation_multiple_groups(g1_robot_model): + """ + Test gravity compensation with multiple joint groups. + """ + for robot_model in [g1_robot_model]: + # Skip if no supplemental info + if robot_model.supplemental_info is None: + pytest.skip("No supplemental info available for testing gravity compensation") + + # Create a valid configuration + q = np.zeros(robot_model.num_dofs) + if robot_model.is_floating_base_model: + q[:7] = [0, 0, 1.0, 0, 0, 0, 1] + + # Get available joint groups + available_groups = list(robot_model.supplemental_info.joint_groups.keys()) + if len(available_groups) < 2: + pytest.skip("Need at least 2 joint groups for testing") + + # Test with multiple groups + test_groups = available_groups[:2] + gravity_multiple = robot_model.compute_gravity_compensation_torques(q, test_groups) + assert gravity_multiple.shape == (robot_model.num_dofs,) + + # Test individual groups + gravity_1 = robot_model.compute_gravity_compensation_torques(q, test_groups[0]) + gravity_2 = robot_model.compute_gravity_compensation_torques(q, test_groups[1]) + + # The multiple group result should have at least as many non-zero elements + # as either individual group (could be more due to overlaps) + nonzero_multiple = np.count_nonzero(np.abs(gravity_multiple) > 1e-6) + nonzero_1 = np.count_nonzero(np.abs(gravity_1) > 1e-6) + nonzero_2 = np.count_nonzero(np.abs(gravity_2) > 1e-6) + assert nonzero_multiple >= max(nonzero_1, nonzero_2) + + +def test_robot_model_gravity_compensation_configuration_dependency(g1_robot_model): + """ + Test that gravity compensation changes with robot configuration. + """ + for robot_model in [g1_robot_model]: + # Skip if no supplemental info + if robot_model.supplemental_info is None: + pytest.skip("No supplemental info available for testing gravity compensation") + + # Get available joint groups - prefer arms if available + available_groups = list(robot_model.supplemental_info.joint_groups.keys()) + test_group = None + for group in ["arms", "left_arm", "right_arm"]: + if group in available_groups: + test_group = group + break + if test_group is None and available_groups: + test_group = available_groups[0] + if test_group is None: + pytest.skip("No joint groups available for testing") + + # Test with different configurations + q1 = np.zeros(robot_model.num_dofs) + q2 = np.zeros(robot_model.num_dofs) + + if robot_model.is_floating_base_model: + # Both configurations upright but different joint positions + q1[:7] = [0, 0, 1.0, 0, 0, 0, 1] + q2[:7] = [0, 0, 1.0, 0, 0, 0, 1] + + # Change arm joint positions specifically (not random joints) + # This ensures we actually change joints that affect the gravity compensation + try: + arm_indices = robot_model.get_joint_group_indices(test_group) + if len(arm_indices) >= 2: + # Change first two arm joints significantly + q2[arm_indices[0]] = np.pi / 4 # 45 degrees + q2[arm_indices[1]] = np.pi / 6 # 30 degrees + elif len(arm_indices) >= 1: + # Change first arm joint if only one available + q2[arm_indices[0]] = np.pi / 3 # 60 degrees + except Exception: + # Fallback to changing some joints if arm indices not available + if robot_model.is_floating_base_model and robot_model.num_dofs > 9: + q2[7] = np.pi / 4 + q2[8] = np.pi / 6 + elif not robot_model.is_floating_base_model and robot_model.num_dofs > 2: + q2[0] = np.pi / 4 + q2[1] = np.pi / 6 + + # Compute gravity compensation for both configurations + gravity_1 = robot_model.compute_gravity_compensation_torques(q1, test_group) + gravity_2 = robot_model.compute_gravity_compensation_torques(q2, test_group) + + # They should be different (unless all compensated joints didn't change) + # Allow for small numerical differences + assert not np.allclose( + gravity_1, gravity_2, atol=1e-10 + ), "Gravity compensation should change with configuration" + + +def test_robot_model_gravity_compensation_error_handling(g1_robot_model): + """ + Test error handling in gravity compensation. + """ + for robot_model in [g1_robot_model]: + # Test with wrong configuration size + q_wrong = np.zeros(robot_model.num_dofs + 1) + with pytest.raises(ValueError, match="Expected q of length"): + robot_model.compute_gravity_compensation_torques(q_wrong) + + # Test with invalid joint group + q_valid = np.zeros(robot_model.num_dofs) + if robot_model.is_floating_base_model: + q_valid[:7] = [0, 0, 1.0, 0, 0, 0, 1] + + with pytest.raises(RuntimeError, match="Error computing gravity compensation"): + robot_model.compute_gravity_compensation_torques(q_valid, "non_existent_group") + + # Test with mixed valid/invalid groups + if robot_model.supplemental_info is not None: + available_groups = list(robot_model.supplemental_info.joint_groups.keys()) + if available_groups: + valid_group = available_groups[0] + with pytest.raises(RuntimeError, match="Error computing gravity compensation"): + robot_model.compute_gravity_compensation_torques( + q_valid, [valid_group, "non_existent_group"] + ) + + +def test_robot_model_gravity_compensation_auto_clip(g1_robot_model): + """ + Test auto-clipping functionality in gravity compensation. + """ + for robot_model in [g1_robot_model]: + # Skip if no supplemental info + if robot_model.supplemental_info is None: + pytest.skip("No supplemental info available for testing gravity compensation") + + # Create configuration with values outside joint limits + q = np.zeros(robot_model.num_dofs) + root_nq = 7 if robot_model.is_floating_base_model else 0 + + if robot_model.is_floating_base_model: + q[:7] = [0, 0, 1.0, 0, 0, 0, 1] # Valid floating base + + # Set extreme joint values (outside limits) + if robot_model.num_dofs > root_nq: + q[root_nq:] = 100.0 # Very large values + + # Should work with auto_clip=True (default) + try: + gravity_clipped = robot_model.compute_gravity_compensation_torques(q, auto_clip=True) + assert gravity_clipped.shape == (robot_model.num_dofs,) + except Exception as e: + pytest.skip(f"Auto-clip test skipped due to: {e}") + + # Test with auto_clip=False - might work or might not depending on limits + try: + gravity_no_clip = robot_model.compute_gravity_compensation_torques(q, auto_clip=False) + assert gravity_no_clip.shape == (robot_model.num_dofs,) + except Exception: + # This is expected if the configuration is invalid + pass + + +def test_robot_model_gravity_compensation_arms_specific(g1_robot_model): + """ + Test gravity compensation specifically for arm joints (if available). + """ + for robot_model in [g1_robot_model]: + # Skip if no supplemental info + if robot_model.supplemental_info is None: + pytest.skip("No supplemental info available for testing gravity compensation") + + available_groups = list(robot_model.supplemental_info.joint_groups.keys()) + + # Test arms specifically if available + if "arms" in available_groups: + q = np.zeros(robot_model.num_dofs) + if robot_model.is_floating_base_model: + q[:7] = [0, 0, 1.0, 0, 0, 0, 1] + + # Test arms gravity compensation + gravity_arms = robot_model.compute_gravity_compensation_torques(q, "arms") + assert gravity_arms.shape == (robot_model.num_dofs,) + + # Test left and right arms separately if available + if "left_arm" in available_groups and "right_arm" in available_groups: + gravity_left = robot_model.compute_gravity_compensation_torques(q, "left_arm") + gravity_right = robot_model.compute_gravity_compensation_torques(q, "right_arm") + + # Both arms should have non-zero compensation (for typical configurations) + if np.any(np.abs(gravity_arms) > 1e-6): + # If arms have compensation, at least one of left/right should too + assert np.any(np.abs(gravity_left) > 1e-6) or np.any( + np.abs(gravity_right) > 1e-6 + ) + else: + pytest.skip("No arm joint groups available for testing") diff --git a/GR00T-WholeBodyControl/decoupled_wbc/tests/control/teleop/__init__.py b/GR00T-WholeBodyControl/decoupled_wbc/tests/control/teleop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/decoupled_wbc/tests/control/teleop/test_teleop_retargeting_ik.py b/GR00T-WholeBodyControl/decoupled_wbc/tests/control/teleop/test_teleop_retargeting_ik.py new file mode 100644 index 0000000000000000000000000000000000000000..ef3a832ca0dcf7198d46b0cff366b8397d6b5501 --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/tests/control/teleop/test_teleop_retargeting_ik.py @@ -0,0 +1,196 @@ +import time + +import numpy as np +import pytest + +from decoupled_wbc.control.robot_model.instantiation.g1 import instantiate_g1_robot_model +from decoupled_wbc.control.robot_model.robot_model import RobotModel +from decoupled_wbc.control.teleop.solver.hand.instantiation.g1_hand_ik_instantiation import ( + instantiate_g1_hand_ik_solver, +) +from decoupled_wbc.control.teleop.teleop_retargeting_ik import TeleopRetargetingIK + + +@pytest.fixture(params=["lower_body", "lower_and_upper_body"]) +def retargeting_ik(request): + waist_location = request.param + robot_model = instantiate_g1_robot_model(waist_location=waist_location) + left_hand_ik_solver, right_hand_ik_solver = instantiate_g1_hand_ik_solver() + return TeleopRetargetingIK( + robot_model=robot_model, + left_hand_ik_solver=left_hand_ik_solver, + right_hand_ik_solver=right_hand_ik_solver, + enable_visualization=False, # Change to true to visualize movements + body_active_joint_groups=["upper_body"], + ) + + +def generate_target_wrist_poses(mode: str, side: str, full_robot: RobotModel) -> dict: + """ + Args: + mode: One of "rotation" or "translation" + side: One of "left" or "right" - specifies which side to animate + Returns: + Dictionary mapping link names to target poses for both wrists + """ + + assert mode in ["rotation", "translation", "both"] + assert side in ["left", "right", "both"] + + # Set up initial state + full_robot.cache_forward_kinematics(full_robot.q_zero) + + # Get both wrist link names + left_wrist_link = full_robot.supplemental_info.hand_frame_names["left"] + right_wrist_link = full_robot.supplemental_info.hand_frame_names["right"] + + # Initialize default poses for both sides + left_default_pose = full_robot.frame_placement(left_wrist_link).np + right_default_pose = full_robot.frame_placement(right_wrist_link).np + + left_initial_pose_matrix = full_robot.frame_placement(left_wrist_link).np + right_initial_pose_matrix = full_robot.frame_placement(right_wrist_link).np + + # Constants + translation_cycle_duration = 4.0 + rotation_cycle_duration = 4.0 + total_duration = 12.0 + translation_amplitude = 0.1 + rotation_amplitude = np.deg2rad(60) # 30 degrees + + body_data_list = [] + for t in np.linspace(0, total_duration, 100): + rotation_matrix = np.eye(3) + current_left_translation_vector = left_initial_pose_matrix[:3, 3].copy() + current_right_translation_vector = right_initial_pose_matrix[:3, 3].copy() + + if mode == "rotation" or mode == "both": + # For rotation-only mode, start rotating immediately + rotation_axis_index = int(t // rotation_cycle_duration) % 3 + time_within_cycle = t % rotation_cycle_duration + angle = rotation_amplitude * np.sin( + (2 * np.pi / rotation_cycle_duration) * time_within_cycle + ) + + if rotation_axis_index == 0: # Roll + rotation_matrix = np.array( + [ + [1, 0, 0], + [0, np.cos(angle), -np.sin(angle)], + [0, np.sin(angle), np.cos(angle)], + ] + ) + elif rotation_axis_index == 2: # Pitch + rotation_matrix = np.array( + [ + [np.cos(angle), 0, np.sin(angle)], + [0, 1, 0], + [-np.sin(angle), 0, np.cos(angle)], + ] + ) + else: # Yaw + rotation_matrix = np.array( + [ + [np.cos(angle), -np.sin(angle), 0], + [np.sin(angle), np.cos(angle), 0], + [0, 0, 1], + ] + ) + + if mode == "translation" or mode == "both": + translation_axis_index = int(t // translation_cycle_duration) % 3 + time_within_cycle = t % translation_cycle_duration + offset = translation_amplitude * np.sin( + (2 * np.pi / translation_cycle_duration) * time_within_cycle + ) + current_left_translation_vector[translation_axis_index] += offset + current_right_translation_vector[translation_axis_index] += offset + + # Construct the 4x4 pose matrix for the animated side + left_animated_pose = np.eye(4) + left_animated_pose[:3, :3] = rotation_matrix + left_animated_pose[:3, 3] = current_left_translation_vector + + right_animated_pose = np.eye(4) + right_animated_pose[:3, :3] = rotation_matrix + right_animated_pose[:3, 3] = current_right_translation_vector + + # Create body_data dictionary with both wrists + body_data = {} + if side == "left": + body_data[left_wrist_link] = left_animated_pose + body_data[right_wrist_link] = right_default_pose + elif side == "right": + body_data[left_wrist_link] = left_default_pose + body_data[right_wrist_link] = right_animated_pose + elif side == "both": + body_data[left_wrist_link] = left_animated_pose + body_data[right_wrist_link] = right_animated_pose + + body_data_list.append(body_data) + + return body_data_list + + +@pytest.mark.parametrize("mode", ["translation", "rotation"]) +@pytest.mark.parametrize("side", ["both", "left", "right"]) +def test_ik_matches_fk(retargeting_ik, mode, side): + full_robot = retargeting_ik.full_robot + + # Generate target wrist poses + body_data_list = generate_target_wrist_poses(mode, side, full_robot) + + max_pos_error = 0 + max_rot_error = 0 + + for body_data in body_data_list: + + time_start = time.time() + + # Run IK to get joint angles + q = retargeting_ik.compute_joint_positions( + body_data, + left_hand_data=None, # Hand IK not tested + right_hand_data=None, # Hand IK not tested + ) + + time_end = time.time() + ik_time = time_end - time_start + print(f"IK time: {ik_time} s") + # Test commented out because of inconsistency in CI/CD computation time + # assert ik_time < 0.05, f"IK time too high for 20Hz loop: {ik_time} s" + + # Run FK to compute where the wrists actually ended up + full_robot.cache_forward_kinematics(q, auto_clip=False) + left_wrist_link = full_robot.supplemental_info.hand_frame_names["left"] + right_wrist_link = full_robot.supplemental_info.hand_frame_names["right"] + T_fk_left = full_robot.frame_placement(left_wrist_link).np + T_fk_right = full_robot.frame_placement(right_wrist_link).np + T_target_left = body_data[left_wrist_link] + T_target_right = body_data[right_wrist_link] + + # Check that FK translation matches target translation + pos_fk_left = T_fk_left[:3, 3] + pos_target_left = T_target_left[:3, 3] + pos_fk_right = T_fk_right[:3, 3] + pos_target_right = T_target_right[:3, 3] + + max_pos_error = max(max_pos_error, np.linalg.norm(pos_fk_left - pos_target_left)) + max_pos_error = max(max_pos_error, np.linalg.norm(pos_fk_right - pos_target_right)) + + # Check that FK rotation matches target rotation + rot_fk_left = T_fk_left[:3, :3] + rot_target_left = T_target_left[:3, :3] + rot_diff_left = rot_fk_left @ rot_target_left.T + rot_error_left = np.arccos(np.clip((np.trace(rot_diff_left) - 1) / 2, -1, 1)) + rot_fk_right = T_fk_right[:3, :3] + rot_target_right = T_target_right[:3, :3] + rot_diff_right = rot_fk_right @ rot_target_right.T + rot_error_right = np.arccos(np.clip((np.trace(rot_diff_right) - 1) / 2, -1, 1)) + + max_rot_error = max(max_rot_error, rot_error_left) + max_rot_error = max(max_rot_error, rot_error_right) + + assert max_pos_error < 0.01 and max_rot_error < np.deg2rad( + 1 + ), f"Max position error: {max_pos_error}, Max rotation error: {np.rad2deg(max_rot_error)} deg" diff --git a/GR00T-WholeBodyControl/decoupled_wbc/tests/control/visualization/__init__.py b/GR00T-WholeBodyControl/decoupled_wbc/tests/control/visualization/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/decoupled_wbc/tests/control/visualization/test_meshcat_visualizer_env.py b/GR00T-WholeBodyControl/decoupled_wbc/tests/control/visualization/test_meshcat_visualizer_env.py new file mode 100644 index 0000000000000000000000000000000000000000..fcebc67189bf3629e03cd8d9b739bd572ebbbbdb --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/tests/control/visualization/test_meshcat_visualizer_env.py @@ -0,0 +1,88 @@ +import pathlib +import time + +import numpy as np +import pytest + +from decoupled_wbc.control.robot_model import RobotModel +from decoupled_wbc.control.robot_model.supplemental_info.g1.g1_supplemental_info import ( + G1SupplementalInfo, +) + + +@pytest.fixture +def env_fixture(): + """ + Pytest fixture that creates and yields the MeshcatVisualizerEnv. + After the test, it closes the environment to clean up. + """ + from decoupled_wbc.control.visualization.meshcat_visualizer_env import MeshcatVisualizerEnv + + root_dir = pathlib.Path(__file__).parent.parent.parent.parent + urdf_path = str( + root_dir / "decoupled_wbc/control/robot_model/model_data/g1/g1_29dof_with_hand.urdf" + ) + asset_path = str(root_dir / "decoupled_wbc/control/robot_model/model_data/g1") + robot_config = { + "asset_path": asset_path, + "urdf_path": urdf_path, + } + robot_model = RobotModel( + robot_config["urdf_path"], + robot_config["asset_path"], + supplemental_info=G1SupplementalInfo(), + ) + env = MeshcatVisualizerEnv(robot_model) + time.sleep(0.5) + yield env + env.close() + + +def test_meshcat_env_init(env_fixture): + """ + Test that the environment initializes without errors + and that reset() returns the proper data structure. + """ + env = env_fixture + initial_obs = env.reset() + assert isinstance(initial_obs, dict), "reset() should return a dictionary." + assert "q" in initial_obs, "The returned dictionary should contain key 'q'." + assert ( + len(initial_obs["q"]) == env.robot_model.num_dofs + ), "Length of 'q' should match the robot's DOF." + + +def test_meshcat_env_observation(env_fixture): + """ + Test that the observe() method returns a valid observation + conforming to the environment's observation space. + """ + env = env_fixture + observation = env.observe() + assert isinstance(observation, dict), "observe() should return a dictionary." + assert "q" in observation, "The returned dictionary should contain key 'q'." + assert ( + len(observation["q"]) == env.robot_model.num_dofs + ), "Length of 'q' should match the robot's DOF." + + +def test_meshcat_env_action(env_fixture): + """ + Test that we can queue an action and visualize it without error. + """ + env = env_fixture + # Build a dummy action within the action space + test_action = {"q": 0.2 * np.ones(env.robot_model.num_dofs)} + + # This should not raise an exception and should visualize the correct configuration + env.queue_action(test_action) + + +def test_meshcat_env_close(env_fixture): + """ + Test closing the environment. (Though the fixture calls env.close() + automatically, we can invoke it here to ensure it's safe to do so.) + """ + env = env_fixture + env.close() + # If close() triggers no exceptions, we're good. diff --git a/GR00T-WholeBodyControl/decoupled_wbc/tests/data/test_exporter.py b/GR00T-WholeBodyControl/decoupled_wbc/tests/data/test_exporter.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5739eacf2f13301ff7c4cd4ff4f400320dbbb1 --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/tests/data/test_exporter.py @@ -0,0 +1,522 @@ +import json +from pathlib import Path +import shutil +import tempfile +import time + +from lerobot.common.datasets.lerobot_dataset import LeRobotDataset +import numpy as np +import pytest + +from decoupled_wbc.data.exporter import DataCollectionInfo, Gr00tDataExporter + + +@pytest.fixture +def test_features(): + """Fixture providing test features dict.""" + return { + "observation.images.ego_view": { + "dtype": "video", + "shape": [64, 64, 3], # Small images for faster tests + "names": ["height", "width", "channel"], + }, + "observation.state": { + "dtype": "float32", + "shape": (8,), + "names": ["x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8"], + }, + "action": { + "dtype": "float32", + "shape": (8,), + "names": ["a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8"], + }, + } + + +@pytest.fixture +def test_modality_config(): + return { + "state": {"feature1": {"start": 0, "end": 4}, "feature2": {"start": 4, "end": 9}}, + "action": {"feature1": {"start": 0, "end": 4}, "feature2": {"start": 4, "end": 9}}, + "video": {"rs_view": {"original_key": "observation.images.ego_view"}}, + "annotation": {"human.task_description": {"original_key": "task_index"}}, + } + + +@pytest.fixture +def test_data_collection_info(): + return DataCollectionInfo( + teleoperator_username="test_user", + support_operator_username="test_user", + robot_type="test_robot", + lower_body_policy="test_policy", + wbc_model_path="test_path", + ) + + +def get_test_frame(step: int): + """Generate a test frame with data that varies by step.""" + # Create a simple, small image that will encode quickly + img = np.ones((64, 64, 3), dtype=np.uint8) * (step % 255) + # Add a pattern to make each frame unique and verifiable + img[step % 64, :, :] = 255 - (step % 255) + + return { + "observation.images.ego_view": img, + "observation.state": np.ones(8, dtype=np.float32) * step, + "action": np.ones(8, dtype=np.float32) * step, + } + + +@pytest.fixture +def temp_dir(): + """Create a temporary directory for test data that's cleaned up after tests.""" + temp_dir = tempfile.mkdtemp() + yield Path(temp_dir) / "dataset" + shutil.rmtree(temp_dir) + + +class TestInterruptAndResume: + """Test class for simulating interruption and resumption of recording.""" + + # Skip this test if ffmpeg is not installed + @pytest.mark.skipif( + shutil.which("ffmpeg") is None, reason="ffmpeg not installed, skipping test" + ) + def test_interrupted_mid_episode( + self, temp_dir, test_features, test_modality_config, test_data_collection_info + ): + """ + Test that simulates a recording session that gets interrupted and then resumes. + + This test uses the actual Gr00tDataExporter implementation with no mocks. + """ + # Constants for the test + NUM_EPISODES = 2 + FRAMES_PER_EPISODE = 5 + + # Pick a random episode and frame to interrupt at + interrupt_episode = 1 + interrupt_frame = 3 + + print(f"Will interrupt at episode {interrupt_episode}, frame {interrupt_frame}") + + # Track what we've added to verify later + completed_episodes = [] + frames_added_first_session = 0 + + # Initial recording session + try: + # Start recording with real Gr00tDataExporter + exporter1 = Gr00tDataExporter.create( + save_root=temp_dir, + fps=30, + features=test_features, + modality_config=test_modality_config, + task="test_task", + robot_type="test_robot", + vcodec="libx264", # Use a common codec that should be available + data_collection_info=test_data_collection_info, + ) + + # Record episodes until interruption + for episode in range(NUM_EPISODES): + for frame in range(FRAMES_PER_EPISODE): + # Simulate interruption + if episode == interrupt_episode and frame == interrupt_frame: + print(f"Simulating interruption at episode {episode}, frame {frame}") + raise KeyboardInterrupt("Simulated interruption") + + # Add frame + exporter1.add_frame(get_test_frame(frame)) + frames_added_first_session += 1 + + # Save episode + exporter1.save_episode() + completed_episodes.append(episode) + + except KeyboardInterrupt: + print(f"Recording interrupted at episode {interrupt_episode}, frame {interrupt_frame}") + print(f"Completed episodes: {completed_episodes}") + # Don't consolidate since we're interrupted + pass + + # Verify what was recorded before interruption + assert len(completed_episodes) == interrupt_episode + assert ( + frames_added_first_session == interrupt_episode * FRAMES_PER_EPISODE + interrupt_frame + ) + + # Let file system operations complete + time.sleep(0.5) + + # Resume recording - create a new exporter pointing to the same directory + exporter2 = Gr00tDataExporter.create( + save_root=temp_dir, + fps=30, + features=test_features, + modality_config=test_modality_config, + task="test_task", + robot_type="test_robot", + vcodec="libx264", + ) + + # The interrupted episode had frames added but wasn't saved + # In a real scenario with the current implementation, we need to restart that episode + + # Record all episodes from the beginning + frames_added_second_session = 0 + episodes_saved_second_session = 0 + + for episode in range(NUM_EPISODES): + for frame in range(FRAMES_PER_EPISODE): + exporter2.add_frame(get_test_frame(frame)) + frames_added_second_session += 1 + + # Save episode + exporter2.save_episode() + episodes_saved_second_session += 1 + + # Verify the result + assert frames_added_second_session == NUM_EPISODES * FRAMES_PER_EPISODE + assert episodes_saved_second_session == NUM_EPISODES + + # Verify actual files were created + for episode_idx in range(NUM_EPISODES): + video_path = exporter2.root / exporter2.meta.get_video_file_path( + episode_idx, "observation.images.ego_view" + ) + assert video_path.exists(), f"Video file not found: {video_path}" + + @pytest.mark.skipif( + shutil.which("ffmpeg") is None, reason="ffmpeg not installed, skipping test" + ) + def test_interrupted_after_episode_completion( + self, temp_dir, test_features, test_modality_config, test_data_collection_info + ): + """ + Test specifically for the case when interruption happens after an episode is completed. + Uses the real Gr00tDataExporter implementation. + """ + # First session - record 1 complete episode and then interrupt + exporter1 = Gr00tDataExporter.create( + save_root=temp_dir, + fps=30, + features=test_features, + modality_config=test_modality_config, + task="test_task", + data_collection_info=test_data_collection_info, + vcodec="libx264", + ) + + # Record 1 complete episode + for frame in range(5): + exporter1.add_frame(get_test_frame(frame)) + exporter1.save_episode() + + # Let file system operations complete + time.sleep(0.5) + + # Verify the first episode was saved + video_path = exporter1.root / exporter1.meta.get_video_file_path( + 0, "observation.images.ego_view" + ) + assert video_path.exists(), f"First episode video file not found: {video_path}" + + # Second session - resume and record another episode + exporter2 = Gr00tDataExporter.create( + save_root=temp_dir, + fps=30, + features=test_features, + modality_config=test_modality_config, + task="test_task", + vcodec="libx264", + ) + + # Record the second episode + for frame in range(5): + exporter2.add_frame(get_test_frame(frame)) + exporter2.save_episode() + + # Verify the second episode was saved + video_path = exporter2.root / exporter2.meta.get_video_file_path( + 1, "observation.images.ego_view" + ) + assert video_path.exists(), f"Second episode video file not found: {video_path}" + + @pytest.mark.skipif( + shutil.which("ffmpeg") is None, reason="ffmpeg not installed, skipping test" + ) + def test_interrupted_no_episode_completion( + self, temp_dir, test_features, test_modality_config, test_data_collection_info + ): + """ + Test specifically for the case when interruption happens in the middle of recording an episode. + Uses the real Gr00tDataExporter implementation. + """ + # First session - add some frames and interrupt before saving + exporter1 = Gr00tDataExporter.create( + save_root=temp_dir, + fps=30, + features=test_features, + modality_config=test_modality_config, + task="test_task", + data_collection_info=test_data_collection_info, + vcodec="libx264", + ) + + # Add 3 frames but don't save + for frame in range(3): + exporter1.add_frame(get_test_frame(frame)) + # Don't save episode or consolidate to simulate interruption + # The episode buffer is only in memory and will be lost on interruption + + # Let file system operations complete + time.sleep(0.5) + + # Verify no episode was saved + video_path = exporter1.root / exporter1.meta.get_video_file_path( + 0, "observation.images.ego_view" + ) + assert not video_path.exists(), f"Episode should not have been saved: {video_path}" + + # Second session - will raise an error because no meta file exist, so we can't resume + with pytest.raises(ValueError): + _ = Gr00tDataExporter.create( + save_root=temp_dir, + fps=30, + features=test_features, + modality_config=test_modality_config, + task="test_task", + vcodec="libx264", + ) + + +@pytest.mark.skipif(shutil.which("ffmpeg") is None, reason="ffmpeg not installed, skipping test") +def test_full_workflow(temp_dir, test_features, test_modality_config, test_data_collection_info): + """ + Test that simulates the complete workflow from the record_session.py example. + """ + NUM_EPISODES = 2 + FRAMES_PER_EPISODE = 3 + + # Create the exporter + exporter = Gr00tDataExporter.create( + save_root=temp_dir, + fps=20, + features=test_features, + modality_config=test_modality_config, + task="test_task", + data_collection_info=test_data_collection_info, + robot_type="dummy", + ) + + # Create a small dataset + for episode_index in range(NUM_EPISODES): + for frame_index in range(FRAMES_PER_EPISODE): + exporter.add_frame(get_test_frame(frame_index)) + exporter.save_episode() + + # check modality config + modality_config_path = exporter.root / "meta" / "modality.json" + assert modality_config_path.exists(), f"{modality_config_path} does not exists." + with open(modality_config_path, "rb") as f: + actual_modality_config = json.load(f) + + assert ( + actual_modality_config == test_modality_config + ), f"Modality configs don't match.\nActual: {actual_modality_config}\nExpected: {test_modality_config}" + + # Verify results + for episode_idx in range(NUM_EPISODES): + video_path = exporter.root / exporter.meta.get_video_file_path( + episode_idx, "observation.images.ego_view" + ) + assert video_path.exists(), f"Video file not found: {video_path}" + + # Check that the expected number of episodes exists + episode_count = 0 + for path in exporter.root.glob("**/*.mp4"): + episode_count += 1 + assert episode_count == NUM_EPISODES, f"Expected {NUM_EPISODES} episodes, found {episode_count}" + + # Check the values of the dataset + dataset = LeRobotDataset( + repo_id="dataset", + root=temp_dir, + ) + for episode_idx in range(NUM_EPISODES): + for frame_idx in range(FRAMES_PER_EPISODE): + expected_frame = get_test_frame(frame_idx) + actual_frame = dataset[episode_idx * FRAMES_PER_EPISODE + frame_idx] + print(actual_frame["observation.images.ego_view"]) + actual_image_frame = actual_frame["observation.images.ego_view"].permute(1, 2, 0) * 255 + assert np.allclose( + actual_image_frame.numpy(), expected_frame["observation.images.ego_view"], atol=10 + ) # Allow some tolerance for video compression + assert np.allclose( + actual_frame["observation.state"], expected_frame["observation.state"] + ) + assert np.allclose(actual_frame["action"], expected_frame["action"]) + + # validate data_collection_info + assert dataset.meta.info["data_collection_info"] == test_data_collection_info.to_dict() + + +@pytest.mark.skipif(shutil.which("ffmpeg") is None, reason="ffmpeg not installed, skipping test") +def test_overwrite_existing_dataset_false( + temp_dir, test_features, test_modality_config, test_data_collection_info +): + """ + Test that appends to the existing dataset when overwrite_existing is set to false. + """ + # first dataset + FIRST_NUM_EPISODES = 2 + FIRST_FRAMES_PER_EPISODE = 3 + + exporter = Gr00tDataExporter.create( + save_root=temp_dir, + fps=20, + features=test_features, + modality_config=test_modality_config, + task="test_task", + data_collection_info=test_data_collection_info, + robot_type="dummy", + ) + # !! `overwrite_existing` should always be set to false by default + # So we're deliberately not setting the overwrite_existing argument here. + # This test ensures that + # i. the default behavior is overwrite_existing=False + # ii. the dataset appends to the existing dataset (instead of overwriting) + + # Create a first dataset + for episode_index in range(FIRST_NUM_EPISODES): + for frame_index in range(FIRST_FRAMES_PER_EPISODE): + exporter.add_frame(get_test_frame(frame_index)) + exporter.save_episode() + + # second dataset + del exporter + SECOND_NUM_EPISODES = 3 + SECOND_FRAMES_PER_EPISODE = 2 + + exporter = Gr00tDataExporter.create( + save_root=temp_dir, + fps=20, + features=test_features, + modality_config=test_modality_config, + task="test_task", + robot_type="dummy", + ) + for episode_index in range(SECOND_NUM_EPISODES): + for frame_index in range(SECOND_FRAMES_PER_EPISODE): + exporter.add_frame(get_test_frame(frame_index)) + exporter.save_episode() + + # verify that there are + EXPECTED_NUM_EPISODES = FIRST_NUM_EPISODES + SECOND_NUM_EPISODES + assert len(list(exporter.root.glob("**/*.mp4"))) == EXPECTED_NUM_EPISODES + assert len(list(exporter.root.glob("**/*.parquet"))) == EXPECTED_NUM_EPISODES + + +def test_overwrite_existing_dataset_true( + temp_dir, test_features, test_modality_config, test_data_collection_info +): + """ + Test that overwrites to an existing dataset when overwrite_existing=True. + """ + # first dataset + FIRST_NUM_EPISODES = 2 + FIRST_FRAMES_PER_EPISODE = 3 + + exporter = Gr00tDataExporter.create( + save_root=temp_dir, + fps=20, + features=test_features, + modality_config=test_modality_config, + task="test_task", + data_collection_info=test_data_collection_info, + robot_type="dummy", + ) + + # Create a first dataset + for episode_index in range(FIRST_NUM_EPISODES): + for frame_index in range(FIRST_FRAMES_PER_EPISODE): + exporter.add_frame(get_test_frame(frame_index)) + exporter.save_episode() + + # verify that the dataset is written to the disk + assert len(list(exporter.root.glob("**/*.mp4"))) == FIRST_NUM_EPISODES + assert len(list(exporter.root.glob("**/*.parquet"))) == FIRST_NUM_EPISODES + + # second dataset + SECOND_NUM_EPISODES = 3 + SECOND_FRAMES_PER_EPISODE = 2 + + # re-initialize the exporter + del exporter + exporter = Gr00tDataExporter.create( + save_root=temp_dir, + fps=20, + features=test_features, + modality_config=test_modality_config, + task="test_task", + data_collection_info=test_data_collection_info, + robot_type="dummy", + overwrite_existing=True, + ) + for episode_index in range(SECOND_NUM_EPISODES): + for frame_index in range(SECOND_FRAMES_PER_EPISODE): + exporter.add_frame(get_test_frame(frame_index)) + exporter.save_episode() + + # verify that the dataset is overwritten + assert len(list(exporter.root.glob("**/*.mp4"))) == SECOND_NUM_EPISODES + assert len(list(exporter.root.glob("**/*.parquet"))) == SECOND_NUM_EPISODES + + +def test_save_episode_as_discarded_and_skip( + temp_dir, test_features, test_modality_config, test_data_collection_info +): + """ + Test that verifies the functionality of saving an episode as discarded and skipping an episode. + """ + FIRST_NUM_EPISODES = 10 + FIRST_FRAMES_PER_EPISODE = 3 + + exporter = Gr00tDataExporter.create( + save_root=temp_dir, + fps=20, + features=test_features, + modality_config=test_modality_config, + task="test_task", + data_collection_info=test_data_collection_info, + robot_type="dummy", + ) + + # Create a first dataset + saved_episodes = 0 + discarded_episode_indices = [] + for episode_index in range(FIRST_NUM_EPISODES): + for frame_index in range(FIRST_FRAMES_PER_EPISODE): + exporter.add_frame(get_test_frame(frame_index)) + if episode_index % 3 == 0: + exporter.save_episode_as_discarded() + discarded_episode_indices.append(saved_episodes) + saved_episodes += 1 + elif episode_index % 3 == 1: + exporter.skip_and_start_new_episode() + else: + exporter.save_episode() + saved_episodes += 1 + + # verify that the dataset is written to the disk + assert len(list(exporter.root.glob("**/*.mp4"))) == saved_episodes + assert len(list(exporter.root.glob("**/*.parquet"))) == saved_episodes + + dataset = LeRobotDataset( + repo_id="dataset", + root=temp_dir, + ) + + assert dataset.meta.info["discarded_episode_indices"] == discarded_episode_indices diff --git a/GR00T-WholeBodyControl/decoupled_wbc/tests/sim/test_sim_data_collection.py b/GR00T-WholeBodyControl/decoupled_wbc/tests/sim/test_sim_data_collection.py new file mode 100644 index 0000000000000000000000000000000000000000..a9d801dffae5135152be4024251998451611c3ae --- /dev/null +++ b/GR00T-WholeBodyControl/decoupled_wbc/tests/sim/test_sim_data_collection.py @@ -0,0 +1,64 @@ +from decoupled_wbc.control.main.teleop.configs.configs import SyncSimDataCollectionConfig +from decoupled_wbc.control.main.teleop.run_sync_sim_data_collection import ( + main as data_collection_main, +) + + +def test_sim_data_collection_unit(robot_name="G1", task_name="GroundOnly"): + """ + Fast CI unit test for simulation data collection (50 steps, no tracking checks). + + This test validates that: + 1. Data collection completes successfully + 2. Upper body joints are moving (velocity check) + + Note: This test runs for only 50 steps and does not perform end effector tracking validation + for faster CI execution. + """ + config = SyncSimDataCollectionConfig() + config.robot = robot_name + config.task_name = task_name + config.enable_visualization = False + config.enable_real_device = False + config.enable_onscreen = False + config.save_img_obs = True + config.ci_test = True + config.ci_test_mode = "unit" + config.replay_data_path = "decoupled_wbc/tests/replay_data/all_joints_raw_data_replay.pkl" + config.remove_existing_dir = True + config.enable_gravity_compensation = True + res = data_collection_main(config) + assert res, "Data collection did not pass for all datasets" + + +def test_sim_data_collection_pre_merge(robot_name="G1", task_name="GroundOnly"): + """ + Pre-merge test for simulation data collection with end effector tracking validation (500 steps). + + This test validates that: + 1. Data collection completes successfully + 2. Upper body joints are moving (velocity check) + 3. End effector tracking error is within thresholds: + - G1 robots: + Max position error < 7cm (0.07m), Max rotation error < 17°, + Average position error < 5cm (0.05m), Average rotation error < 12° + """ + config = SyncSimDataCollectionConfig() + config.robot = robot_name + config.task_name = task_name + config.enable_visualization = False + config.enable_real_device = False + config.enable_onscreen = False + config.save_img_obs = True + config.ci_test = True + config.ci_test_mode = "pre_merge" + config.replay_data_path = "decoupled_wbc/tests/replay_data/all_joints_raw_data_replay.pkl" + config.remove_existing_dir = True + config.enable_gravity_compensation = True + res = data_collection_main(config) + assert res, "Data collection did not pass for all datasets" + + +if __name__ == "__main__": + # Run unit tests for fast CI + test_sim_data_collection_unit("G1", "GroundOnly") diff --git a/GR00T-WholeBodyControl/external_dependencies/XRoboToolkit-PC-Service-Pybind_X86_and_ARM64/CLAUDE.md b/GR00T-WholeBodyControl/external_dependencies/XRoboToolkit-PC-Service-Pybind_X86_and_ARM64/CLAUDE.md new file mode 100644 index 0000000000000000000000000000000000000000..6cedca535b76a4397ad65a7a96411cb4063ad047 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/XRoboToolkit-PC-Service-Pybind_X86_and_ARM64/CLAUDE.md @@ -0,0 +1,108 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Project Overview + +This project provides Python bindings for the XRoboToolkit PC Service SDK, enabling Python applications to extract XR state data including controller poses, hand tracking, and body motion capture from XR devices (primarily PICO headsets). + +## Architecture + +The project consists of: + +- **Core C++ Bindings** (`bindings/py_bindings.cpp`): Pybind11-based C++ module that wraps the PXREARobotSDK +- **SDK Integration**: Uses the XRoboToolkit-PC-Service SDK (cloned from external repository) +- **Build System**: CMake-based build with Python setuptools integration +- **Multi-platform Support**: Linux (x86_64/aarch64) and Windows + +Key components: +- `PXREARobotSDK.h`: Main SDK header providing device connectivity and data parsing +- `py_bindings.cpp`: Thread-safe C++ wrapper with mutex-protected global state variables +- JSON parsing using nlohmann/json for device state data +- Callback-based data updates from the SDK + +## Build Commands + +### Ubuntu/Linux Setup and Build +```bash +# Full setup (downloads dependencies and builds) +bash setup_ubuntu.sh + +# Manual build after setup +python setup.py install + +# Clean build artifacts +python setup.py clean +``` + +### Windows Setup and Build +```batch +# Full setup (downloads dependencies and builds) +setup_windows.bat + +# Manual build after setup +python setup.py install +``` + +### Development Commands +```bash +# Uninstall existing package +pip uninstall -y xrobotoolkit_sdk + +# Install pybind11 dependency +conda install -c conda-forge pybind11 +# or +pip install pybind11 + +# Build and install +python setup.py install +``` + +## Data Flow and Threading + +The SDK uses a callback-based architecture: +- `OnPXREAClientCallback`: Main callback function that receives JSON data from connected devices +- Global state variables (poses, button states, etc.) are updated in real-time +- Thread-safe access via mutex locks for each data category +- Data parsing from comma-separated pose strings to arrays + +## Key Functions and Data Types + +### Controller Data +- Poses: `std::array` (x,y,z,qx,qy,qz,qw) +- Buttons: Menu, Primary, Secondary, Axis Click +- Analog: Trigger, Grip, Axis (x,y) + +### Hand Tracking +- 26 joints per hand with 7 values each (position + quaternion) +- Hand scale factor + +### Body Tracking +- 24 body joints with pose, velocity, acceleration data +- IMU timestamps for each joint +- Availability flag for body tracking system + +## Dependencies + +### Required +- pybind11 (Python binding framework) +- CMake (build system) +- XRoboToolkit-PC-Service SDK (automatically downloaded during setup) + +### Platform-specific Libraries +- Linux: `libPXREARobotSDK.so` +- Windows: `PXREARobotSDK.dll` and `PXREARobotSDK.lib` + +## Testing + +No formal test suite is included. Test functionality using the example scripts in `examples/`: +- `example.py`: Basic controller and headset pose testing +- `example_body_tracking.py`: Body tracking functionality +- `run_binding_continuous.py`: Continuous data capture + +## Important Notes + +- The SDK requires active XR device connection (PICO headset) +- Body tracking requires at least two Pico Swift devices +- All data access is thread-safe but real-time dependent on device connectivity +- The project builds a Python extension module that must be installed to site-packages \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/XRoboToolkit-PC-Service-Pybind_X86_and_ARM64/CMakeLists.txt b/GR00T-WholeBodyControl/external_dependencies/XRoboToolkit-PC-Service-Pybind_X86_and_ARM64/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..654b7b6015322b9964810c5ea5541a6dad3bf335 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/XRoboToolkit-PC-Service-Pybind_X86_and_ARM64/CMakeLists.txt @@ -0,0 +1,54 @@ +cmake_minimum_required(VERSION 3.14) + +project(MyPybind11Project LANGUAGES CXX) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +cmake_host_system_information(RESULT ISA_NAME QUERY OS_PLATFORM) # Added: Important for UNIX specific logic +message(STATUS "OS_PLATFORM (ISA_NAME): ${ISA_NAME}") + +include(GNUInstallDirs) # Add this line +find_package(pybind11 REQUIRED) + +# Python Bindings for py_bindings.cpp +pybind11_add_module(xrobotoolkit_sdk MODULE bindings/py_bindings.cpp) + +# Link xrobotoolkit_sdk module against pybind11 +target_link_libraries(xrobotoolkit_sdk PRIVATE pybind11::module) + +# Add include directories and link libraries for PXREARobotSDK to xrobotoolkit_sdk target +if(WIN32) + target_include_directories(xrobotoolkit_sdk PUBLIC + ${PROJECT_SOURCE_DIR}/include + ) + target_link_directories(xrobotoolkit_sdk PUBLIC ${PROJECT_SOURCE_DIR}/lib) + target_link_libraries(xrobotoolkit_sdk PUBLIC + PXREARobotSDK.dll # Assuming this is how PXREARobotSDK is linked, mirroring ConsoleDemo + ) +endif() + +if(UNIX) + # ISA_NAME is set by cmake_host_system_information above + if(ISA_NAME STREQUAL "aarch64") + target_include_directories(xrobotoolkit_sdk PUBLIC + ${PROJECT_SOURCE_DIR}/include/aarch64 + ) + target_link_directories(xrobotoolkit_sdk PUBLIC ${PROJECT_SOURCE_DIR}/lib/aarch64) + else() + target_include_directories(xrobotoolkit_sdk PUBLIC + ${PROJECT_SOURCE_DIR}/include + ) + target_link_directories(xrobotoolkit_sdk PUBLIC ${PROJECT_SOURCE_DIR}/lib) + endif() + target_link_libraries(xrobotoolkit_sdk PUBLIC + PXREARobotSDK + ) +endif() + +# Install the Python module +install(TARGETS xrobotoolkit_sdk + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} # Installs to /lib + # You might want a Python-specific path like: + # DESTINATION lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages +) diff --git a/GR00T-WholeBodyControl/external_dependencies/XRoboToolkit-PC-Service-Pybind_X86_and_ARM64/LICENSE b/GR00T-WholeBodyControl/external_dependencies/XRoboToolkit-PC-Service-Pybind_X86_and_ARM64/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..c0973fd2fae63464a24d96e09da74aa7fb61720b --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/XRoboToolkit-PC-Service-Pybind_X86_and_ARM64/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 XR Robotics + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/GR00T-WholeBodyControl/external_dependencies/XRoboToolkit-PC-Service-Pybind_X86_and_ARM64/README.md b/GR00T-WholeBodyControl/external_dependencies/XRoboToolkit-PC-Service-Pybind_X86_and_ARM64/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9d7a937dd07961c8595ee9196d8dcbcfcbd19e46 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/XRoboToolkit-PC-Service-Pybind_X86_and_ARM64/README.md @@ -0,0 +1,169 @@ +# XRoboToolkit-PC-Service-Pybind + +This project provides a python interface to extract XR state using XRoboToolkit-PC-Service sdk. + +## Requirements + +- [`pybind11`](https://github.com/pybind/pybind11) +- [`XRoboRoolkit PC Service`](https://github.com/XR-Robotics/XRoboToolkit-PC-Service#) + +## Building the Project +### Ubuntu 22.04 + +``` +conda remove --name xr --all +conda create -n xr python=3.10 +conda activate xr + +mkdir -p tmp +cd tmp +git clone https://github.com/XR-Robotics/XRoboToolkit-PC-Service.git +cd XRoboToolkit-PC-Service/RoboticsService/PXREARobotSDK +bash build.sh +cd ../../../.. + +mkdir -p lib +mkdir -p include +cp tmp/XRoboToolkit-PC-Service/RoboticsService/PXREARobotSDK/PXREARobotSDK.h include/ +cp -r tmp/XRoboToolkit-PC-Service/RoboticsService/PXREARobotSDK/nlohmann include/nlohmann/ +cp tmp/XRoboToolkit-PC-Service/RoboticsService/PXREARobotSDK/build/libPXREARobotSDK.so lib/ +# rm -rf tmp + +# Build the project +conda install -c conda-forge pybind11 + +pip uninstall -y xrobotoolkit_sdk +python setup.py install +``` +### Linux Ubuntu 22.04 arm64 version (Nvidia orin supported) +``` +bash setup_orin.sh +``` +### Windows + +**Ensure pybind11 is installed before running the following command.** + +``` +setup_windows.bat +``` + +## Using the Python Bindings + +**1. Get Controller and Headset Poses** + +```python +import xrobotoolkit_sdk as xrt + +xrt.init() + +left_pose = xrt.get_left_controller_pose() +right_pose = xrt.get_right_controller_pose() +headset_pose = xrt.get_headset_pose() + +print(f"Left Controller Pose: {left_pose}") +print(f"Right Controller Pose: {right_pose}") +print(f"Headset Pose: {headset_pose}") + +xrt.close() +``` + +**2. Get Controller Inputs (Triggers, Grips, Buttons, Axes)** + +```python +import xrobotoolkit_sdk as xrt + +xrt.init() + +# Triggers and Grips +left_trigger = xrt.get_left_trigger() +right_grip = xrt.get_right_grip() +print(f"Left Trigger: {left_trigger}, Right Grip: {right_grip}") + +# Buttons +a_button_pressed = xrt.get_A_button() +x_button_pressed = xrt.get_X_button() +print(f"A Button Pressed: {a_button_pressed}, X Button Pressed: {x_button_pressed}") + +# Axes +left_axis = xrt.get_left_axis() +right_axis_click = xrt.get_right_axis_click() +print(f"Left Axis: {left_axis}, Right Axis Clicked: {right_axis_click}") + +# Timestamp +timestamp = xrt.get_time_stamp_ns() +print(f"Current Timestamp (ns): {timestamp}") + +xrt.close() +``` + +**3. Get hand tracking state** +```python +import xrobotoolkit_sdk as xrt + +xrt.init() + +# Left Hand State +left_hand_tracking_state = xrt.get_left_hand_tracking_state() +print(f"Left Hand State: {left_hand_tracking_state}") + +# Left Hand isActive +left_hand_is_active = xrt.get_left_hand_is_active() +print(f"Left Hand isActive: {left_hand_is_active}") + +# Right Hand State +right_hand_tracking_state = xrt.get_right_hand_tracking_state() +print(f"Right Hand State: {right_hand_tracking_state}") + +# Right Hand isActive +right_hand_is_active = xrt.get_right_hand_is_active() +print(f"Right Hand isActive: {right_hand_is_active}") + +xrt.close() +``` + +**4. Get whole body motion tracking (please refer to this example when check Full Body tracking mode in UNITY app)** +```python +import xrobotoolkit_sdk as xrt + +xrt.init() + +# Check if body tracking data is available +if xrt.is_body_data_available(): + # Get body joint poses (24 joints, 7 values each: x,y,z,qx,qy,qz,qw) + body_poses = xrt.get_body_joints_pose() + print(f"Body joints pose data: {body_poses}") + + # Get body joint velocities (24 joints, 6 values each: vx,vy,vz,wx,wy,wz) + body_velocities = xrt.get_body_joints_velocity() + print(f"Body joints velocity data: {body_velocities}") + + # Get body joint accelerations (24 joints, 6 values each: ax,ay,az,wax,way,waz) + body_accelerations = xrt.get_body_joints_acceleration() + print(f"Body joints acceleration data: {body_accelerations}") + + # Get IMU timestamps for each joint + imu_timestamps = xrt.get_body_joints_timestamp() + print(f"IMU timestamps: {imu_timestamps}") + + # Get body data timestamp + body_timestamp = xrt.get_body_timestamp_ns() + print(f"Body data timestamp: {body_timestamp}") + + # Example: Get specific joint data (Head joint is index 15) + head_pose = body_poses[15] # Head joint + x, y, z, qx, qy, qz, qw = head_pose + print(f"Head pose: Position({x:.3f}, {y:.3f}, {z:.3f}) Rotation({qx:.3f}, {qy:.3f}, {qz:.3f}, {qw:.3f})") +else: + print("Body tracking data not available. Make sure:") + print("1. PICO headset is connected") + print("2. Body tracking is enabled in the control panel") + print("3. At least two Pico Swift devices are connected and calibrated") + +xrt.close() +``` + +**Body Joint Indices (similar to SMPL, 24 joints total):** +- 0: Pelvis, 1: Left Hip, 2: Right Hip, 3: Spine1, 4: Left Knee, 5: Right Knee +- 6: Spine2, 7: Left Ankle, 8: Right Ankle, 9: Spine3, 10: Left Foot, 11: Right Foot +- 12: Neck, 13: Left Collar, 14: Right Collar, 15: Head, 16: Left Shoulder, 17: Right Shoulder +- 18: Left Elbow, 19: Right Elbow, 20: Left Wrist, 21: Right Wrist, 22: Left Hand, 23: Right Hand diff --git a/GR00T-WholeBodyControl/external_dependencies/XRoboToolkit-PC-Service-Pybind_X86_and_ARM64/setup.py b/GR00T-WholeBodyControl/external_dependencies/XRoboToolkit-PC-Service-Pybind_X86_and_ARM64/setup.py new file mode 100644 index 0000000000000000000000000000000000000000..0cd2b10c8a3389e868af4f154a947bfa54f50dee --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/XRoboToolkit-PC-Service-Pybind_X86_and_ARM64/setup.py @@ -0,0 +1,148 @@ +import os +import platform +import re +import shutil # Added for shutil.rmtree +import subprocess +import sys +from distutils.version import LooseVersion + +from setuptools import Command, Extension, find_packages, setup # Added Command +from setuptools.command.build_ext import build_ext + + +class CMakeExtension(Extension): + def __init__(self, name, sourcedir=""): + Extension.__init__(self, name, sources=[]) + self.sourcedir = os.path.abspath(sourcedir) + + +class CMakeBuild(build_ext): + def run(self): + try: + out = subprocess.check_output(["cmake", "--version"]) + except OSError: + raise RuntimeError( + "CMake must be installed to build the following extensions: " + + ", ".join(e.name for e in self.extensions) + ) + + if platform.system() == "Windows": + cmake_version = LooseVersion(re.search(r"version\s*([\d.]+)", out.decode()).group(1)) + if cmake_version < "3.1.0": + raise RuntimeError("CMake >= 3.1.0 is required on Windows") + + for ext in self.extensions: + self.build_extension(ext) + + def build_extension(self, ext): + extdir = os.path.abspath(os.path.dirname(self.get_ext_fullpath(ext.name))) + # required for auto-detection of auxiliary "native" libs + if not extdir.endswith(os.path.sep): + extdir += os.path.sep + + # Get pybind11 include paths + cmake_args = [ + "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=" + extdir, + "-DPYTHON_EXECUTABLE=" + sys.executable, + "-DCMAKE_BUILD_TYPE=Release", + ] + + cfg = "Debug" if self.debug else "Release" + build_args = ["--config", cfg] + + if platform.system() == "Windows": + cmake_args += ["-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{}={}".format(cfg.upper(), extdir)] + if sys.maxsize > 2**32: + cmake_args += ["-A", "x64"] + build_args += ["--", "/m"] + else: + cmake_args += ["-DCMAKE_BUILD_TYPE=" + cfg] + build_args += ["--", "-j2"] # Adjust core count as needed + + env = os.environ.copy() + env["CXXFLAGS"] = '{} -DVERSION_INFO=\\"{}\\"'.format( + env.get("CXXFLAGS", ""), self.distribution.get_version() + ) + if not os.path.exists(self.build_temp): + os.makedirs(self.build_temp) + + subprocess.check_call(["cmake", ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env) + subprocess.check_call(["cmake", "--build", "."] + build_args, cwd=self.build_temp) + + +# New Clean Command +class CleanCommand(Command): + """Custom clean command to tidy up the project root.""" + + user_options = [] + + def initialize_options(self): + pass + + def finalize_options(self): + pass + + def run(self): + # Remove build directory + if os.path.exists("build"): + print("Removing 'build/' directory") + shutil.rmtree("build") + # Remove .egg-info directory + for item in os.listdir("."): + if item.endswith(".egg-info"): + print(f"Removing '{item}' directory") + shutil.rmtree(item) + for item in os.listdir("."): + if item.endswith(".eggs"): + print(f"Removing '{item}' directory") + shutil.rmtree(item) + # Optionally, remove dist directory if you generate distributions + if os.path.exists("dist"): + print("Removing 'dist/' directory") + shutil.rmtree("dist") + + +# New Uninstall Command +class UninstallCommand(Command): + """Custom command to uninstall the package.""" + + user_options = [] + + def initialize_options(self): + pass + + def finalize_options(self): + pass + + def run(self): + package_name = self.distribution.get_name() + print(f"Attempting to uninstall {package_name}...") + try: + subprocess.check_call([sys.executable, "-m", "pip", "uninstall", "-y", package_name]) + print(f"{package_name} uninstalled successfully.") + except subprocess.CalledProcessError as e: + print( + f"Failed to uninstall {package_name}. It may not be installed or pip uninstall failed." + ) + print(f"Error: {e}") + except FileNotFoundError: + print("pip command not found. Please ensure pip is installed and in your PATH.") + + +setup( + name="xrobotoolkit_sdk", + version="1.0.2", + author="Zhigen Zhao", + author_email="zhigen.zhao@bytedance.com", + description="A Python binding for XRobotoolkit PC Service SDK using pybind11 and CMake", + long_description="", # Optionally, load from a README.md file + ext_modules=[CMakeExtension("xrobotoolkit_sdk")], + cmdclass=dict( + build_ext=CMakeBuild, + clean=CleanCommand, # Add clean command + uninstall=UninstallCommand, # Add uninstall command + ), + zip_safe=False, + python_requires=">=3.10", # Specify your Python version requirement + packages=find_packages(), # If you have other Python packages in your project +) diff --git a/GR00T-WholeBodyControl/external_dependencies/XRoboToolkit-PC-Service-Pybind_X86_and_ARM64/setup_orin.sh b/GR00T-WholeBodyControl/external_dependencies/XRoboToolkit-PC-Service-Pybind_X86_and_ARM64/setup_orin.sh new file mode 100644 index 0000000000000000000000000000000000000000..5d7476fae6d2f907f84eb3ab6557c727bfeca191 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/XRoboToolkit-PC-Service-Pybind_X86_and_ARM64/setup_orin.sh @@ -0,0 +1,27 @@ +if [[ "$CONDA_DEFAULT_ENV" != "" ]]; then + conda install -c conda-forge libstdcxx-ng -y +fi + +mkdir -p tmp +cd tmp +git clone -b orin https://github.com/XR-Robotics/XRoboToolkit-PC-Service.git +cd XRoboToolkit-PC-Service/RoboticsService/PXREARobotSDK +bash build.sh +cd ../../../.. + +mkdir -p lib/aarch64 +mkdir -p include/aarch64 +cp tmp/XRoboToolkit-PC-Service/RoboticsService/PXREARobotSDK/PXREARobotSDK.h include/aarch64/ +cp -r tmp/XRoboToolkit-PC-Service/RoboticsService/PXREARobotSDK/nlohmann include/aarch64/nlohmann/ +cp tmp/XRoboToolkit-PC-Service/RoboticsService/PXREARobotSDK/build/libPXREARobotSDK.so lib/aarch64/ +# rm -rf tmp + +# Build the project +if [[ "$CONDA_DEFAULT_ENV" != "" ]]; then + conda install -c conda-forge pybind11 -y +else + pip install pybind11 -y +fi + +pip uninstall -y xrobotoolkit_sdk +python setup.py install \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/XRoboToolkit-PC-Service-Pybind_X86_and_ARM64/setup_ubuntu.sh b/GR00T-WholeBodyControl/external_dependencies/XRoboToolkit-PC-Service-Pybind_X86_and_ARM64/setup_ubuntu.sh new file mode 100644 index 0000000000000000000000000000000000000000..327cc93a9eba97a80b014abadf84f841e2a99741 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/XRoboToolkit-PC-Service-Pybind_X86_and_ARM64/setup_ubuntu.sh @@ -0,0 +1,27 @@ +if [[ "$CONDA_DEFAULT_ENV" != "" ]]; then + conda install -c conda-forge libstdcxx-ng -y +fi + +mkdir -p tmp +cd tmp +git clone https://github.com/XR-Robotics/XRoboToolkit-PC-Service.git +cd XRoboToolkit-PC-Service/RoboticsService/PXREARobotSDK +bash build.sh +cd ../../../.. + +mkdir -p lib +mkdir -p include +cp tmp/XRoboToolkit-PC-Service/RoboticsService/PXREARobotSDK/PXREARobotSDK.h include/ +cp -r tmp/XRoboToolkit-PC-Service/RoboticsService/PXREARobotSDK/nlohmann include/nlohmann/ +cp tmp/XRoboToolkit-PC-Service/RoboticsService/PXREARobotSDK/build/libPXREARobotSDK.so lib/ +# rm -rf tmp + +# Build the project +if [[ "$CONDA_DEFAULT_ENV" != "" ]]; then + conda install -c conda-forge pybind11 -y +else + pip install pybind11 -y +fi + +pip uninstall -y xrobotoolkit_sdk +python setup.py install \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/XRoboToolkit-PC-Service-Pybind_X86_and_ARM64/setup_windows.bat b/GR00T-WholeBodyControl/external_dependencies/XRoboToolkit-PC-Service-Pybind_X86_and_ARM64/setup_windows.bat new file mode 100644 index 0000000000000000000000000000000000000000..26de58923955889bc31d592df3c2a6e70f887a5c --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/XRoboToolkit-PC-Service-Pybind_X86_and_ARM64/setup_windows.bat @@ -0,0 +1,242 @@ +@echo off +setlocal + +echo Setting up environment for XRoboToolkit-PC-Service... + +:: Define the base directory for the script execution +set "SCRIPT_ROOT=%CD%" + +:: Define a temporary directory for cloning +set "TEMP_DIR=tmp" + +:: Define source paths relative to the cloned repository root +set "XROBOTKIT_CLONED_REPO_PATH=%TEMP_DIR%\XRoboToolkit-PC-Service" +set "PXREAROBOTSDK_SOURCE_DIR=%XROBOTKIT_CLONED_REPO_PATH%\RoboticsService\PXREARobotSDK" +set "PXREAROBOTSDK_LIB_DIR=%XROBOTKIT_CLONED_REPO_PATH%\RoboticsService\SDK\win\64" + +:: Define destination directories +set "LIB_DEST_DIR=%SCRIPT_ROOT%\lib" +set "INCLUDE_DEST_DIR=%SCRIPT_ROOT%\include" + +:: Create destination directories +echo Creating destination directories... +mkdir "%LIB_DEST_DIR%" 2>NUL +if not exist "%LIB_DEST_DIR%" ( + echo Error: Failed to create lib directory. Exiting. + exit /b 1 +) + +mkdir "%INCLUDE_DEST_DIR%" 2>NUL +if not exist "%INCLUDE_DEST_DIR%" ( + echo Error: Failed to create include directory. Exiting. + exit /b 1 +) + +echo Destination directories created successfully. + +:: --- Check for pybind11 and install if not found --- +echo. +echo Checking for pybind11... +pip show pybind11 >NUL 2>&1 +if %errorlevel% neq 0 ( + echo Error: pybind11 not found. Please run `pip install pybind11` first. Exiting. + exit /b 1 +) + +:: --- Set PYBIND11_DIR for CMake --- +echo. +echo Setting PYBIND11_DIR environment variable... +for /f "usebackq" %%i in (`python -c "import sys; print(sys.prefix)"`) do set PYTHON_PREFIX=%%i +if not defined PYTHON_PREFIX ( + echo Error: Could not determine Python installation prefix. + echo Please ensure Python is correctly installed and in your PATH. Exiting. + exit /b 1 +) + +set "PYBIND11_DIR=%PYTHON_PREFIX%\Lib\site-packages\pybind11\share\cmake\pybind11" +echo Attempting to set PYBIND11_DIR to: %PYBIND11_DIR% +set PYBIND11_DIR=%PYBIND11_DIR% +if not exist "%PYBIND11_DIR%\pybind11Config.cmake" ( + echo Warning: pybind11Config.cmake not found at expected PYBIND11_DIR: "%PYBIND11_DIR%" + echo This might indicate a problem with the pybind11 installation or its path. + :: Attempting to find another common path if the standard one doesn't work. + for /d %%d in ("%PYTHON_PREFIX%\Lib\site-packages\pybind11\share\cmake\*") do ( + if exist "%%d\pybind11Config.cmake" ( + set "PYBIND11_DIR=%%d" + echo Found pybind11Config.cmake in "%%d". Using this path. + goto :pybind11_dir_found + ) + ) + echo Critical Error: pybind11Config.cmake could not be found after pybind11 installation. + echo Please check your pybind11 installation. Exiting. + exit /b 1 +) +:pybind11_dir_found +echo PYBIND11_DIR set to: %PYBIND11_DIR% + +set "DLL_NAME=PXREARobotSDK.dll" +set "LIB_NAME=PXREARobotSDK.lib" + +:: Create the temporary directory and navigate into it +echo Creating temporary directory: %TEMP_DIR% +mkdir %TEMP_DIR% +if not exist %TEMP_DIR% ( + echo Error: Failed to create temporary directory %TEMP_DIR%. Ingore. +) +cd %TEMP_DIR% +if %errorlevel% neq 0 ( + echo Error: Failed to navigate into %TEMP_DIR%. Exiting. + exit /b 1 +) + +:: Clone the repository +echo Cloning XRoboToolkit-PC-Service repository... +git clone https://github.com/XR-Robotics/XRoboToolkit-PC-Service.git +if %errorlevel% neq 0 ( + echo Error: Git clone failed. Exiting. + cd .. + rmdir /s /q %TEMP_DIR% + exit /b 1 +) + +:: Navigate back to the script's root directory to handle destinations +cd %SCRIPT_ROOT% +if %errorlevel% neq 0 ( + echo Error: Failed to navigate back to script root. Exiting. + exit /b 1 +) + +:: --- Copy Header Files --- +echo. +echo Copying header files to %INCLUDE_DEST_DIR%... + +:: Copy PXREARobotSDK.h +set "PXREAROBOTSDK_H_SRC=%PXREAROBOTSDK_SOURCE_DIR%\PXREARobotSDK.h" +echo Copying %PXREAROBOTSDK_H_SRC% +copy "%PXREAROBOTSDK_H_SRC%" "%INCLUDE_DEST_DIR%\" +if %errorlevel% neq 0 ( + echo Error: Failed to copy PXREARobotSDK.h. Exiting. + goto :cleanup_and_exit +) + +:: Create nlohmann subdirectory in include +set "NLOHMANN_INCLUDE_DEST_DIR=%INCLUDE_DEST_DIR%\nlohmann" +echo Ensuring '%NLOHMANN_INCLUDE_DEST_DIR%' directory exists... +mkdir %NLOHMANN_INCLUDE_DEST_DIR% 2>NUL +if %errorlevel% neq 0 ( + echo Error: Failed to create nlohmann include directory. Ignore. +) + +:: Copy nlohmann/json.hpp +set "NLOHMANN_JSON_HPP_SRC=%PXREAROBOTSDK_SOURCE_DIR%\nlohmann\json.hpp" +echo Copying %NLOHMANN_JSON_HPP_SRC% +copy "%NLOHMANN_JSON_HPP_SRC%" "%NLOHMANN_INCLUDE_DEST_DIR%\" +if %errorlevel% neq 0 ( + echo Error: Failed to copy nlohmann/json.hpp. Exiting. + goto :cleanup_and_exit +) + +:: Copy nlohmann/json_fwd.hpp +set "NLOHMANN_JSON_FWD_HPP_SRC=%PXREAROBOTSDK_SOURCE_DIR%\nlohmann\json_fwd.hpp" +echo Copying %NLOHMANN_JSON_FWD_HPP_SRC% +copy "%NLOHMANN_JSON_FWD_HPP_SRC%" "%NLOHMANN_INCLUDE_DEST_DIR%\" +if %errorlevel% neq 0 ( + echo Error: Failed to copy nlohmann/json_fwd.hpp. Exiting. + goto :cleanup_and_exit +) + +echo Header files copied successfully. + +:: --- Copy Pre-built PXREARobotSDK DLL and LIB --- +echo. +echo Checking for pre-built libraries in %PXREAROBOTSDK_LIB_DIR% +set "DLL_SOURCE_PATH=%PXREAROBOTSDK_LIB_DIR%\%DLL_NAME%" +set "LIB_SOURCE_PATH=%PXREAROBOTSDK_LIB_DIR%\%LIB_NAME%" + +if not exist "%DLL_SOURCE_PATH%" ( + echo Error: Required DLL "%DLL_SOURCE_PATH%" not found. + echo Please ensure the cloned repository contains the pre-built files. + goto :cleanup_and_exit +) +if not exist "%LIB_SOURCE_PATH%" ( + echo Error: Required LIB "%LIB_SOURCE_PATH%" not found. + echo Please ensure the cloned repository contains the pre-built files. + goto :cleanup_and_exit +) + +echo Copying %DLL_NAME% to %LIB_DEST_DIR%/ +copy "%DLL_SOURCE_PATH%" "%LIB_DEST_DIR%\" +if %errorlevel% neq 0 ( + echo Error: Failed to copy %DLL_NAME%. Exiting. + goto :cleanup_and_exit +) + +echo Copying %LIB_NAME% to %LIB_DEST_DIR%/ +copy "%LIB_SOURCE_PATH%" "%LIB_DEST_DIR%\" +if %errorlevel% neq 0 ( + echo Error: Failed to copy %LIB_NAME%. Exiting. + goto :cleanup_and_exit +) + +echo Libraries copied successfully. + +:: Build and install the Python project +echo. +echo Building and installing the Python project... +python setup.py install +if %errorlevel% neq 0 ( + echo Error: Python setup.py install failed. Exiting. + goto :cleanup_and_exit +) + +:: Copy DLL to the installed package location +echo. +echo Copying DLL to the installed package location... +for /f "usebackq" %%i in (`python -c "import site; print(site.getsitepackages()[0])"`) do set SITE_PACKAGES=%%i +if not defined SITE_PACKAGES ( + echo Warning: Could not determine site-packages directory. + echo DLL not copied to package location. You may need to do this manually. + goto :cleanup_and_exit +) + +:: Find the egg directory +set "FOUND_EGG=" +for /d %%d in ("%SITE_PACKAGES%\Lib\site-packages\xrobotoolkit_sdk-*") do ( + set "FOUND_EGG=%%d" + goto :egg_found +) +:egg_found + +if not defined FOUND_EGG ( + echo Warning: Could not find xrobotoolkit_sdk egg directory in %SITE_PACKAGES% + echo Looking in easy-install.pth... + if exist "%SITE_PACKAGES%\easy-install.pth" ( + for /f "usebackq tokens=*" %%i in (`findstr /i "xrobotoolkit_sdk" "%SITE_PACKAGES%\easy-install.pth"`) do set "FOUND_EGG=%%i" + ) +) + +if not defined FOUND_EGG ( + echo Warning: Could not find xrobotoolkit_sdk egg directory. + echo DLL not copied to package location. You may need to do this manually. +) else ( + echo Found egg directory: %FOUND_EGG% + echo Copying %DLL_NAME% to %FOUND_EGG% + copy "%LIB_DEST_DIR%\%DLL_NAME%" "%FOUND_EGG%\" + if %errorlevel% neq 0 ( + echo Warning: Failed to copy DLL to egg directory. + ) else ( + echo DLL successfully copied to package location. + ) +) + +echo Setup completed successfully! + +:cleanup_and_exit +:: Remove the temporary directory +echo Cleaning up temporary directory: %TEMP_DIR% +rmdir /s /q "%SCRIPT_ROOT%\%TEMP_DIR%" +if %errorlevel% neq 0 ( + echo Warning: Failed to remove temporary directory "%SCRIPT_ROOT%\%TEMP_DIR%". Please remove it manually. +) + +endlocal \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/.gitignore b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..001de9a86d5d99f6bb78bfdec65740fe1523210d --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/.gitignore @@ -0,0 +1,39 @@ +# Generated by MacOS +.DS_Store + +# Generated by Windows +Thumbs.db + +# Applications +*.app +*.exe +*.war + +# Large media files +*.mp4 +*.tiff +*.avi +*.flv +*.mov +*.wmv +*.jpg +*.png + +# VS Code +.vscode + +# other +*.egg-info +__pycache__ + +# IDEs +.idea + +# cache +.pytest_cache + +# JetBrains IDE +.idea/ + +# python +dist/ \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/LICENSE b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..42d2e648c8881ea075a3bc386c91669290b2e386 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2016-2024 HangZhou YuShu TECHNOLOGY CO.,LTD. ("Unitree Robotics") +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/README zh.md b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/README zh.md new file mode 100644 index 0000000000000000000000000000000000000000..a7e6a8c2472c9afca1f65a7a7035b286f6f77d50 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/README zh.md @@ -0,0 +1,121 @@ +# unitree_sdk2_python +unitree_sdk2 python 接口 + +# 安装 +## 依赖 +- python>=3.8 +- cyclonedds==0.10.2 +- numpy +- opencv-python + +## 安装 unitree_sdk2_python +在终端中执行: +```bash +cd ~ +sudo apt install python3-pip +git clone https://github.com/unitreerobotics/unitree_sdk2_python.git +cd unitree_sdk2_python +pip3 install -e . +``` +## FAQ +##### 1. `pip3 install -e .` 遇到报错 +```bash +Could not locate cyclonedds. Try to set CYCLONEDDS_HOME or CMAKE_PREFIX_PATH +``` +该错误提示找不到 cyclonedds 路径。首先编译安装cyclonedds: +```bash +cd ~ +git clone https://github.com/eclipse-cyclonedds/cyclonedds -b releases/0.10.x +cd cyclonedds && mkdir build install && cd build +cmake .. -DCMAKE_INSTALL_PREFIX=../install +cmake --build . --target install +``` +进入 unitree_sdk2_python 目录,设置 `CYCLONEDDS_HOME` 为刚刚编译好的 cyclonedds 所在路径,再安装 unitree_sdk2_python +```bash +cd ~/unitree_sdk2_python +export CYCLONEDDS_HOME="~/cyclonedds/install" +pip3 install -e . +``` + +详细见: +https://pypi.org/project/cyclonedds/#installing-with-pre-built-binaries + +# 使用 +python sdk2 接口与 unitree_skd2的接口保持一致,通过请求响应或订阅发布topic实现机器人的状态获取和控制。相应的例程位于`/example`目录下。在运行例程前,需要根据文档 https://support.unitree.com/home/zh/developer/Quick_start 配置好机器人的网络连接。 +## DDS通讯 +在终端中执行: +```bash +python3 ./example/helloworld/publisher.py +``` +打开新的终端,执行: +```bash +python3 ./example/helloworld/subscriber.py +``` +可以看到终端输出的数据信息。`publisher.py` 和 `subscriber.py` 传输的数据定义在 `user_data.py` 中,用户可以根据需要自行定义需要传输的数据结构。 + +## 高层状态和控制 +高层接口的数据结构和控制方式与unitree_sdk2一致。具体可见:https://support.unitree.com/home/zh/developer/sports_services +### 高层状态 +终端中执行: +```bash +python3 ./example/high_level/read_highstate.py enp2s0 +``` +其中 `enp2s0` 为机器人所连接的网卡名称,请根据实际情况修改。 +### 高层控制 +终端中执行: +```bash +python3 ./example/high_level/sportmode_test.py enp2s0 +``` +其中 `enp2s0` 为机器人所连接的网卡名称,请根据实际情况修改。 +该例程提供了几种测试方法,可根据测试需要选择: +```python +test.StandUpDown() # 站立趴下 +# test.VelocityMove() # 速度控制 +# test.BalanceAttitude() # 姿态控制 +# test.TrajectoryFollow() # 轨迹跟踪 +# test.SpecialMotions() # 特殊动作 + +``` +## 底层状态和控制 +底层接口的数据结构和控制方式与unitree_sdk2一致。具体可见:https://support.unitree.com/home/zh/developer/Basic_services +### 底层状态 +终端中执行: +```bash +python3 ./example/low_level/lowlevel_control.py enp2s0 +``` +其中 `enp2s0` 为机器人所连接的网卡名称,请根据实际情况修改。程序会输出右前腿hip关节的状态、IMU和电池电压信息。 + +### 底层电机控制 +首先使用 app 关闭高层运动服务(sport_mode),否则会导致指令冲突。 +终端中执行: +```bash +python3 ./example/low_level/lowlevel_control.py enp2s0 +``` +其中 `enp2s0` 为机器人所连接的网卡名称,请根据实际情况修改。左后腿 hip 关节会保持在0角度 (安全起见,这里设置 kp=10, kd=1),左后腿 calf 关节将持续输出 1Nm 的转矩。 + +## 遥控器状态获取 +终端中执行: +```bash +python3 ./example/wireless_controller/wireless_controller.py enp2s0 +``` +其中 `enp2s0` 为机器人所连接的网卡名称,请根据实际情况修改。 +终端将输出每一个按键的状态。对于遥控器按键的定义和数据结构可见: https://support.unitree.com/home/zh/developer/Get_remote_control_status + +## 前置摄像头 +使用opencv获取前置摄像头(确保在有图形界面的系统下运行, 按 ESC 退出程序): +```bash +python3 ./example/front_camera/camera_opencv.py enp2s0 +``` +其中 `enp2s0` 为机器人所连接的网卡名称,请根据实际情况修改。 + +## 避障开关 +```bash +python3 ./example/obstacles_avoid_switch/obstacles_avoid_switch.py enp2s0 +``` +其中 `enp2s0` 为机器人所连接的网卡名称,请根据实际情况修改。机器人将循环开启和关闭避障功能。关于避障服务,详细见 https://support.unitree.com/home/zh/developer/ObstaclesAvoidClient + +## 灯光音量控制 +```bash +python3 ./example/vui_client/vui_client_example.py enp2s0 +``` +其中 `enp2s0` 为机器人所连接的网卡名称,请根据实际情况修改。机器人将循环调节音量和灯光亮度。该接口详细见 https://support.unitree.com/home/zh/developer/VuiClient diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/README.md b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/README.md new file mode 100644 index 0000000000000000000000000000000000000000..fb799c2d5ec8a4b8d3e9a1e99fd9a3785903805a --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/README.md @@ -0,0 +1,118 @@ +# unitree_sdk2_python +Python interface for unitree sdk2 + +# Installation +## Dependencies +- Python >= 3.8 +- cyclonedds == 0.10.2 +- numpy +- opencv-python +## Install unitree_sdk2_python + +```bash +pip install unitree_sdk2py +``` + +### Installing from source +Execute the following commands in the terminal: +```bash +cd ~ +sudo apt install python3-pip +git clone https://github.com/unitreerobotics/unitree_sdk2_python.git +cd unitree_sdk2_python +pip3 install -e . +``` +## FAQ +##### 1. Error when `pip3 install -e .`: +```bash +Could not locate cyclonedds. Try to set CYCLONEDDS_HOME or CMAKE_PREFIX_PATH +``` +This error mentions that the cyclonedds path could not be found. First compile and install cyclonedds: + +```bash +cd ~ +git clone https://github.com/eclipse-cyclonedds/cyclonedds -b releases/0.10.x +cd cyclonedds && mkdir build install && cd build +cmake .. -DCMAKE_INSTALL_PREFIX=../install +cmake --build . --target install +``` +Enter the unitree_sdk2_python directory, set `CYCLONEDDS_HOME` to the path of the cyclonedds you just compiled, and then install unitree_sdk2_python. +```bash +cd ~/unitree_sdk2_python +export CYCLONEDDS_HOME="~/cyclonedds/install" +pip3 install -e . +``` +For details, see: https://pypi.org/project/cyclonedds/#installing-with-pre-built-binaries + +# Usage +The Python sdk2 interface maintains consistency with the unitree_sdk2 interface, achieving robot status acquisition and control through request-response or topic subscription/publishing. Example programs are located in the `/example` directory. Before running the examples, configure the robot's network connection as per the instructions in the document at https://support.unitree.com/home/en/developer/Quick_start. +## DDS Communication +In the terminal, execute: +```bash +python3 ./example/helloworld/publisher.py +``` +Open a new terminal and execute: +```bash +python3 ./example/helloworld/subscriber.py +``` +You will see the data output in the terminal. The data structure transmitted between `publisher.py` and `subscriber.py` is defined in `user_data.py`, and users can define the required data structure as needed. +## High-Level Status and Control +The high-level interface maintains consistency with unitree_sdk2 in terms of data structure and control methods. For detailed information, refer to https://support.unitree.com/home/en/developer/sports_services. +### High-Level Status +Execute the following command in the terminal: +```bash +python3 ./example/high_level/read_highstate.py enp2s0 +``` +Replace `enp2s0` with the name of the network interface to which the robot is connected,. +### High-Level Control +Execute the following command in the terminal: +```bash +python3 ./example/high_level/sportmode_test.py enp2s0 +``` +Replace `enp2s0` with the name of the network interface to which the robot is connected. This example program provides several test methods, and you can choose the required tests as follows: +```python +test.StandUpDown() # Stand up and lie down +# test.VelocityMove() # Velocity control +# test.BalanceAttitude() # Attitude control +# test.TrajectoryFollow() # Trajectory tracking +# test.SpecialMotions() # Special motions +``` +## Low-Level Status and Control +The low-level interface maintains consistency with unitree_sdk2 in terms of data structure and control methods. For detailed information, refer to https://support.unitree.com/home/en/developer/Basic_services. +### Low-Level Status +Execute the following command in the terminal: +```bash +python3 ./example/low_level/lowlevel_control.py enp2s0 +``` +Replace `enp2s0` with the name of the network interface to which the robot is connected. The program will output the state of the right front leg hip joint, IMU, and battery voltage. +### Low-Level Motor Control +First, use the app to turn off the high-level motion service (sport_mode) to prevent conflicting instructions. +Execute the following command in the terminal: +```bash +python3 ./example/low_level/lowlevel_control.py enp2s0 +``` +Replace `enp2s0` with the name of the network interface to which the robot is connected. The left hind leg hip joint will maintain a 0-degree position (for safety, set kp=10, kd=1), and the left hind leg calf joint will continuously output 1Nm of torque. +## Wireless Controller Status +Execute the following command in the terminal: +```bash +python3 ./example/wireless_controller/wireless_controller.py enp2s0 +``` +Replace `enp2s0` with the name of the network interface to which the robot is connected. The terminal will output the status of each key. For the definition and data structure of the remote control keys, refer to https://support.unitree.com/home/en/developer/Get_remote_control_status. +## Front Camera +Use OpenCV to obtain the front camera (ensure to run on a system with a graphical interface, and press ESC to exit the program): +```bash +python3 ./example/front_camera/camera_opencv.py enp2s0 +``` +Replace `enp2s0` with the name of the network interface to which the robot is connected. + +## Obstacle Avoidance Switch +```bash +python3 ./example/obstacles_avoid_switch/obstacles_avoid_switch.py enp2s0 +``` +Replace `enp2s0` with the name of the network interface to which the robot is connected. The robot will cycle obstacle avoidance on and off. For details on the obstacle avoidance service, see https://support.unitree.com/home/en/developer/ObstaclesAvoidClient + +## Light and volume control +```bash +python3 ./example/vui_client/vui_client_example.py enp2s0 +``` +Replace `enp2s0` with the name of the network interface to which the robot is connected.T he robot will cycle the volume and light brightness. The interface is detailed at https://support.unitree.com/home/en/developer/VuiClient \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/pyproject.toml b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/pyproject.toml new file mode 100644 index 0000000000000000000000000000000000000000..07de284aa5c45f56b69ca6f605edf72a14785b99 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools", "wheel"] +build-backend = "setuptools.build_meta" \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/setup.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/setup.py new file mode 100644 index 0000000000000000000000000000000000000000..54d8cac8a87a9bcb137bf6b89e590299cc6f2aca --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/setup.py @@ -0,0 +1,21 @@ +from setuptools import setup, find_packages + +setup(name='unitree_sdk2py', + version='1.0.1', + author='UnitreeRobotics', + author_email='unitree@unitree.com', + long_description=open('README.md').read(), + long_description_content_type="text/markdown", + license="BSD-3-Clause", + packages=find_packages(include=['unitree_sdk2py','unitree_sdk2py.*']), + description='Unitree robot sdk version 2 for python', + project_urls={ + "Source Code": "https://github.com/unitreerobotics/unitree_sdk2_python", + }, + python_requires='>=3.8', + install_requires=[ + "cyclonedds==0.10.2", + "numpy", + "opencv-python", + ], + ) \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py.egg-info/PKG-INFO b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py.egg-info/PKG-INFO new file mode 100644 index 0000000000000000000000000000000000000000..d5f2dd04883eb159f0ab298cf0039f75c7040436 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py.egg-info/PKG-INFO @@ -0,0 +1,143 @@ +Metadata-Version: 2.4 +Name: unitree_sdk2py +Version: 1.0.1 +Summary: Unitree robot sdk version 2 for python +Author: UnitreeRobotics +Author-email: unitree@unitree.com +License: BSD-3-Clause +Project-URL: Source Code, https://github.com/unitreerobotics/unitree_sdk2_python +Requires-Python: >=3.8 +Description-Content-Type: text/markdown +License-File: LICENSE +Requires-Dist: cyclonedds==0.10.2 +Requires-Dist: numpy +Requires-Dist: opencv-python +Dynamic: author +Dynamic: author-email +Dynamic: description +Dynamic: description-content-type +Dynamic: license +Dynamic: license-file +Dynamic: project-url +Dynamic: requires-dist +Dynamic: requires-python +Dynamic: summary + +# unitree_sdk2_python +Python interface for unitree sdk2 + +# Installation +## Dependencies +- Python >= 3.8 +- cyclonedds == 0.10.2 +- numpy +- opencv-python +## Install unitree_sdk2_python + +```bash +pip install unitree_sdk2py +``` + +### Installing from source +Execute the following commands in the terminal: +```bash +cd ~ +sudo apt install python3-pip +git clone https://github.com/unitreerobotics/unitree_sdk2_python.git +cd unitree_sdk2_python +pip3 install -e . +``` +## FAQ +##### 1. Error when `pip3 install -e .`: +```bash +Could not locate cyclonedds. Try to set CYCLONEDDS_HOME or CMAKE_PREFIX_PATH +``` +This error mentions that the cyclonedds path could not be found. First compile and install cyclonedds: + +```bash +cd ~ +git clone https://github.com/eclipse-cyclonedds/cyclonedds -b releases/0.10.x +cd cyclonedds && mkdir build install && cd build +cmake .. -DCMAKE_INSTALL_PREFIX=../install +cmake --build . --target install +``` +Enter the unitree_sdk2_python directory, set `CYCLONEDDS_HOME` to the path of the cyclonedds you just compiled, and then install unitree_sdk2_python. +```bash +cd ~/unitree_sdk2_python +export CYCLONEDDS_HOME="~/cyclonedds/install" +pip3 install -e . +``` +For details, see: https://pypi.org/project/cyclonedds/#installing-with-pre-built-binaries + +# Usage +The Python sdk2 interface maintains consistency with the unitree_sdk2 interface, achieving robot status acquisition and control through request-response or topic subscription/publishing. Example programs are located in the `/example` directory. Before running the examples, configure the robot's network connection as per the instructions in the document at https://support.unitree.com/home/en/developer/Quick_start. +## DDS Communication +In the terminal, execute: +```bash +python3 ./example/helloworld/publisher.py +``` +Open a new terminal and execute: +```bash +python3 ./example/helloworld/subscriber.py +``` +You will see the data output in the terminal. The data structure transmitted between `publisher.py` and `subscriber.py` is defined in `user_data.py`, and users can define the required data structure as needed. +## High-Level Status and Control +The high-level interface maintains consistency with unitree_sdk2 in terms of data structure and control methods. For detailed information, refer to https://support.unitree.com/home/en/developer/sports_services. +### High-Level Status +Execute the following command in the terminal: +```bash +python3 ./example/high_level/read_highstate.py enp2s0 +``` +Replace `enp2s0` with the name of the network interface to which the robot is connected,. +### High-Level Control +Execute the following command in the terminal: +```bash +python3 ./example/high_level/sportmode_test.py enp2s0 +``` +Replace `enp2s0` with the name of the network interface to which the robot is connected. This example program provides several test methods, and you can choose the required tests as follows: +```python +test.StandUpDown() # Stand up and lie down +# test.VelocityMove() # Velocity control +# test.BalanceAttitude() # Attitude control +# test.TrajectoryFollow() # Trajectory tracking +# test.SpecialMotions() # Special motions +``` +## Low-Level Status and Control +The low-level interface maintains consistency with unitree_sdk2 in terms of data structure and control methods. For detailed information, refer to https://support.unitree.com/home/en/developer/Basic_services. +### Low-Level Status +Execute the following command in the terminal: +```bash +python3 ./example/low_level/lowlevel_control.py enp2s0 +``` +Replace `enp2s0` with the name of the network interface to which the robot is connected. The program will output the state of the right front leg hip joint, IMU, and battery voltage. +### Low-Level Motor Control +First, use the app to turn off the high-level motion service (sport_mode) to prevent conflicting instructions. +Execute the following command in the terminal: +```bash +python3 ./example/low_level/lowlevel_control.py enp2s0 +``` +Replace `enp2s0` with the name of the network interface to which the robot is connected. The left hind leg hip joint will maintain a 0-degree position (for safety, set kp=10, kd=1), and the left hind leg calf joint will continuously output 1Nm of torque. +## Wireless Controller Status +Execute the following command in the terminal: +```bash +python3 ./example/wireless_controller/wireless_controller.py enp2s0 +``` +Replace `enp2s0` with the name of the network interface to which the robot is connected. The terminal will output the status of each key. For the definition and data structure of the remote control keys, refer to https://support.unitree.com/home/en/developer/Get_remote_control_status. +## Front Camera +Use OpenCV to obtain the front camera (ensure to run on a system with a graphical interface, and press ESC to exit the program): +```bash +python3 ./example/front_camera/camera_opencv.py enp2s0 +``` +Replace `enp2s0` with the name of the network interface to which the robot is connected. + +## Obstacle Avoidance Switch +```bash +python3 ./example/obstacles_avoid_switch/obstacles_avoid_switch.py enp2s0 +``` +Replace `enp2s0` with the name of the network interface to which the robot is connected. The robot will cycle obstacle avoidance on and off. For details on the obstacle avoidance service, see https://support.unitree.com/home/en/developer/ObstaclesAvoidClient + +## Light and volume control +```bash +python3 ./example/vui_client/vui_client_example.py enp2s0 +``` +Replace `enp2s0` with the name of the network interface to which the robot is connected.T he robot will cycle the volume and light brightness. The interface is detailed at https://support.unitree.com/home/en/developer/VuiClient diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py.egg-info/SOURCES.txt b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py.egg-info/SOURCES.txt new file mode 100644 index 0000000000000000000000000000000000000000..7a5b37c9119b06172f66c62dd4ceea8e2a203c23 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py.egg-info/SOURCES.txt @@ -0,0 +1,145 @@ +LICENSE +README.md +pyproject.toml +setup.py +unitree_sdk2py/__init__.py +unitree_sdk2py.egg-info/PKG-INFO +unitree_sdk2py.egg-info/SOURCES.txt +unitree_sdk2py.egg-info/dependency_links.txt +unitree_sdk2py.egg-info/requires.txt +unitree_sdk2py.egg-info/top_level.txt +unitree_sdk2py/core/__init__.py +unitree_sdk2py/core/channel.py +unitree_sdk2py/core/channel_config.py +unitree_sdk2py/core/channel_name.py +unitree_sdk2py/go2/__init__.py +unitree_sdk2py/go2/obstacles_avoid/__init__.py +unitree_sdk2py/go2/obstacles_avoid/obstacles_avoid_api.py +unitree_sdk2py/go2/obstacles_avoid/obstacles_avoid_client.py +unitree_sdk2py/go2/robot_state/__init__.py +unitree_sdk2py/go2/robot_state/robot_state_api.py +unitree_sdk2py/go2/robot_state/robot_state_client.py +unitree_sdk2py/go2/sport/__init__.py +unitree_sdk2py/go2/sport/sport_api.py +unitree_sdk2py/go2/sport/sport_client.py +unitree_sdk2py/go2/video/__init__.py +unitree_sdk2py/go2/video/video_api.py +unitree_sdk2py/go2/video/video_client.py +unitree_sdk2py/go2/vui/__init__.py +unitree_sdk2py/go2/vui/vui_api.py +unitree_sdk2py/go2/vui/vui_client.py +unitree_sdk2py/idl/__init__.py +unitree_sdk2py/idl/default.py +unitree_sdk2py/idl/builtin_interfaces/__init__.py +unitree_sdk2py/idl/builtin_interfaces/msg/__init__.py +unitree_sdk2py/idl/builtin_interfaces/msg/dds_/_Time_.py +unitree_sdk2py/idl/builtin_interfaces/msg/dds_/__init__.py +unitree_sdk2py/idl/geometry_msgs/__init__.py +unitree_sdk2py/idl/geometry_msgs/msg/__init__.py +unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Point32_.py +unitree_sdk2py/idl/geometry_msgs/msg/dds_/_PointStamped_.py +unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Point_.py +unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Pose2D_.py +unitree_sdk2py/idl/geometry_msgs/msg/dds_/_PoseStamped_.py +unitree_sdk2py/idl/geometry_msgs/msg/dds_/_PoseWithCovarianceStamped_.py +unitree_sdk2py/idl/geometry_msgs/msg/dds_/_PoseWithCovariance_.py +unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Pose_.py +unitree_sdk2py/idl/geometry_msgs/msg/dds_/_QuaternionStamped_.py +unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Quaternion_.py +unitree_sdk2py/idl/geometry_msgs/msg/dds_/_TwistStamped_.py +unitree_sdk2py/idl/geometry_msgs/msg/dds_/_TwistWithCovarianceStamped_.py +unitree_sdk2py/idl/geometry_msgs/msg/dds_/_TwistWithCovariance_.py +unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Twist_.py +unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Vector3_.py +unitree_sdk2py/idl/geometry_msgs/msg/dds_/__init__.py +unitree_sdk2py/idl/nav_msgs/__init__.py +unitree_sdk2py/idl/nav_msgs/msg/__init__.py +unitree_sdk2py/idl/nav_msgs/msg/dds_/_MapMetaData_.py +unitree_sdk2py/idl/nav_msgs/msg/dds_/_OccupancyGrid_.py +unitree_sdk2py/idl/nav_msgs/msg/dds_/_Odometry_.py +unitree_sdk2py/idl/nav_msgs/msg/dds_/__init__.py +unitree_sdk2py/idl/sensor_msgs/__init__.py +unitree_sdk2py/idl/sensor_msgs/msg/__init__.py +unitree_sdk2py/idl/sensor_msgs/msg/dds_/_PointCloud2_.py +unitree_sdk2py/idl/sensor_msgs/msg/dds_/_PointField_.py +unitree_sdk2py/idl/sensor_msgs/msg/dds_/__init__.py +unitree_sdk2py/idl/sensor_msgs/msg/dds_/PointField_Constants/_PointField_.py +unitree_sdk2py/idl/sensor_msgs/msg/dds_/PointField_Constants/__init__.py +unitree_sdk2py/idl/std_msgs/__init__.py +unitree_sdk2py/idl/std_msgs/msg/__init__.py +unitree_sdk2py/idl/std_msgs/msg/dds_/_Header_.py +unitree_sdk2py/idl/std_msgs/msg/dds_/_String_.py +unitree_sdk2py/idl/std_msgs/msg/dds_/__init__.py +unitree_sdk2py/idl/unitree_api/__init__.py +unitree_sdk2py/idl/unitree_api/msg/__init__.py +unitree_sdk2py/idl/unitree_api/msg/dds_/_RequestHeader_.py +unitree_sdk2py/idl/unitree_api/msg/dds_/_RequestIdentity_.py +unitree_sdk2py/idl/unitree_api/msg/dds_/_RequestLease_.py +unitree_sdk2py/idl/unitree_api/msg/dds_/_RequestPolicy_.py +unitree_sdk2py/idl/unitree_api/msg/dds_/_Request_.py +unitree_sdk2py/idl/unitree_api/msg/dds_/_ResponseHeader_.py +unitree_sdk2py/idl/unitree_api/msg/dds_/_ResponseStatus_.py +unitree_sdk2py/idl/unitree_api/msg/dds_/_Response_.py +unitree_sdk2py/idl/unitree_api/msg/dds_/__init__.py +unitree_sdk2py/idl/unitree_go/__init__.py +unitree_sdk2py/idl/unitree_go/msg/__init__.py +unitree_sdk2py/idl/unitree_go/msg/dds_/_AudioData_.py +unitree_sdk2py/idl/unitree_go/msg/dds_/_BmsCmd_.py +unitree_sdk2py/idl/unitree_go/msg/dds_/_BmsState_.py +unitree_sdk2py/idl/unitree_go/msg/dds_/_Error_.py +unitree_sdk2py/idl/unitree_go/msg/dds_/_Go2FrontVideoData_.py +unitree_sdk2py/idl/unitree_go/msg/dds_/_HeightMap_.py +unitree_sdk2py/idl/unitree_go/msg/dds_/_IMUState_.py +unitree_sdk2py/idl/unitree_go/msg/dds_/_InterfaceConfig_.py +unitree_sdk2py/idl/unitree_go/msg/dds_/_LidarState_.py +unitree_sdk2py/idl/unitree_go/msg/dds_/_LowCmd_.py +unitree_sdk2py/idl/unitree_go/msg/dds_/_LowState_.py +unitree_sdk2py/idl/unitree_go/msg/dds_/_MotorCmd_.py +unitree_sdk2py/idl/unitree_go/msg/dds_/_MotorCmds_.py +unitree_sdk2py/idl/unitree_go/msg/dds_/_MotorState_.py +unitree_sdk2py/idl/unitree_go/msg/dds_/_MotorStates_.py +unitree_sdk2py/idl/unitree_go/msg/dds_/_PathPoint_.py +unitree_sdk2py/idl/unitree_go/msg/dds_/_Req_.py +unitree_sdk2py/idl/unitree_go/msg/dds_/_Res_.py +unitree_sdk2py/idl/unitree_go/msg/dds_/_SportModeState_.py +unitree_sdk2py/idl/unitree_go/msg/dds_/_TimeSpec_.py +unitree_sdk2py/idl/unitree_go/msg/dds_/_UwbState_.py +unitree_sdk2py/idl/unitree_go/msg/dds_/_UwbSwitch_.py +unitree_sdk2py/idl/unitree_go/msg/dds_/_WirelessController_.py +unitree_sdk2py/idl/unitree_go/msg/dds_/__init__.py +unitree_sdk2py/idl/unitree_hg/__init__.py +unitree_sdk2py/idl/unitree_hg/msg/__init__.py +unitree_sdk2py/idl/unitree_hg/msg/dds_/_BmsCmd_.py +unitree_sdk2py/idl/unitree_hg/msg/dds_/_BmsState_.py +unitree_sdk2py/idl/unitree_hg/msg/dds_/_HandCmd_.py +unitree_sdk2py/idl/unitree_hg/msg/dds_/_HandState_.py +unitree_sdk2py/idl/unitree_hg/msg/dds_/_IMUState_.py +unitree_sdk2py/idl/unitree_hg/msg/dds_/_LowCmd_.py +unitree_sdk2py/idl/unitree_hg/msg/dds_/_LowState_.py +unitree_sdk2py/idl/unitree_hg/msg/dds_/_MainBoardState_.py +unitree_sdk2py/idl/unitree_hg/msg/dds_/_MotorCmd_.py +unitree_sdk2py/idl/unitree_hg/msg/dds_/_MotorState_.py +unitree_sdk2py/idl/unitree_hg/msg/dds_/_OdoState_.py +unitree_sdk2py/idl/unitree_hg/msg/dds_/_PressSensorState_.py +unitree_sdk2py/idl/unitree_hg/msg/dds_/__init__.py +unitree_sdk2py/rpc/__init__.py +unitree_sdk2py/rpc/client.py +unitree_sdk2py/rpc/client_base.py +unitree_sdk2py/rpc/client_stub.py +unitree_sdk2py/rpc/internal.py +unitree_sdk2py/rpc/lease_client.py +unitree_sdk2py/rpc/lease_server.py +unitree_sdk2py/rpc/request_future.py +unitree_sdk2py/rpc/server.py +unitree_sdk2py/rpc/server_base.py +unitree_sdk2py/rpc/server_stub.py +unitree_sdk2py/utils/__init__.py +unitree_sdk2py/utils/bqueue.py +unitree_sdk2py/utils/clib_lookup.py +unitree_sdk2py/utils/crc.py +unitree_sdk2py/utils/future.py +unitree_sdk2py/utils/hz_sample.py +unitree_sdk2py/utils/joystick.py +unitree_sdk2py/utils/singleton.py +unitree_sdk2py/utils/thread.py +unitree_sdk2py/utils/timerfd.py \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py.egg-info/dependency_links.txt b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py.egg-info/dependency_links.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py.egg-info/requires.txt b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py.egg-info/requires.txt new file mode 100644 index 0000000000000000000000000000000000000000..29e8e2f3f50a2da8215dc832dac714f9fb652ced --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py.egg-info/requires.txt @@ -0,0 +1,3 @@ +cyclonedds==0.10.2 +numpy +opencv-python diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py.egg-info/top_level.txt b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py.egg-info/top_level.txt new file mode 100644 index 0000000000000000000000000000000000000000..c5eef26d6f8ecdfd5579b0c5ad07cf48c63fdfc4 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py.egg-info/top_level.txt @@ -0,0 +1 @@ +unitree_sdk2py diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f071aeb7f277dbc7976c4691318efc51fa0fea1a --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/__init__.py @@ -0,0 +1,10 @@ +from . import idl, utils, core, rpc, go2, b2 + +__all__ = [ + "idl" + "utils" + "core", + "rpc", + "go2", + "b2", +] diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f0c9ac05e3f52c767141b71ac08f21963899ad9a Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/core/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/core/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/core/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/core/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b2c5593188d3abca6fa3f0b09d8c30e81795617b Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/core/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/core/__pycache__/channel.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/core/__pycache__/channel.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..474532dc44bf174f714e5bc8eea8f459a31f2d66 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/core/__pycache__/channel.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/core/__pycache__/channel_config.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/core/__pycache__/channel_config.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b7a91e25e39b40148f2b79d594cc6155ceacfb34 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/core/__pycache__/channel_config.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/core/channel.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/core/channel.py new file mode 100644 index 0000000000000000000000000000000000000000..daacc6323291815cf259c78fb49a2b67ff302c98 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/core/channel.py @@ -0,0 +1,290 @@ +import time +from typing import Any, Callable +from threading import Thread, Event + +from cyclonedds.domain import Domain, DomainParticipant +from cyclonedds.internal import dds_c_t +from cyclonedds.pub import DataWriter +from cyclonedds.sub import DataReader +from cyclonedds.topic import Topic +from cyclonedds.qos import Qos +from cyclonedds.core import DDSException, Listener +from cyclonedds.util import duration +from cyclonedds.internal import dds_c_t, InvalidSample + +# for channel config +from .channel_config import ChannelConfigAutoDetermine, ChannelConfigHasInterface + +# for singleton +from ..utils.singleton import Singleton +from ..utils.bqueue import BQueue + + +""" +" class ChannelReader +""" + +""" +" class Channel +""" +class Channel: + + """ + " internal class __Reader + """ + class __Reader: + def __init__(self): + self.__reader = None + self.__handler = None + self.__queue = None + self.__queueEnable = False + self.__threadEvent = None + self.__threadReader = None + + def Init(self, participant: DomainParticipant, topic: Topic, qos: Qos = None, handler: Callable = None, queueLen: int = 0): + if handler is None: + self.__reader = DataReader(participant, topic, qos) + else: + self.__handler = handler + if queueLen > 0: + self.__queueEnable = True + self.__queue = BQueue(queueLen) + self.__threadEvent = Event() + self.__threadReader = Thread(target=self.__ChannelReaderThreadFunc, name="ch_reader", daemon=True) + self.__threadReader.start() + self.__reader = DataReader(participant, topic, qos, Listener(on_data_available=self.__OnDataAvailable)) + + def Read(self, timeout: float = None): + sample = None + try: + if timeout is None: + sample = self.__reader.take_one() + else: + sample = self.__reader.take_one(timeout=duration(seconds=timeout)) + except DDSException as e: + print("[Reader] catch DDSException msg:", e.msg) + except TimeoutError as e: + print("[Reader] take sample timeout") + except: + print("[Reader] take sample error") + + return sample + + def Close(self): + if self.__reader is not None: + del self.__reader + + if self.__queueEnable: + self.__threadEvent.set() + self.__queue.Interrupt() + self.__queue.Clear() + self.__threadReader.join() + + def __OnDataAvailable(self, reader: DataReader): + samples = [] + try: + samples = reader.take(1) + except DDSException as e: + print("[Reader] catch DDSException error. msg:", e.msg) + return + except TimeoutError as e: + print("[Reader] take sample timeout") + return + except: + print("[Reader] take sample error") + return + + if samples is None: + return + + # check invalid sample + sample = samples[0] + if isinstance(sample, InvalidSample): + return + + # do sample + if self.__queueEnable: + self.__queue.Put(sample) + else: + self.__handler(sample) + + def __ChannelReaderThreadFunc(self): + while not self.__threadEvent.is_set(): + sample = self.__queue.Get() + if sample is not None: + self.__handler(sample) + + """ + " internal class __Writer + """ + class __Writer: + def __init__(self): + self.__writer = None + self.__publication_matched_count = 0 + + def Init(self, participant: DomainParticipant, topic: Topic, qos: Qos = None): + self.__writer = DataWriter(participant, topic, qos, Listener(on_publication_matched=self.__OnPublicationMatched)) + time.sleep(0.2) + + def Write(self, sample: Any, timeout: float = None): + waitsec = 0.0 if timeout is None else timeout + + # check publication_matched_count + while waitsec > 0.0 and self.__publication_matched_count == 0: + time.sleep(0.1) + waitsec = waitsec - 0.1 + # print(time.time()) + + # check waitsec + if timeout is not None and waitsec <= 0.0: + return False + + try: + self.__writer.write(sample) + except DDSException as e: + print("[Writer] catch DDSException error. msg:", e.msg) + return False + except Exception as e: + print("[Writer] write sample error. msg:", e.args()) + return False + + return True + + def Close(self): + if self.__writer is not None: + del self.__writer + + def __OnPublicationMatched(self, writer: DataWriter, status: dds_c_t.publication_matched_status): + self.__publication_matched_count = status.current_count + + + # channel __init__ + def __init__(self, participant: DomainParticipant, name: str, type: Any, qos: Qos = None): + self.__reader = self.__Reader() + self.__writer = self.__Writer() + self.__participant = participant + self.__topic = Topic(self.__participant, name, type, qos) + + def SetWriter(self, qos: Qos = None): + self.__writer.Init(self.__participant, self.__topic, qos) + + def SetReader(self, qos: Qos = None, handler: Callable = None, queueLen: int = 0): + self.__reader.Init(self.__participant, self.__topic, qos, handler, queueLen) + + def Write(self, sample: Any, timeout: float = None): + return self.__writer.Write(sample, timeout) + + def Read(self, timeout: float = None): + return self.__reader.Read(timeout) + + def CloseReader(self): + self.__reader.Close() + + def CloseWriter(self): + self.__writer.Close() + + +""" +" class ChannelFactory +""" +class ChannelFactory(Singleton): + __domain = None + __participant = None + __qos = None + + def __init__(self): + super().__init__() + + def Init(self, id: int, networkInterface: str = None, qos: Qos = None): + config = None + # choose config + if networkInterface is None: + config = ChannelConfigAutoDetermine + else: + config = ChannelConfigHasInterface.replace('$__IF_NAME__$', networkInterface) + + try: + self.__domain = Domain(id, config) + except DDSException as e: + print("[ChannelFactory] create domain error. msg:", e.msg) + return False + except: + print("[ChannelFactory] create domain error.") + return False + + try: + self.__participant = DomainParticipant(id) + except DDSException as e: + print("[ChannelFactory] create domain participant error. msg:", e.msg) + return False + except: + print("[ChannelFactory] create domain participant error") + return False + + self.__qos = qos + + return True + + def CreateChannel(self, name: str, type: Any): + return Channel(self.__participant, name, type, self.__qos) + + def CreateSendChannel(self, name: str, type: Any): + channel = self.CreateChannel(name, type) + channel.SetWriter(None) + return channel + + def CreateRecvChannel(self, name: str, type: Any, handler: Callable = None, queueLen: int = 0): + channel = self.CreateChannel(name, type) + channel.SetReader(None, handler, queueLen) + return channel + + +""" +" class ChannelPublisher +""" +class ChannelPublisher: + def __init__(self, name: str, type: Any): + factory = ChannelFactory() + self.__channel = factory.CreateChannel(name, type) + self.__inited = False + + def Init(self): + if not self.__inited: + self.__channel.SetWriter(None) + self.__inited = True + + def Close(self): + self.__channel.CloseWriter() + self.__inited = False + + def Write(self, sample: Any, timeout: float = None): + return self.__channel.Write(sample, timeout) + +""" +" class ChannelSubscriber +""" +class ChannelSubscriber: + def __init__(self, name: str, type: Any): + factory = ChannelFactory() + self.__channel = factory.CreateChannel(name, type) + self.__inited = False + + def Init(self, handler: Callable = None, queueLen: int = 0): + if not self.__inited: + self.__channel.SetReader(None, handler, queueLen) + self.__inited = True + + def Close(self): + self.__channel.CloseReader() + self.__inited = False + + def Read(self, timeout: float = None): + return self.__channel.Read(timeout) + +""" +" function ChannelFactoryInitialize. used to intialize channel everenment. +""" +def ChannelFactoryInitialize(id: int = 0, networkInterface: str = None): + factory = ChannelFactory() + if not factory.Init(id, networkInterface): + raise Exception("channel factory init error.") diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/core/channel_config.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/core/channel_config.py new file mode 100644 index 0000000000000000000000000000000000000000..19a67a4c47f28d7f378ffe17e6a9d9182b0069ae --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/core/channel_config.py @@ -0,0 +1,25 @@ +ChannelConfigHasInterface = ''' + + + + + + + + + config + /tmp/cdds.LOG + + + ''' + +ChannelConfigAutoDetermine = ''' + + + + + + + + + ''' diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/core/channel_name.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/core/channel_name.py new file mode 100644 index 0000000000000000000000000000000000000000..722e408f010236de8530449105baed6c26ecd1be --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/core/channel_name.py @@ -0,0 +1,34 @@ +from enum import Enum + +""" +" Enum ChannelType +""" +class ChannelType(Enum): + SEND = 0 + RECV = 1 + +""" +" function GetClientChannelName +""" +def GetClientChannelName(serviceName: str, channelType: ChannelType): + name = "rt/api/" + serviceName + + if channelType == ChannelType.SEND: + name += "/request" + else: + name += "/response" + + return name + +""" +" function GetClientChannelName +""" +def GetServerChannelName(serviceName: str, channelType: ChannelType): + name = "rt/api/" + serviceName + + if channelType == ChannelType.SEND: + name += "/response" + else: + name += "/request" + + return name \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..902cf53a461ba6f27904ac6e1c868e0eec02d049 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/obstacles_avoid/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/obstacles_avoid/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/obstacles_avoid/obstacles_avoid_api.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/obstacles_avoid/obstacles_avoid_api.py new file mode 100644 index 0000000000000000000000000000000000000000..ad9dc06abd95edd2c9a524b5a51c1ab795ed3010 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/obstacles_avoid/obstacles_avoid_api.py @@ -0,0 +1,19 @@ +""" +" service name +""" +OBSTACLES_AVOID_SERVICE_NAME = "obstacles_avoid" + + +""" +" service api version +""" +OBSTACLES_AVOID_API_VERSION = "1.0.0.2" + + +""" +" api id +""" +OBSTACLES_AVOID_API_ID_SWITCH_SET = 1001 +OBSTACLES_AVOID_API_ID_SWITCH_GET = 1002 +OBSTACLES_AVOID_API_ID_MOVE = 1003 +OBSTACLES_AVOID_API_ID_USE_REMOTE_COMMAND_FROM_API = 1004 \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/obstacles_avoid/obstacles_avoid_client.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/obstacles_avoid/obstacles_avoid_client.py new file mode 100644 index 0000000000000000000000000000000000000000..4d7b62b6e2b5132e957eb0d3717b51040ebf1868 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/obstacles_avoid/obstacles_avoid_client.py @@ -0,0 +1,60 @@ +import json + +from ...rpc.client import Client +from .obstacles_avoid_api import * + + +""" +" class ObstaclesAvoidClient +""" +class ObstaclesAvoidClient(Client): + def __init__(self): + super().__init__(OBSTACLES_AVOID_SERVICE_NAME, False) + + def Init(self): + # set api version + self._SetApiVerson(OBSTACLES_AVOID_API_VERSION) + # regist api + self._RegistApi(OBSTACLES_AVOID_API_ID_SWITCH_SET, 0) + self._RegistApi(OBSTACLES_AVOID_API_ID_SWITCH_GET, 0) + self._RegistApi(OBSTACLES_AVOID_API_ID_MOVE, 0) + self._RegistApi(OBSTACLES_AVOID_API_ID_USE_REMOTE_COMMAND_FROM_API, 0) + + # 1001 + def SwitchSet(self, on: bool): + p = {} + p["enable"] = on + parameter = json.dumps(p) + + code, data = self._Call(OBSTACLES_AVOID_API_ID_SWITCH_SET, parameter) + return code + + # 1002 + def SwitchGet(self): + p = {} + parameter = json.dumps(p) + + code, data = self._Call(OBSTACLES_AVOID_API_ID_SWITCH_GET, parameter) + if code == 0: + d = json.loads(data) + return code, d["enable"] + else: + return code, None + + # 1003 + def Move(self, vx: float, vy: float, vyaw: float): + p = {} + p["x"] = vx + p["y"] = vy + p["yaw"] = vyaw + p["mode"] = 0 + parameter = json.dumps(p) + code = self._CallNoReply(OBSTACLES_AVOID_API_ID_MOVE, parameter) + return code + + def UseRemoteCommandFromApi(self, isRemoteCommandsFromApi: bool): + p = {} + p["is_remote_commands_from_api"] = isRemoteCommandsFromApi + parameter = json.dumps(p) + code, data = self._Call(OBSTACLES_AVOID_API_ID_USE_REMOTE_COMMAND_FROM_API, parameter) + return code \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/robot_state/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/robot_state/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/robot_state/robot_state_api.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/robot_state/robot_state_api.py new file mode 100644 index 0000000000000000000000000000000000000000..fde54dfcf5cb6c2f1be23009ab271601bb7f7d7c --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/robot_state/robot_state_api.py @@ -0,0 +1,25 @@ +""" +" service name +""" +ROBOT_STATE_SERVICE_NAME = "robot_state" + + +""" +" service api version +""" +ROBOT_STATE_API_VERSION = "1.0.0.1" + + +""" +" api id +""" +ROBOT_STATE_API_ID_SERVICE_SWITCH = 1001 +ROBOT_STATE_API_ID_REPORT_FREQ = 1002 +ROBOT_STATE_API_ID_SERVICE_LIST = 1003 + + +""" +" error code +""" +ROBOT_STATE_ERR_SERVICE_SWITCH = 5201 +ROBOT_STATE_ERR_SERVICE_PROTECTED = 5202 diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/robot_state/robot_state_client.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/robot_state/robot_state_client.py new file mode 100644 index 0000000000000000000000000000000000000000..097a89103b96d90ba6db93c4e619c969086ce35c --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/robot_state/robot_state_client.py @@ -0,0 +1,84 @@ +import json + +from ...rpc.client import Client +from ...rpc.internal import * +from .robot_state_api import * + + +""" +" class ServiceState +""" +class ServiceState: + def __init__(self, name: str = None, status: int = None, protect: bool = None): + self.name = name + self.status = status + self.protect = protect + +""" +" class RobotStateClient +""" +class RobotStateClient(Client): + def __init__(self): + super().__init__(ROBOT_STATE_SERVICE_NAME, False) + + def Init(self): + # set api version + self._SetApiVerson(ROBOT_STATE_API_VERSION) + # regist api + self._RegistApi(ROBOT_STATE_API_ID_SERVICE_SWITCH, 0) + self._RegistApi(ROBOT_STATE_API_ID_REPORT_FREQ, 0) + self._RegistApi(ROBOT_STATE_API_ID_SERVICE_LIST, 0) + + def ServiceList(self): + p = {} + parameter = json.dumps(p) + + code, data = self._Call(ROBOT_STATE_API_ID_SERVICE_LIST, parameter) + + if code != 0: + return code, None + + lst = [] + + d = json.loads(data) + for t in d: + s = ServiceState() + s.name = t["name"] + s.status = t["status"] + s.protect = t["protect"] + lst.append(s) + + return code, lst + + + def ServiceSwitch(self, name: str, switch: bool): + p = {} + p["name"] = name + p["switch"] = int(switch) + parameter = json.dumps(p) + + code, data = self._Call(ROBOT_STATE_API_ID_SERVICE_SWITCH, parameter) + + if code != 0: + return code + + d = json.loads(data) + + status = d["status"] + + if status == 5: + return ROBOT_STATE_ERR_SERVICE_PROTECTED + + if status != 0 and status != 1: + return ROBOT_STATE_ERR_SERVICE_SWITCH + + return code + + def SetReportFreq(self, interval: int, duration: int): + p = {} + p["interval"] = interval + p["duration"] = duration + parameter = json.dumps(p) + + code, data = self._Call(ROBOT_STATE_API_ID_REPORT_FREQ, p) + return code diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/sport/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/sport/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/sport/sport_api.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/sport/sport_api.py new file mode 100644 index 0000000000000000000000000000000000000000..bfca62a5591453420620222c993335f9ebc2bb80 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/sport/sport_api.py @@ -0,0 +1,74 @@ +""" +" service name +""" +SPORT_SERVICE_NAME = "sport" + + +""" +" service api version +""" +SPORT_API_VERSION = "1.0.0.1" + + +""" +" api id +""" +SPORT_API_ID_DAMP = 1001 +SPORT_API_ID_BALANCESTAND = 1002 +SPORT_API_ID_STOPMOVE = 1003 +SPORT_API_ID_STANDUP = 1004 +SPORT_API_ID_STANDDOWN = 1005 +SPORT_API_ID_RECOVERYSTAND = 1006 +SPORT_API_ID_EULER = 1007 +SPORT_API_ID_MOVE = 1008 +SPORT_API_ID_SIT = 1009 +SPORT_API_ID_RISESIT = 1010 +SPORT_API_ID_SWITCHGAIT = 1011 +SPORT_API_ID_TRIGGER = 1012 +SPORT_API_ID_BODYHEIGHT = 1013 +SPORT_API_ID_FOOTRAISEHEIGHT = 1014 +SPORT_API_ID_SPEEDLEVEL = 1015 +SPORT_API_ID_HELLO = 1016 +SPORT_API_ID_STRETCH = 1017 +SPORT_API_ID_TRAJECTORYFOLLOW = 1018 +SPORT_API_ID_CONTINUOUSGAIT = 1019 +SPORT_API_ID_CONTENT = 1020 +SPORT_API_ID_WALLOW = 1021 +SPORT_API_ID_DANCE1 = 1022 +SPORT_API_ID_DANCE2 = 1023 +SPORT_API_ID_GETBODYHEIGHT = 1024 +SPORT_API_ID_GETFOOTRAISEHEIGHT = 1025 +SPORT_API_ID_GETSPEEDLEVEL = 1026 +SPORT_API_ID_SWITCHJOYSTICK = 1027 +SPORT_API_ID_POSE = 1028 +SPORT_API_ID_SCRAPE = 1029 +SPORT_API_ID_FRONTFLIP = 1030 +SPORT_API_ID_FRONTJUMP = 1031 +SPORT_API_ID_FRONTPOUNCE = 1032 +SPORT_API_ID_WIGGLEHIPS = 1033 +SPORT_API_ID_GETSTATE = 1034 +SPORT_API_ID_ECONOMICGAIT = 1035 +SPORT_API_ID_HEART = 1036 +ROBOT_SPORT_API_ID_DANCE3 = 1037 +ROBOT_SPORT_API_ID_DANCE4 = 1038 +ROBOT_SPORT_API_ID_HOPSPINLEFT = 1039 +ROBOT_SPORT_API_ID_HOPSPINRIGHT = 1040 + +ROBOT_SPORT_API_ID_LEFTFLIP = 1042 +ROBOT_SPORT_API_ID_BACKFLIP = 1044 +ROBOT_SPORT_API_ID_FREEWALK = 1045 +ROBOT_SPORT_API_ID_FREEBOUND = 1046 +ROBOT_SPORT_API_ID_FREEJUMP = 1047 +ROBOT_SPORT_API_ID_FREEAVOID = 1048 +ROBOT_SPORT_API_ID_WALKSTAIR = 1049 +ROBOT_SPORT_API_ID_WALKUPRIGHT = 1050 +ROBOT_SPORT_API_ID_CROSSSTEP = 1051 + +""" +" error code +""" +# client side +SPORT_ERR_CLIENT_POINT_PATH = 4101 +# server side +SPORT_ERR_SERVER_OVERTIME = 4201 +SPORT_ERR_SERVER_NOT_INIT = 4202 diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/sport/sport_client.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/sport/sport_client.py new file mode 100644 index 0000000000000000000000000000000000000000..d058e515304d5577bc463d07010c7c9bca85bc0f --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/sport/sport_client.py @@ -0,0 +1,446 @@ +import json + +from ...rpc.client import Client +from .sport_api import * + +""" +" SPORT_PATH_POINT_SIZE +""" +SPORT_PATH_POINT_SIZE = 30 + + +""" +" class PathPoint +""" +class PathPoint: + def __init__(self, timeFromStart: float, x: float, y: float, yaw: float, vx: float, vy: float, vyaw: float): + self.timeFromStart = timeFromStart + self.x = x + self.y = y + self.yaw = yaw + self.vx = vx + self.vy = vy + self.vyaw = vyaw + + +""" +" class SportClient +""" +class SportClient(Client): + def __init__(self, enableLease: bool = False): + super().__init__(SPORT_SERVICE_NAME, enableLease) + + + def Init(self): + # set api version + self._SetApiVerson(SPORT_API_VERSION) + + # regist api + self._RegistApi(SPORT_API_ID_DAMP, 0) + self._RegistApi(SPORT_API_ID_BALANCESTAND, 0) + self._RegistApi(SPORT_API_ID_STOPMOVE, 0) + self._RegistApi(SPORT_API_ID_STANDUP, 0) + self._RegistApi(SPORT_API_ID_STANDDOWN, 0) + self._RegistApi(SPORT_API_ID_RECOVERYSTAND, 0) + self._RegistApi(SPORT_API_ID_EULER, 0) + self._RegistApi(SPORT_API_ID_MOVE, 0) + self._RegistApi(SPORT_API_ID_SIT, 0) + self._RegistApi(SPORT_API_ID_RISESIT, 0) + self._RegistApi(SPORT_API_ID_SWITCHGAIT, 0) + self._RegistApi(SPORT_API_ID_TRIGGER, 0) + self._RegistApi(SPORT_API_ID_BODYHEIGHT, 0) + self._RegistApi(SPORT_API_ID_FOOTRAISEHEIGHT, 0) + self._RegistApi(SPORT_API_ID_SPEEDLEVEL, 0) + self._RegistApi(SPORT_API_ID_HELLO, 0) + self._RegistApi(SPORT_API_ID_STRETCH, 0) + self._RegistApi(SPORT_API_ID_TRAJECTORYFOLLOW, 0) + self._RegistApi(SPORT_API_ID_CONTINUOUSGAIT, 0) + # self._RegistApi(SPORT_API_ID_CONTENT, 0) + self._RegistApi(SPORT_API_ID_WALLOW, 0) + self._RegistApi(SPORT_API_ID_DANCE1, 0) + self._RegistApi(SPORT_API_ID_DANCE2, 0) + # self._RegistApi(SPORT_API_ID_GETBODYHEIGHT, 0) + # self._RegistApi(SPORT_API_ID_GETFOOTRAISEHEIGHT, 0) + # self._RegistApi(SPORT_API_ID_GETSPEEDLEVEL, 0) + self._RegistApi(SPORT_API_ID_SWITCHJOYSTICK, 0) + self._RegistApi(SPORT_API_ID_POSE, 0) + self._RegistApi(SPORT_API_ID_SCRAPE, 0) + self._RegistApi(SPORT_API_ID_FRONTFLIP, 0) + self._RegistApi(SPORT_API_ID_FRONTJUMP, 0) + self._RegistApi(SPORT_API_ID_FRONTPOUNCE, 0) + self._RegistApi(SPORT_API_ID_WIGGLEHIPS, 0) + self._RegistApi(SPORT_API_ID_GETSTATE, 0) + self._RegistApi(SPORT_API_ID_ECONOMICGAIT, 0) + self._RegistApi(SPORT_API_ID_HEART, 0) + + self._RegistApi(ROBOT_SPORT_API_ID_LEFTFLIP, 0) + self._RegistApi(ROBOT_SPORT_API_ID_BACKFLIP, 0) + self._RegistApi(ROBOT_SPORT_API_ID_FREEWALK, 0) + self._RegistApi(ROBOT_SPORT_API_ID_FREEBOUND, 0) + self._RegistApi(ROBOT_SPORT_API_ID_FREEJUMP, 0) + self._RegistApi(ROBOT_SPORT_API_ID_FREEAVOID, 0) + self._RegistApi(ROBOT_SPORT_API_ID_WALKSTAIR, 0) + self._RegistApi(ROBOT_SPORT_API_ID_WALKUPRIGHT, 0) + self._RegistApi(ROBOT_SPORT_API_ID_CROSSSTEP, 0) + + # 1001 + def Damp(self): + p = {} + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_DAMP, parameter) + return code + + # 1002 + def BalanceStand(self): + p = {} + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_BALANCESTAND, parameter) + return code + + # 1003 + def StopMove(self): + p = {} + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_STOPMOVE, parameter) + return code + + # 1004 + def StandUp(self): + p = {} + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_STANDUP, parameter) + return code + + # 1005 + def StandDown(self): + p = {} + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_STANDDOWN, parameter) + return code + + # 1006 + def RecoveryStand(self): + p = {} + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_RECOVERYSTAND, parameter) + return code + + # 1007 + def Euler(self, roll: float, pitch: float, yaw: float): + p = {} + p["x"] = roll + p["y"] = pitch + p["z"] = yaw + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_EULER, parameter) + return code + + # 1008 + def Move(self, vx: float, vy: float, vyaw: float): + p = {} + p["x"] = vx + p["y"] = vy + p["z"] = vyaw + parameter = json.dumps(p) + code = self._CallNoReply(SPORT_API_ID_MOVE, parameter) + return code + + # 1009 + def Sit(self): + p = {} + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_SIT, parameter) + return code + + #1010 + def RiseSit(self): + p = {} + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_RISESIT, parameter) + return code + + # 1011 + def SwitchGait(self, t: int): + p = {} + p["data"] = t + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_SWITCHGAIT, parameter) + return code + + # 1012 + def Trigger(self): + p = {} + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_TRIGGER, parameter) + return code + + # 1013 + def BodyHeight(self, height: float): + p = {} + p["data"] = height + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_BODYHEIGHT, parameter) + return code + + # 1014 + def FootRaiseHeight(self, height: float): + p = {} + p["data"] = height + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_FOOTRAISEHEIGHT, parameter) + return code + + # 1015 + def SpeedLevel(self, level: int): + p = {} + p["data"] = level + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_SPEEDLEVEL, parameter) + return code + + # 1016 + def Hello(self): + p = {} + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_HELLO, parameter) + return code + + # 1017 + def Stretch(self): + p = {} + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_STRETCH, parameter) + return code + + # 1018 + def TrajectoryFollow(self, path: list): + l = len(path) + if l != SPORT_PATH_POINT_SIZE: + return SPORT_ERR_CLIENT_POINT_PATH + + path_p = [] + for i in range(l): + point = path[i] + p = {} + p["t_from_start"] = point.timeFromStart + p["x"] = point.x + p["y"] = point.y + p["yaw"] = point.yaw + p["vx"] = point.vx + p["vy"] = point.vy + p["vyaw"] = point.vyaw + path_p.append(p) + + parameter = json.dumps(path_p) + code = self._CallNoReply(SPORT_API_ID_TRAJECTORYFOLLOW, parameter) + return code + + # 1019 + def ContinuousGait(self, flag: int): + p = {} + p["data"] = flag + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_CONTINUOUSGAIT, parameter) + return code + + # # 1020 + # def Content(self): + # p = {} + # parameter = json.dumps(p) + # code, data = self._Call(SPORT_API_ID_CONTENT, parameter) + # return code + + # 1021 + def Wallow(self): + p = {} + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_WALLOW, parameter) + return code + + # 1022 + def Dance1(self): + p = {} + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_DANCE1, parameter) + return code + + # 1023 + def Dance2(self): + p = {} + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_DANCE2, parameter) + return code + + # 1025 + def GetFootRaiseHeight(self): + p = {} + parameter = json.dumps(p) + + code, data = self._Call(SPORT_API_ID_GETFOOTRAISEHEIGHT, parameter) + + if code == 0: + d = json.loads(data) + return code, d["data"] + else: + return code, None + + + # 1026 + def GetSpeedLevel(self): + p = {} + parameter = json.dumps(p) + + code, data = self._Call(SPORT_API_ID_GETSPEEDLEVEL, parameter) + + if code == 0: + d = json.loads(data) + return code, d["data"] + else: + return code, None + + # 1027 + def SwitchJoystick(self, on: bool): + p = {} + p["data"] = on + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_SWITCHJOYSTICK, parameter) + return code + + # 1028 + def Pose(self, flag: bool): + p = {} + p["data"] = flag + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_POSE, parameter) + return code + + # 1029 + def Scrape(self): + p = {} + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_SCRAPE, parameter) + return code + + # 1030 + def FrontFlip(self): + p = {} + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_FRONTFLIP, parameter) + return code + + # 1031 + def FrontJump(self): + p = {} + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_FRONTJUMP, parameter) + return code + + # 1032 + def FrontPounce(self): + p = {} + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_FRONTPOUNCE, parameter) + return code + + # 1033 + def WiggleHips(self): + p = {} + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_WIGGLEHIPS, parameter) + return code + + # 1034 + def GetState(self, keys: list): + parameter = json.dumps(keys) + code, data = self._Call(SPORT_API_ID_GETSTATE, parameter) + if code == 0: + return code, json.loads(data) + else: + return code, None + + # 1035 + def EconomicGait(self, flag: bool): + p = {} + p["data"] = flag + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_ECONOMICGAIT, parameter) + return code + + # 1036 + def Heart(self): + p = {} + parameter = json.dumps(p) + code, data = self._Call(SPORT_API_ID_HEART, parameter) + return code + + # 1042 + def LeftFlip(self): + p = {} + p["data"] = True + parameter = json.dumps(p) + code, data = self._Call(ROBOT_SPORT_API_ID_LEFTFLIP, parameter) + return code + + # 1044 + def BackFlip(self): + p = {} + p["data"] = True + parameter = json.dumps(p) + code, data = self._Call(ROBOT_SPORT_API_ID_BACKFLIP, parameter) + return code + + # 1045 + def FreeWalk(self, flag: bool): + p = {} + p["data"] = True + parameter = json.dumps(p) + code, data = self._Call(ROBOT_SPORT_API_ID_FREEWALK, parameter) + return code + + # 1046 + def FreeBound(self, flag: bool): + p = {} + p["data"] = flag + parameter = json.dumps(p) + code, data = self._Call(ROBOT_SPORT_API_ID_FREEBOUND, parameter) + return code + + # 1047 + def FreeJump(self, flag: bool): + p = {} + p["data"] = flag + parameter = json.dumps(p) + code, data = self._Call(ROBOT_SPORT_API_ID_FREEJUMP, parameter) + return code + + # 1048 + def FreeAvoid(self, flag: bool): + p = {} + p["data"] = flag + parameter = json.dumps(p) + code, data = self._Call(ROBOT_SPORT_API_ID_FREEAVOID, parameter) + return code + + # 1049 + def WalkStair(self, flag: bool): + p = {} + p["data"] = flag + parameter = json.dumps(p) + code, data = self._Call(ROBOT_SPORT_API_ID_WALKSTAIR, parameter) + return code + + # 1050 + def WalkUpright(self, flag: bool): + p = {} + p["data"] = flag + parameter = json.dumps(p) + code, data = self._Call(ROBOT_SPORT_API_ID_WALKUPRIGHT, parameter) + return code + + # 1051 + def CrossStep(self, flag: bool): + p = {} + p["data"] = flag + parameter = json.dumps(p) + code, data = self._Call(ROBOT_SPORT_API_ID_CROSSSTEP, parameter) + return code \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/video/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/video/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/video/video_api.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/video/video_api.py new file mode 100644 index 0000000000000000000000000000000000000000..a4cb1b646dbced31f8e3b5394c23ce34973387e6 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/video/video_api.py @@ -0,0 +1,16 @@ +""" +" service name +""" +VIDEO_SERVICE_NAME = "videohub" + + +""" +" service api version +""" +VIDEO_API_VERSION = "1.0.0.1" + + +""" +" api id +""" +VIDEO_API_ID_GETIMAGESAMPLE = 1001 diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/video/video_client.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/video/video_client.py new file mode 100644 index 0000000000000000000000000000000000000000..79e1fb5abbf5a7b780ec640b3be113d849a76e98 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/video/video_client.py @@ -0,0 +1,23 @@ +import json + +from ...rpc.client import Client +from .video_api import * + + +""" +" class VideoClient +""" +class VideoClient(Client): + def __init__(self): + super().__init__(VIDEO_SERVICE_NAME, False) + + + def Init(self): + # set api version + self._SetApiVerson(VIDEO_API_VERSION) + # regist api + self._RegistApi(VIDEO_API_ID_GETIMAGESAMPLE, 0) + + # 1001 + def GetImageSample(self): + return self._CallBinary(VIDEO_API_ID_GETIMAGESAMPLE, []) diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/vui/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/vui/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/vui/vui_api.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/vui/vui_api.py new file mode 100644 index 0000000000000000000000000000000000000000..d5dcd34028307351ad4fba136456e3435a5a005e --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/vui/vui_api.py @@ -0,0 +1,21 @@ +""" +" service name +""" +VUI_SERVICE_NAME = "vui" + + +""" +" service api version +""" +VUI_API_VERSION = "1.0.0.1" + + +""" +" api id +""" +VUI_API_ID_SETSWITCH = 1001 +VUI_API_ID_GETSWITCH = 1002 +VUI_API_ID_SETVOLUME = 1003 +VUI_API_ID_GETVOLUME = 1004 +VUI_API_ID_SETBRIGHTNESS = 1005 +VUI_API_ID_GETBRIGHTNESS = 1006 diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/vui/vui_client.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/vui/vui_client.py new file mode 100644 index 0000000000000000000000000000000000000000..234f285b8cf1af0016fa92ca236600449b410c2b --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/go2/vui/vui_client.py @@ -0,0 +1,86 @@ +import json + +from ...rpc.client import Client +from .vui_api import * + + +""" +" class VideoClient +""" +class VuiClient(Client): + def __init__(self): + super().__init__(VUI_SERVICE_NAME, False) + + def Init(self): + # set api version + self._SetApiVerson(VUI_API_VERSION) + # regist api + self._RegistApi(VUI_API_ID_SETSWITCH, 0) + self._RegistApi(VUI_API_ID_GETSWITCH, 0) + self._RegistApi(VUI_API_ID_SETVOLUME, 0) + self._RegistApi(VUI_API_ID_GETVOLUME, 0) + self._RegistApi(VUI_API_ID_SETBRIGHTNESS, 0) + self._RegistApi(VUI_API_ID_GETBRIGHTNESS, 0) + + # 1001 + def SetSwitch(self, enable: int): + p = {} + p["enable"] = enable + parameter = json.dumps(p) + + code, data = self._Call(VUI_API_ID_SETSWITCH, parameter) + return code + + # 1002 + def GetSwitch(self): + p = {} + parameter = json.dumps(p) + + code, data = self._Call(VUI_API_ID_GETSWITCH, parameter) + if code == 0: + d = json.loads(data) + return code, d["enable"] + else: + return code, None + + # 1003 + def SetVolume(self, level: int): + p = {} + p["volume"] = level + parameter = json.dumps(p) + + code, data = self._Call(VUI_API_ID_SETVOLUME, parameter) + return code + + # 1006 + def GetVolume(self): + p = {} + parameter = json.dumps(p) + + code, data = self._Call(VUI_API_ID_GETVOLUME, parameter) + if code == 0: + d = json.loads(data) + return code, d["volume"] + else: + return code, None + + # 1005 + def SetBrightness(self, level: int): + p = {} + p["brightness"] = level + parameter = json.dumps(p) + + code, data = self._Call(VUI_API_ID_SETBRIGHTNESS, parameter) + return code + + # 1006 + def GetBrightness(self): + p = {} + parameter = json.dumps(p) + + code, data = self._Call(VUI_API_ID_GETBRIGHTNESS, parameter) + if code == 0: + d = json.loads(data) + return code, d["brightness"] + else: + return code, None \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/h1/loco/h1_loco_api.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/h1/loco/h1_loco_api.py new file mode 100644 index 0000000000000000000000000000000000000000..bd8ddbe5323a57571fde2216ae0d99823884ab83 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/h1/loco/h1_loco_api.py @@ -0,0 +1,31 @@ +""" +" service name +""" +LOCO_SERVICE_NAME = "loco" + + +""" +" service api version +""" +LOCO_API_VERSION = "2.0.0.0" + + +""" +" api id +""" +ROBOT_API_ID_LOCO_GET_FSM_ID = 8001 +ROBOT_API_ID_LOCO_GET_FSM_MODE = 8002 +ROBOT_API_ID_LOCO_GET_BALANCE_MODE = 8003 +ROBOT_API_ID_LOCO_GET_SWING_HEIGHT = 8004 +ROBOT_API_ID_LOCO_GET_STAND_HEIGHT = 8005 +ROBOT_API_ID_LOCO_GET_PHASE = 8006 # deprecated + +ROBOT_API_ID_LOCO_SET_FSM_ID = 8101 +ROBOT_API_ID_LOCO_SET_BALANCE_MODE = 8102 +ROBOT_API_ID_LOCO_SET_SWING_HEIGHT = 8103 +ROBOT_API_ID_LOCO_SET_STAND_HEIGHT = 8104 +ROBOT_API_ID_LOCO_SET_VELOCITY = 8105 + +""" +" error code +""" \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/h1/loco/h1_loco_client.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/h1/loco/h1_loco_client.py new file mode 100644 index 0000000000000000000000000000000000000000..3bc01e3e4fde7505c5640699a3bf4cb808348771 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/h1/loco/h1_loco_client.py @@ -0,0 +1,83 @@ +import json + +from ...rpc.client import Client +from .h1_loco_api import * + +""" +" class SportClient +""" +class LocoClient(Client): + def __init__(self): + super().__init__(LOCO_SERVICE_NAME, False) + + + def Init(self): + # set api version + self._SetApiVerson(LOCO_API_VERSION) + + # regist api + self._RegistApi(ROBOT_API_ID_LOCO_GET_FSM_ID, 0) + self._RegistApi(ROBOT_API_ID_LOCO_GET_FSM_MODE, 0) + self._RegistApi(ROBOT_API_ID_LOCO_GET_BALANCE_MODE, 0) + self._RegistApi(ROBOT_API_ID_LOCO_GET_SWING_HEIGHT, 0) + self._RegistApi(ROBOT_API_ID_LOCO_GET_STAND_HEIGHT, 0) + self._RegistApi(ROBOT_API_ID_LOCO_GET_PHASE, 0) # deprecated + + self._RegistApi(ROBOT_API_ID_LOCO_SET_FSM_ID, 0) + self._RegistApi(ROBOT_API_ID_LOCO_SET_BALANCE_MODE, 0) + self._RegistApi(ROBOT_API_ID_LOCO_SET_SWING_HEIGHT, 0) + self._RegistApi(ROBOT_API_ID_LOCO_SET_STAND_HEIGHT, 0) + self._RegistApi(ROBOT_API_ID_LOCO_SET_VELOCITY, 0) + + # 8101 + def SetFsmId(self, fsm_id: int): + p = {} + p["data"] = fsm_id + parameter = json.dumps(p) + code, data = self._Call(ROBOT_API_ID_LOCO_SET_FSM_ID, parameter) + return code + + # 8104 + def SetStandHeight(self, stand_height: float): + p = {} + p["data"] = stand_height + parameter = json.dumps(p) + code, data = self._Call(ROBOT_API_ID_LOCO_SET_STAND_HEIGHT, parameter) + return code + + # 8105 + def SetVelocity(self, vx: float, vy: float, omega: float, duration: float = 1.0): + p = {} + velocity = [vx,vy,omega] + p["velocity"] = velocity + p["duration"] = duration + parameter = json.dumps(p) + code, data = self._Call(ROBOT_API_ID_LOCO_SET_VELOCITY, parameter) + return code + + def Damp(self): + self.SetFsmId(1) + + def Start(self): + self.SetFsmId(204) + + def StandUp(self): + self.SetFsmId(2) + + def ZeroTorque(self): + self.SetFsmId(0) + + def StopMove(self): + self.SetVelocity(0., 0., 0.) + + def HighStand(self): + UINT32_MAX = (1 << 32) - 1 + self.SetStandHeight(UINT32_MAX) + + def LowStand(self): + UINT32_MIN = 0 + self.SetStandHeight(UINT32_MIN) + + def Move(self, vx: float, vy: float, vyaw: float, continous_move: bool = False): + duration = 864000.0 if continous_move else 1 + self.SetVelocity(vx, vy, vyaw, duration) \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..38d706eca375dcad0cf6dfedebfe0d7ca7ebbd7f --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/__init__.py @@ -0,0 +1,12 @@ +from .default import * +from . import builtin_interfaces, geometry_msgs, sensor_msgs, std_msgs, unitree_go, unitree_api + +__all__ = [ + "builtin_interfaces", + "geometry_msgs", + "sensor_msgs", + "std_msgs", + "unitree_go", + "unitree_hg", + "unitree_api", +] diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ed76d9c0a61e386d4c6f1b822ae3ca16de28a663 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/__pycache__/default.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/__pycache__/default.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0a77ac2aa4f71d4264ce42d9fa8375d436749fb7 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/__pycache__/default.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/builtin_interfaces/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/builtin_interfaces/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c0397fdc3d02ac446ba4ae05e3e27ccfb70192dd --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/builtin_interfaces/__init__.py @@ -0,0 +1,9 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: builtin_interfaces + +""" + +from . import msg +__all__ = ["msg", ] diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/builtin_interfaces/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/builtin_interfaces/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..30fda643a463cb8440b0c84b6d71a196853da1a8 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/builtin_interfaces/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/builtin_interfaces/msg/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/builtin_interfaces/msg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7913980d4a7753d69ce5e988c13a1170ee6181c --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/builtin_interfaces/msg/__init__.py @@ -0,0 +1,9 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: builtin_interfaces.msg + +""" + +from . import dds_ +__all__ = ["dds_", ] diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/builtin_interfaces/msg/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/builtin_interfaces/msg/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..55889906b82c3e47d6948b0adebb1cc8e323df22 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/builtin_interfaces/msg/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/builtin_interfaces/msg/dds_/_Time_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/builtin_interfaces/msg/dds_/_Time_.py new file mode 100644 index 0000000000000000000000000000000000000000..970c671121341d02218e595c78b2be9ba40b247d --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/builtin_interfaces/msg/dds_/_Time_.py @@ -0,0 +1,28 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: builtin_interfaces.msg.dds_ + IDL file: Time_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import builtin_interfaces + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class Time_(idl.IdlStruct, typename="builtin_interfaces.msg.dds_.Time_"): + sec: types.int32 + nanosec: types.uint32 + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/builtin_interfaces/msg/dds_/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/builtin_interfaces/msg/dds_/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c3f9730c66933eac1d489042bf17fe4f5d2493d0 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/builtin_interfaces/msg/dds_/__init__.py @@ -0,0 +1,9 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: builtin_interfaces.msg.dds_ + +""" + +from ._Time_ import Time_ +__all__ = ["Time_", ] diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/builtin_interfaces/msg/dds_/__pycache__/_Time_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/builtin_interfaces/msg/dds_/__pycache__/_Time_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..23bd611fee9beca6dbb7d7e271915c9d316294cf Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/builtin_interfaces/msg/dds_/__pycache__/_Time_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/builtin_interfaces/msg/dds_/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/builtin_interfaces/msg/dds_/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5c0face88b33dd2e804a15a5c2cdc9514287ed8d Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/builtin_interfaces/msg/dds_/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/default.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/default.py new file mode 100644 index 0000000000000000000000000000000000000000..778006a84d7e5abda31b7c218c3cd4c212899491 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/default.py @@ -0,0 +1,272 @@ +from .builtin_interfaces.msg.dds_ import * +from .std_msgs.msg.dds_ import * +from .geometry_msgs.msg.dds_ import * +from .nav_msgs.msg.dds_ import * +from .sensor_msgs.msg.dds_ import * +from .unitree_go.msg.dds_ import * +from .unitree_api.msg.dds_ import * + +# IDL for unitree_hg +from .unitree_hg.msg.dds_ import LowCmd_ as HGLowCmd_ +from .unitree_hg.msg.dds_ import LowState_ as HGLowState_ +from .unitree_hg.msg.dds_ import MotorCmd_ as HGMotorCmd_ +from .unitree_hg.msg.dds_ import MotorState_ as HGMotorState_ +from .unitree_hg.msg.dds_ import BmsState_ as HGBmsState_ +from .unitree_hg.msg.dds_ import IMUState_ as HGIMUState_ +from .unitree_hg.msg.dds_ import MainBoardState_ as HGMainBoardState_ +from .unitree_hg.msg.dds_ import PressSensorState_ as HGPressSensorState_ +from .unitree_hg.msg.dds_ import HandCmd_ as HGHandCmd_ +from .unitree_hg.msg.dds_ import HandState_ as HGHandState_ +from .unitree_hg.msg.dds_ import OdoState_ as HGOdoState_ + +""" +" builtin_interfaces_msgs.msg.dds_ dafault +""" +def builtin_interfaces_msgs_msg_dds__Time_(): + return Time_(0, 0) + + +""" +" std_msgs.msg.dds_ dafault +""" +def std_msgs_msg_dds__Header_(): + return Header_(builtin_interfaces_msgs_msg_dds__Time_(), "") + +def std_msgs_msg_dds__String_(): + return String_("") + + +""" +" geometry_msgs.msg.dds_ dafault +""" +def geometry_msgs_msg_dds__Point_(): + return Point_(0.0, 0.0, 0.0) + +def geometry_msgs_msg_dds__Point32_(): + return Point32_(0.0, 0.0, 0.0) + +def geometry_msgs_msg_dds__PointStamped_(): + return PointStamped_(std_msgs_msg_dds__Header_(), geometry_msgs_msg_dds__Point_()) + +def geometry_msgs_msg_dds__Quaternion_(): + return Quaternion_(0.0, 0.0, 0.0, 0.0) + +def geometry_msgs_msg_dds__Vector3_(): + return Vector3_(0.0, 0.0, 0.0) + +def geometry_msgs_msg_dds__Pose_(): + return Pose_(geometry_msgs_msg_dds__Point_(), geometry_msgs_msg_dds__Quaternion_()) + +def geometry_msgs_msg_dds__Pose2D_(): + return Pose2D_(0.0, 0.0, 0.0) + +def geometry_msgs_msg_dds__PoseStamped_(): + return PoseStamped_(std_msgs_msg_dds__Header_(), geometry_msgs_msg_dds__Pose_()) + +def geometry_msgs_msg_dds__PoseWithCovariance_(): + return PoseWithCovariance_(geometry_msgs_msg_dds__Pose_(), [ + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 + ]) + +def geometry_msgs_msg_dds__PoseWithCovarianceStamped_(): + return PoseWithCovarianceStamped_(std_msgs_msg_dds__Header_(), geometry_msgs_msg_dds__PoseWithCovariance_()) + +def geometry_msgs_msg_dds__QuaternionStamped_(): + return QuaternionStamped_(std_msgs_msg_dds__Header_(), geometry_msgs_msg_dds__Quaternion_()) + +def geometry_msgs_msg_dds__Twist_(): + return Twist_(geometry_msgs_msg_dds__Vector3_(), geometry_msgs_msg_dds__Vector3_()) + +def geometry_msgs_msg_dds__TwistStamped_(): + return TwistStamped_(std_msgs_msg_dds__Header_(), geometry_msgs_msg_dds__Twist_()) + +def geometry_msgs_msg_dds__TwistWithCovariance_(): + return TwistWithCovariance_(geometry_msgs_msg_dds__Twist_(), [ + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 + ]) + +def geometry_msgs_msg_dds__TwistWithCovarianceStamped_(): + return TwistWithCovarianceStamped_(std_msgs_msg_dds__Header_(), geometry_msgs_msg_dds__TwistWithCovariance_()) + + +""" +" nav_msgs.msg.dds_ dafault +""" +def nav_msgs_msg_dds__MapMetaData_(): + return MapMetaData_(builtin_interfaces_msgs_msg_dds__Time_(), 0, 0, geometry_msgs_msg_dds__Pose_()) + +def nav_msgs_msg_dds__OccupancyGrid_(): + return OccupancyGrid_(std_msgs_msg_dds__Header_(), nav_msgs_msg_dds__MapMetaData_(), []) + +def nav_msgs_msg_dds__Odometry_(): + return Odometry_(std_msgs_msg_dds__Header_(), "", geometry_msgs_msg_dds__PoseWithCovariance_(), + geometry_msgs_msg_dds__TwistWithCovariance_()) + + +""" +" sensor_msgs.msg.dds_ dafault +""" +def sensor_msgs_msg_dds__PointField_Constants_PointField_(): + return PointField_("", 0, 0, 0) + +def sensor_msgs_msg_dds__PointField_Constants_PointCloud2_(): + return PointCloud2_(std_msgs_msg_dds__Header_(), 0, 0, [], False, 0, 0, [], False) + + +""" +" unitree_go.msg.dds_ dafault +""" +def unitree_go_msg_dds__AudioData_(): + return AudioData_(0, []) + +def unitree_go_msg_dds__BmsCmd_(): + return BmsCmd_(0, [0, 0, 0]) + +def unitree_go_msg_dds__BmsState_(): + return BmsState_(0, 0, 0, 0, 0, 0, [0, 0], [0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) + +def unitree_go_msg_dds__Error_(): + return Error_(0, 0) + +def unitree_go_msg_dds__Go2FrontVideoData_(): + return Go2FrontVideoData_(0, [], [], []) + +def unitree_go_msg_dds__HeightMap_(): + return HeightMap_(0.0, "", 0.0, 0, 0, [0.0, 0.0], []) + +def unitree_go_msg_dds__IMUState_(): + return IMUState_([0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], 0) + +def unitree_go_msg_dds__InterfaceConfig_(): + return InterfaceConfig_(0, 0, [0, 0]) + +def unitree_go_msg_dds__LidarState_(): + return LidarState_(0.0, "", "", "", 0.0, 0.0, 0, 0.0, 0.0, 0, 0, 0.0, 0.0, [0.0, 0.0, 0.0], 0.0, 0, 0) + +def unitree_go_msg_dds__MotorCmd_(): + return MotorCmd_(0, 0.0, 0.0, 0.0, 0.0, 0.0, [0, 0, 0]) + +def unitree_go_msg_dds__MotorState_(): + return MotorState_(0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0, 0, [0, 0]) + +def unitree_go_msg_dds__LowCmd_(): + return LowCmd_([0, 0], 0, 0, [0, 0], [0, 0], 0, [unitree_go_msg_dds__MotorCmd_() for i in range(20)], + unitree_go_msg_dds__BmsCmd_(), + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0], 0, 0, 0) + +def unitree_go_msg_dds__LowState_(): + return LowState_([0, 0], 0, 0, [0, 0], [0, 0], 0, unitree_go_msg_dds__IMUState_(), + [unitree_go_msg_dds__MotorState_() for i in range(20)], + unitree_go_msg_dds__BmsState_(), [0, 0, 0, 0], [0, 0, 0, 0], 0, + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + 0, 0, 0, 0, 0.0, 0.0, [0, 0, 0, 0], 0, 0) + +def unitree_go_msg_dds__Req_(): + return Req_("", "") + +def unitree_go_msg_dds__Res_(): + return Res_("", [], "") + +def unitree_go_msg_dds__TimeSpec_(): + return TimeSpec_(0, 0) + +def unitree_go_msg_dds__PathPoint_(): + return PathPoint_(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) + +def unitree_go_msg_dds__SportModeState_(): + return SportModeState_(unitree_go_msg_dds__TimeSpec_(), 0, unitree_go_msg_dds__IMUState_(), + 0, 0, 0, 0.0, [0.0, 0.0, 0.0], 0.0, + [0.0, 0.0, 0.0], 0.0, [0.0, 0.0, 0.0, 0.0], [0, 0, 0, 0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], + [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],[unitree_go_msg_dds__PathPoint_() for i in range(10)]) + +def unitree_go_msg_dds__UwbState_(): + return UwbState_([0, 0], 0, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, [0.0, 0.0], 0, 0, 0) + +def unitree_go_msg_dds__UwbSwitch_(): + return UwbSwitch_(0) + +def unitree_go_msg_dds__WirelessController_(): + return WirelessController_(0.0, 0.0, 0.0, 0.0, 0) + + +""" +" unitree_hg.msg.dds_ dafault +""" +def unitree_hg_msg_dds__BmsCmd_(): + return HGBmsCmd_(0, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) + +def unitree_hg_msg_dds__BmsState_(): + return HGBmsState_(0, 0, 0, + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0], 0, 0, 0, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 0, 0, [0, 0, 0, 0, 0], [0, 0, 0]) + +def unitree_hg_msg_dds__IMUState_(): + return HGIMUState_([0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], 0) + +def unitree_hg_msg_dds__MotorCmd_(): + return HGMotorCmd_(0, 0.0, 0.0, 0.0, 0.0, 0.0, 0) + +def unitree_hg_msg_dds__MotorState_(): + return HGMotorState_(0, 0.0, 0.0, 0.0, 0.0, [0, 0], 0.0, [0, 0], 0, [0, 0, 0, 0]) + +def unitree_hg_msg_dds__MainBoardState_(): + return HGMainBoardState_([0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0, 0, 0, 0, 0, 0]) + +def unitree_hg_msg_dds__LowCmd_(): + return HGLowCmd_(0, 0, [unitree_hg_msg_dds__MotorCmd_() for i in range(35)], [0, 0, 0, 0], 0) + +def unitree_hg_msg_dds__LowState_(): + return HGLowState_([0, 0], 0, 0, 0, unitree_hg_msg_dds__IMUState_(), + [unitree_hg_msg_dds__MotorState_() for i in range(35)], + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0], 0) + +def unitree_hg_msg_dds__PressSensorState_(): + return HGPressSensorState_([0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], + [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 0, 0) + +def unitree_hg_msg_dds__HandCmd_(): + return HGHandCmd_([unitree_hg_msg_dds__MotorCmd_() for i in range(7)], [0, 0, 0, 0]) + +def unitree_hg_msg_dds__HandState_(): + return HGHandState_([unitree_hg_msg_dds__MotorState_() for i in range(7)], + [unitree_hg_msg_dds__PressSensorState_() for i in range(7)], + unitree_hg_msg_dds__IMUState_(), + 0.0, 0.0, 0.0, 0.0, [0, 0], [0, 0]) + +def unitree_hg_msg_dds__OdoState_(): + return HGOdoState_([0, 0], 0, [0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], 0) + + +""" +" unitree_api.msg.dds_ dafault +""" +def unitree_api_msg_dds__RequestIdentity_(): + return RequestIdentity_(0, 0) + +def unitree_api_msg_dds__RequestLease_(): + return RequestLease_(0, unitree_hg_msg_dds__IMUState_(), [], ) + +def unitree_api_msg_dds__RequestPolicy_(): + return RequestPolicy_(0, False) + +def unitree_api_msg_dds__RequestHeader_(): + return RequestHeader_(unitree_api_msg_dds__RequestIdentity_(), unitree_api_msg_dds__RequestLease_(), + unitree_api_msg_dds__RequestPolicy_()) + +def unitree_api_msg_dds__Request_(): + return Request_(unitree_api_msg_dds__RequestHeader_(), "", []) + +def unitree_api_msg_dds__ResponseStatus_(): + return ResponseStatus_(0) + +def unitree_api_msg_dds__ResponseHeader_(): + return ResponseHeader_(unitree_api_msg_dds__RequestIdentity_(), unitree_api_msg_dds__ResponseStatus_()) + +def unitree_api_msg_dds__Response_(): + return Response_(unitree_api_msg_dds__ResponseHeader_(), "", [], 0, 0, [0, 0]) + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ab191082914ca13ca10c437234c4a16838544032 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/__init__.py @@ -0,0 +1,9 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: geometry_msgs + +""" + +from . import msg +__all__ = ["msg", ] diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3c9e9d90653cbd497500b301fed79a2cb06ea8b2 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7d10dec2fc98d3255f3220465b4078616a01df44 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/__init__.py @@ -0,0 +1,9 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: geometry_msgs.msg + +""" + +from . import dds_ +__all__ = ["dds_", ] diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a0582abd7a0e689b95360ee30f5cc3534d1bbe13 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Point32_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Point32_.py new file mode 100644 index 0000000000000000000000000000000000000000..34eefd432d97e8574d6ed6f402ce3dcf30300d1b --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Point32_.py @@ -0,0 +1,29 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: geometry_msgs.msg.dds_ + IDL file: Point32_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import geometry_msgs + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class Point32_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.Point32_"): + x: types.float32 + y: types.float32 + z: types.float32 + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_PointStamped_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_PointStamped_.py new file mode 100644 index 0000000000000000000000000000000000000000..19de6aee500432b4c5a9e7f96076afcd8e720332 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_PointStamped_.py @@ -0,0 +1,31 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: geometry_msgs.msg.dds_ + IDL file: PointStamped_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import geometry_msgs + +# if TYPE_CHECKING: +# import std_msgs.msg.dds_ + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class PointStamped_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.PointStamped_"): + header: 'unitree_sdk2py.idl.std_msgs.msg.dds_.Header_' + point: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Point_' + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Point_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Point_.py new file mode 100644 index 0000000000000000000000000000000000000000..efbc5625e363f9b012723c4a641f5621df54f02a --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Point_.py @@ -0,0 +1,29 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: geometry_msgs.msg.dds_ + IDL file: Point_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import geometry_msgs + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class Point_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.Point_"): + x: types.float64 + y: types.float64 + z: types.float64 + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Pose2D_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Pose2D_.py new file mode 100644 index 0000000000000000000000000000000000000000..c223370ee1130b30ac5bd54ea687fab80915a916 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Pose2D_.py @@ -0,0 +1,29 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: geometry_msgs.msg.dds_ + IDL file: Pose2D_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import geometry_msgs + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class Pose2D_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.Pose2D_"): + x: types.float64 + y: types.float64 + theta: types.float64 + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_PoseStamped_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_PoseStamped_.py new file mode 100644 index 0000000000000000000000000000000000000000..7864bb02c2c060d430bbfe049a7bf9cf94a7670a --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_PoseStamped_.py @@ -0,0 +1,32 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: geometry_msgs.msg.dds_ + IDL file: PoseStamped_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import geometry_msgs + +# if TYPE_CHECKING: +# import std_msgs.msg.dds_ + + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class PoseStamped_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.PoseStamped_"): + header: 'unitree_sdk2py.idl.std_msgs.msg.dds_.Header_' + pose: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Pose_' + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_PoseWithCovarianceStamped_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_PoseWithCovarianceStamped_.py new file mode 100644 index 0000000000000000000000000000000000000000..843d4c8e2fe7cad66a57d1dd26b10295f2e3ae31 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_PoseWithCovarianceStamped_.py @@ -0,0 +1,32 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: geometry_msgs.msg.dds_ + IDL file: PoseWithCovarianceStamped_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import geometry_msgs + +# if TYPE_CHECKING: +# import std_msgs.msg.dds_ + + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class PoseWithCovarianceStamped_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.PoseWithCovarianceStamped_"): + header: 'unitree_sdk2py.idl.std_msgs.msg.dds_.Header_' + pose: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.PoseWithCovariance_' + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_PoseWithCovariance_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_PoseWithCovariance_.py new file mode 100644 index 0000000000000000000000000000000000000000..bd7530136371e124b7a2d484e1fed781255e7d55 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_PoseWithCovariance_.py @@ -0,0 +1,28 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: geometry_msgs.msg.dds_ + IDL file: PoseWithCovariance_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import geometry_msgs + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class PoseWithCovariance_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.PoseWithCovariance_"): + pose: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Pose_' + covariance: types.array[types.float64, 36] + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Pose_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Pose_.py new file mode 100644 index 0000000000000000000000000000000000000000..2ea78d1b0c2e29c522787543bbe1604156c0d5fe --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Pose_.py @@ -0,0 +1,28 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: geometry_msgs.msg.dds_ + IDL file: Pose_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import geometry_msgs + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class Pose_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.Pose_"): + position: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Point_' + orientation: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Quaternion_' + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_QuaternionStamped_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_QuaternionStamped_.py new file mode 100644 index 0000000000000000000000000000000000000000..ae2b360571187f5063c2091314a38bb5774dce46 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_QuaternionStamped_.py @@ -0,0 +1,32 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: geometry_msgs.msg.dds_ + IDL file: QuaternionStamped_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import geometry_msgs + +# if TYPE_CHECKING: +# import std_msgs.msg.dds_ + + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class QuaternionStamped_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.QuaternionStamped_"): + header: 'unitree_sdk2py.idl.std_msgs.msg.dds_.Header_' + quaternion: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Quaternion_' + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Quaternion_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Quaternion_.py new file mode 100644 index 0000000000000000000000000000000000000000..0a401fbaf03e05a1263e8dcfeb57dc148e667675 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Quaternion_.py @@ -0,0 +1,30 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: geometry_msgs.msg.dds_ + IDL file: Quaternion_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import geometry_msgs + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class Quaternion_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.Quaternion_"): + x: types.float64 + y: types.float64 + z: types.float64 + w: types.float64 + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_TwistStamped_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_TwistStamped_.py new file mode 100644 index 0000000000000000000000000000000000000000..97aa7c9a3d6cae94a8c71ebd797fc9cd288aead9 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_TwistStamped_.py @@ -0,0 +1,32 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: geometry_msgs.msg.dds_ + IDL file: TwistStamped_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import geometry_msgs + +# if TYPE_CHECKING: +# import std_msgs.msg.dds_ + + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class TwistStamped_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.TwistStamped_"): + header: 'unitree_sdk2py.idl.std_msgs.msg.dds_.Header_' + twist: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Twist_' + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_TwistWithCovarianceStamped_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_TwistWithCovarianceStamped_.py new file mode 100644 index 0000000000000000000000000000000000000000..d322b7f9f1b46b95c5845aa4338db33ee5f16cd6 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_TwistWithCovarianceStamped_.py @@ -0,0 +1,32 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: geometry_msgs.msg.dds_ + IDL file: TwistWithCovarianceStamped_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import geometry_msgs + +# if TYPE_CHECKING: +# import std_msgs.msg.dds_ + + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class TwistWithCovarianceStamped_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.TwistWithCovarianceStamped_"): + header: 'unitree_sdk2py.idl.std_msgs.msg.dds_.Header_' + twist: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.TwistWithCovariance_' + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_TwistWithCovariance_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_TwistWithCovariance_.py new file mode 100644 index 0000000000000000000000000000000000000000..7281bfcc4b2c66dfeba1afa8d0149dbce99ecd6e --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_TwistWithCovariance_.py @@ -0,0 +1,28 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: geometry_msgs.msg.dds_ + IDL file: TwistWithCovariance_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import geometry_msgs + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class TwistWithCovariance_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.TwistWithCovariance_"): + twist: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Twist_' + covariance: types.array[types.float64, 36] + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Twist_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Twist_.py new file mode 100644 index 0000000000000000000000000000000000000000..5cd3b23d0e13e9d7ac1d5923fb007e0dd74f10c2 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Twist_.py @@ -0,0 +1,28 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: geometry_msgs.msg.dds_ + IDL file: Twist_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import geometry_msgs + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class Twist_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.Twist_"): + linear: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Vector3_' + angular: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Vector3_' + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Vector3_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Vector3_.py new file mode 100644 index 0000000000000000000000000000000000000000..9cdeb0f513dae523817bfa241ebaca9c9916f62c --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/_Vector3_.py @@ -0,0 +1,29 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: geometry_msgs.msg.dds_ + IDL file: Vector3_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import geometry_msgs + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class Vector3_(idl.IdlStruct, typename="geometry_msgs.msg.dds_.Vector3_"): + x: types.float64 + y: types.float64 + z: types.float64 + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..68c4fe29153922fb403e264c73e30b6cdf73a94d --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__init__.py @@ -0,0 +1,23 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: geometry_msgs.msg.dds_ + +""" + +from ._Point32_ import Point32_ +from ._Point_ import Point_ +from ._PointStamped_ import PointStamped_ +from ._Pose2D_ import Pose2D_ +from ._Pose_ import Pose_ +from ._PoseStamped_ import PoseStamped_ +from ._PoseWithCovariance_ import PoseWithCovariance_ +from ._PoseWithCovarianceStamped_ import PoseWithCovarianceStamped_ +from ._Quaternion_ import Quaternion_ +from ._QuaternionStamped_ import QuaternionStamped_ +from ._Twist_ import Twist_ +from ._TwistStamped_ import TwistStamped_ +from ._TwistWithCovariance_ import TwistWithCovariance_ +from ._TwistWithCovarianceStamped_ import TwistWithCovarianceStamped_ +from ._Vector3_ import Vector3_ +__all__ = ["Point32_", "Point_", "PointStamped_", "Pose2D_", "Pose_", "PoseStamped_", "PoseWithCovariance_", "PoseWithCovarianceStamped_", "Quaternion_", "QuaternionStamped_", "Twist_", "TwistStamped_", "TwistWithCovariance_", "TwistWithCovarianceStamped_", "Vector3_", ] diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_Point32_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_Point32_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2c8c14a1c7c624afd49493f9c7d4db71a33f5ec8 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_Point32_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_PointStamped_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_PointStamped_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..50aab298670aabef70c0311a6750cc2d8ce50ca1 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_PointStamped_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_Point_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_Point_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a1532b52424bb74d7f8c1b916685705cf2ce2067 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_Point_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_Pose2D_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_Pose2D_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c1d4a153f94e65f8a542a0a1339f06aaee5ff27b Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_Pose2D_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_PoseStamped_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_PoseStamped_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9fc510ff673707bdf15579e31efb4b34621c9781 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_PoseStamped_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_PoseWithCovarianceStamped_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_PoseWithCovarianceStamped_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9d3b3ed0a31d9b68c4d3ba7b6a6b2a8d626c93e5 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_PoseWithCovarianceStamped_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_PoseWithCovariance_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_PoseWithCovariance_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..67f8d2847a0e3c87057d7c3e9d5cf60063ea7337 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_PoseWithCovariance_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_Pose_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_Pose_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a4c475345a60cc1149712800cb4769e775b0e6a8 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_Pose_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_QuaternionStamped_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_QuaternionStamped_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3a480cd3088194a9e1dae0267bc8aaa2f5512819 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_QuaternionStamped_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_Quaternion_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_Quaternion_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..026b59b3c4c4b34ce6c68986cd3b987082c8c21c Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_Quaternion_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_TwistStamped_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_TwistStamped_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0a6545a844ba4eb001ff1b7299b04ab192653994 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_TwistStamped_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_TwistWithCovarianceStamped_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_TwistWithCovarianceStamped_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..66027e7b415853884fe139386e7b2f9c4c0ef4ec Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_TwistWithCovarianceStamped_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_TwistWithCovariance_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_TwistWithCovariance_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4565c535c4f86d7f3c764c61352b0106bee2c69a Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_TwistWithCovariance_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_Twist_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_Twist_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d2d492ff6f1f5cedfb9d81b906be109e8f718a54 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_Twist_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_Vector3_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_Vector3_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3384638ed44d6afd509abbf20e63ebc216752db8 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/_Vector3_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..03f74ea8a4455867157df82f4a22fb3bc281eede Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/geometry_msgs/msg/dds_/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a2724c20cb7d398d1d7310723940d2746e6cf4e3 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/__init__.py @@ -0,0 +1,9 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: nav_msgs + +""" + +from . import msg +__all__ = ["msg", ] diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1ab8e3f8685ccbaacd52fc2c8b4ddd55f7e79af1 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d47683bba44d86b88bf82a986d9cef54bb6022b9 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/__init__.py @@ -0,0 +1,9 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: nav_msgs.msg + +""" + +from . import dds_ +__all__ = ["dds_", ] diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..250b7b68dd7d019bdb62f39a406b855520ede2a1 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/dds_/_MapMetaData_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/dds_/_MapMetaData_.py new file mode 100644 index 0000000000000000000000000000000000000000..9228cd6262cdb5c80849bb64ae00e5f3452df265 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/dds_/_MapMetaData_.py @@ -0,0 +1,35 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: nav_msgs.msg.dds_ + IDL file: MapMetaData_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import nav_msgs + +# if TYPE_CHECKING: +# import builtin_interfaces.msg.dds_ +# import geometry_msgs.msg.dds_ + + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class MapMetaData_(idl.IdlStruct, typename="nav_msgs.msg.dds_.MapMetaData_"): + map_load_time: 'unitree_sdk2py.idl.builtin_interfaces.msg.dds_.Time_' + resolution: types.float32 + width: types.uint32 + height: types.uint32 + origin: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.Pose_' + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/dds_/_OccupancyGrid_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/dds_/_OccupancyGrid_.py new file mode 100644 index 0000000000000000000000000000000000000000..0274c58633563d87cba2a0d3cc10bd3ec00404fa --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/dds_/_OccupancyGrid_.py @@ -0,0 +1,33 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: nav_msgs.msg.dds_ + IDL file: OccupancyGrid_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import nav_msgs + +# if TYPE_CHECKING: +# import std_msgs.msg.dds_ + + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class OccupancyGrid_(idl.IdlStruct, typename="nav_msgs.msg.dds_.OccupancyGrid_"): + header: 'unitree_sdk2py.idl.std_msgs.msg.dds_.Header_' + info: 'unitree_sdk2py.idl.nav_msgs.msg.dds_.MapMetaData_' + data: types.sequence[types.uint8] + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/dds_/_Odometry_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/dds_/_Odometry_.py new file mode 100644 index 0000000000000000000000000000000000000000..054bb5c1ca853fd209b080bbf5cf270ca8abb984 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/dds_/_Odometry_.py @@ -0,0 +1,35 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: nav_msgs.msg.dds_ + IDL file: Odometry_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import nav_msgs + +# if TYPE_CHECKING: +# import geometry_msgs.msg.dds_ +# import std_msgs.msg.dds_ + + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class Odometry_(idl.IdlStruct, typename="nav_msgs.msg.dds_.Odometry_"): + header: 'unitree_sdk2py.idl.std_msgs.msg.dds_.Header_' + child_frame_id: str + pose: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.PoseWithCovariance_' + twist: 'unitree_sdk2py.idl.geometry_msgs.msg.dds_.TwistWithCovariance_' + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/dds_/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/dds_/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a14e17a2568eb89a22e30daaa6a315fc9a198e46 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/dds_/__init__.py @@ -0,0 +1,11 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: nav_msgs.msg.dds_ + +""" + +from ._MapMetaData_ import MapMetaData_ +from ._OccupancyGrid_ import OccupancyGrid_ +from ._Odometry_ import Odometry_ +__all__ = ["MapMetaData_", "OccupancyGrid_", "Odometry_", ] diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/dds_/__pycache__/_MapMetaData_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/dds_/__pycache__/_MapMetaData_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1470dd84500c9dcdc2f86f614c25a598e4a70bdf Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/dds_/__pycache__/_MapMetaData_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/dds_/__pycache__/_OccupancyGrid_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/dds_/__pycache__/_OccupancyGrid_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3d8d0612ef43cf189088e7b0b8ad10a0b6b1873a Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/dds_/__pycache__/_OccupancyGrid_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/dds_/__pycache__/_Odometry_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/dds_/__pycache__/_Odometry_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ae52d481383f3926d89b7371d1045cd4e1caf724 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/dds_/__pycache__/_Odometry_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/dds_/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/dds_/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5f34eca4e38f8067378579215fa5fd7d43f77469 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/nav_msgs/msg/dds_/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..984e7e248126452c8f851dc4a456d77e9028d0a5 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/__init__.py @@ -0,0 +1,9 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: sensor_msgs + +""" + +from . import msg +__all__ = ["msg", ] diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5258f9a161cf137e648341cafbf177fc796b9668 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..62a22921ad85252c3a502616b22a083bd1282507 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/__init__.py @@ -0,0 +1,9 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: sensor_msgs.msg + +""" + +from . import dds_ +__all__ = ["dds_", ] diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..083e2b911fe824f0dc746c1c77539edd0759cd88 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/PointField_Constants/_PointField_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/PointField_Constants/_PointField_.py new file mode 100644 index 0000000000000000000000000000000000000000..673aa84045041f800918805a63aacab3b23ac75f --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/PointField_Constants/_PointField_.py @@ -0,0 +1,28 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: sensor_msgs.msg.dds_.PointField_Constants + IDL file: PointField_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import sensor_msgs + +INT8_ = 1 +UINT8_ = 2 +INT16_ = 3 +UINT16_ = 4 +INT32_ = 5 +UINT32_ = 6 +FLOAT32_ = 7 +FLOAT64_ = 8 + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/PointField_Constants/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/PointField_Constants/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..310fecd8fe30ab1e3975dc3a987ce4b7e0dc93dc --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/PointField_Constants/__init__.py @@ -0,0 +1,9 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: sensor_msgs.msg.dds_.PointField_Constants + +""" + +from ._PointField_ import FLOAT32_, FLOAT64_, INT16_, INT32_, INT8_, UINT16_, UINT32_, UINT8_ +__all__ = ["FLOAT32_", "FLOAT64_", "INT16_", "INT32_", "INT8_", "UINT16_", "UINT32_", "UINT8_", ] diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/PointField_Constants/__pycache__/_PointField_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/PointField_Constants/__pycache__/_PointField_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..869215014225e3b19a8d32b21d91be39b4f3289f Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/PointField_Constants/__pycache__/_PointField_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/PointField_Constants/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/PointField_Constants/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6dfac862f1a5453c34705146779bfd1800f231c0 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/PointField_Constants/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/_PointCloud2_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/_PointCloud2_.py new file mode 100644 index 0000000000000000000000000000000000000000..ffdf713358992a7f27a4f69b246ea0407a78c722 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/_PointCloud2_.py @@ -0,0 +1,39 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: sensor_msgs.msg.dds_ + IDL file: PointCloud2_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import sensor_msgs + +# if TYPE_CHECKING: +# import std_msgs.msg.dds_ + + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class PointCloud2_(idl.IdlStruct, typename="sensor_msgs.msg.dds_.PointCloud2_"): + header: 'unitree_sdk2py.idl.std_msgs.msg.dds_.Header_' + height: types.uint32 + width: types.uint32 + fields: types.sequence['unitree_sdk2py.idl.sensor_msgs.msg.dds_.PointField_'] + is_bigendian: bool + point_step: types.uint32 + row_step: types.uint32 + data: types.sequence[types.uint8] + is_dense: bool + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/_PointField_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/_PointField_.py new file mode 100644 index 0000000000000000000000000000000000000000..e62dbf9f35bac89311400d723659e4bf90c29748 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/_PointField_.py @@ -0,0 +1,30 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: sensor_msgs.msg.dds_ + IDL file: PointField_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import sensor_msgs + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class PointField_(idl.IdlStruct, typename="sensor_msgs.msg.dds_.PointField_"): + name: str + offset: types.uint32 + datatype: types.uint8 + count: types.uint32 + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..68e0141a4cf8683111d3ec7d65d48e9800808481 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/__init__.py @@ -0,0 +1,11 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: sensor_msgs.msg.dds_ + +""" + +from . import PointField_Constants +from ._PointCloud2_ import PointCloud2_ +from ._PointField_ import PointField_ +__all__ = ["PointField_Constants", "PointCloud2_", "PointField_", ] diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/__pycache__/_PointCloud2_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/__pycache__/_PointCloud2_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9567ebc67892e5714fc2cdf1707dc35c4540a679 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/__pycache__/_PointCloud2_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/__pycache__/_PointField_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/__pycache__/_PointField_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fb03153df19643a70a6861e0b451474e648b5bed Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/__pycache__/_PointField_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ce0f0931aae16176bdf1779c9c9b3f4f361c5fa1 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/sensor_msgs/msg/dds_/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c17a7058278c8089d67927930c42e9507d7409bf --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/__init__.py @@ -0,0 +1,9 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: std_msgs + +""" + +from . import msg +__all__ = ["msg", ] diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fce2ed28806ae11a5b537c3670d2baa61d6c781a Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/msg/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/msg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..02c8fe3b58f2bd3402755c78180ef8aace8bb7cb --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/msg/__init__.py @@ -0,0 +1,9 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: std_msgs.msg + +""" + +from . import dds_ +__all__ = ["dds_", ] diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/msg/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/msg/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..42d8a5b9846f1c882cbb9ed248969c2fadd145c3 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/msg/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/msg/dds_/_Header_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/msg/dds_/_Header_.py new file mode 100644 index 0000000000000000000000000000000000000000..bd3564fdb8d7def232802b12e730f3e7e8957f57 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/msg/dds_/_Header_.py @@ -0,0 +1,32 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: std_msgs.msg.dds_ + IDL file: Header_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import std_msgs + +# if TYPE_CHECKING: +# import builtin_interfaces.msg.dds_ + + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class Header_(idl.IdlStruct, typename="std_msgs.msg.dds_.Header_"): + stamp: 'unitree_sdk2py.idl.builtin_interfaces.msg.dds_.Time_' + frame_id: str + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/msg/dds_/_String_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/msg/dds_/_String_.py new file mode 100644 index 0000000000000000000000000000000000000000..052f1223112bee1273b57f11f5432caeaf311c95 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/msg/dds_/_String_.py @@ -0,0 +1,27 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: std_msgs.msg.dds_ + IDL file: String_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import std_msgs + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class String_(idl.IdlStruct, typename="std_msgs.msg.dds_.String_"): + data: str + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/msg/dds_/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/msg/dds_/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f5282e54c7ce2e735d75308b8248c3a72146c8b2 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/msg/dds_/__init__.py @@ -0,0 +1,10 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: std_msgs.msg.dds_ + +""" + +from ._Header_ import Header_ +from ._String_ import String_ +__all__ = ["Header_", "String_", ] diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/msg/dds_/__pycache__/_Header_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/msg/dds_/__pycache__/_Header_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e2476e8a36c6d8d0c480611e3501a94bcc064cb1 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/msg/dds_/__pycache__/_Header_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/msg/dds_/__pycache__/_String_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/msg/dds_/__pycache__/_String_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..eeeb51a5237bb79e78003d46dd630737255e0639 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/msg/dds_/__pycache__/_String_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/msg/dds_/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/msg/dds_/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..00a29bd493523dc987a5145ae6e28907fb03e1e0 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/std_msgs/msg/dds_/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e6546ffa7e3c1a32c9f101ae01cae06096477dc5 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/__init__.py @@ -0,0 +1,9 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.10.2 + Module: unitree_api + +""" + +from . import msg +__all__ = ["msg", ] diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..644c5968251889682c5b02d1b50f2ece692fbf48 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bbf9fded5ebceb537e47ae08edf248e3f3b8db50 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/__init__.py @@ -0,0 +1,9 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.10.2 + Module: unitree_api.msg + +""" + +from . import dds_ +__all__ = ["dds_", ] diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6174db54d927a51d5170dfe22d106c4248026ae6 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/_RequestHeader_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/_RequestHeader_.py new file mode 100644 index 0000000000000000000000000000000000000000..57d67a0bfef0565dfb887499d795c4ec3e9cdb58 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/_RequestHeader_.py @@ -0,0 +1,29 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.10.2 + Module: unitree_api.msg.dds_ + IDL file: RequestHeader_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_api + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class RequestHeader_(idl.IdlStruct, typename="unitree_api.msg.dds_.RequestHeader_"): + identity: 'unitree_sdk2py.idl.unitree_api.msg.dds_.RequestIdentity_' + lease: 'unitree_sdk2py.idl.unitree_api.msg.dds_.RequestLease_' + policy: 'unitree_sdk2py.idl.unitree_api.msg.dds_.RequestPolicy_' + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/_RequestIdentity_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/_RequestIdentity_.py new file mode 100644 index 0000000000000000000000000000000000000000..a891b549619ec0d9a2c71d6526a2be9fcf162357 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/_RequestIdentity_.py @@ -0,0 +1,28 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.10.2 + Module: unitree_api.msg.dds_ + IDL file: RequestIdentity_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_api + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class RequestIdentity_(idl.IdlStruct, typename="unitree_api.msg.dds_.RequestIdentity_"): + id: types.int64 + api_id: types.int64 + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/_RequestLease_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/_RequestLease_.py new file mode 100644 index 0000000000000000000000000000000000000000..32cef0fbb28314b3320e7a071e9545fdfd233c8c --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/_RequestLease_.py @@ -0,0 +1,27 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.10.2 + Module: unitree_api.msg.dds_ + IDL file: RequestLease_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_api + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class RequestLease_(idl.IdlStruct, typename="unitree_api.msg.dds_.RequestLease_"): + id: types.int64 + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/_RequestPolicy_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/_RequestPolicy_.py new file mode 100644 index 0000000000000000000000000000000000000000..aa7ef2fa96dfecc014d5138e69403f330720e073 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/_RequestPolicy_.py @@ -0,0 +1,28 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.10.2 + Module: unitree_api.msg.dds_ + IDL file: RequestPolicy_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_api + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class RequestPolicy_(idl.IdlStruct, typename="unitree_api.msg.dds_.RequestPolicy_"): + priority: types.int32 + noreply: bool + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/_Request_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/_Request_.py new file mode 100644 index 0000000000000000000000000000000000000000..39c6b43423c87222eda36220df27605d92e23161 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/_Request_.py @@ -0,0 +1,28 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.10.2 + Module: unitree_api.msg.dds_ + IDL file: Request_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_api + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class Request_(idl.IdlStruct, typename="unitree_api.msg.dds_.Request_"): + header: 'unitree_sdk2py.idl.unitree_api.msg.dds_.RequestHeader_' + parameter: str + binary: types.sequence[types.uint8] + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/_ResponseHeader_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/_ResponseHeader_.py new file mode 100644 index 0000000000000000000000000000000000000000..ef473401d940cbf05ec9e6531b76da10e99d37b6 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/_ResponseHeader_.py @@ -0,0 +1,28 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.10.2 + Module: unitree_api.msg.dds_ + IDL file: ResponseHeader_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_api + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class ResponseHeader_(idl.IdlStruct, typename="unitree_api.msg.dds_.ResponseHeader_"): + identity: 'unitree_sdk2py.idl.unitree_api.msg.dds_.RequestIdentity_' + status: 'unitree_sdk2py.idl.unitree_api.msg.dds_.ResponseStatus_' + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/_ResponseStatus_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/_ResponseStatus_.py new file mode 100644 index 0000000000000000000000000000000000000000..92c0b1b4cd5b9bb90056e65ce145a15c5a01498a --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/_ResponseStatus_.py @@ -0,0 +1,27 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.10.2 + Module: unitree_api.msg.dds_ + IDL file: ResponseStatus_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_api + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class ResponseStatus_(idl.IdlStruct, typename="unitree_api.msg.dds_.ResponseStatus_"): + code: types.int32 + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/_Response_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/_Response_.py new file mode 100644 index 0000000000000000000000000000000000000000..c743651259c92445b1d8e3c005a2c337b56e99f8 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/_Response_.py @@ -0,0 +1,28 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.10.2 + Module: unitree_api.msg.dds_ + IDL file: Response_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_api + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class Response_(idl.IdlStruct, typename="unitree_api.msg.dds_.Response_"): + header: 'unitree_sdk2py.idl.unitree_api.msg.dds_.ResponseHeader_' + data: str + binary: types.sequence[types.uint8] + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1e4c9f865d2fdcacae6cd6bf9b7d9624a2bb3d2c --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/__init__.py @@ -0,0 +1,16 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.10.2 + Module: unitree_api.msg.dds_ + +""" + +from ._RequestHeader_ import RequestHeader_ +from ._RequestIdentity_ import RequestIdentity_ +from ._RequestLease_ import RequestLease_ +from ._RequestPolicy_ import RequestPolicy_ +from ._Request_ import Request_ +from ._ResponseHeader_ import ResponseHeader_ +from ._ResponseStatus_ import ResponseStatus_ +from ._Response_ import Response_ +__all__ = ["RequestHeader_", "RequestIdentity_", "RequestLease_", "RequestPolicy_", "Request_", "ResponseHeader_", "ResponseStatus_", "Response_", ] diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/__pycache__/_RequestIdentity_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/__pycache__/_RequestIdentity_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..86207bdf23656ad1b9f97ac14e431e5b942da7d9 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/__pycache__/_RequestIdentity_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/__pycache__/_RequestLease_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/__pycache__/_RequestLease_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..009077569870ec9976a00e5e676790335af6bf93 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/__pycache__/_RequestLease_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/__pycache__/_Request_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/__pycache__/_Request_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ed00c81e33299abfc8935ac7270ba9f0039354ce Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/__pycache__/_Request_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/__pycache__/_ResponseHeader_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/__pycache__/_ResponseHeader_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4451373efe9df35463e51f959f0aec73f416f423 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/__pycache__/_ResponseHeader_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4f7407d3fc8d02485c937bfb666a788e69a37b58 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_api/msg/dds_/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b5530061e0bc6195adc4e5980192c55aef6fb828 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/__init__.py @@ -0,0 +1,9 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_go + +""" + +from . import msg +__all__ = ["msg", ] diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7f6f2a11439ff191f026c4b09875a1331af47941 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f8cae9bd40899ad0c0f52ddfcefbd13c01f1ebb6 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/__init__.py @@ -0,0 +1,9 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_go.msg + +""" + +from . import dds_ +__all__ = ["dds_", ] diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7dc6bb0d72e33504a6b9a88ba2fbfafd634e5b18 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_AudioData_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_AudioData_.py new file mode 100644 index 0000000000000000000000000000000000000000..27913c9b8ba384b9aba7ef5ac6206e10d4407f06 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_AudioData_.py @@ -0,0 +1,28 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_go.msg.dds_ + IDL file: AudioData_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_go + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class AudioData_(idl.IdlStruct, typename="unitree_go.msg.dds_.AudioData_"): + time_frame: types.uint64 + data: types.sequence[types.uint8] + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_BmsCmd_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_BmsCmd_.py new file mode 100644 index 0000000000000000000000000000000000000000..5da647ee5a055b2f54da661a8b460d588b75b1aa --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_BmsCmd_.py @@ -0,0 +1,28 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_go.msg.dds_ + IDL file: BmsCmd_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_go + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class BmsCmd_(idl.IdlStruct, typename="unitree_go.msg.dds_.BmsCmd_"): + off: types.uint8 + reserve: types.array[types.uint8, 3] + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_BmsState_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_BmsState_.py new file mode 100644 index 0000000000000000000000000000000000000000..af635e8cde2887aa201c9c38a8bfa721b7055c07 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_BmsState_.py @@ -0,0 +1,35 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_go.msg.dds_ + IDL file: BmsState_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_go + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class BmsState_(idl.IdlStruct, typename="unitree_go.msg.dds_.BmsState_"): + version_high: types.uint8 + version_low: types.uint8 + status: types.uint8 + soc: types.uint8 + current: types.int32 + cycle: types.uint16 + bq_ntc: types.array[types.uint8, 2] + mcu_ntc: types.array[types.uint8, 2] + cell_vol: types.array[types.uint16, 15] + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_Error_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_Error_.py new file mode 100644 index 0000000000000000000000000000000000000000..c338c6953b5e204440ad58292faa99431f35c9e2 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_Error_.py @@ -0,0 +1,28 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_go.msg.dds_ + IDL file: Error_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_go + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class Error_(idl.IdlStruct, typename="unitree_go.msg.dds_.Error_"): + source: types.uint32 + state: types.uint32 + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_Go2FrontVideoData_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_Go2FrontVideoData_.py new file mode 100644 index 0000000000000000000000000000000000000000..04d245b043b03d5bf58050872a46be9a4845d6ac --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_Go2FrontVideoData_.py @@ -0,0 +1,30 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_go.msg.dds_ + IDL file: Go2FrontVideoData_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_go + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class Go2FrontVideoData_(idl.IdlStruct, typename="unitree_go.msg.dds_.Go2FrontVideoData_"): + time_frame: types.uint64 + video720p: types.sequence[types.uint8] + video360p: types.sequence[types.uint8] + video180p: types.sequence[types.uint8] + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_HeightMap_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_HeightMap_.py new file mode 100644 index 0000000000000000000000000000000000000000..48168dad5fcddbb44728e5d39834002c7985265a --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_HeightMap_.py @@ -0,0 +1,33 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_go.msg.dds_ + IDL file: HeightMap_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_go + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class HeightMap_(idl.IdlStruct, typename="unitree_go.msg.dds_.HeightMap_"): + stamp: types.float64 + frame_id: str + resolution: types.float32 + width: types.uint32 + height: types.uint32 + origin: types.array[types.float32, 2] + data: types.sequence[types.float32] + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_IMUState_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_IMUState_.py new file mode 100644 index 0000000000000000000000000000000000000000..e48908fd44816a98cc758c1d6d743712d4a0d860 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_IMUState_.py @@ -0,0 +1,31 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_go.msg.dds_ + IDL file: IMUState_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_go + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class IMUState_(idl.IdlStruct, typename="unitree_go.msg.dds_.IMUState_"): + quaternion: types.array[types.float32, 4] + gyroscope: types.array[types.float32, 3] + accelerometer: types.array[types.float32, 3] + rpy: types.array[types.float32, 3] + temperature: types.uint8 + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_InterfaceConfig_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_InterfaceConfig_.py new file mode 100644 index 0000000000000000000000000000000000000000..5efbd642b66a6200515e8449296d400508e75822 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_InterfaceConfig_.py @@ -0,0 +1,29 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_go.msg.dds_ + IDL file: InterfaceConfig_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_go + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class InterfaceConfig_(idl.IdlStruct, typename="unitree_go.msg.dds_.InterfaceConfig_"): + mode: types.uint8 + value: types.uint8 + reserve: types.array[types.uint8, 2] + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_LidarState_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_LidarState_.py new file mode 100644 index 0000000000000000000000000000000000000000..68610687db191a091ca96da489ebab9895362dd4 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_LidarState_.py @@ -0,0 +1,43 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_go.msg.dds_ + IDL file: LidarState_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_go + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class LidarState_(idl.IdlStruct, typename="unitree_go.msg.dds_.LidarState_"): + stamp: types.float64 + firmware_version: str + software_version: str + sdk_version: str + sys_rotation_speed: types.float32 + com_rotation_speed: types.float32 + error_state: types.uint8 + cloud_frequency: types.float32 + cloud_packet_loss_rate: types.float32 + cloud_size: types.uint32 + cloud_scan_num: types.uint32 + imu_frequency: types.float32 + imu_packet_loss_rate: types.float32 + imu_rpy: types.array[types.float32, 3] + serial_recv_stamp: types.float64 + serial_buffer_size: types.uint32 + serial_buffer_read: types.uint32 + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_LowCmd_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_LowCmd_.py new file mode 100644 index 0000000000000000000000000000000000000000..bcd4781f660ba9c81404a66bca4cd35c5c7dc511 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_LowCmd_.py @@ -0,0 +1,40 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_go.msg.dds_ + IDL file: LowCmd_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_go + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class LowCmd_(idl.IdlStruct, typename="unitree_go.msg.dds_.LowCmd_"): + head: types.array[types.uint8, 2] + level_flag: types.uint8 + frame_reserve: types.uint8 + sn: types.array[types.uint32, 2] + version: types.array[types.uint32, 2] + bandwidth: types.uint16 + motor_cmd: types.array['unitree_sdk2py.idl.unitree_go.msg.dds_.MotorCmd_', 20] + bms_cmd: 'unitree_sdk2py.idl.unitree_go.msg.dds_.BmsCmd_' + wireless_remote: types.array[types.uint8, 40] + led: types.array[types.uint8, 12] + fan: types.array[types.uint8, 2] + gpio: types.uint8 + reserve: types.uint32 + crc: types.uint32 + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_LowState_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_LowState_.py new file mode 100644 index 0000000000000000000000000000000000000000..79ecbe6dc9f996abf0cecca8dda51f95e91cbcab --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_LowState_.py @@ -0,0 +1,48 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_go.msg.dds_ + IDL file: LowState_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_go + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class LowState_(idl.IdlStruct, typename="unitree_go.msg.dds_.LowState_"): + head: types.array[types.uint8, 2] + level_flag: types.uint8 + frame_reserve: types.uint8 + sn: types.array[types.uint32, 2] + version: types.array[types.uint32, 2] + bandwidth: types.uint16 + imu_state: 'unitree_sdk2py.idl.unitree_go.msg.dds_.IMUState_' + motor_state: types.array['unitree_sdk2py.idl.unitree_go.msg.dds_.MotorState_', 20] + bms_state: 'unitree_sdk2py.idl.unitree_go.msg.dds_.BmsState_' + foot_force: types.array[types.int16, 4] + foot_force_est: types.array[types.int16, 4] + tick: types.uint32 + wireless_remote: types.array[types.uint8, 40] + bit_flag: types.uint8 + adc_reel: types.float32 + temperature_ntc1: types.uint8 + temperature_ntc2: types.uint8 + power_v: types.float32 + power_a: types.float32 + fan_frequency: types.array[types.uint16, 4] + reserve: types.uint32 + crc: types.uint32 + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_MotorCmd_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_MotorCmd_.py new file mode 100644 index 0000000000000000000000000000000000000000..5a2dd85fa21fa7b6e422667607243aa1dddb5d97 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_MotorCmd_.py @@ -0,0 +1,33 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_go.msg.dds_ + IDL file: MotorCmd_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_go + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class MotorCmd_(idl.IdlStruct, typename="unitree_go.msg.dds_.MotorCmd_"): + mode: types.uint8 + q: types.float32 + dq: types.float32 + tau: types.float32 + kp: types.float32 + kd: types.float32 + reserve: types.array[types.uint32, 3] + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_MotorCmds_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_MotorCmds_.py new file mode 100644 index 0000000000000000000000000000000000000000..11d30297f7126c343a33d2cd7ff70240afd51a31 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_MotorCmds_.py @@ -0,0 +1,23 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_go.msg.dds_ + IDL file: MotorCmds_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass, field + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class MotorCmds_(idl.IdlStruct, typename="unitree_go.msg.dds_.MotorCmds_"): + cmds: types.sequence['unitree_sdk2py.idl.unitree_go.msg.dds_.MotorCmd_'] = field(default_factory=lambda: []) + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_MotorState_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_MotorState_.py new file mode 100644 index 0000000000000000000000000000000000000000..0787acb3c13ab7bbbc7fc1499ec0be34ede1f998 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_MotorState_.py @@ -0,0 +1,37 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_go.msg.dds_ + IDL file: MotorState_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_go + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class MotorState_(idl.IdlStruct, typename="unitree_go.msg.dds_.MotorState_"): + mode: types.uint8 + q: types.float32 + dq: types.float32 + ddq: types.float32 + tau_est: types.float32 + q_raw: types.float32 + dq_raw: types.float32 + ddq_raw: types.float32 + temperature: types.uint8 + lost: types.uint32 + reserve: types.array[types.uint32, 2] + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_MotorStates_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_MotorStates_.py new file mode 100644 index 0000000000000000000000000000000000000000..4b0245ba78355636bd078ce0cc25d0fc6f2709e9 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_MotorStates_.py @@ -0,0 +1,23 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_go.msg.dds_ + IDL file: MotorStates_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass, field + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class MotorStates_(idl.IdlStruct, typename="unitree_go.msg.dds_.MotorStates_"): + states: types.sequence['unitree_sdk2py.idl.unitree_go.msg.dds_.MotorState_'] = field(default_factory=lambda: []) + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_PathPoint_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_PathPoint_.py new file mode 100644 index 0000000000000000000000000000000000000000..20a8c55d34d8933ed51a018025c0e929534f1fee --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_PathPoint_.py @@ -0,0 +1,33 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_go.msg.dds_ + IDL file: PathPoint_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_go + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class PathPoint_(idl.IdlStruct, typename="unitree_go.msg.dds_.PathPoint_"): + t_from_start: types.float32 + x: types.float32 + y: types.float32 + yaw: types.float32 + vx: types.float32 + vy: types.float32 + vyaw: types.float32 + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_Req_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_Req_.py new file mode 100644 index 0000000000000000000000000000000000000000..5bb39b35a92f7add9ede6454193d9cae5dfc3ec0 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_Req_.py @@ -0,0 +1,28 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_go.msg.dds_ + IDL file: Req_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_go + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class Req_(idl.IdlStruct, typename="unitree_go.msg.dds_.Req_"): + uuid: str + body: str + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_Res_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_Res_.py new file mode 100644 index 0000000000000000000000000000000000000000..684a5a705bf37e867d5b11faa6d166769220ede9 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_Res_.py @@ -0,0 +1,29 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_go.msg.dds_ + IDL file: Res_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_go + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class Res_(idl.IdlStruct, typename="unitree_go.msg.dds_.Res_"): + uuid: str + data: types.sequence[types.uint8] + body: str + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_SportModeState_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_SportModeState_.py new file mode 100644 index 0000000000000000000000000000000000000000..e0a26a156b26b50aca98178cfc855ff030dfc153 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_SportModeState_.py @@ -0,0 +1,42 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_go.msg.dds_ + IDL file: SportModeState_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_go + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class SportModeState_(idl.IdlStruct, typename="unitree_go.msg.dds_.SportModeState_"): + stamp: 'unitree_sdk2py.idl.unitree_go.msg.dds_.TimeSpec_' + error_code: types.uint32 + imu_state: 'unitree_sdk2py.idl.unitree_go.msg.dds_.IMUState_' + mode: types.uint8 + progress: types.float32 + gait_type: types.uint8 + foot_raise_height: types.float32 + position: types.array[types.float32, 3] + body_height: types.float32 + velocity: types.array[types.float32, 3] + yaw_speed: types.float32 + range_obstacle: types.array[types.float32, 4] + foot_force: types.array[types.int16, 4] + foot_position_body: types.array[types.float32, 12] + foot_speed_body: types.array[types.float32, 12] + path_point: types.array['unitree_sdk2py.idl.unitree_go.msg.dds_.PathPoint_', 10] + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_TimeSpec_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_TimeSpec_.py new file mode 100644 index 0000000000000000000000000000000000000000..7a580b6b82c5487057a7b36d6917802974687262 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_TimeSpec_.py @@ -0,0 +1,28 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_go.msg.dds_ + IDL file: TimeSpec_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_go + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class TimeSpec_(idl.IdlStruct, typename="unitree_go.msg.dds_.TimeSpec_"): + sec: types.int32 + nanosec: types.uint32 + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_UwbState_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_UwbState_.py new file mode 100644 index 0000000000000000000000000000000000000000..d5f258885bad02a4c8cd0fce020a3e13976e7540 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_UwbState_.py @@ -0,0 +1,43 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_go.msg.dds_ + IDL file: UwbState_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_go + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class UwbState_(idl.IdlStruct, typename="unitree_go.msg.dds_.UwbState_"): + version: types.array[types.uint8, 2] + channel: types.uint8 + joy_mode: types.uint8 + orientation_est: types.float32 + pitch_est: types.float32 + distance_est: types.float32 + yaw_est: types.float32 + tag_roll: types.float32 + tag_pitch: types.float32 + tag_yaw: types.float32 + base_roll: types.float32 + base_pitch: types.float32 + base_yaw: types.float32 + joystick: types.array[types.float32, 2] + error_state: types.uint8 + buttons: types.uint8 + enabled_from_app: types.uint8 + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_UwbSwitch_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_UwbSwitch_.py new file mode 100644 index 0000000000000000000000000000000000000000..b902ef8985b305ac2d3ccd63daf5610d45a23e34 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_UwbSwitch_.py @@ -0,0 +1,27 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_go.msg.dds_ + IDL file: UwbSwitch_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_go + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class UwbSwitch_(idl.IdlStruct, typename="unitree_go.msg.dds_.UwbSwitch_"): + enabled: types.uint8 + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_WirelessController_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_WirelessController_.py new file mode 100644 index 0000000000000000000000000000000000000000..18919dde4c8d35056b44f7f739717a0de3fa8d03 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/_WirelessController_.py @@ -0,0 +1,31 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_go.msg.dds_ + IDL file: WirelessController_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_go + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class WirelessController_(idl.IdlStruct, typename="unitree_go.msg.dds_.WirelessController_"): + lx: types.float32 + ly: types.float32 + rx: types.float32 + ry: types.float32 + keys: types.uint16 + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fc24f6f177555a511c3540f3cc2c9ee80ca92b80 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__init__.py @@ -0,0 +1,31 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_go.msg.dds_ + +""" + +from ._AudioData_ import AudioData_ +from ._BmsCmd_ import BmsCmd_ +from ._BmsState_ import BmsState_ +from ._Error_ import Error_ +from ._Go2FrontVideoData_ import Go2FrontVideoData_ +from ._HeightMap_ import HeightMap_ +from ._IMUState_ import IMUState_ +from ._InterfaceConfig_ import InterfaceConfig_ +from ._LidarState_ import LidarState_ +from ._LowCmd_ import LowCmd_ +from ._LowState_ import LowState_ +from ._MotorCmd_ import MotorCmd_ +from ._MotorCmds_ import MotorCmds_ +from ._MotorState_ import MotorState_ +from ._MotorStates_ import MotorStates_ +from ._Req_ import Req_ +from ._Res_ import Res_ +from ._SportModeState_ import SportModeState_ +from ._TimeSpec_ import TimeSpec_ +from ._PathPoint_ import PathPoint_ +from ._UwbState_ import UwbState_ +from ._UwbSwitch_ import UwbSwitch_ +from ._WirelessController_ import WirelessController_ +__all__ = ["AudioData_", "BmsCmd_", "BmsState_", "Error_", "Go2FrontVideoData_", "HeightMap_", "IMUState_", "InterfaceConfig_", "LidarState_", "LowCmd_", "LowState_", "MotorCmd_", "MotorCmds_", "MotorState_", "MotorStates_", "Req_", "Res_", "SportModeState_", "TimeSpec_", "PathPoint_", "UwbState_", "UwbSwitch_", "WirelessController_", ] diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_AudioData_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_AudioData_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..441a613afed964832ce40297f1c5be575197cbb8 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_AudioData_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_BmsCmd_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_BmsCmd_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..06102fbbddee058af90862ca0abb1dae60ab361a Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_BmsCmd_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_BmsState_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_BmsState_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..08cfb348e1b316a77fb2b6caa6fc45e0a2289a6b Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_BmsState_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_Error_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_Error_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..abf838bb5e940f5ad9ef3becc0a8b1cf3a794639 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_Error_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_Go2FrontVideoData_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_Go2FrontVideoData_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..881088559b02493fb965eb638a3c258e00b5a888 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_Go2FrontVideoData_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_HeightMap_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_HeightMap_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..72438055637790879628e5be021847e9365bb7e9 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_HeightMap_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_IMUState_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_IMUState_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..36a1eb8b67a1d8b8040deeb7d53fe53a9211efca Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_IMUState_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_InterfaceConfig_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_InterfaceConfig_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f9e7148b2e20ad3445a515fdce1b666b184fa495 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_InterfaceConfig_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_LidarState_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_LidarState_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e08b1156617583028183e5db6a5976beefbcc76b Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_LidarState_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_LowCmd_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_LowCmd_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..167b186928eb34a26ab2068d5079e65a25997f9e Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_LowCmd_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_LowState_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_LowState_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..64ef460e84cffda4a7f94c7241b1e712f881460c Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_LowState_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_MotorCmd_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_MotorCmd_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e93fc22fad01cfd2d4e54fd7009e74016c12d113 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_MotorCmd_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_MotorCmds_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_MotorCmds_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f8311d681a12f1db0fec63d5602d29edae0d1159 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_MotorCmds_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_MotorState_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_MotorState_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6e0286422989121a9ad6cb41b41af570a4ea4d56 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_MotorState_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_MotorStates_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_MotorStates_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..72c5a3b3b777e4c61507d1f4fdb6027450662368 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_MotorStates_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_PathPoint_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_PathPoint_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2eb7ebbcbd793d9b5770d96b7be9bf95fdb7d604 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_PathPoint_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_Req_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_Req_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..23644b9b02231bf67e2ea912b307ca7ef23704e6 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_Req_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_Res_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_Res_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..79bc4fb42bd091e52bcc0896a61723eef0f0442f Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_Res_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_SportModeState_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_SportModeState_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..07c0032e5ec4da348f36795477e68409a3b8c742 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_SportModeState_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_TimeSpec_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_TimeSpec_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9a852fc79bec2c053ae23ce5869fe79e8ad44b46 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_TimeSpec_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_UwbState_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_UwbState_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b3e8b1fbb3d4a52f78acb158c015007c941cabe7 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_UwbState_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_UwbSwitch_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_UwbSwitch_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5723c48fede7aa0b976b0082d165d2b2a889e1e2 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_UwbSwitch_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_WirelessController_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_WirelessController_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..af5db4ad2ad7158e16b3d8ae10578b4f83379c8b Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/_WirelessController_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b9f99743427f80dbe784adb889b483cd5b63088c Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_go/msg/dds_/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/.idlpy_manifest b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/.idlpy_manifest new file mode 100644 index 0000000000000000000000000000000000000000..fd4ea941d06367df426b56377ef7b3cc9bddd06a --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/.idlpy_manifest @@ -0,0 +1,43 @@ +BmsCmd_ +msg + + +BmsState_ +msg + + +HandCmd_ +msg + + +HandState_ +msg + + +IMUState_ +msg + + +LowCmd_ +msg + + +LowState_ +msg + + +MainBoardState_ +msg + + +MotorCmd_ +msg + + +MotorState_ +msg + + +PressSensorState_ +msg + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5f55ee5a77008c92ae6b92445898075a10734cc0 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/__init__.py @@ -0,0 +1,9 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_hg + +""" + +from . import msg +__all__ = ["msg", ] diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..11a221147b755f656675a06d7dbac67e3cf33841 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/.idlpy_manifest b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/.idlpy_manifest new file mode 100644 index 0000000000000000000000000000000000000000..3218e96c25558fc49619ee52b9d5d5b7ab9de813 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/.idlpy_manifest @@ -0,0 +1,43 @@ +BmsCmd_ +dds_ + + +BmsState_ +dds_ + + +HandCmd_ +dds_ + + +HandState_ +dds_ + + +IMUState_ +dds_ + + +LowCmd_ +dds_ + + +LowState_ +dds_ + + +MainBoardState_ +dds_ + + +MotorCmd_ +dds_ + + +MotorState_ +dds_ + + +PressSensorState_ +dds_ + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..02b132d52fadc2ad33bdbc4e0917727b2e44ad3b --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/__init__.py @@ -0,0 +1,9 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_hg.msg + +""" + +from . import dds_ +__all__ = ["dds_", ] diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..67a4a2bf664e7643ecaa2ef043b39f5506181860 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/.idlpy_manifest b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/.idlpy_manifest new file mode 100644 index 0000000000000000000000000000000000000000..6174f37e074cc58dbda3ed45cc32e07915acb279 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/.idlpy_manifest @@ -0,0 +1,43 @@ +BmsCmd_ + +BmsCmd_ + +BmsState_ + +BmsState_ + +HandCmd_ + +HandCmd_ + +HandState_ + +HandState_ + +IMUState_ + +IMUState_ + +LowCmd_ + +LowCmd_ + +LowState_ + +LowState_ + +MainBoardState_ + +MainBoardState_ + +MotorCmd_ + +MotorCmd_ + +MotorState_ + +MotorState_ + +PressSensorState_ + +PressSensorState_ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_BmsCmd_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_BmsCmd_.py new file mode 100644 index 0000000000000000000000000000000000000000..525d1a402fd3577e6e9827faaafb98908221a205 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_BmsCmd_.py @@ -0,0 +1,28 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_hg.msg.dds_ + IDL file: BmsCmd_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_hg + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class BmsCmd_(idl.IdlStruct, typename="unitree_hg.msg.dds_.BmsCmd_"): + cmd: types.uint8 + reserve: types.array[types.uint8, 40] + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_BmsState_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_BmsState_.py new file mode 100644 index 0000000000000000000000000000000000000000..dd0c6bd441f42bff3e94a62c82ed963ea31c879c --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_BmsState_.py @@ -0,0 +1,39 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_hg.msg.dds_ + IDL file: BmsState_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_hg + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class BmsState_(idl.IdlStruct, typename="unitree_hg.msg.dds_.BmsState_"): + version_high: types.uint8 + version_low: types.uint8 + fn: types.uint8 + cell_vol: types.array[types.uint16, 40] + bmsvoltage: types.array[types.uint32, 3] + current: types.int32 + soc: types.uint8 + soh: types.uint8 + temperature: types.array[types.int16, 12] + cycle: types.uint16 + manufacturer_date: types.uint16 + bmsstate: types.array[types.uint32, 5] + reserve: types.array[types.uint32, 3] + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_HandCmd_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_HandCmd_.py new file mode 100644 index 0000000000000000000000000000000000000000..044afcbe6ba86dc347f24e8a26267051b143387a --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_HandCmd_.py @@ -0,0 +1,28 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_hg.msg.dds_ + IDL file: HandCmd_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_hg + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class HandCmd_(idl.IdlStruct, typename="unitree_hg.msg.dds_.HandCmd_"): + motor_cmd: types.sequence['unitree_sdk2py.idl.unitree_hg.msg.dds_.MotorCmd_'] + reserve: types.array[types.uint32, 4] + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_HandState_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_HandState_.py new file mode 100644 index 0000000000000000000000000000000000000000..351dc75eeb9bdea6a9b5562921255c8a38a20639 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_HandState_.py @@ -0,0 +1,35 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_hg.msg.dds_ + IDL file: HandState_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_hg + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class HandState_(idl.IdlStruct, typename="unitree_hg.msg.dds_.HandState_"): + motor_state: types.sequence['unitree_sdk2py.idl.unitree_hg.msg.dds_.MotorState_'] + press_sensor_state: types.sequence['unitree_sdk2py.idl.unitree_hg.msg.dds_.PressSensorState_'] + imu_state: 'unitree_sdk2py.idl.unitree_hg.msg.dds_.IMUState_' + power_v: types.float32 + power_a: types.float32 + system_v: types.float32 + device_v: types.float32 + error: types.array[types.uint32, 2] + reserve: types.array[types.uint32, 2] + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_IMUState_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_IMUState_.py new file mode 100644 index 0000000000000000000000000000000000000000..75d01a64ccfce815e3f68bd100cbad92a455c367 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_IMUState_.py @@ -0,0 +1,31 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_hg.msg.dds_ + IDL file: IMUState_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_hg + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class IMUState_(idl.IdlStruct, typename="unitree_hg.msg.dds_.IMUState_"): + quaternion: types.array[types.float32, 4] + gyroscope: types.array[types.float32, 3] + accelerometer: types.array[types.float32, 3] + rpy: types.array[types.float32, 3] + temperature: types.int16 + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_LowCmd_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_LowCmd_.py new file mode 100644 index 0000000000000000000000000000000000000000..56b4b8bab22bba943d3a49d6c0260d67c20c87fa --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_LowCmd_.py @@ -0,0 +1,31 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_hg.msg.dds_ + IDL file: LowCmd_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_hg + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class LowCmd_(idl.IdlStruct, typename="unitree_hg.msg.dds_.LowCmd_"): + mode_pr: types.uint8 + mode_machine: types.uint8 + motor_cmd: types.array['unitree_sdk2py.idl.unitree_hg.msg.dds_.MotorCmd_', 35] + reserve: types.array[types.uint32, 4] + crc: types.uint32 + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_LowState_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_LowState_.py new file mode 100644 index 0000000000000000000000000000000000000000..003c815e9daac85d3d27979de9472cb1f88285ba --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_LowState_.py @@ -0,0 +1,37 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_hg.msg.dds_ + IDL file: LowState_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_hg + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class LowState_(idl.IdlStruct, typename="unitree_hg.msg.dds_.LowState_"): + version: types.array[types.uint32, 2] + mode_pr: types.uint8 + mode_machine: types.uint8 + tick: types.uint32 + imu_state: 'unitree_sdk2py.idl.unitree_hg.msg.dds_.IMUState_' + # position: types.array[types.float32, 3] + # linear_velocity: types.array[types.float32, 3] + motor_state: types.array['unitree_sdk2py.idl.unitree_hg.msg.dds_.MotorState_', 35] + wireless_remote: types.array[types.uint8, 40] + reserve: types.array[types.uint32, 4] + crc: types.uint32 + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_MainBoardState_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_MainBoardState_.py new file mode 100644 index 0000000000000000000000000000000000000000..c28024590e6a0ddd4e765c920c01135bec475fbc --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_MainBoardState_.py @@ -0,0 +1,30 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_hg.msg.dds_ + IDL file: MainBoardState_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_hg + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class MainBoardState_(idl.IdlStruct, typename="unitree_hg.msg.dds_.MainBoardState_"): + fan_state: types.array[types.uint16, 6] + temperature: types.array[types.int16, 6] + value: types.array[types.float32, 6] + state: types.array[types.uint32, 6] + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_MotorCmd_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_MotorCmd_.py new file mode 100644 index 0000000000000000000000000000000000000000..3dd8f9da38d863380b3724a25f688633027293d1 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_MotorCmd_.py @@ -0,0 +1,33 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_hg.msg.dds_ + IDL file: MotorCmd_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_hg + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class MotorCmd_(idl.IdlStruct, typename="unitree_hg.msg.dds_.MotorCmd_"): + mode: types.uint8 + q: types.float32 + dq: types.float32 + tau: types.float32 + kp: types.float32 + kd: types.float32 + reserve: types.uint32 + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_MotorState_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_MotorState_.py new file mode 100644 index 0000000000000000000000000000000000000000..839fccfdd4cde45ed73a36a9ab23ec16ec272b6b --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_MotorState_.py @@ -0,0 +1,36 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_hg.msg.dds_ + IDL file: MotorState_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_hg + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class MotorState_(idl.IdlStruct, typename="unitree_hg.msg.dds_.MotorState_"): + mode: types.uint8 + q: types.float32 + dq: types.float32 + ddq: types.float32 + tau_est: types.float32 + temperature: types.array[types.int16, 2] + vol: types.float32 + sensor: types.array[types.uint32, 2] + motorstate: types.uint32 + reserve: types.array[types.uint32, 4] + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_OdoState_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_OdoState_.py new file mode 100644 index 0000000000000000000000000000000000000000..f3ff6738772468bef2a30d351252902c5e7cc276 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_OdoState_.py @@ -0,0 +1,32 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DX IDL version: v0.11.0 + Module: unitree_hg.msg.dds_ + IDL file: OdoState_.idl + + +""" + +from enum import auto +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_hg + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class OdoState_(idl.IdlStruct, typename="unitree_hg.msg.dds_.OdoState_"): + version: types.array[types.uint32, 2] + tick: types.uint32 + position: types.array[types.float32, 3] + orientation: types.array[types.float32, 4] # quaternion [x, y, z, w] + linear_velocity: types.array[types.float32, 3] + angular_velocity: types.array[types.float32, 3] + crc: types.uint32 + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_PressSensorState_.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_PressSensorState_.py new file mode 100644 index 0000000000000000000000000000000000000000..7dcf79462f9962e1fae26f33ea29921efb1e3a9a --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/_PressSensorState_.py @@ -0,0 +1,30 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_hg.msg.dds_ + IDL file: PressSensorState_.idl + +""" + +from enum import auto +from typing import TYPE_CHECKING, Optional +from dataclasses import dataclass + +import cyclonedds.idl as idl +import cyclonedds.idl.annotations as annotate +import cyclonedds.idl.types as types + +# root module import for resolving types +# import unitree_hg + + +@dataclass +@annotate.final +@annotate.autoid("sequential") +class PressSensorState_(idl.IdlStruct, typename="unitree_hg.msg.dds_.PressSensorState_"): + pressure: types.array[types.float32, 12] + temperature: types.array[types.float32, 12] + lost: types.uint32 + reserve: types.uint32 + + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b4bca37f937d4ad3b14ad1d7135f3b04db000d39 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__init__.py @@ -0,0 +1,20 @@ +""" + Generated by Eclipse Cyclone DDS idlc Python Backend + Cyclone DDS IDL version: v0.11.0 + Module: unitree_hg.msg.dds_ + +""" + +from ._BmsCmd_ import BmsCmd_ +from ._BmsState_ import BmsState_ +from ._HandCmd_ import HandCmd_ +from ._HandState_ import HandState_ +from ._IMUState_ import IMUState_ +from ._OdoState_ import OdoState_ +from ._LowCmd_ import LowCmd_ +from ._LowState_ import LowState_ +from ._MainBoardState_ import MainBoardState_ +from ._MotorCmd_ import MotorCmd_ +from ._MotorState_ import MotorState_ +from ._PressSensorState_ import PressSensorState_ +__all__ = ["BmsCmd_", "BmsState_", "HandCmd_", "HandState_", "IMUState_", "OdoState_", "LowCmd_", "LowState_", "MainBoardState_", "MotorCmd_", "MotorState_", "PressSensorState_", ] diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_BmsCmd_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_BmsCmd_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2b5e19cde7bea0ee5f9791f4dc139225a6e5e151 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_BmsCmd_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_BmsState_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_BmsState_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5d2f20279722ea3b560cf47d4e5f7a09a19e42cc Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_BmsState_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_HandCmd_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_HandCmd_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..790d3dad7fa87d08ad3110b326cb11fef722cca6 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_HandCmd_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_HandState_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_HandState_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ed961f26e467dc41e0bdce4c6f06db3152c8a20a Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_HandState_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_IMUState_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_IMUState_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3a247a1a683e48ef29ec970aa3caa30aff423fd9 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_IMUState_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_LowCmd_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_LowCmd_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..73dcc650aa245dc585ff164bb654b78e80072cd0 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_LowCmd_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_LowState_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_LowState_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..edcc981a40308c347cef7fe380747f6cbfd274e2 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_LowState_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_MainBoardState_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_MainBoardState_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ae74a1430bfdcb4da8c38d2f6cf8b5d9c799d08f Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_MainBoardState_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_MotorCmd_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_MotorCmd_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..280e839ac2a9cb35f51439da1934b384e82af5ab Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_MotorCmd_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_MotorState_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_MotorState_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e45ed9a14e3fb4ef07700685af5d5f4856c2d1f6 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_MotorState_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_OdoState_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_OdoState_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cf5a292cf4b52aff42fd35dd1ec6d4a9b3054c02 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_OdoState_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_PressSensorState_.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_PressSensorState_.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e56cde1cebce8060c4a2088bcac5eb8ef34cc4b4 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/_PressSensorState_.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..77cca295ec9ed8ec44646388e4ff843dda12fc8d Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/idl/unitree_hg/msg/dds_/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..39eb96f74ac7a06b48f32a11051b7e72352fe97d Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/client.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/client.py new file mode 100644 index 0000000000000000000000000000000000000000..d774e538396c44a4f8a1e5c089a4d15560839f3c --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/client.py @@ -0,0 +1,89 @@ +from .client_base import ClientBase +from .lease_client import LeaseClient +from .internal import * + +""" +" class Client +""" +class Client(ClientBase): + def __init__(self, serviceName: str, enabaleLease: bool = False): + super().__init__(serviceName) + + self.__apiMapping = {} + self.__apiVersion = None + self.__leaseClient = None + self.__enableLease = enabaleLease + + if (self.__enableLease): + self.__leaseClient = LeaseClient(serviceName) + self.__leaseClient.Init() + + def WaitLeaseApplied(self): + if self.__enableLease: + self.__leaseClient.WaitApplied() + + def GetLeaseId(self): + if self.__enableLease: + return self.__leaseClient.GetId() + else: + return None + + def GetApiVersion(self): + return self.__apiVersion + + def GetServerApiVersion(self): + code, apiVerson = self._CallBase(RPC_API_ID_INTERNAL_API_VERSION, "{}", 0, 0) + if code != 0: + print("[Client] get server api version error:", code) + return code, None + else: + return code, apiVerson + + def _SetApiVerson(self, apiVersion: str): + self.__apiVersion = apiVersion + + def _Call(self, apiId: int, parameter: str): + ret, proirity, leaseId = self.__CheckApi(apiId) + if ret == 0: + return self._CallBase(apiId, parameter, proirity, leaseId) + else: + return RPC_ERR_CLIENT_API_NOT_REG, None + + def _CallNoReply(self, apiId: int, parameter: str): + ret, proirity, leaseId = self.__CheckApi(apiId) + if ret == 0: + return self._CallNoReplyBase(apiId, parameter, proirity, leaseId) + else: + return RPC_ERR_CLIENT_API_NOT_REG + + def _CallBinary(self, apiId: int, parameter: list): + ret, proirity, leaseId = self.__CheckApi(apiId) + if ret == 0: + return self._CallBinaryBase(apiId, parameter, proirity, leaseId) + else: + return RPC_ERR_CLIENT_API_NOT_REG, None + + def _CallBinaryNoReply(self, apiId: int, parameter: list): + ret, proirity, leaseId = self.__CheckApi(apiId) + if ret == 0: + return self._CallBinaryNoReplyBase(apiId, parameter, proirity, leaseId) + else: + return RPC_ERR_CLIENT_API_NOT_REG + + def _RegistApi(self, apiId: int, proirity: int): + self.__apiMapping[apiId] = proirity + + def __CheckApi(self, apiId: int): + proirity = 0 + leaseId = 0 + + if apiId > RPC_INTERNAL_API_ID_MAX: + proirity = self.__apiMapping.get(apiId) + + if proirity is None: + return RPC_ERR_CLIENT_API_NOT_REG, proirity, leaseId + + if self.__enableLease: + leaseId = self.__leaseClient.GetId() + + return 0, proirity, leaseId \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/client_base.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/client_base.py new file mode 100644 index 0000000000000000000000000000000000000000..1bac028f8a4f034c8cb1d191144afcdc8169eeee --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/client_base.py @@ -0,0 +1,93 @@ +import time + +from ..idl.unitree_api.msg.dds_ import Request_ as Request +from ..idl.unitree_api.msg.dds_ import RequestHeader_ as RequestHeader +from ..idl.unitree_api.msg.dds_ import RequestLease_ as RequestLease +from ..idl.unitree_api.msg.dds_ import RequestIdentity_ as RequestIdentity +from ..idl.unitree_api.msg.dds_ import RequestPolicy_ as RequestPolicy + +from ..utils.future import FutureResult + +from .client_stub import ClientStub +from .internal import * + + +""" +" class ClientBase +""" +class ClientBase: + def __init__(self, serviceName: str): + self.__timeout = 1.0 + self.__stub = ClientStub(serviceName) + self.__stub.Init() + + def SetTimeout(self, timeout: float): + self.__timeout = timeout + + def _CallBase(self, apiId: int, parameter: str, proirity: int = 0, leaseId: int = 0): + # print("[CallBase] call apiId:", apiId, ", proirity:", proirity, ", leaseId:", leaseId) + header = self.__SetHeader(apiId, leaseId, proirity, False) + request = Request(header, parameter, []) + + future = self.__stub.SendRequest(request, self.__timeout) + if future is None: + return RPC_ERR_CLIENT_SEND, None + + result = future.GetResult(self.__timeout) + + if result.code != FutureResult.FUTURE_SUCC: + self.__stub.RemoveFuture(request.header.identity.id) + code = RPC_ERR_CLIENT_API_TIMEOUT if result.code == FutureResult.FUTUTE_ERR_TIMEOUT else RPC_ERR_UNKNOWN + return code, None + + response = result.value + + if response.header.identity.api_id != apiId: + return RPC_ERR_CLIENT_API_NOT_MATCH, None + else: + return response.header.status.code, response.data + + def _CallNoReplyBase(self, apiId: int, parameter: str, proirity: int, leaseId: int): + header = self.__SetHeader(apiId, leaseId, proirity, True) + request = Request(header, parameter, []) + + if self.__stub.Send(request, self.__timeout): + return 0 + else: + return RPC_ERR_CLIENT_SEND + + def _CallBinaryBase(self, apiId: int, parameter: list, proirity: int, leaseId: int): + header = self.__SetHeader(apiId, leaseId, proirity, False) + request = Request(header, "", parameter) + + future = self.__stub.SendRequest(request, self.__timeout) + if future is None: + return RPC_ERR_CLIENT_SEND, None + + result = future.GetResult(self.__timeout) + if result.code != FutureResult.FUTURE_SUCC: + self.__stub.RemoveFuture(request.header.identity.id) + code = RPC_ERR_CLIENT_API_TIMEOUT if result.code == FutureResult.FUTUTE_ERR_TIMEOUT else RPC_ERR_UNKNOWN + return code, None + + response = result.value + + if response.header.identity.api_id != apiId: + return RPC_ERR_CLIENT_API_NOT_MATCH, None + else: + return response.header.status.code, response.binary + + def _CallBinaryNoReplyBase(self, apiId: int, parameter: list, proirity: int, leaseId: int): + header = self.__SetHeader(apiId, leaseId, proirity, True) + request = Request(header, "", parameter) + + if self.__stub.Send(request, self.__timeout): + return 0 + else: + return RPC_ERR_CLIENT_SEND + + def __SetHeader(self, apiId: int, leaseId: int, priority: int, noReply: bool): + identity = RequestIdentity(time.monotonic_ns(), apiId) + lease = RequestLease(leaseId) + policy = RequestPolicy(priority, noReply) + return RequestHeader(identity, lease, policy) diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/client_stub.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/client_stub.py new file mode 100644 index 0000000000000000000000000000000000000000..67c2c8fb63112579e7d93a89949ab4c524fe1fa3 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/client_stub.py @@ -0,0 +1,69 @@ +import time + +from enum import Enum +from threading import Thread, Condition + +from ..idl.unitree_api.msg.dds_ import Request_ as Request +from ..idl.unitree_api.msg.dds_ import Response_ as Response + +from ..core.channel import ChannelFactory +from ..core.channel_name import ChannelType, GetClientChannelName +from .request_future import RequestFuture, RequestFutureQueue + + +""" +" class ClientStub +""" +class ClientStub: + def __init__(self, serviceName: str): + self.__serviceName = serviceName + self.__futureQueue = None + + self.__sendChannel = None + self.__recvChannel = None + + def Init(self): + factory = ChannelFactory() + self.__futureQueue = RequestFutureQueue() + + # create channel + self.__sendChannel = factory.CreateSendChannel(GetClientChannelName(self.__serviceName, ChannelType.SEND), Request) + self.__recvChannel = factory.CreateRecvChannel(GetClientChannelName(self.__serviceName, ChannelType.RECV), Response, + self.__ResponseHandler,10) + time.sleep(0.5) + + + def Send(self, request: Request, timeout: float): + if self.__sendChannel.Write(request, timeout): + return True + else: + print("[ClientStub] send error. id:", request.header.identity.id) + return False + + def SendRequest(self, request: Request, timeout: float): + id = request.header.identity.id + + future = RequestFuture() + future.SetRequestId(id) + self.__futureQueue.Set(id, future) + + if self.__sendChannel.Write(request, timeout): + return future + else: + print("[ClientStub] send request error. id:", request.header.identity.id) + self.__futureQueue.Remove(id) + return None + + def RemoveFuture(self, requestId: int): + self.__futureQueue.Remove(requestId) + + def __ResponseHandler(self, response: Response): + id = response.header.identity.id + # apiId = response.header.identity.api_id + # print("[ClientStub] responseHandler recv response id:", id, ", apiId:", apiId) + future = self.__futureQueue.Get(id) + if future is None: + # print("[ClientStub] get future from queue error. id:", id) + pass + elif not future.Ready(response): + print("[ClientStub] set future ready error.") diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/internal.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/internal.py new file mode 100644 index 0000000000000000000000000000000000000000..875a78b11a156ae56ed39fcc282ad0d2d28b5ad2 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/internal.py @@ -0,0 +1,31 @@ +# internal api id max +RPC_INTERNAL_API_ID_MAX = 100 + +# internal api id +RPC_API_ID_INTERNAL_API_VERSION = 1 + +# lease api id +RPC_API_ID_LEASE_APPLY = 101 +RPC_API_ID_LEASE_RENEWAL = 102 + +# lease term default +RPC_LEASE_TERM = 1.0 + +# internal error +RPC_OK = 0 +# client error +RPC_ERR_UNKNOWN = 3001 +RPC_ERR_CLIENT_SEND = 3102 +RPC_ERR_CLIENT_API_NOT_REG = 3103 +RPC_ERR_CLIENT_API_TIMEOUT = 3104 +RPC_ERR_CLIENT_API_NOT_MATCH = 3105 +RPC_ERR_CLIENT_API_DATA = 3106 +RPC_ERR_CLIENT_LEASE_INVALID = 3107 +# server error +RPC_ERR_SERVER_SEND = 3201 +RPC_ERR_SERVER_INTERNAL = 3202 +RPC_ERR_SERVER_API_NOT_IMPL = 3203 +RPC_ERR_SERVER_API_PARAMETER = 3204 +RPC_ERR_SERVER_LEASE_DENIED = 3205 +RPC_ERR_SERVER_LEASE_NOT_EXIST = 3206 +RPC_ERR_SERVER_LEASE_EXIST = 3207 diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/lease_client.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/lease_client.py new file mode 100644 index 0000000000000000000000000000000000000000..37f600f8cbb12ae13bc1ddeaafc64bbb56bd0e08 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/lease_client.py @@ -0,0 +1,113 @@ +import time +import socket +import os +import json + +from threading import Thread, Lock + +from .client_base import ClientBase +from .internal import * + + +""" +" class LeaseContext +""" +class LeaseContext: + def __init__(self): + self.id = 0 + self.term = RPC_LEASE_TERM + + def Update(self, id, term): + self.id = id + self.term = term + + def Reset(self): + self.id = 0 + self.term = RPC_LEASE_TERM + + def Valid(self): + return self.id != 0 + + +""" +" class LeaseClient +""" +class LeaseClient(ClientBase): + def __init__(self, name: str): + self.__name = name + "_lease" + self.__contextName = socket.gethostname() + "/" + name + "/" + str(os.getpid()) + self.__context = LeaseContext() + self.__thread = None + self.__lock = Lock() + super().__init__(self.__name) + print("[LeaseClient] lease name:", self.__name, ", context name:", self.__contextName) + + def Init(self): + self.SetTimeout(1.0) + self.__thread = Thread(target=self.__ThreadFunc, name=self.__name, daemon=True) + self.__thread.start() + + def WaitApplied(self): + while True: + with self.__lock: + if self.__context.Valid(): + break + time.sleep(0.1) + + def GetId(self): + with self.__lock: + return self.__context.id + + def Applied(self): + with self.__lock: + return self.__context.Valid() + + def __Apply(self): + parameter = {} + parameter["name"] = self.__contextName + p = json.dumps(parameter) + + c, d = self._CallBase(RPC_API_ID_LEASE_APPLY, p) + if c != 0: + print("[LeaseClient] apply lease error. code:", c) + return + + data = json.loads(d) + + id = data["id"] + term = data["term"] + + print("[LeaseClient] lease applied id:", id, ", term:", term) + + with self.__lock: + self.__context.Update(id, float(term/1000000)) + + def __Renewal(self): + parameter = {} + p = json.dumps(parameter) + + c, d = self._CallBase(RPC_API_ID_LEASE_RENEWAL, p, 0, self.__context.id) + if c != 0: + print("[LeaseClient] renewal lease error. code:", c) + if c == RPC_ERR_SERVER_LEASE_NOT_EXIST: + with self.__lock: + self.__context.Reset() + + def __GetWaitSec(self): + waitsec = 0.0 + if self.__context.Valid(): + waitsec = self.__context.term + + if waitsec <= 0: + waitsec = RPC_LEASE_TERM + + return waitsec * 0.3 + + def __ThreadFunc(self): + while True: + if self.__context.Valid(): + self.__Renewal() + else: + self.__Apply() + # sleep waitsec + time.sleep(self.__GetWaitSec()) diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/lease_server.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/lease_server.py new file mode 100644 index 0000000000000000000000000000000000000000..d5b27d183db407cd325f75512a4b25b4aafaef6d --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/lease_server.py @@ -0,0 +1,151 @@ +import time +import json + +from threading import Lock + +from ..idl.unitree_api.msg.dds_ import Request_ as Request +from ..idl.unitree_api.msg.dds_ import ResponseHeader_ as ResponseHeader +from ..idl.unitree_api.msg.dds_ import ResponseStatus_ as ResponseStatus +from ..idl.unitree_api.msg.dds_ import Response_ as Response + +from .internal import * +from .server_base import ServerBase + + +""" +" class LeaseCache +""" +class LeaseCache: + def __init__(self): + self.lastModified = 0 + self.id = 0 + self.name = None + + def Set(self, id: int, name: str, lastModified: int) : + self.id = id + self.name = name + self.lastModified = lastModified + + def Renewal(self, lastModified: int): + self.lastModified = lastModified + + def Clear(self): + self.id = 0 + self.lastModified = 0 + self.name = None + + +""" +" class LeaseServer +""" +class LeaseServer(ServerBase): + def __init__(self, name: str, term: float): + self.__term = int(term * 1000000) + self.__lock = Lock() + self.__cache = LeaseCache() + super().__init__(name + "_lease") + + def Init(self): + pass + + def Start(self, enablePrioQueue: bool = False): + super()._SetServerRequestHandler(self.__ServerRequestHandler) + super()._Start(enablePrioQueue) + + def CheckRequestLeaseDenied(self, leaseId: int): + with self.__lock: + if self.__cache.id == 0: + return self.__cache.id != leaseId + + now = self.__Now() + if now > self.__cache.lastModified + self.__term: + self.__cache.Clear() + return False + else: + return self.__cache.id != leaseId + + def __Apply(self, parameter: str): + name = "" + data = "" + + try: + p = json.loads(parameter) + name = p.get("name") + + except: + print("[LeaseServer] apply json loads error. parameter:", parameter) + return RPC_ERR_SERVER_API_PARAMETER, data + + if not name: + name = "anonymous" + + id = 0 + lastModified = 0 + setted = False + + now = self.__Now() + + with self.__lock: + id = self.__cache.id + lastModified = self.__cache.lastModified + + if id == 0 or now > lastModified + self.__term: + if id != 0: + print("[LeaseServer] id expired:", id, ", name:", self.__cache.name) + + id = self.__GenerateId() + self.__cache.Set(id, name, now) + setted = True + + print("[LeaseServer] id stored:", id, ", name:", name) + + if setted: + d = {} + d["id"] = id + d["term"] = self.__term + data = json.dumps(d) + return 0, data + else: + return RPC_ERR_SERVER_LEASE_EXIST, data + + + def __Renewal(self, id: int): + now = self.__Now() + + with self.__lock: + if self.__cache.id != id: + return RPC_ERR_SERVER_LEASE_NOT_EXIST + + if now > self.__cache.lastModified + self.__term: + self.__cache.Clear() + return RPC_ERR_SERVER_LEASE_NOT_EXIST + else: + self.__cache.Renewal(now) + return 0 + + def __ServerRequestHandler(self, request: Request): + identity = request.header.identity + parameter = request.parameter + apiId = identity.api_id + code = RPC_ERR_SERVER_API_NOT_IMPL + data = "" + + if apiId == RPC_API_ID_LEASE_APPLY: + code, data = self.__Apply(parameter) + elif apiId == RPC_API_ID_LEASE_RENEWAL: + code = self.__Renewal(request.header.lease.id) + else: + print("[LeaseServer] api is not implemented. apiId", apiId) + + if request.header.policy.noreply: + return + + status = ResponseStatus(code) + response = Response(ResponseHeader(identity, status), data, []) + self._SendResponse(response) + + def __GenerateId(self): + return self.__Now() + + def __Now(self): + return int(time.time_ns()/1000) \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/request_future.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/request_future.py new file mode 100644 index 0000000000000000000000000000000000000000..037ab10aa556a3739815fc88288c4c3f1f8f7b02 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/request_future.py @@ -0,0 +1,46 @@ +from threading import Condition, Lock +from enum import Enum + +from ..idl.unitree_api.msg.dds_ import Response_ as Response +from ..utils.future import Future, FutureResult + + +""" +" class RequestFuture +""" +class RequestFuture(Future): + def __init__(self): + self.__requestId = None + super().__init__() + + def SetRequestId(self, requestId: int): + self.__requestId = requestId + + def GetRequestId(self): + return self.__requestId + + +class RequestFutureQueue: + def __init__(self): + self.__data = {} + self.__lock = Lock() + + def Set(self, requestId: int, future: RequestFuture): + if future is None: + return False + with self.__lock: + self.__data[requestId] = future + return True + + def Get(self, requestId: int): + future = None + with self.__lock: + future = self.__data.get(requestId) + if future is not None: + self.__data.pop(requestId) + return future + + def Remove(self, requestId: int): + with self.__lock: + if id in self.__data: + self.__data.pop(requestId) \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/server.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/server.py new file mode 100644 index 0000000000000000000000000000000000000000..4e389a84514051607c7a709212a1ab5fa9f1df22 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/server.py @@ -0,0 +1,122 @@ +import time + +from typing import Callable, Any + +from ..idl.unitree_api.msg.dds_ import Request_ as Request +from ..idl.unitree_api.msg.dds_ import ResponseStatus_ as ResponseStatus +from ..idl.unitree_api.msg.dds_ import ResponseHeader_ as ResponseHeader +from ..idl.unitree_api.msg.dds_ import Response_ as Response + +from .server_base import ServerBase +from .lease_server import LeaseServer +from .internal import * + +""" +" class Server +""" +class Server(ServerBase): + def __init__(self, name: str): + self.__apiVersion = "" + self.__apiHandlerMapping = {} + self.__apiBinaryHandlerMapping = {} + self.__apiBinarySet = {} + self.__enableLease = False + self.__leaseServer = None + super().__init__(name) + + def Init(self): + pass + + def StartLease(self, term: float = 1.0): + self.__enableLease = True + self.__leaseServer = LeaseServer(self.GetName(), term) + self.__leaseServer.Init() + self.__leaseServer.Start(False) + + def Start(self, enablePrioQueue: bool = False): + super()._SetServerRequestHandler(self.__ServerRequestHandler) + super()._Start(enablePrioQueue) + + def GetApiVersion(self): + return self.__apiVersion + + def _SetApiVersion(self, apiVersion: str): + self.__apiVersion = apiVersion + print("[Server] set api version:", self.__apiVersion) + + def _RegistHandler(self, apiId: int, handler: Callable, checkLease: bool): + self.__apiHandlerMapping[apiId] = (handler, checkLease) + + def _RegistBinaryHandler(self, apiId: int, handler: Callable, checkLease: bool): + self.__apiBinaryHandlerMapping[apiId] = (handler, checkLease) + self.__apiBinarySet.add(apiId) + + def __GetHandler(self, apiId: int): + if apiId in self.__apiHandlerMapping: + return self.__apiHandlerMapping.get(apiId) + else: + return None, False + + def __GetBinaryHandler(self, apiId: int): + if apiId in self.__apiBinaryHandlerMapping: + return self.__apiBinaryHandlerMapping.get(apiId) + else: + return None, False + + def __IsBinary(self, apiId): + return apiId in self.__apiBinarySet + + def __CheckLeaseDenied(self, leaseId: int): + if (self.__enableLease): + return self.__leaseServer.CheckRequestLeaseDenied(leaseId) + else: + return False + + def __ServerRequestHandler(self, request: Request): + parameter = request.parameter + parameterBinary = request.binary + + identity = request.header.identity + leaseId = request.header.lease.id + apiId = identity.api_id + + code = 0 + data = "" + dataBinary = [] + + if apiId == RPC_API_ID_INTERNAL_API_VERSION: + data = self.__apiVersion + else: + requestHandler = None + binaryRequestHandler = None + checkLease = False + + if self.__IsBinary(apiId): + binaryRequestHandler, checkLease = self.__GetBinaryHandler(apiId) + else: + requestHandler, checkLease = self.__GetHandler(apiId) + + if requestHandler is None and binaryRequestHandler is None: + code = RPC_ERR_SERVER_API_NOT_IMPL + elif checkLease and self.__CheckLeaseDenied(leaseId): + code = RPC_ERR_SERVER_LEASE_DENIED + else: + try: + if binaryRequestHandler is None: + code, data = requestHandler(parameter) + if code != 0: + data = "" + else: + code, dataBinary = binaryRequestHandler(parameterBinary) + if code != 0: + dataBinary = [] + except: + code = RPC_ERR_SERVER_INTERNAL + + if request.header.policy.noreply: + return + + status = ResponseStatus(code) + response = Response(ResponseHeader(identity, status), data, dataBinary) + + self._SendResponse(response) \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/server_base.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/server_base.py new file mode 100644 index 0000000000000000000000000000000000000000..f01056175b9f86fdc7cf94821030c8f9baf5ae53 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/server_base.py @@ -0,0 +1,32 @@ +import time + +from typing import Callable, Any + +from ..idl.unitree_api.msg.dds_ import Request_ as Request +from ..idl.unitree_api.msg.dds_ import Response_ as Response + +from .server_stub import ServerStub + + +""" +" class ServerBase +""" +class ServerBase: + def __init__(self, name: str): + self.__name = name + self.__serverRequestHandler = None + self.__serverStub = ServerStub(self.__name) + + def GetName(self): + return self.__name + + def _Start(self, enablePrioQueue: bool = False): + self.__serverStub.Init(self.__serverRequestHandler, enablePrioQueue) + print("[ServerBase] server started. name:", self.__name, ", enable proirity queue:", enablePrioQueue) + + def _SetServerRequestHandler(self, serverRequestHandler: Callable): + self.__serverRequestHandler = serverRequestHandler + + def _SendResponse(self, response: Response): + if not self.__serverStub.Send(response, 1.0): + print("[ServerBase] send response error.") diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/server_stub.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/server_stub.py new file mode 100644 index 0000000000000000000000000000000000000000..e67be1fcee12e11788134962b546445764487fc8 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/rpc/server_stub.py @@ -0,0 +1,78 @@ +import time + +from enum import Enum +from threading import Thread, Condition +from typing import Callable, Any + +from ..utils.bqueue import BQueue +from ..idl.unitree_api.msg.dds_ import Request_ as Request +from ..idl.unitree_api.msg.dds_ import Response_ as Response + +from ..core.channel import ChannelFactory +from ..core.channel_name import ChannelType, GetServerChannelName + + +""" +" class ServerStub +""" +class ServerStub: + def __init__(self, serviceName: str): + self.__serviceName = serviceName + self.__serverRquestHandler = None + self.__sendChannel = None + self.__recvChannel = None + self.__enablePriority = None + self.__queue = None + self.__prioQueue = None + self.__queueThread = None + self.__prioQueueThread = None + + def Init(self, serverRequestHander: Callable, enablePriority: bool = False): + self.__serverRquestHandler = serverRequestHander + self.__enablePriority = enablePriority + + factory = ChannelFactory() + + # create channel + self.__sendChannel = factory.CreateSendChannel(GetServerChannelName(self.__serviceName, ChannelType.SEND), Response) + self.__recvChannel = factory.CreateRecvChannel(GetServerChannelName(self.__serviceName, ChannelType.RECV), Request, self.__Enqueue, 10) + + # start priority request thread + self.__queue = BQueue(10) + self.__queueThread = Thread(target=self.__QueueThreadFunc, name="server_queue", daemon=True) + self.__queueThread.start() + + if enablePriority: + self.__prioQueue = BQueue(5) + self.__prioQueueThread = Thread(target=self.__PrioQueueThreadFunc, name="server_prio_queue", daemon=True) + self.__prioQueueThread.start() + + # wait thread started + time.sleep(0.5) + + def Send(self, response: Response, timeout: float): + if self.__sendChannel.Write(response, timeout): + return True + else: + print("[ServerStub] send error. id:", response.header.identity.id) + return False + + def __Enqueue(self, request: Request): + if self.__enablePriority and request.header.policy.priority > 0: + self.__prioQueue.Put(request, True) + else: + self.__queue.Put(request, True) + + def __QueueThreadFunc(self): + while True: + request = self.__queue.Get() + if request is None: + continue + self.__serverRquestHandler(request) + + def __PrioQueueThreadFunc(self): + while True: + request = self.__prioQueue.Get() + if request is None: + continue + self.__serverRquestHandler(request) diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/client/obstacles_avoid_client_example.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/client/obstacles_avoid_client_example.py new file mode 100644 index 0000000000000000000000000000000000000000..7936fe7b8d46a6b0a29008c0e84c3367538fe292 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/client/obstacles_avoid_client_example.py @@ -0,0 +1,91 @@ +import time +import os + +from unitree_sdk2py.core.channel import ChannelFactoryInitialize +from unitree_sdk2py.go2.obstacles_avoid.obstacles_avoid_client import ObstaclesAvoidClient + +if __name__ == "__main__": + ChannelFactoryInitialize(0, "enp3s0") + + client = ObstaclesAvoidClient() + client.SetTimeout(3.0) + client.Init() + + while True: + print("##################GetServerApiVersion###################") + code, serverAPiVersion = client.GetServerApiVersion() + if code != 0: + print("get server api error. code:", code) + else: + print("get server api version:", serverAPiVersion) + + if serverAPiVersion != client.GetApiVersion(): + print("api version not equal.") + + time.sleep(3) + + print("##################SwitchGet###################") + code, enable = client.SwitchGet() + if code != 0: + print("switch get error. code:", code) + else: + print("switch get success. enable:", enable) + + time.sleep(3) + + print("##################SwitchSet (on)###################") + code = client.SwitchSet(True) + if code != 0: + print("switch set error. code:", code) + else: + print("switch set success.") + + time.sleep(3) + + print("##################SwitchGet###################") + code, enable1 = client.SwitchGet() + if code != 0: + print("switch get error. code:", code) + else: + print("switch get success. enable:", enable1) + + time.sleep(3) + + print("##################SwitchSet (off)###################") + code = client.SwitchSet(False) + if code != 0: + print("switch set error. code:", code) + else: + print("switch set success.") + + time.sleep(3) + + print("##################SwitchGet###################") + code, enable1 = client.SwitchGet() + if code != 0: + print("switch get error. code:", code) + else: + print("switch get success. enable:", enable1) + + time.sleep(3) + + + print("##################SwitchSet (enable)###################") + + code = client.SwitchSet(enable) + if code != 0: + print("switch set error. code:", code) + else: + print("switch set success. enable:", enable) + + time.sleep(3) + + print("##################SwitchGet###################") + code, enable = client.SwitchGet() + if code != 0: + print("switch get error. code:", code) + else: + print("switch get success. enable:", enable) + + time.sleep(3) + \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/client/robot_service_client_example.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/client/robot_service_client_example.py new file mode 100644 index 0000000000000000000000000000000000000000..01467c04dce69b493ba5d196bf27e64347d2d2fa --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/client/robot_service_client_example.py @@ -0,0 +1,50 @@ +import time +from unitree_sdk2py.core.channel import ChannelFactoryInitialize +from unitree_sdk2py.go2.robot_state.robot_state_client import RobotStateClient + +if __name__ == "__main__": + ChannelFactoryInitialize(0, "enx000ec6768747") + rsc = RobotStateClient() + rsc.SetTimeout(3.0) + rsc.Init() + + while True: + print("##################GetServerApiVersion###################") + code, serverAPiVersion = rsc.GetServerApiVersion() + + if code != 0: + print("get server api error. code:", code) + else: + print("get server api version:", serverAPiVersion) + + time.sleep(3) + + print("##################ServiceList###################") + code, lst = rsc.ServiceList() + + if code != 0: + print("list sevrice error. code:", code) + else: + print("list service success. len:", len(lst)) + for s in lst: + print("name:", s.name, ", protect:", s.protect, ", status:", s.status) + + time.sleep(3) + + print("##################ServiceSwitch###################") + code = rsc.ServiceSwitch("sport_mode", False) + if code != 0: + print("service stop sport_mode error. code:", code) + else: + print("service stop sport_mode success. code:", code) + + time.sleep(1) + + code = rsc.ServiceSwitch("sport_mode", True) + if code != 0: + print("service start sport_mode error. code:", code) + else: + print("service start sport_mode success. code:", code) + + time.sleep(3) + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/client/sport_client_example.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/client/sport_client_example.py new file mode 100644 index 0000000000000000000000000000000000000000..22a8de0e866e01292579513246abecbadde2bc7f --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/client/sport_client_example.py @@ -0,0 +1,109 @@ +import time +from unitree_sdk2py.core.channel import ChannelFactoryInitialize +from unitree_sdk2py.go2.sport.sport_client import SportClient, PathPoint, SPORT_PATH_POINT_SIZE + +if __name__ == "__main__": + ChannelFactoryInitialize(0, "enp2s0") + client = SportClient() + client.SetTimeout(10.0) + client.Init() + + print("##################GetServerApiVersion###################") + code, serverAPiVersion = client.GetServerApiVersion() + if code != 0: + print("get server api error. code:", code) + else: + print("get server api version:", serverAPiVersion) + + if serverAPiVersion != client.GetApiVersion(): + print("api version not equal.") + + time.sleep(3) + + print("##################Trigger###################") + code = client.Trigger() + if code != 0: + print("sport trigger error. code:", code) + else: + print("sport trigger success.") + + time.sleep(3) + + while True: + print("##################RecoveryStand###################") + code = client.RecoveryStand() + + if code != 0: + print("sport recovery stand error. code:", code) + else: + print("sport recovery stand success.") + + time.sleep(3) + + print("##################StandDown###################") + code = client.StandDown() + if code != 0: + print("sport stand down error. code:", code) + else: + print("sport stand down success.") + + time.sleep(3) + + print("##################Damp###################") + code = client.Damp() + if code != 0: + print("sport damp error. code:", code) + else: + print("sport damp down success.") + + time.sleep(3) + + print("##################RecoveryStand###################") + code = client.RecoveryStand() + + if code != 0: + print("sport recovery stand error. code:", code) + else: + print("sport recovery stand success.") + + time.sleep(3) + + print("##################Sit###################") + code = client.Sit() + if code != 0: + print("sport stand down error. code:", code) + else: + print("sport stand down success.") + + time.sleep(3) + + print("##################RiseSit###################") + code = client.RiseSit() + + if code != 0: + print("sport rise sit error. code:", code) + else: + print("sport rise sit success.") + + time.sleep(3) + + print("##################SetBodyHight###################") + code = client.BodyHeight(0.18) + + if code != 0: + print("sport body hight error. code:", code) + else: + print("sport body hight success.") + + time.sleep(3) + + print("##################GetState#################") + keys = ["state", "bodyHeight", "footRaiseHeight", "speedLevel", "gait"] + code, data = client.GetState(keys) + + if code != 0: + print("sport get state error. code:", code) + else: + print("sport get state success. data:", data) + + time.sleep(3) diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/client/video_client_example.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/client/video_client_example.py new file mode 100644 index 0000000000000000000000000000000000000000..7eec94946c78af28fd58ac5e0f21ef219a512052 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/client/video_client_example.py @@ -0,0 +1,26 @@ +import time +import os + +from unitree_sdk2py.core.channel import ChannelFactoryInitialize +from unitree_sdk2py.go2.video.video_client import VideoClient + +if __name__ == "__main__": + ChannelFactoryInitialize(0, "enp2s0") + + client = VideoClient() + client.SetTimeout(3.0) + client.Init() + + print("##################GetImageSample###################") + code, data = client.GetImageSample() + + if code != 0: + print("get image sample error. code:", code) + else: + imageName = os.path.dirname(__file__) + time.strftime('/%Y%m%d%H%M%S.jpg',time.localtime()) + print("ImageName:", imageName) + + with open(imageName, "+wb") as f: + f.write(bytes(data)) + + time.sleep(1) diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/client/vui_client_example.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/client/vui_client_example.py new file mode 100644 index 0000000000000000000000000000000000000000..6df7c0946dac5621a514ac6980f34afc6a89c6a9 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/client/vui_client_example.py @@ -0,0 +1,74 @@ +import time +import os + +from unitree_sdk2py.core.channel import ChannelFactoryInitialize +from unitree_sdk2py.go2.vui.vui_client import VuiClient + +if __name__ == "__main__": + ChannelFactoryInitialize(0, "enp2s0") + + client = VuiClient() + client.SetTimeout(3.0) + client.Init() + + for i in range(1, 11): + print("#################GetBrightness####################") + code, level = client.GetBrightness() + + if code != 0: + print("get brightness error. code:", code) + else: + print("get brightness success. level:", level) + + time.sleep(1) + + print("#################SetBrightness####################") + + code = client.SetBrightness(i) + + if code != 0: + print("set brightness error. code:", code) + else: + print("set brightness success. level:", i) + + time.sleep(1) + + print("#################SetBrightness 0####################") + + code = client.SetBrightness(0) + + if code != 0: + print("set brightness error. code:", code) + else: + print("set brightness 0 success.") + + for i in range(1, 11): + print("#################GetVolume####################") + code, level = client.GetVolume() + + if code != 0: + print("get volume error. code:", code) + else: + print("get volume success. level:", level) + + time.sleep(1) + + print("#################SetVolume####################") + + code = client.SetVolume(i) + + if code != 0: + print("set volume error. code:", code) + else: + print("set volume success. level:", i) + + time.sleep(1) + + print("#################SetVolume 0####################") + + code = client.SetVolume(0) + + if code != 0: + print("set volume error. code:", code) + else: + print("set volume 0 success.") diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/crc/test_crc.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/crc/test_crc.py new file mode 100644 index 0000000000000000000000000000000000000000..ceb1b4ba546452ebfe8f6cfb023a55f14e5a6e07 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/crc/test_crc.py @@ -0,0 +1,27 @@ +from unitree_sdk2py.idl.default import unitree_go_msg_dds__LowCmd_, unitree_go_msg_dds__LowState_ +from unitree_sdk2py.idl.default import unitree_hg_msg_dds__LowCmd_, unitree_hg_msg_dds__LowState_ +from unitree_sdk2py.utils.crc import CRC + +crc = CRC() + +""" +" LowCmd/LowState CRC +""" +cmd = unitree_go_msg_dds__LowCmd_() +cmd.crc = crc.Crc(cmd) + +state = unitree_go_msg_dds__LowState_() +state.crc = crc.Crc(state) + +print("CRC[LowCmd, LowState]: {}, {}".format(cmd.crc, state.crc)) + +""" +" LowCmd/LowState for HG CRC. () +""" +cmd = unitree_hg_msg_dds__LowCmd_() +cmd.crc = crc.Crc(cmd) + +state = unitree_hg_msg_dds__LowState_() +state.crc = crc.Crc(state) + +print("CRC[HGLowCmd, HGLowState]: {}, {}".format(cmd.crc, state.crc)) diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/helloworld/helloworld.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/helloworld/helloworld.py new file mode 100644 index 0000000000000000000000000000000000000000..7e93803f581c640f135f2f4bdd503368bf5ee209 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/helloworld/helloworld.py @@ -0,0 +1,6 @@ +from dataclasses import dataclass +from cyclonedds.idl import IdlStruct + +@dataclass +class HelloWorld(IdlStruct, typename="HelloWorld"): + data: str \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/helloworld/publisher.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/helloworld/publisher.py new file mode 100644 index 0000000000000000000000000000000000000000..36e8fb88ebf036c4248158da87249a4cf61230cd --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/helloworld/publisher.py @@ -0,0 +1,22 @@ +import time + +from unitree_sdk2py.core.channel import ChannelPublisher, ChannelFactoryInitialize +from helloworld import HelloWorld + +ChannelFactoryInitialize() + +pub = ChannelPublisher("topic", HelloWorld) +pub.Init() + +for i in range(30): + msg = HelloWorld("Hello world. time:" + str(time.time())) + # msg.data = "Hello world. time:" + str(time.time()) + + if pub.Write(msg, 0.5): + print("publish success. msg:", msg) + else: + print("publish error.") + + time.sleep(1) + +pub.Close() \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/helloworld/subscriber.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/helloworld/subscriber.py new file mode 100644 index 0000000000000000000000000000000000000000..38e47631d60e3814a01df1943ee56e425da7df30 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/helloworld/subscriber.py @@ -0,0 +1,19 @@ +import time + +from unitree_sdk2py.core.channel import ChannelSubscriber, ChannelFactoryInitialize +from helloworld import HelloWorld + +ChannelFactoryInitialize() + +sub = ChannelSubscriber("topic", HelloWorld) +sub.Init() + +while True: + msg = sub.Read() + + if msg is None: + print("subscribe error.") + else: + print("subscribe success. msg:", msg) + +pub.Close() \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/lowlevel/lowlevel_control.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/lowlevel/lowlevel_control.py new file mode 100644 index 0000000000000000000000000000000000000000..8e94fe1b30622b09ddfc9a355c96ed714e449607 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/lowlevel/lowlevel_control.py @@ -0,0 +1,51 @@ +import time + +from unitree_sdk2py.core.channel import ChannelPublisher, ChannelFactoryInitialize +from unitree_sdk2py.core.channel import ChannelSubscriber, ChannelFactoryInitialize +from unitree_sdk2py.idl.default import unitree_go_msg_dds__LowCmd_ +from unitree_sdk2py.idl.unitree_go.msg.dds_ import LowCmd_ +from unitree_sdk2py.utils.crc import CRC +from unitree_sdk2py.utils.thread import Thread +import unitree_go2_const as go2 + +crc = CRC() +lowCmdThreadPtr=Thread() + +if __name__ == '__main__': + + ChannelFactoryInitialize(1, "enp2s0") + # Create a publisher to publish the data defined in UserData class + pub = ChannelPublisher("lowcmd", LowCmd_) + pub.Init() + + while True: + # Create a Userdata message + cmd = unitree_go_msg_dds__LowCmd_() + + # Toque controle, set RL_2 toque + cmd.motor_cmd[go2.LegID["RL_2"]].mode = 0x01 + cmd.motor_cmd[go2.LegID["RL_2"]].q = go2.PosStopF # Set to stop position(rad) + cmd.motor_cmd[go2.LegID["RL_2"]].kp = 0 + cmd.motor_cmd[go2.LegID["RL_2"]].dq = go2.VelStopF # Set to stop angular velocity(rad/s) + cmd.motor_cmd[go2.LegID["RL_2"]].kd = 0 + cmd.motor_cmd[go2.LegID["RL_2"]].tau = 1 # target toque is set to 1N.m + + # Poinstion(rad) control, set RL_0 rad + cmd.motor_cmd[go2.LegID["RL_0"]].mode = 0x01 + cmd.motor_cmd[go2.LegID["RL_0"]].q = 0 # Taregt angular(rad) + cmd.motor_cmd[go2.LegID["RL_0"]].kp = 10 # Poinstion(rad) control kp gain + cmd.motor_cmd[go2.LegID["RL_0"]].dq = 0 # Taregt angular velocity(rad/ss) + cmd.motor_cmd[go2.LegID["RL_0"]].kd = 1 # Poinstion(rad) control kd gain + cmd.motor_cmd[go2.LegID["RL_0"]].tau = 0 # Feedforward toque 1N.m + + cmd.crc = crc.Crc(cmd) + + #Publish message + if pub.Write(cmd): + print("Publish success. msg:", cmd.crc) + else: + print("Waitting for subscriber.") + + time.sleep(0.002) + + pub.Close() diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/lowlevel/read_lowstate.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/lowlevel/read_lowstate.py new file mode 100644 index 0000000000000000000000000000000000000000..d3f20ca35d7c6fe19a54bdfc49edc643757708ae --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/lowlevel/read_lowstate.py @@ -0,0 +1,24 @@ +import time +from unitree_sdk2py.core.channel import ChannelSubscriber, ChannelFactoryInitialize +from unitree_sdk2py.idl.default import unitree_go_msg_dds__LowState_ +from unitree_sdk2py.idl.unitree_go.msg.dds_ import LowState_ + +import unitree_go2_const as go2 + + +def LowStateHandler(msg: LowState_): + + # print front right hip motor states + print("FR_0 motor state: ", msg.motor_state[go2.LegID["FR_0"]]) + print("IMU state: ", msg.imu_state) + print("Battery state: voltage: ", msg.power_v, "current: ", msg.power_a) + + +if __name__ == "__main__": + # Modify "enp2s0" to the actual network interface + ChannelFactoryInitialize(0, "enp2s0") + sub = ChannelSubscriber("rt/lowstate", LowState_) + sub.Init(LowStateHandler, 10) + + while True: + time.sleep(10.0) diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/lowlevel/sub_lowstate.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/lowlevel/sub_lowstate.py new file mode 100644 index 0000000000000000000000000000000000000000..9a946197d898316a25ae98838eaeba6dea5e27fa --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/lowlevel/sub_lowstate.py @@ -0,0 +1,15 @@ +import time +from unitree_sdk2py.core.channel import ChannelSubscriber, ChannelFactoryInitialize +from unitree_sdk2py.idl.default import unitree_go_msg_dds__LowState_ +from unitree_sdk2py.idl.unitree_go.msg.dds_ import LowState_ + +def LowStateHandler(msg: LowState_): + print(msg.motor_state) + + +ChannelFactoryInitialize(0, "enp2s0") +sub = ChannelSubscriber("rt/lowstate", LowState_) +sub.Init(LowStateHandler, 10) + +while True: + time.sleep(10.0) \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/lowlevel/unitree_go2_const.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/lowlevel/unitree_go2_const.py new file mode 100644 index 0000000000000000000000000000000000000000..153a0519d381dd4fac5b7d9c7dedc19c87755c97 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/lowlevel/unitree_go2_const.py @@ -0,0 +1,20 @@ +LegID = { + "FR_0": 0, # Front right hip + "FR_1": 1, # Front right thigh + "FR_2": 2, # Front right calf + "FL_0": 3, + "FL_1": 4, + "FL_2": 5, + "RR_0": 6, + "RR_1": 7, + "RR_2": 8, + "RL_0": 9, + "RL_1": 10, + "RL_2": 11, +} + +HIGHLEVEL = 0xEE +LOWLEVEL = 0xFF +TRIGERLEVEL = 0xF0 +PosStopF = 2.146e9 +VelStopF = 16000.0 diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/rpc/test_api.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/rpc/test_api.py new file mode 100644 index 0000000000000000000000000000000000000000..68778ca35d39a51cbdd77de3196a9c12b142d0ab --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/rpc/test_api.py @@ -0,0 +1,9 @@ +# service name +TEST_SERVICE_NAME = "test" + +# api version +TEST_API_VERSION = "1.0.0.1" + +# api id +TEST_API_ID_MOVE = 1008 +TEST_API_ID_STOP = 1002 \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/rpc/test_client_example.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/rpc/test_client_example.py new file mode 100644 index 0000000000000000000000000000000000000000..35c6ad45311fef8bdd6bc290de58ef99a83dbe76 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/rpc/test_client_example.py @@ -0,0 +1,62 @@ +import time +import json + +from unitree_sdk2py.core.channel import ChannelFactoryInitialize +from unitree_sdk2py.rpc.client import Client + +from test_api import * + +""" +" class TestClient +""" +class TestClient(Client): + def __init__(self, enableLease: bool = False): + super().__init__("test", enableLease) + + def Init(self): + self._RegistApi(TEST_API_ID_MOVE, 0) + self._RegistApi(TEST_API_ID_STOP, 1) + self._SetApiVerson(TEST_API_VERSION) + + def Move(self, vx: float, vy: float, vyaw: float): + parameter = {} + parameter["vx"] = vx + parameter["vy"] = vy + parameter["vyaw"] = vyaw + p = json.dumps(parameter) + + c, d = self._Call(TEST_API_ID_MOVE, p) + return c + + def Stop(self): + parameter = {} + p = json.dumps(parameter) + + c, d = self._Call(TEST_API_ID_STOP, p) + return c + +if __name__ == "__main__": + # initialize channel factory. + ChannelFactoryInitialize(0) + + # create client + client = TestClient(True) + client.Init() + client.SetTimeout(5.0) + + # get server version + code, serverApiVersion = client.GetServerApiVersion() + print("server api version:", serverApiVersion) + + # wait lease applied + client.WaitLeaseApplied() + + # test api + while True: + code = client.Move(0.2, 0, 0) + print("client move ret:", code) + time.sleep(1.0) + + code = client.Stop() + print("client stop ret:", code) + time.sleep(1.0) diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/rpc/test_server_example.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/rpc/test_server_example.py new file mode 100644 index 0000000000000000000000000000000000000000..a929e011b1769b3635344c3cd8f8e4df70ae37df --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/test/rpc/test_server_example.py @@ -0,0 +1,45 @@ +import time +import json + +from unitree_sdk2py.core.channel import ChannelFactoryInitialize +from unitree_sdk2py.rpc.server import Server + +from test_api import * + + +""" +" class TestServer +""" +class TestServer(Server): + def __init__(self): + super().__init__("test") + + def Init(self): + self._RegistHandler(TEST_API_ID_MOVE, self.Move, 1) + self._RegistHandler(TEST_API_ID_STOP, self.Stop, 0) + self._SetApiVersion(TEST_API_VERSION) + + def Move(self, parameter: str): + p = json.loads(parameter) + x = p["vx"] + y = p["vy"] + yaw = p["vyaw"] + print("Move Called. vx:", x, ", vy:", y, ", vyaw:", yaw) + return 0, "" + + def Stop(self, parameter: str): + print("Stop Called.") + return 0, "" + +if __name__ == "__main__": + # initialize channel factory. + ChannelFactoryInitialize(0) + + # create server + server = TestServer() + server.Init() + server.StartLease(1.0) + server.Start(False) + + while True: + time.sleep(10) \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/__init__.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/__pycache__/__init__.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ad7b203f45bc727d384831d4331a255e5c60a440 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/__pycache__/__init__.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/__pycache__/bqueue.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/__pycache__/bqueue.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..76d0f94def89a2e6c7c11d7c1a6ce478b19cc26a Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/__pycache__/bqueue.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/__pycache__/singleton.cpython-310.pyc b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/__pycache__/singleton.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..81e30cdfd11989bf203f254d05054eb20585dcd9 Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/__pycache__/singleton.cpython-310.pyc differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/bqueue.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/bqueue.py new file mode 100644 index 0000000000000000000000000000000000000000..a612bfb44668b32e061ce1f5bae22d31d64c8358 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/bqueue.py @@ -0,0 +1,58 @@ +from typing import Any +from collections import deque +from threading import Condition + +class BQueue: + def __init__(self, maxLen: int = 10): + self.__curLen = 0 + self.__maxLen = maxLen + self.__queue = deque() + self.__condition = Condition() + + def Put(self, x: Any, replace: bool = False): + noReplaced = True + with self.__condition: + if self.__curLen >= self.__maxLen: + if not replace: + return False + else: + noReplaced = False + self.__queue.popleft() + self.__curLen -= 1 + + self.__queue.append(x) + self.__curLen += 1 + self.__condition.notify() + + return noReplaced + + def Get(self, timeout: float = None): + with self.__condition: + if not self.__queue: + try: + self.__condition.wait(timeout) + except: + return None + + if not self.__queue: + return None + + self.__curLen -= 1 + return self.__queue.popleft() + + def Clear(self): + with self.__condition: + if self.__queue: + self.__queue.clear() + self.__curLen = 0 + + def Size(self): + with self.__condition: + return self.__curLen + + def Interrupt(self, notifyAll: bool = False): + with self.__condition: + if notifyAll: + self.__condition.notify() + else: + self.__condition.notify_all() diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/clib_lookup.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/clib_lookup.py new file mode 100644 index 0000000000000000000000000000000000000000..ca7073d2eb566313b542b0f1c1067de8be3ae739 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/clib_lookup.py @@ -0,0 +1,17 @@ +import os +import ctypes + +clib = ctypes.CDLL(None, use_errno=True) + +def CLIBCheckError(ret, func, args): + if ret < 0: + code = ctypes.get_errno() + raise OSError(code, os.strerror(code)) + return ret + +def CLIBLookup(name, resType, argTypes): + func = clib[name] + func.restye = resType + func.argtypes = argTypes + func.errcheck = CLIBCheckError + return func diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/crc.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/crc.py new file mode 100644 index 0000000000000000000000000000000000000000..c25070657df1fa3f20ca9bef23a95612b27f8e94 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/crc.py @@ -0,0 +1,228 @@ +import struct +import cyclonedds +import cyclonedds.idl as idl + +from .singleton import Singleton +from ..idl.unitree_go.msg.dds_ import LowCmd_ +from ..idl.unitree_go.msg.dds_ import LowState_ + +from ..idl.unitree_hg.msg.dds_ import LowCmd_ as HGLowCmd_ +from ..idl.unitree_hg.msg.dds_ import LowState_ as HGLowState_ +import ctypes +import os +import platform + +class CRC(Singleton): + def __init__(self): + #4 bytes aligned, little-endian format. + #size 812 + self.__packFmtLowCmd = '<4B4IH2x' + 'B3x5f3I' * 20 + '4B' + '55Bx2I' + #size 1180 + self.__packFmtLowState = '<4B4IH2x' + '13fb3x' + 'B3x7fb3x3I' * 20 + '4BiH4b15H' + '8hI41B3xf2b2x2f4h2I' + #size 1004 + self.__packFmtHGLowCmd = '<2B2x' + 'B3x5fI' * 35 + '5I' + #size 2092 + self.__packFmtHGLowState = '<2I2B2xI' + '13fh2x' + 'B3x4f2hf7I' * 35 + '40B5I' + + + script_dir = os.path.dirname(os.path.abspath(__file__)) + self.platform = platform.system() + if self.platform == "Linux": + if platform.machine()=="x86_64": + self.crc_lib = ctypes.CDLL(script_dir + '/lib/crc_amd64.so') + elif platform.machine()=="aarch64": + self.crc_lib = ctypes.CDLL(script_dir + '/lib/crc_aarch64.so') + + self.crc_lib.crc32_core.argtypes = (ctypes.POINTER(ctypes.c_uint32), ctypes.c_uint32) + self.crc_lib.crc32_core.restype = ctypes.c_uint32 + + def Crc(self, msg: idl.IdlStruct): + if msg.__idl_typename__ == 'unitree_go.msg.dds_.LowCmd_': + return self.__Crc32(self.__PackLowCmd(msg)) + elif msg.__idl_typename__ == 'unitree_go.msg.dds_.LowState_': + return self.__Crc32(self.__PackLowState(msg)) + if msg.__idl_typename__ == 'unitree_hg.msg.dds_.LowCmd_': + return self.__Crc32(self.__PackHGLowCmd(msg)) + elif msg.__idl_typename__ == 'unitree_hg.msg.dds_.LowState_': + return self.__Crc32(self.__PackHGLowState(msg)) + else: + raise TypeError('unknown IDL message type to crc') + + def __PackLowCmd(self, cmd: LowCmd_): + origData = [] + origData.extend(cmd.head) + origData.append(cmd.level_flag) + origData.append(cmd.frame_reserve) + origData.extend(cmd.sn) + origData.extend(cmd.version) + origData.append(cmd.bandwidth) + + for i in range(20): + origData.append(cmd.motor_cmd[i].mode) + origData.append(cmd.motor_cmd[i].q) + origData.append(cmd.motor_cmd[i].dq) + origData.append(cmd.motor_cmd[i].tau) + origData.append(cmd.motor_cmd[i].kp) + origData.append(cmd.motor_cmd[i].kd) + origData.extend(cmd.motor_cmd[i].reserve) + + origData.append(cmd.bms_cmd.off) + origData.extend(cmd.bms_cmd.reserve) + + origData.extend(cmd.wireless_remote) + origData.extend(cmd.led) + origData.extend(cmd.fan) + origData.append(cmd.gpio) + origData.append(cmd.reserve) + origData.append(cmd.crc) + + return self.__Trans(struct.pack(self.__packFmtLowCmd, *origData)) + + def __PackLowState(self, state: LowState_): + origData = [] + origData.extend(state.head) + origData.append(state.level_flag) + origData.append(state.frame_reserve) + origData.extend(state.sn) + origData.extend(state.version) + origData.append(state.bandwidth) + + origData.extend(state.imu_state.quaternion) + origData.extend(state.imu_state.gyroscope) + origData.extend(state.imu_state.accelerometer) + origData.extend(state.imu_state.rpy) + origData.append(state.imu_state.temperature) + + for i in range(20): + origData.append(state.motor_state[i].mode) + origData.append(state.motor_state[i].q) + origData.append(state.motor_state[i].dq) + origData.append(state.motor_state[i].ddq) + origData.append(state.motor_state[i].tau_est) + origData.append(state.motor_state[i].q_raw) + origData.append(state.motor_state[i].dq_raw) + origData.append(state.motor_state[i].ddq_raw) + origData.append(state.motor_state[i].temperature) + origData.append(state.motor_state[i].lost) + origData.extend(state.motor_state[i].reserve) + + origData.append(state.bms_state.version_high) + origData.append(state.bms_state.version_low) + origData.append(state.bms_state.status) + origData.append(state.bms_state.soc) + origData.append(state.bms_state.current) + origData.append(state.bms_state.cycle) + origData.extend(state.bms_state.bq_ntc) + origData.extend(state.bms_state.mcu_ntc) + origData.extend(state.bms_state.cell_vol) + + origData.extend(state.foot_force) + origData.extend(state.foot_force_est) + origData.append(state.tick) + origData.extend(state.wireless_remote) + origData.append(state.bit_flag) + origData.append(state.adc_reel) + origData.append(state.temperature_ntc1) + origData.append(state.temperature_ntc2) + origData.append(state.power_v) + origData.append(state.power_a) + origData.extend(state.fan_frequency) + origData.append(state.reserve) + origData.append(state.crc) + + return self.__Trans(struct.pack(self.__packFmtLowState, *origData)) + + def __PackHGLowCmd(self, cmd: HGLowCmd_): + origData = [] + origData.append(cmd.mode_pr) + origData.append(cmd.mode_machine) + + for i in range(35): + origData.append(cmd.motor_cmd[i].mode) + origData.append(cmd.motor_cmd[i].q) + origData.append(cmd.motor_cmd[i].dq) + origData.append(cmd.motor_cmd[i].tau) + origData.append(cmd.motor_cmd[i].kp) + origData.append(cmd.motor_cmd[i].kd) + origData.append(cmd.motor_cmd[i].reserve) + + origData.extend(cmd.reserve) + origData.append(cmd.crc) + + return self.__Trans(struct.pack(self.__packFmtHGLowCmd, *origData)) + + def __PackHGLowState(self, state: HGLowState_): + origData = [] + origData.extend(state.version) + origData.append(state.mode_pr) + origData.append(state.mode_machine) + origData.append(state.tick) + + origData.extend(state.imu_state.quaternion) + origData.extend(state.imu_state.gyroscope) + origData.extend(state.imu_state.accelerometer) + origData.extend(state.imu_state.rpy) + origData.append(state.imu_state.temperature) + + for i in range(35): + origData.append(state.motor_state[i].mode) + origData.append(state.motor_state[i].q) + origData.append(state.motor_state[i].dq) + origData.append(state.motor_state[i].ddq) + origData.append(state.motor_state[i].tau_est) + origData.extend(state.motor_state[i].temperature) + origData.append(state.motor_state[i].vol) + origData.extend(state.motor_state[i].sensor) + origData.append(state.motor_state[i].motorstate) + origData.extend(state.motor_state[i].reserve) + + origData.extend(state.wireless_remote) + origData.extend(state.reserve) + origData.append(state.crc) + + return self.__Trans(struct.pack(self.__packFmtHGLowState, *origData)) + + def __Trans(self, packData): + calcData = [] + calcLen = ((len(packData)>>2)-1) + + for i in range(calcLen): + d = ((packData[i*4+3] << 24) | (packData[i*4+2] << 16) | (packData[i*4+1] << 8) | (packData[i*4])) + calcData.append(d) + + return calcData + + def _crc_py(self, data): + bit = 0 + crc = 0xFFFFFFFF + polynomial = 0x04c11db7 + + for i in range(len(data)): + bit = 1 << 31 + current = data[i] + + for b in range(32): + if crc & 0x80000000: + crc = (crc << 1) & 0xFFFFFFFF + crc ^= polynomial + else: + crc = (crc << 1) & 0xFFFFFFFF + + if current & bit: + crc ^= polynomial + + bit >>= 1 + + return crc + + def _crc_ctypes(self, data): + uint32_array = (ctypes.c_uint32 * len(data))(*data) + length = len(data) + crc=self.crc_lib.crc32_core(uint32_array, length) + return crc + + def __Crc32(self, data): + if self.platform == "Linux": + return self._crc_ctypes(data) + else: + return self._crc_py(data) diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/future.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/future.py new file mode 100644 index 0000000000000000000000000000000000000000..f539087832b9a66796c4e46ef44885a2cf5273c7 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/future.py @@ -0,0 +1,104 @@ +from threading import Condition +from typing import Any +from enum import Enum + +""" +" Enum RequtestFutureState +""" +class FutureState(Enum): + DEFER = 0 + READY = 1 + FAILED = 2 + +""" +" class FutureException +""" +class FutureResult: + FUTURE_SUCC = 0 + FUTUTE_ERR_TIMEOUT = 1 + FUTURE_ERR_FAILED = 2 + FUTURE_ERR_UNKNOWN = 3 + + def __init__(self, code: int, msg: str, value: Any = None): + self.code = code + self.msg = msg + self.value = value + + def __str__(self): + return f"FutureResult(code={str(self.code)}, msg='{self.msg}', value={self.value})" + +class Future: + def __init__(self): + self.__state = FutureState.DEFER + self.__msg = None + self.__condition = Condition() + + def GetResult(self, timeout: float = None): + with self.__condition: + return self.__WaitResult(timeout) + + def Wait(self, timeout: float = None): + with self.__condition: + return self.__Wait(timeout) + + def Ready(self, value): + with self.__condition: + ready = self.__Ready(value) + self.__condition.notify() + return ready + + def Fail(self, reason: str): + with self.__condition: + fail = self.__Fail(reason) + self.__condition.notify() + return fail + + def __Wait(self, timeout: float = None): + if not self.__IsDeferred(): + return True + try: + if timeout is None: + return self.__condition.wait() + else: + return self.__condition.wait(timeout) + except: + print("[Future] future wait error") + return False + + def __WaitResult(self, timeout: float = None): + if not self.__Wait(timeout): + return FutureResult(FutureResult.FUTUTE_ERR_TIMEOUT, "future wait timeout") + + if self.__IsReady(): + return FutureResult(FutureResult.FUTURE_SUCC, "success", self.__value) + elif self.__IsFailed(): + return FutureResult(FutureResult.FUTURE_ERR_FAILED, self.__msg) + else: + return FutureResult(FutureResult.FUTURE_ERR_UNKNOWN, "future state error:" + str(self.__state)) + + def __Ready(self, value): + if not self.__IsDeferred(): + print("[Future] futrue state is not defer") + return False + else: + self.__value = value + self.__state = FutureState.READY + return True + + def __Fail(self, message: str): + if not self.__IsDeferred(): + print("[Future] futrue state is not DEFER") + return False + else: + self.__msg = message + self.__state = FutureState.FAILED + return True + + def __IsDeferred(self): + return self.__state == FutureState.DEFER + + def __IsReady(self): + return self.__state == FutureState.READY + + def __IsFailed(self): + return self.__state == FutureState.FAILED \ No newline at end of file diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/hz_sample.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/hz_sample.py new file mode 100644 index 0000000000000000000000000000000000000000..962fe3c6af82cb031f3b43d3362d74e52e73a3c5 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/hz_sample.py @@ -0,0 +1,24 @@ +import time +from threading import Lock +from .thread import RecurrentThread + +class HZSample: + def __init__(self, interval: float = 1.0): + self.__count = 0 + self.__inter = interval if interval > 0.0 else 1.0 + self.__lock = Lock() + self.__thread = RecurrentThread(self.__inter, target=self.TimerFunc) + + def Start(self): + self.__thread.Start() + + def Sample(self): + with self.__lock: + self.__count += 1 + + def TimerFunc(self): + count = 0 + with self.__lock: + count = self.__count + self.__count = 0 + print("HZ: {}".format(count/self.__inter)) diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/joystick.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/joystick.py new file mode 100644 index 0000000000000000000000000000000000000000..aeda67278d8aece61d4ff4ccde3acf3420186eb1 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/joystick.py @@ -0,0 +1,251 @@ +import math +import struct +import os +os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = "hide" # Disable pygame welcome message +import pygame +import time + +class Button: + def __init__(self) -> None: + self.pressed = False + self.on_pressed = False + self.on_released = False + self.data = 0 + self.click_count = 0 # 记录连续点击次数 + self.last_pressed_time = 0 # 上次按下时间 + + def __call__(self, data) -> None: + current_time = time.perf_counter() + # print('before',self.data) + + self.pressed = (data != 0) + self.on_pressed = self.pressed and self.data == 0 + self.on_released = not self.pressed and self.data != 0 + + # print('after',self.data) + # 处理连续点击 + if self.on_pressed: + # print('on_pressed') + # print('on_pressed current_time',current_time) + # print('on_pressed last_pressed_time',self.last_pressed_time) + # print('on_pressed diff',current_time-self.last_pressed_time) + + if current_time - self.last_pressed_time <= 0.3: # 0.1 秒以内的连续点击 + self.click_count += 1 + # print(self.click_count) + else: + self.click_count = 0 # 超过时间间隔,重置计数器 + self.last_pressed_time = current_time + self.data = data + + def reset_click_count(self): + """手动重置连续点击计数器""" + self.click_count = 0 + +class Axis: + def __init__(self) -> None: + self.data = 0.0 + self.pressed = False + self.on_pressed = False + self.on_released = False + + self.smooth = 0.03 + self.deadzone = 0.01 + self.threshold = 0.5 + + def __call__(self, data) -> None: + data_deadzone = 0.0 if math.fabs(data) < self.deadzone else data + new_data = self.data * (1 - self.smooth) + data_deadzone * self.smooth + self.pressed = math.fabs(new_data) > self.threshold + self.on_pressed = self.pressed and math.fabs(self.data) < self.threshold + self.on_released = not self.pressed and math.fabs(self.data) > self.threshold + self.data = new_data + + +class Joystick: + def __init__(self) -> None: + # Buttons + self.back = Button() + self.start = Button() + # self.LS = Button() + # self.RS = Button() + self.LB = Button() + self.RB = Button() + self.LT = Button() + self.RT = Button() + self.A = Button() + self.B = Button() + self.X = Button() + self.Y = Button() + self.up = Button() + self.down = Button() + self.left = Button() + self.right = Button() + self.F1 = Button() + self.F2 = Button() + + # Axes + # self.LT = Axis() + # self.RT = Axis() + self.lx = Axis() + self.ly = Axis() + self.rx = Axis() + self.ry = Axis() + + self.last_active_time = time.perf_counter() # 最后一次活动时间 + self.inactive_timeout = 0.5 # 超时时间(单位:秒) + def update(self): + """ + Update the current handle key based on the original data + Used to update flag bits such as on_pressed + + Examples: + >>> new_A_data = 1 + >>> self.A( new_A_data ) + """ + pass + + def extract(self, wireless_remote): + """ + Extract data from unitree_joystick + wireless_remote: uint8_t[40] + """ + # Buttons + button1 = [int(data) for data in f'{wireless_remote[2]:08b}'] + button2 = [int(data) for data in f'{wireless_remote[3]:08b}'] + self.LT(button1[2]) + self.RT(button1[3]) + self.back(button1[4]) + self.start(button1[5]) + self.LB(button1[6]) + self.RB(button1[7]) + self.left(button2[0]) + self.down(button2[1]) + self.right(button2[2]) + self.up(button2[3]) + self.Y(button2[4]) + self.X(button2[5]) + self.B(button2[6]) + self.A(button2[7]) + # Axes + self.lx( struct.unpack('f', bytes(wireless_remote[4:8]))[0] ) + self.rx( struct.unpack('f', bytes(wireless_remote[8:12]))[0] ) + self.ry( struct.unpack('f', bytes(wireless_remote[12:16]))[0] ) + self.ly( struct.unpack('f', bytes(wireless_remote[20:24]))[0] ) + + + # 检查是否有按键按下 + if any([ + self.LT.pressed, self.RT.pressed, self.back.pressed, self.start.pressed, + self.LB.pressed, self.RB.pressed, self.left.pressed, self.down.pressed, + self.right.pressed, self.up.pressed, self.Y.pressed, self.X.pressed, + self.B.pressed, self.A.pressed + ]): + self.last_active_time = time.perf_counter() # 更新最后一次活动时间 + elif time.perf_counter() - self.last_active_time > self.inactive_timeout: + # 超过设定的超时时间未按下任何键,重置所有按键的点击计数 + self.reset_all_click_counts() + self.last_active_time = time.perf_counter() # 重置最后活动时间 + + def reset_all_click_counts(self): + """重置所有按键的连续点击计数器""" + for button in [ + self.LT, self.RT, self.back, self.start, self.LB, self.RB, + self.left, self.down, self.right, self.up, self.Y, self.X, self.B, self.A + ]: + button.reset_click_count() + + def combine(self): + """ + Merge data from Joystick to wireless_remote + """ + # prepare an empty list + wireless_remote = [0 for _ in range(40)] + + # Buttons + wireless_remote[2] = int(''.join([f'{key}' for key in [ + 0, 0, round(self.LT.data), round(self.RT.data), + self.back.data, self.start.data, self.LB.data, self.RB.data, + ]]), 2) + wireless_remote[3] = int(''.join([f'{key}' for key in [ + self.left.data, self.down.data, self.right.data, + self.up.data, self.Y.data, self.X.data, self.B.data, self.A.data, + ]]), 2) + + # Axes + sticks = [self.lx.data, self.rx.data, self.ry.data, self.ly.data] + packs = list(map(lambda x: struct.pack('f', x), sticks)) + wireless_remote[4:8] = packs[0] + wireless_remote[8:12] = packs[1] + wireless_remote[12:16] = packs[2] + wireless_remote[20:24] = packs[3] + return wireless_remote + +class PyGameJoystick(Joystick): + def __init__(self) -> None: + super().__init__() + + pygame.init() + pygame.joystick.init() + if pygame.joystick.get_count() <= 0: + raise Exception("No joystick found!") + + self._joystick = pygame.joystick.Joystick(0) + self._joystick.init() + + def print(self): + print("\naxes: ") + for i in range(self._joystick.get_numaxes()): + print(self._joystick.get_axis(i), end=" ") + print("\nbuttons: ") + for i in range(self._joystick.get_numbuttons()): + print(self._joystick.get_button(i), end=" ") + print("\nhats: ") + for i in range(self._joystick.get_numhats()): + print(self._joystick.get_hat(i), end=" ") + print("\nballs: ") + for i in range(self._joystick.get_numballs()): + print(self._joystick.get_ball(i), end=" ") + print("\n") + +class LogicJoystick(PyGameJoystick): + """ Logic F710 """ + def __init__(self) -> None: + super().__init__() + + def update(self): + pygame.event.pump() + + self.back(self._joystick.get_button(6)) + self.start(self._joystick.get_button(7)) + self.LS(self._joystick.get_button(9)) + self.RS(self._joystick.get_button(10)) + self.LB(self._joystick.get_button(4)) + self.RB(self._joystick.get_button(5)) + self.A(self._joystick.get_button(0)) + self.B(self._joystick.get_button(1)) + self.X(self._joystick.get_button(2)) + self.Y(self._joystick.get_button(3)) + + self.LT((self._joystick.get_axis(2) + 1)/2) + self.RT((self._joystick.get_axis(5) + 1)/2) + self.rx(self._joystick.get_axis(3)) + self.ry(-self._joystick.get_axis(4)) + + + # Logitech controller has 2 modes + # mode 1: light down + self.up(1 if self._joystick.get_hat(0)[1] > 0.5 else 0) + self.down(1 if self._joystick.get_hat(0)[1] < -0.5 else 0) + self.left(1 if self._joystick.get_hat(0)[0] < -0.5 else 0) + self.right(1 if self._joystick.get_hat(0)[0] > 0.5 else 0) + self.lx(self._joystick.get_axis(0)) + self.ly(-self._joystick.get_axis(1)) + # mode 2: light up + # self.up(1 if self._joystick.get_axis(1) < -0.5 else 0) + # self.down(1 if self._joystick.get_axis(0) > 0.5 else 0) + # self.left(1 if self._joystick.get_axis(0) < -0.5 else 0) + # self.right(1 if self._joystick.get_axis(0) > 0.5 else 0) + # self.lx(self._joystick.get_hat(0)[1]) + # self.ly(self._joystick.get_hat(0)[1]) + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/lib/crc_aarch64.so b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/lib/crc_aarch64.so new file mode 100644 index 0000000000000000000000000000000000000000..878df74577e4fc4c90ff2d011c2344633c9798da Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/lib/crc_aarch64.so differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/lib/crc_amd64.so b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/lib/crc_amd64.so new file mode 100644 index 0000000000000000000000000000000000000000..258055d3ce3d48fc05b39c7b06aa14145f4694ec Binary files /dev/null and b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/lib/crc_amd64.so differ diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/singleton.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/singleton.py new file mode 100644 index 0000000000000000000000000000000000000000..62ca3b092c73de5b72a105f50fbbd55c574f5fc4 --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/singleton.py @@ -0,0 +1,11 @@ +class Singleton: + __instance = None + + def __new__(cls, *args, **kwargs): + if cls.__instance is None: + cls.__instance = super(Singleton, cls).__new__(cls) + return cls.__instance + + def __init__(self): + pass + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/thread.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/thread.py new file mode 100644 index 0000000000000000000000000000000000000000..f17cf4e815f7d613588ac11d69eb83cb8ea816ba --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/thread.py @@ -0,0 +1,83 @@ +import sys +import os +import errno +import ctypes +import struct +import threading + +from .future import Future +from .timerfd import * + +class Thread(Future): + def __init__(self, target = None, name = None, args = (), kwargs = None): + super().__init__() + self.__target = target + self.__args = args + self.__kwargs = {} if kwargs is None else kwargs + self.__thread = threading.Thread(target=self.__ThreadFunc, name=name, daemon=True) + + def Start(self): + return self.__thread.start() + + def GetId(self): + return self.__thread.ident + + def GetNativeId(self): + return self.__thread.native_id + + def __ThreadFunc(self): + value = None + try: + value = self.__target(*self.__args, **self.__kwargs) + self.Ready(value) + except: + info = sys.exc_info() + self.Fail(f"[Thread] target func raise exception: name={info[0].__name__}, args={str(info[1].args)}") + +class RecurrentThread(Thread): + def __init__(self, interval: float = 1.0, target = None, name = None, args = (), kwargs = None): + self.__quit = False + self.__inter = interval + self.__loopTarget = target + self.__loopArgs = args + self.__loopKwargs = {} if kwargs is None else kwargs + + if interval is None or interval <= 0.0: + super().__init__(target=self.__LoopFunc_0, name=name) + else: + super().__init__(target=self.__LoopFunc, name=name) + + def Wait(self, timeout: float = None): + self.__quit = True + super().Wait(timeout) + + def __LoopFunc(self): + # clock type CLOCK_MONOTONIC = 1 + tfd = timerfd_create(1, 0) + spec = itimerspec.from_seconds(self.__inter, self.__inter) + timerfd_settime(tfd, 0, ctypes.byref(spec), None) + + while not self.__quit: + try: + self.__loopTarget(*self.__loopArgs, **self.__loopKwargs) + except: + info = sys.exc_info() + print(f"[RecurrentThread] target func raise exception: name={info[0].__name__}, args={str(info[1].args)}") + + try: + buf = os.read(tfd, 8) + # print(struct.unpack("Q", buf)[0]) + except OSError as e: + if e.errno != errno.EAGAIN: + raise e + + os.close(tfd) + + def __LoopFunc_0(self): + while not self.__quit: + try: + self.__loopTarget(*self.__args, **self.__kwargs) + except: + info = sys.exc_info() + print(f"[RecurrentThread] target func raise exception: name={info[0].__name__}, args={str(info[1].args)}") + diff --git a/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/timerfd.py b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/timerfd.py new file mode 100644 index 0000000000000000000000000000000000000000..002ef3935daf7f35a8ae2e11dba2c1042659be5a --- /dev/null +++ b/GR00T-WholeBodyControl/external_dependencies/unitree_sdk2_python/unitree_sdk2py/utils/timerfd.py @@ -0,0 +1,45 @@ +import math +import ctypes +from .clib_lookup import CLIBLookup + +class timespec(ctypes.Structure): + _fields_ = [("sec", ctypes.c_long), ("nsec", ctypes.c_long)] + __slots__ = [name for name,type in _fields_] + + @classmethod + def from_seconds(cls, secs): + c = cls() + c.seconds = secs + return c + + @property + def seconds(self): + return self.sec + self.nsec / 1000000000 + + @seconds.setter + def seconds(self, secs): + x, y = math.modf(secs) + self.sec = int(y) + self.nsec = int(x * 1000000000) + + +class itimerspec(ctypes.Structure): + _fields_ = [("interval", timespec),("value", timespec)] + __slots__ = [name for name,type in _fields_] + + @classmethod + def from_seconds(cls, interval, value): + spec = cls() + spec.interval.seconds = interval + spec.value.seconds = value + return spec + + +# function timerfd_create +timerfd_create = CLIBLookup("timerfd_create", ctypes.c_int, (ctypes.c_long, ctypes.c_int)) + +# function timerfd_settime +timerfd_settime = CLIBLookup("timerfd_settime", ctypes.c_int, (ctypes.c_int, ctypes.c_int, ctypes.POINTER(itimerspec), ctypes.POINTER(itimerspec))) + +# function timerfd_gettime +timerfd_gettime = CLIBLookup("timerfd_gettime", ctypes.c_int, (ctypes.c_int, ctypes.POINTER(itimerspec))) diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_174421-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_174421-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3ccbebe533d21e360a53a7ed30a02677764d6f6f --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_174421-TEST/.hydra/config.yaml @@ -0,0 +1,34 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + smpl_motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + config: + render_results: false +checkpoint: /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +num_envs: 1 +headless: true +use_wandb: false +max_render_steps: 2 diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_174421-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_174421-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..fe54404bf6cf65c8f734c0e7774c11eaacf6b2b5 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_174421-TEST/.hydra/hydra.yaml @@ -0,0 +1,163 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + - +num_envs=1 + - +headless=true + - +use_wandb=false + - +max_render_steps=2 + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + - ++manager_env.config.render_results=false + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered,++manager_env.config.render_results=false,+headless=true,+max_render_steps=2,+num_envs=1,+use_wandb=false,checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260814_174421-TEST + choices: + manager_env/recorders: empty + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_174421-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_174421-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..dbfb3704bd18725d9af4fdfa9b3b6e0e8aeb400d --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_174421-TEST/.hydra/overrides.yaml @@ -0,0 +1,8 @@ +- checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +- +num_envs=1 +- +headless=true +- +use_wandb=false +- +max_render_steps=2 +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered +- ++manager_env.config.render_results=false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_174421-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260814_174421-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..0e0369ec0468d2cd0a5700ba25580aabde3d731e --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_174421-TEST/eval.log @@ -0,0 +1,6 @@ +2026-08-14 17:44:21.788 | INFO | __main__:main:90 - Loading training config file from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/config.yaml +2026-08-14 17:44:25.637 | WARNING | logging:callHandlers:1762 - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +2026-08-14 17:44:25.640 | INFO | logging:callHandlers:1762 - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +2026-08-14 17:44:25.640 | INFO | logging:callHandlers:1762 - Using device: cuda +2026-08-14 17:44:25.641 | INFO | logging:callHandlers:1762 - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.kit +2026-08-14 17:44:25.860 | DEBUG | logging:callHandlers:1762 - Using selector: EpollSelector diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_174421-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260814_174421-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..c62df2a5bb9e7cf248d0412581e73b0e95c70836 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_174421-TEST/eval_agent_trl.log @@ -0,0 +1,5 @@ +[2026-08-14 17:44:25,636][isaaclab.app.app_launcher][WARNING] - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +[2026-08-14 17:44:25,639][isaaclab.app.app_launcher][INFO] - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +[2026-08-14 17:44:25,640][isaaclab.app.app_launcher][INFO] - Using device: cuda +[2026-08-14 17:44:25,641][isaaclab.app.app_launcher][INFO] - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.kit +[2026-08-14 17:44:25,860][asyncio][DEBUG] - Using selector: EpollSelector diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_174530-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_174530-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3ccbebe533d21e360a53a7ed30a02677764d6f6f --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_174530-TEST/.hydra/config.yaml @@ -0,0 +1,34 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + smpl_motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + config: + render_results: false +checkpoint: /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +num_envs: 1 +headless: true +use_wandb: false +max_render_steps: 2 diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_174530-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_174530-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3c7b734a793291b98d44bceb449addf0561eba89 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_174530-TEST/.hydra/hydra.yaml @@ -0,0 +1,163 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + - +num_envs=1 + - +headless=true + - +use_wandb=false + - +max_render_steps=2 + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + - ++manager_env.config.render_results=false + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered,++manager_env.config.render_results=false,+headless=true,+max_render_steps=2,+num_envs=1,+use_wandb=false,checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260814_174530-TEST + choices: + manager_env/recorders: empty + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_174530-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_174530-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..dbfb3704bd18725d9af4fdfa9b3b6e0e8aeb400d --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_174530-TEST/.hydra/overrides.yaml @@ -0,0 +1,8 @@ +- checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +- +num_envs=1 +- +headless=true +- +use_wandb=false +- +max_render_steps=2 +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered +- ++manager_env.config.render_results=false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_174530-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260814_174530-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..f5d15964e9b0b43a7da52b48c472a805504cb582 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_174530-TEST/eval.log @@ -0,0 +1,6 @@ +2026-08-14 17:45:30.709 | INFO | __main__:main:90 - Loading training config file from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/config.yaml +2026-08-14 17:45:34.342 | WARNING | logging:callHandlers:1762 - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +2026-08-14 17:45:34.345 | INFO | logging:callHandlers:1762 - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +2026-08-14 17:45:34.345 | INFO | logging:callHandlers:1762 - Using device: cuda +2026-08-14 17:45:34.346 | INFO | logging:callHandlers:1762 - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.kit +2026-08-14 17:45:34.494 | DEBUG | logging:callHandlers:1762 - Using selector: EpollSelector diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_174530-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260814_174530-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..00ba4354931021bf1892bb12ed85020ba0f5080a --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_174530-TEST/eval_agent_trl.log @@ -0,0 +1,5 @@ +[2026-08-14 17:45:34,341][isaaclab.app.app_launcher][WARNING] - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +[2026-08-14 17:45:34,344][isaaclab.app.app_launcher][INFO] - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +[2026-08-14 17:45:34,345][isaaclab.app.app_launcher][INFO] - Using device: cuda +[2026-08-14 17:45:34,346][isaaclab.app.app_launcher][INFO] - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.kit +[2026-08-14 17:45:34,494][asyncio][DEBUG] - Using selector: EpollSelector diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_175217-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_175217-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3ccbebe533d21e360a53a7ed30a02677764d6f6f --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_175217-TEST/.hydra/config.yaml @@ -0,0 +1,34 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + smpl_motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + config: + render_results: false +checkpoint: /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +num_envs: 1 +headless: true +use_wandb: false +max_render_steps: 2 diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_175217-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_175217-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ac9c3f87b17d8e2cc494c332b53e67a929ea113f --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_175217-TEST/.hydra/hydra.yaml @@ -0,0 +1,163 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + - +num_envs=1 + - +headless=true + - +use_wandb=false + - +max_render_steps=2 + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + - ++manager_env.config.render_results=false + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered,++manager_env.config.render_results=false,+headless=true,+max_render_steps=2,+num_envs=1,+use_wandb=false,checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260814_175217-TEST + choices: + manager_env/recorders: empty + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_175217-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_175217-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..dbfb3704bd18725d9af4fdfa9b3b6e0e8aeb400d --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_175217-TEST/.hydra/overrides.yaml @@ -0,0 +1,8 @@ +- checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +- +num_envs=1 +- +headless=true +- +use_wandb=false +- +max_render_steps=2 +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered +- ++manager_env.config.render_results=false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_175217-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260814_175217-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..b2956c8b4f881d972bfa5485a44eb64972099f34 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_175217-TEST/eval.log @@ -0,0 +1,7 @@ +2026-08-14 17:52:17.570 | INFO | __main__:main:90 - Loading training config file from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/config.yaml +2026-08-14 17:52:21.132 | WARNING | logging:callHandlers:1762 - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +2026-08-14 17:52:21.135 | INFO | logging:callHandlers:1762 - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +2026-08-14 17:52:21.136 | INFO | logging:callHandlers:1762 - Using device: cuda +2026-08-14 17:52:21.137 | INFO | logging:callHandlers:1762 - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.kit +2026-08-14 17:52:21.453 | DEBUG | logging:callHandlers:1762 - Using selector: EpollSelector +2026-08-14 17:52:32.790 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_175217-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260814_175217-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..37fc5754c9f3bde50ff88f7646ed2cfa15d48a39 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_175217-TEST/eval_agent_trl.log @@ -0,0 +1,5 @@ +[2026-08-14 17:52:21,132][isaaclab.app.app_launcher][WARNING] - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +[2026-08-14 17:52:21,135][isaaclab.app.app_launcher][INFO] - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +[2026-08-14 17:52:21,135][isaaclab.app.app_launcher][INFO] - Using device: cuda +[2026-08-14 17:52:21,137][isaaclab.app.app_launcher][INFO] - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.kit +[2026-08-14 17:52:21,453][asyncio][DEBUG] - Using selector: EpollSelector diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_175514-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_175514-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3ccbebe533d21e360a53a7ed30a02677764d6f6f --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_175514-TEST/.hydra/config.yaml @@ -0,0 +1,34 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + smpl_motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + config: + render_results: false +checkpoint: /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +num_envs: 1 +headless: true +use_wandb: false +max_render_steps: 2 diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_175514-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_175514-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..fafe97d476b65eba090ce898510bb9427b5ab75a --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_175514-TEST/.hydra/hydra.yaml @@ -0,0 +1,163 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + - +num_envs=1 + - +headless=true + - +use_wandb=false + - +max_render_steps=2 + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + - ++manager_env.config.render_results=false + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered,++manager_env.config.render_results=false,+headless=true,+max_render_steps=2,+num_envs=1,+use_wandb=false,checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260814_175514-TEST + choices: + manager_env/recorders: empty + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_175514-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_175514-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..dbfb3704bd18725d9af4fdfa9b3b6e0e8aeb400d --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_175514-TEST/.hydra/overrides.yaml @@ -0,0 +1,8 @@ +- checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +- +num_envs=1 +- +headless=true +- +use_wandb=false +- +max_render_steps=2 +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered +- ++manager_env.config.render_results=false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_175514-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260814_175514-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..988805c00426a8afbbac90146833232e642cc356 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_175514-TEST/eval.log @@ -0,0 +1,6 @@ +2026-08-14 17:55:14.590 | INFO | __main__:main:90 - Loading training config file from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/config.yaml +2026-08-14 17:55:17.783 | WARNING | logging:callHandlers:1762 - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +2026-08-14 17:55:17.786 | INFO | logging:callHandlers:1762 - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +2026-08-14 17:55:17.786 | INFO | logging:callHandlers:1762 - Using device: cuda +2026-08-14 17:55:17.787 | INFO | logging:callHandlers:1762 - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.kit +2026-08-14 17:55:17.956 | DEBUG | logging:callHandlers:1762 - Using selector: EpollSelector diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_175514-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260814_175514-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..83436203ef58d1ea6a6e5fe7352a0ea9e7438568 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_175514-TEST/eval_agent_trl.log @@ -0,0 +1,5 @@ +[2026-08-14 17:55:17,782][isaaclab.app.app_launcher][WARNING] - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +[2026-08-14 17:55:17,786][isaaclab.app.app_launcher][INFO] - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +[2026-08-14 17:55:17,786][isaaclab.app.app_launcher][INFO] - Using device: cuda +[2026-08-14 17:55:17,787][isaaclab.app.app_launcher][INFO] - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.kit +[2026-08-14 17:55:17,956][asyncio][DEBUG] - Using selector: EpollSelector diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_175730-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_175730-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3ccbebe533d21e360a53a7ed30a02677764d6f6f --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_175730-TEST/.hydra/config.yaml @@ -0,0 +1,34 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + smpl_motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + config: + render_results: false +checkpoint: /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +num_envs: 1 +headless: true +use_wandb: false +max_render_steps: 2 diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_175730-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_175730-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bf0826fe229381abf7946eb331bb5c61acf3a3c9 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_175730-TEST/.hydra/hydra.yaml @@ -0,0 +1,163 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + - +num_envs=1 + - +headless=true + - +use_wandb=false + - +max_render_steps=2 + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + - ++manager_env.config.render_results=false + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered,++manager_env.config.render_results=false,+headless=true,+max_render_steps=2,+num_envs=1,+use_wandb=false,checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260814_175730-TEST + choices: + manager_env/recorders: empty + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_175730-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_175730-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..dbfb3704bd18725d9af4fdfa9b3b6e0e8aeb400d --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_175730-TEST/.hydra/overrides.yaml @@ -0,0 +1,8 @@ +- checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +- +num_envs=1 +- +headless=true +- +use_wandb=false +- +max_render_steps=2 +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered +- ++manager_env.config.render_results=false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_175730-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260814_175730-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..a62a8e45bf4d78aa3187541686d81487933045af --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_175730-TEST/eval.log @@ -0,0 +1,7 @@ +2026-08-14 17:57:30.947 | INFO | __main__:main:90 - Loading training config file from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/config.yaml +2026-08-14 17:57:34.508 | WARNING | logging:callHandlers:1762 - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +2026-08-14 17:57:34.511 | INFO | logging:callHandlers:1762 - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +2026-08-14 17:57:34.511 | INFO | logging:callHandlers:1762 - Using device: cuda +2026-08-14 17:57:34.512 | INFO | logging:callHandlers:1762 - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.kit +2026-08-14 17:57:34.677 | DEBUG | logging:callHandlers:1762 - Using selector: EpollSelector +2026-08-14 17:57:42.950 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_175730-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260814_175730-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..ae69f21c5217abab28a6f9508ed453422c388489 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_175730-TEST/eval_agent_trl.log @@ -0,0 +1,5 @@ +[2026-08-14 17:57:34,508][isaaclab.app.app_launcher][WARNING] - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +[2026-08-14 17:57:34,511][isaaclab.app.app_launcher][INFO] - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +[2026-08-14 17:57:34,511][isaaclab.app.app_launcher][INFO] - Using device: cuda +[2026-08-14 17:57:34,512][isaaclab.app.app_launcher][INFO] - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.kit +[2026-08-14 17:57:34,677][asyncio][DEBUG] - Using selector: EpollSelector diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_175822-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_175822-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3ccbebe533d21e360a53a7ed30a02677764d6f6f --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_175822-TEST/.hydra/config.yaml @@ -0,0 +1,34 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + smpl_motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + config: + render_results: false +checkpoint: /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +num_envs: 1 +headless: true +use_wandb: false +max_render_steps: 2 diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_175822-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_175822-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9fcb7ac4a94721a7b75fb1fd82c562295086f836 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_175822-TEST/.hydra/hydra.yaml @@ -0,0 +1,163 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + - +num_envs=1 + - +headless=true + - +use_wandb=false + - +max_render_steps=2 + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + - ++manager_env.config.render_results=false + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered,++manager_env.config.render_results=false,+headless=true,+max_render_steps=2,+num_envs=1,+use_wandb=false,checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260814_175822-TEST + choices: + manager_env/recorders: empty + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_175822-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_175822-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..dbfb3704bd18725d9af4fdfa9b3b6e0e8aeb400d --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_175822-TEST/.hydra/overrides.yaml @@ -0,0 +1,8 @@ +- checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +- +num_envs=1 +- +headless=true +- +use_wandb=false +- +max_render_steps=2 +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered +- ++manager_env.config.render_results=false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_175822-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260814_175822-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..8a922024eb064ff430580b1cf6a9a445a8b39aeb --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_175822-TEST/eval.log @@ -0,0 +1,98 @@ +2026-08-14 17:58:22.250 | INFO | __main__:main:90 - Loading training config file from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/config.yaml +2026-08-14 17:58:25.752 | WARNING | logging:callHandlers:1762 - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +2026-08-14 17:58:25.755 | INFO | logging:callHandlers:1762 - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +2026-08-14 17:58:25.755 | INFO | logging:callHandlers:1762 - Using device: cuda +2026-08-14 17:58:25.756 | INFO | logging:callHandlers:1762 - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.kit +2026-08-14 17:58:25.902 | DEBUG | logging:callHandlers:1762 - Using selector: EpollSelector +2026-08-14 17:58:32.480 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch +2026-08-14 17:58:32.672 | WARNING | logging:callHandlers:1762 - TGS solver with enable_external_forces_every_iteration=False may cause noisy velocities. +2026-08-14 17:58:36.425 | INFO | logging:callHandlers:1762 - Registered backend 'physx' for factory Articulation. +2026-08-14 17:58:36.749 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +2026-08-14 17:58:36.882 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 17:58:37.379 | INFO | logging:callHandlers:1762 - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +2026-08-14 17:58:37.385 | INFO | logging:callHandlers:1762 - Applied RobotAPI to prim /g1 +2026-08-14 17:58:37.391 | INFO | logging:callHandlers:1762 - Set isaac:robotType = 'Default' on /g1 +2026-08-14 17:58:37.392 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.392 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.393 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.393 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.394 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.394 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.395 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.395 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.396 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.396 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.396 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.397 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.397 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.398 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.398 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.399 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.399 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.399 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.400 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.400 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.401 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.401 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.402 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.402 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.402 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.403 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.403 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.404 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.404 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 17:58:37.424 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 17:58:37.495 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_175836_6311/main/payloads/base.usda +2026-08-14 17:58:37.817 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_175836_6311/main/main.usda +2026-08-14 17:58:37.823 | INFO | logging:callHandlers:1762 - Skipping disabled rule: Delete Newton Redundant APIs +2026-08-14 17:58:37.972 | INFO | logging:callHandlers:1762 - Registered backend 'physx' for factory FrameView. +2026-08-14 17:58:37.996 | INFO | logging:callHandlers:1762 - Registered backend 'physx' for factory ContactSensor. +2026-08-14 17:58:37.998 | INFO | logging:callHandlers:1762 - Physics scene prim path: /physicsScene +2026-08-14 17:58:50.421 | INFO | logging:callHandlers:1762 - Simulation parameters for joints in /World/envs/env_.*/Robot: ++---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Dynamic Friction | Viscous Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 2 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 3 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 4 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 5 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 6 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 7 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 8 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 9 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 11 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 12 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 13 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 14 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 15 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 16 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 17 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 18 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 19 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 20 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 21 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 22 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 23 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 24 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 25 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 26 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 27 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +2026-08-14 17:58:50.463 | WARNING | logging:callHandlers:1762 - omni.kit.material.library is not available; using hardcoded built-in MDL list (15 basename(s)). +2026-08-14 17:58:50.489 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:235 - Loaded skeleton from gear_sonic/data/assets/robot_description/mjcf/g1_29dof_rev_1_0.xml +2026-08-14 17:58:50.490 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:236 - Loading motion data from /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered... +2026-08-14 17:58:50.491 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_data:472 - Loaded 2 motions +2026-08-14 17:58:51.793 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1091 - Loading 1 motions... +2026-08-14 17:58:51.806 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1092 - Sampling motion: tensor([1], device='cuda:0'), .... +2026-08-14 17:58:51.806 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1093 - Current motion keys: ['walk_forward_amateur_001__A001'], .... +2026-08-14 17:58:51.822 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1120 - Increased file descriptor limits from 1024/1048576 to 1048576/1048576 +2026-08-14 17:58:51.954 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1140 - Loading motions with 1 jobs... +2026-08-14 17:58:52.429 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1577 - Loaded 1 motions with a total length of 40.020s and 2002 frames. +2026-08-14 17:58:53.025 | INFO | logging:callHandlers:1762 - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'right_hip_pitch_joint', 'waist_yaw_joint', 'left_hip_roll_joint', 'right_hip_roll_joint', 'waist_roll_joint', 'left_hip_yaw_joint', 'right_hip_yaw_joint', 'waist_pitch_joint', 'left_knee_joint', 'right_knee_joint', 'left_shoulder_pitch_joint', 'right_shoulder_pitch_joint', 'left_ankle_pitch_joint', 'right_ankle_pitch_joint', 'left_shoulder_roll_joint', 'right_shoulder_roll_joint', 'left_ankle_roll_joint', 'right_ankle_roll_joint', 'left_shoulder_yaw_joint', 'right_shoulder_yaw_joint', 'left_elbow_joint', 'right_elbow_joint', 'left_wrist_roll_joint', 'right_wrist_roll_joint', 'left_wrist_pitch_joint', 'right_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] +2026-08-14 17:58:56.132 | INFO | logging:callHandlers:1762 - SimulationContext cleared diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_175822-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260814_175822-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..6712833a768a8af2a2a42f2967aa2a796d875def --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_175822-TEST/eval_agent_trl.log @@ -0,0 +1,87 @@ +[2026-08-14 17:58:25,752][isaaclab.app.app_launcher][WARNING] - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +[2026-08-14 17:58:25,755][isaaclab.app.app_launcher][INFO] - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +[2026-08-14 17:58:25,755][isaaclab.app.app_launcher][INFO] - Using device: cuda +[2026-08-14 17:58:25,756][isaaclab.app.app_launcher][INFO] - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.kit +[2026-08-14 17:58:25,902][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-14 17:58:32,672][isaaclab_physx.physics.physx_manager][WARNING] - TGS solver with enable_external_forces_every_iteration=False may cause noisy velocities. +[2026-08-14 17:58:36,424][isaaclab.utils.backend_utils][INFO] - Registered backend 'physx' for factory Articulation. +[2026-08-14 17:58:36,749][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +[2026-08-14 17:58:36,881][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 17:58:37,378][isaacsim.asset.importer.utils.impl.asset_utils][INFO] - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +[2026-08-14 17:58:37,385][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Applied RobotAPI to prim /g1 +[2026-08-14 17:58:37,391][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Set isaac:robotType = 'Default' on /g1 +[2026-08-14 17:58:37,392][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,392][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,393][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,393][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,394][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,394][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,395][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,395][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,395][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,396][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,396][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,397][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,397][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,398][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,398][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,398][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,399][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,399][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,400][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,400][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,401][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,401][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,402][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,402][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,402][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,403][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,403][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,404][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,404][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 17:58:37,424][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 17:58:37,494][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_175836_6311/main/payloads/base.usda +[2026-08-14 17:58:37,817][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_175836_6311/main/main.usda +[2026-08-14 17:58:37,822][isaacsim.asset.transformer.manager][INFO] - Skipping disabled rule: Delete Newton Redundant APIs +[2026-08-14 17:58:37,972][isaaclab.utils.backend_utils][INFO] - Registered backend 'physx' for factory FrameView. +[2026-08-14 17:58:37,996][isaaclab.utils.backend_utils][INFO] - Registered backend 'physx' for factory ContactSensor. +[2026-08-14 17:58:37,998][isaaclab.scene.interactive_scene][INFO] - Physics scene prim path: /physicsScene +[2026-08-14 17:58:50,421][isaaclab_physx.assets.articulation.articulation][INFO] - Simulation parameters for joints in /World/envs/env_.*/Robot: ++---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Dynamic Friction | Viscous Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 2 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 3 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 4 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 5 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 6 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 7 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 8 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 9 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 11 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 12 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 13 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 14 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 15 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 16 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 17 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 18 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 19 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 20 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 21 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 22 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 23 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 24 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 25 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 26 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 27 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +[2026-08-14 17:58:50,463][isaacsim.asset.transformer.rules.utils][WARNING] - omni.kit.material.library is not available; using hardcoded built-in MDL list (15 basename(s)). +[2026-08-14 17:58:53,024][isaaclab.envs.mdp.actions.joint_actions][INFO] - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'right_hip_pitch_joint', 'waist_yaw_joint', 'left_hip_roll_joint', 'right_hip_roll_joint', 'waist_roll_joint', 'left_hip_yaw_joint', 'right_hip_yaw_joint', 'waist_pitch_joint', 'left_knee_joint', 'right_knee_joint', 'left_shoulder_pitch_joint', 'right_shoulder_pitch_joint', 'left_ankle_pitch_joint', 'right_ankle_pitch_joint', 'left_shoulder_roll_joint', 'right_shoulder_roll_joint', 'left_ankle_roll_joint', 'right_ankle_roll_joint', 'left_shoulder_yaw_joint', 'right_shoulder_yaw_joint', 'left_elbow_joint', 'right_elbow_joint', 'left_wrist_roll_joint', 'right_wrist_roll_joint', 'left_wrist_pitch_joint', 'right_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] +[2026-08-14 17:58:56,131][isaaclab.sim.simulation_context][INFO] - SimulationContext cleared diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_175932-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_175932-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..33a692d68e735bd8d22f4c506974e5f73b0eb9e3 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_175932-TEST/.hydra/config.yaml @@ -0,0 +1,39 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + smpl_motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + config: + render_results: false + events: + physics_material: null + add_joint_default_pos: null + base_com: null + randomize_rigid_body_mass: null +checkpoint: /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +num_envs: 1 +headless: true +use_wandb: false +max_render_steps: 2 diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_175932-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_175932-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..51c688c2ebe3abd9f41b13079fbc3f1c6b4a3a63 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_175932-TEST/.hydra/hydra.yaml @@ -0,0 +1,167 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + - +num_envs=1 + - +headless=true + - +use_wandb=false + - +max_render_steps=2 + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + - ++manager_env.config.render_results=false + - ++manager_env.events.physics_material=null + - ++manager_env.events.add_joint_default_pos=null + - ++manager_env.events.base_com=null + - ++manager_env.events.randomize_rigid_body_mass=null + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered,++manager_env.config.render_results=false,++manager_env.events.add_joint_default_pos=null,++manager_env.events.base_com=null,++manager_env.events.physics_material=null,++manager_env.events.randomize_rigid_body_mass=null,+headless=true,+max_render_steps=2,+num_envs=1,+use_wandb=false,checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260814_175932-TEST + choices: + manager_env/recorders: empty + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_175932-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_175932-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..81b7d44e1b90d25cc467642cd364d5200c39ad5e --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_175932-TEST/.hydra/overrides.yaml @@ -0,0 +1,12 @@ +- checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +- +num_envs=1 +- +headless=true +- +use_wandb=false +- +max_render_steps=2 +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered +- ++manager_env.config.render_results=false +- ++manager_env.events.physics_material=null +- ++manager_env.events.add_joint_default_pos=null +- ++manager_env.events.base_com=null +- ++manager_env.events.randomize_rigid_body_mass=null diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_175932-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260814_175932-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..bb484330f33ea9dd7b6d69b846e5013a4e331233 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_175932-TEST/eval.log @@ -0,0 +1,97 @@ +2026-08-14 17:59:32.729 | INFO | __main__:main:90 - Loading training config file from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/config.yaml +2026-08-14 17:59:36.320 | WARNING | logging:callHandlers:1762 - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +2026-08-14 17:59:36.324 | INFO | logging:callHandlers:1762 - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +2026-08-14 17:59:36.324 | INFO | logging:callHandlers:1762 - Using device: cuda +2026-08-14 17:59:36.326 | INFO | logging:callHandlers:1762 - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.kit +2026-08-14 17:59:36.513 | DEBUG | logging:callHandlers:1762 - Using selector: EpollSelector +2026-08-14 17:59:46.000 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch +2026-08-14 17:59:46.196 | WARNING | logging:callHandlers:1762 - TGS solver with enable_external_forces_every_iteration=False may cause noisy velocities. +2026-08-14 17:59:49.868 | INFO | logging:callHandlers:1762 - Registered backend 'physx' for factory Articulation. +2026-08-14 17:59:49.980 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +2026-08-14 17:59:49.994 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 17:59:50.207 | INFO | logging:callHandlers:1762 - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +2026-08-14 17:59:50.213 | INFO | logging:callHandlers:1762 - Applied RobotAPI to prim /g1 +2026-08-14 17:59:50.219 | INFO | logging:callHandlers:1762 - Set isaac:robotType = 'Default' on /g1 +2026-08-14 17:59:50.220 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.220 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.221 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.221 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.222 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.222 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.223 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.223 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.224 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.224 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.224 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.225 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.225 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.226 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.226 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.227 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.227 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.228 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.228 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.228 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.229 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.229 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.230 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.230 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.230 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.231 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.231 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.232 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.232 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 17:59:50.252 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 17:59:50.325 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_175950_6311/main/payloads/base.usda +2026-08-14 17:59:50.751 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_175950_6311/main/main.usda +2026-08-14 17:59:50.757 | INFO | logging:callHandlers:1762 - Skipping disabled rule: Delete Newton Redundant APIs +2026-08-14 17:59:50.956 | INFO | logging:callHandlers:1762 - Registered backend 'physx' for factory FrameView. +2026-08-14 17:59:50.972 | INFO | logging:callHandlers:1762 - Registered backend 'physx' for factory ContactSensor. +2026-08-14 17:59:50.974 | INFO | logging:callHandlers:1762 - Physics scene prim path: /physicsScene +2026-08-14 17:59:53.256 | INFO | logging:callHandlers:1762 - Simulation parameters for joints in /World/envs/env_.*/Robot: ++---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Dynamic Friction | Viscous Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 2 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 3 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 4 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 5 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 6 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 7 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 8 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 9 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 11 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 12 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 13 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 14 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 15 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 16 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 17 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 18 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 19 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 20 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 21 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 22 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 23 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 24 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 25 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 26 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 27 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +2026-08-14 17:59:53.260 | WARNING | logging:callHandlers:1762 - omni.kit.material.library is not available; using hardcoded built-in MDL list (15 basename(s)). +2026-08-14 17:59:53.270 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:235 - Loaded skeleton from gear_sonic/data/assets/robot_description/mjcf/g1_29dof_rev_1_0.xml +2026-08-14 17:59:53.271 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:236 - Loading motion data from /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered... +2026-08-14 17:59:53.271 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_data:472 - Loaded 2 motions +2026-08-14 17:59:53.793 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1091 - Loading 1 motions... +2026-08-14 17:59:53.795 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1092 - Sampling motion: tensor([1], device='cuda:0'), .... +2026-08-14 17:59:53.795 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1093 - Current motion keys: ['walk_forward_amateur_001__A001'], .... +2026-08-14 17:59:53.795 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1120 - Increased file descriptor limits from 1024/1048576 to 1048576/1048576 +2026-08-14 17:59:53.854 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1140 - Loading motions with 1 jobs... +2026-08-14 17:59:54.039 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1577 - Loaded 1 motions with a total length of 40.020s and 2002 frames. +2026-08-14 17:59:54.352 | INFO | logging:callHandlers:1762 - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'right_hip_pitch_joint', 'waist_yaw_joint', 'left_hip_roll_joint', 'right_hip_roll_joint', 'waist_roll_joint', 'left_hip_yaw_joint', 'right_hip_yaw_joint', 'waist_pitch_joint', 'left_knee_joint', 'right_knee_joint', 'left_shoulder_pitch_joint', 'right_shoulder_pitch_joint', 'left_ankle_pitch_joint', 'right_ankle_pitch_joint', 'left_shoulder_roll_joint', 'right_shoulder_roll_joint', 'left_ankle_roll_joint', 'right_ankle_roll_joint', 'left_shoulder_yaw_joint', 'right_shoulder_yaw_joint', 'left_elbow_joint', 'right_elbow_joint', 'left_wrist_roll_joint', 'right_wrist_roll_joint', 'left_wrist_pitch_joint', 'right_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_175932-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260814_175932-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..d599f03b3e9e918aa139019807d74270fe431cc6 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_175932-TEST/eval_agent_trl.log @@ -0,0 +1,86 @@ +[2026-08-14 17:59:36,319][isaaclab.app.app_launcher][WARNING] - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +[2026-08-14 17:59:36,323][isaaclab.app.app_launcher][INFO] - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +[2026-08-14 17:59:36,324][isaaclab.app.app_launcher][INFO] - Using device: cuda +[2026-08-14 17:59:36,326][isaaclab.app.app_launcher][INFO] - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.kit +[2026-08-14 17:59:36,513][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-14 17:59:46,195][isaaclab_physx.physics.physx_manager][WARNING] - TGS solver with enable_external_forces_every_iteration=False may cause noisy velocities. +[2026-08-14 17:59:49,868][isaaclab.utils.backend_utils][INFO] - Registered backend 'physx' for factory Articulation. +[2026-08-14 17:59:49,980][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +[2026-08-14 17:59:49,994][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 17:59:50,206][isaacsim.asset.importer.utils.impl.asset_utils][INFO] - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +[2026-08-14 17:59:50,213][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Applied RobotAPI to prim /g1 +[2026-08-14 17:59:50,219][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Set isaac:robotType = 'Default' on /g1 +[2026-08-14 17:59:50,220][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,220][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,221][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,221][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,222][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,222][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,222][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,223][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,223][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,224][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,224][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,225][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,225][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,226][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,226][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,227][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,227][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,227][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,228][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,228][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,229][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,229][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,230][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,230][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,230][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,231][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,231][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,232][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,232][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 17:59:50,252][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 17:59:50,324][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_175950_6311/main/payloads/base.usda +[2026-08-14 17:59:50,751][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_175950_6311/main/main.usda +[2026-08-14 17:59:50,757][isaacsim.asset.transformer.manager][INFO] - Skipping disabled rule: Delete Newton Redundant APIs +[2026-08-14 17:59:50,956][isaaclab.utils.backend_utils][INFO] - Registered backend 'physx' for factory FrameView. +[2026-08-14 17:59:50,972][isaaclab.utils.backend_utils][INFO] - Registered backend 'physx' for factory ContactSensor. +[2026-08-14 17:59:50,974][isaaclab.scene.interactive_scene][INFO] - Physics scene prim path: /physicsScene +[2026-08-14 17:59:53,256][isaaclab_physx.assets.articulation.articulation][INFO] - Simulation parameters for joints in /World/envs/env_.*/Robot: ++---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Dynamic Friction | Viscous Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 2 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 3 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 4 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 5 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 6 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 7 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 8 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 9 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 11 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 12 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 13 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 14 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 15 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 16 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 17 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 18 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 19 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 20 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 21 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 22 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 23 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 24 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 25 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 26 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 27 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +[2026-08-14 17:59:53,260][isaacsim.asset.transformer.rules.utils][WARNING] - omni.kit.material.library is not available; using hardcoded built-in MDL list (15 basename(s)). +[2026-08-14 17:59:54,352][isaaclab.envs.mdp.actions.joint_actions][INFO] - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'right_hip_pitch_joint', 'waist_yaw_joint', 'left_hip_roll_joint', 'right_hip_roll_joint', 'waist_roll_joint', 'left_hip_yaw_joint', 'right_hip_yaw_joint', 'waist_pitch_joint', 'left_knee_joint', 'right_knee_joint', 'left_shoulder_pitch_joint', 'right_shoulder_pitch_joint', 'left_ankle_pitch_joint', 'right_ankle_pitch_joint', 'left_shoulder_roll_joint', 'right_shoulder_roll_joint', 'left_ankle_roll_joint', 'right_ankle_roll_joint', 'left_shoulder_yaw_joint', 'right_shoulder_yaw_joint', 'left_elbow_joint', 'right_elbow_joint', 'left_wrist_roll_joint', 'right_wrist_roll_joint', 'left_wrist_pitch_joint', 'right_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_180059-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_180059-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..33a692d68e735bd8d22f4c506974e5f73b0eb9e3 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_180059-TEST/.hydra/config.yaml @@ -0,0 +1,39 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + smpl_motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + config: + render_results: false + events: + physics_material: null + add_joint_default_pos: null + base_com: null + randomize_rigid_body_mass: null +checkpoint: /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +num_envs: 1 +headless: true +use_wandb: false +max_render_steps: 2 diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_180059-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_180059-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c0b4d3215e0cfcf09c6d2bad13eaa17f32ed9652 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_180059-TEST/.hydra/hydra.yaml @@ -0,0 +1,167 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + - +num_envs=1 + - +headless=true + - +use_wandb=false + - +max_render_steps=2 + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + - ++manager_env.config.render_results=false + - ++manager_env.events.physics_material=null + - ++manager_env.events.add_joint_default_pos=null + - ++manager_env.events.base_com=null + - ++manager_env.events.randomize_rigid_body_mass=null + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered,++manager_env.config.render_results=false,++manager_env.events.add_joint_default_pos=null,++manager_env.events.base_com=null,++manager_env.events.physics_material=null,++manager_env.events.randomize_rigid_body_mass=null,+headless=true,+max_render_steps=2,+num_envs=1,+use_wandb=false,checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260814_180059-TEST + choices: + manager_env/recorders: empty + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_180059-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_180059-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..81b7d44e1b90d25cc467642cd364d5200c39ad5e --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_180059-TEST/.hydra/overrides.yaml @@ -0,0 +1,12 @@ +- checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +- +num_envs=1 +- +headless=true +- +use_wandb=false +- +max_render_steps=2 +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered +- ++manager_env.config.render_results=false +- ++manager_env.events.physics_material=null +- ++manager_env.events.add_joint_default_pos=null +- ++manager_env.events.base_com=null +- ++manager_env.events.randomize_rigid_body_mass=null diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_180059-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260814_180059-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..abed19435b1f871fe0ea8c69621a8e41e76ffa66 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_180059-TEST/eval.log @@ -0,0 +1,114 @@ +2026-08-14 18:00:59.500 | INFO | __main__:main:90 - Loading training config file from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/config.yaml +2026-08-14 18:01:02.775 | WARNING | logging:callHandlers:1762 - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +2026-08-14 18:01:02.779 | INFO | logging:callHandlers:1762 - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +2026-08-14 18:01:02.779 | INFO | logging:callHandlers:1762 - Using device: cuda +2026-08-14 18:01:02.780 | INFO | logging:callHandlers:1762 - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.kit +2026-08-14 18:01:02.931 | DEBUG | logging:callHandlers:1762 - Using selector: EpollSelector +2026-08-14 18:01:10.604 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch +2026-08-14 18:01:10.805 | WARNING | logging:callHandlers:1762 - TGS solver with enable_external_forces_every_iteration=False may cause noisy velocities. +2026-08-14 18:01:13.638 | INFO | logging:callHandlers:1762 - Registered backend 'physx' for factory Articulation. +2026-08-14 18:01:13.736 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +2026-08-14 18:01:13.746 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:01:13.946 | INFO | logging:callHandlers:1762 - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +2026-08-14 18:01:13.953 | INFO | logging:callHandlers:1762 - Applied RobotAPI to prim /g1 +2026-08-14 18:01:13.959 | INFO | logging:callHandlers:1762 - Set isaac:robotType = 'Default' on /g1 +2026-08-14 18:01:13.960 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.960 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.961 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.961 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.961 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.962 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.962 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.963 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.963 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.964 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.964 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.965 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.965 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.965 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.966 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.966 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.967 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.967 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.968 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.968 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.968 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.969 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.969 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.970 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.970 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.971 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.971 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.971 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.972 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:01:13.992 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:01:14.062 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_180113_6311/main/payloads/base.usda +2026-08-14 18:01:14.476 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_180113_6311/main/main.usda +2026-08-14 18:01:14.482 | INFO | logging:callHandlers:1762 - Skipping disabled rule: Delete Newton Redundant APIs +2026-08-14 18:01:14.690 | INFO | logging:callHandlers:1762 - Registered backend 'physx' for factory FrameView. +2026-08-14 18:01:14.705 | INFO | logging:callHandlers:1762 - Registered backend 'physx' for factory ContactSensor. +2026-08-14 18:01:14.707 | INFO | logging:callHandlers:1762 - Physics scene prim path: /physicsScene +2026-08-14 18:01:16.988 | INFO | logging:callHandlers:1762 - Simulation parameters for joints in /World/envs/env_.*/Robot: ++---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Dynamic Friction | Viscous Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 2 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 3 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 4 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 5 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 6 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 7 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 8 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 9 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 11 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 12 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 13 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 14 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 15 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 16 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 17 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 18 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 19 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 20 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 21 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 22 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 23 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 24 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 25 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 26 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 27 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +2026-08-14 18:01:16.992 | WARNING | logging:callHandlers:1762 - omni.kit.material.library is not available; using hardcoded built-in MDL list (15 basename(s)). +2026-08-14 18:01:17.002 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:235 - Loaded skeleton from gear_sonic/data/assets/robot_description/mjcf/g1_29dof_rev_1_0.xml +2026-08-14 18:01:17.002 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:236 - Loading motion data from /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered... +2026-08-14 18:01:17.003 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_data:472 - Loaded 2 motions +2026-08-14 18:01:17.512 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1091 - Loading 1 motions... +2026-08-14 18:01:17.514 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1092 - Sampling motion: tensor([1], device='cuda:0'), .... +2026-08-14 18:01:17.514 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1093 - Current motion keys: ['walk_forward_amateur_001__A001'], .... +2026-08-14 18:01:17.514 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1120 - Increased file descriptor limits from 1024/1048576 to 1048576/1048576 +2026-08-14 18:01:17.573 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1140 - Loading motions with 1 jobs... +2026-08-14 18:01:17.758 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1577 - Loaded 1 motions with a total length of 40.020s and 2002 frames. +2026-08-14 18:01:18.071 | INFO | logging:callHandlers:1762 - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'right_hip_pitch_joint', 'waist_yaw_joint', 'left_hip_roll_joint', 'right_hip_roll_joint', 'waist_roll_joint', 'left_hip_yaw_joint', 'right_hip_yaw_joint', 'waist_pitch_joint', 'left_knee_joint', 'right_knee_joint', 'left_shoulder_pitch_joint', 'right_shoulder_pitch_joint', 'left_ankle_pitch_joint', 'right_ankle_pitch_joint', 'left_shoulder_roll_joint', 'right_shoulder_roll_joint', 'left_ankle_roll_joint', 'right_ankle_roll_joint', 'left_shoulder_yaw_joint', 'right_shoulder_yaw_joint', 'left_elbow_joint', 'right_elbow_joint', 'left_wrist_roll_joint', 'right_wrist_roll_joint', 'left_wrist_pitch_joint', 'right_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] +2026-08-14 18:01:20.478 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:250 - Motion Encoder and Quantizer initialized with embedding dim: 64 (num_tokens=2, token_dim=32) +2026-08-14 18:01:21.752 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:319 - Initialized g1 encoder with input features: ['command_multi_future_nonflat', 'motion_anchor_ori_b_mf_nonflat'] +2026-08-14 18:01:21.774 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:319 - Initialized teleop encoder with input features: ['command_multi_future_lower_body', 'vr_3point_local_target', 'vr_3point_local_orn_target', 'motion_anchor_ori_b'] +2026-08-14 18:01:21.800 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:319 - Initialized smpl encoder with input features: ['smpl_joints_multi_future_local_nonflat', 'smpl_root_ori_b_multi_future', 'joint_pos_multi_future_wrist_for_smpl'] +2026-08-14 18:01:21.842 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:409 - Initialized g1_dyn decoder with input features: ['token_flattened', 'proprioception'] and output features: ['action'] +2026-08-14 18:01:21.859 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:409 - Initialized g1_kin decoder with input features: ['token'] and output features: ['command_multi_future_nonflat', 'motion_anchor_ori_b_mf_nonflat'] +2026-08-14 18:01:25.266 | INFO | __main__:main:433 - Loading checkpoint from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +2026-08-14 18:01:25.534 | INFO | __main__:main:449 - Model parameterization: std +2026-08-14 18:01:25.534 | INFO | __main__:main:450 - Checkpoint parameterization: std +2026-08-14 18:01:25.536 | INFO | __main__:main:462 - Successfully loaded policy state dict +2026-08-14 18:01:25.810 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:begin_seq_motion_samples:1016 - Loading motions for evaluation +2026-08-14 18:01:25.812 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1091 - Loading 1 motions... +2026-08-14 18:01:25.812 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1092 - Sampling motion: tensor([0], device='cuda:0'), .... +2026-08-14 18:01:25.812 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1093 - Current motion keys: ['walk_forward_amateur_001__A001_M'], .... +2026-08-14 18:01:25.868 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1140 - Loading motions with 1 jobs... +2026-08-14 18:01:26.062 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1577 - Loaded 1 motions with a total length of 40.020s and 2002 frames. +2026-08-14 18:01:27.451 | INFO | __main__:main:623 - Reached max_render_steps=2. Exiting. diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_180059-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260814_180059-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..590d8b41e175f6cd240f4c9d0ca20a1ea6603e26 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_180059-TEST/eval_agent_trl.log @@ -0,0 +1,86 @@ +[2026-08-14 18:01:02,775][isaaclab.app.app_launcher][WARNING] - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +[2026-08-14 18:01:02,778][isaaclab.app.app_launcher][INFO] - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +[2026-08-14 18:01:02,779][isaaclab.app.app_launcher][INFO] - Using device: cuda +[2026-08-14 18:01:02,780][isaaclab.app.app_launcher][INFO] - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.kit +[2026-08-14 18:01:02,931][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-14 18:01:10,805][isaaclab_physx.physics.physx_manager][WARNING] - TGS solver with enable_external_forces_every_iteration=False may cause noisy velocities. +[2026-08-14 18:01:13,638][isaaclab.utils.backend_utils][INFO] - Registered backend 'physx' for factory Articulation. +[2026-08-14 18:01:13,736][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +[2026-08-14 18:01:13,746][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:01:13,945][isaacsim.asset.importer.utils.impl.asset_utils][INFO] - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +[2026-08-14 18:01:13,952][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Applied RobotAPI to prim /g1 +[2026-08-14 18:01:13,959][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Set isaac:robotType = 'Default' on /g1 +[2026-08-14 18:01:13,960][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,960][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,961][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,961][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,961][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,962][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,962][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,963][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,963][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,964][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,964][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,964][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,965][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,965][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,966][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,966][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,967][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,967][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,967][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,968][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,968][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,969][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,969][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,970][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,970][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,970][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,971][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,971][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,972][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:01:13,992][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:01:14,062][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_180113_6311/main/payloads/base.usda +[2026-08-14 18:01:14,476][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_180113_6311/main/main.usda +[2026-08-14 18:01:14,482][isaacsim.asset.transformer.manager][INFO] - Skipping disabled rule: Delete Newton Redundant APIs +[2026-08-14 18:01:14,690][isaaclab.utils.backend_utils][INFO] - Registered backend 'physx' for factory FrameView. +[2026-08-14 18:01:14,704][isaaclab.utils.backend_utils][INFO] - Registered backend 'physx' for factory ContactSensor. +[2026-08-14 18:01:14,707][isaaclab.scene.interactive_scene][INFO] - Physics scene prim path: /physicsScene +[2026-08-14 18:01:16,988][isaaclab_physx.assets.articulation.articulation][INFO] - Simulation parameters for joints in /World/envs/env_.*/Robot: ++---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Dynamic Friction | Viscous Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 2 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 3 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 4 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 5 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 6 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 7 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 8 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 9 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 11 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 12 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 13 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 14 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 15 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 16 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 17 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 18 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 19 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 20 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 21 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 22 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 23 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 24 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 25 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 26 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 27 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +[2026-08-14 18:01:16,992][isaacsim.asset.transformer.rules.utils][WARNING] - omni.kit.material.library is not available; using hardcoded built-in MDL list (15 basename(s)). +[2026-08-14 18:01:18,070][isaaclab.envs.mdp.actions.joint_actions][INFO] - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'right_hip_pitch_joint', 'waist_yaw_joint', 'left_hip_roll_joint', 'right_hip_roll_joint', 'waist_roll_joint', 'left_hip_yaw_joint', 'right_hip_yaw_joint', 'waist_pitch_joint', 'left_knee_joint', 'right_knee_joint', 'left_shoulder_pitch_joint', 'right_shoulder_pitch_joint', 'left_ankle_pitch_joint', 'right_ankle_pitch_joint', 'left_shoulder_roll_joint', 'right_shoulder_roll_joint', 'left_ankle_roll_joint', 'right_ankle_roll_joint', 'left_shoulder_yaw_joint', 'right_shoulder_yaw_joint', 'left_elbow_joint', 'right_elbow_joint', 'left_wrist_roll_joint', 'right_wrist_roll_joint', 'left_wrist_pitch_joint', 'right_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_180351-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_180351-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..90593108254c80f700e2586b2cac8d34a092e2b0 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_180351-TEST/.hydra/config.yaml @@ -0,0 +1,48 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + render_envs: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RenderEnvsRecorderCfg + video_save_path: ${manager_env.config.save_rendering_dir} + video_quality: 5 + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + smpl_motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + config: + render_results: true + render_width: 640 + render_height: 360 + render_frame_skip: 2 + max_render_envs: 1 + save_rendering_dir: /mnt/data/code/Sonic-ActionReplay/public_outputs/sonic_walk_test + events: + physics_material: null + add_joint_default_pos: null + base_com: null + randomize_rigid_body_mass: null +checkpoint: /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +num_envs: 1 +headless: true +use_wandb: false +max_render_steps: 100 diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_180351-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_180351-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0fb667f77f39445e20facfce9c432a2cda88e529 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_180351-TEST/.hydra/hydra.yaml @@ -0,0 +1,173 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + - manager_env/recorders=render + - +num_envs=1 + - +headless=true + - +use_wandb=false + - +max_render_steps=100 + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + - ++manager_env.config.render_results=true + - ++manager_env.config.render_width=640 + - ++manager_env.config.render_height=360 + - ++manager_env.config.render_frame_skip=2 + - ++manager_env.config.max_render_envs=1 + - ++manager_env.config.save_rendering_dir=/mnt/data/code/Sonic-ActionReplay/public_outputs/sonic_walk_test + - ++manager_env.events.physics_material=null + - ++manager_env.events.add_joint_default_pos=null + - ++manager_env.events.base_com=null + - ++manager_env.events.randomize_rigid_body_mass=null + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered,++manager_env.config.max_render_envs=1,++manager_env.config.render_frame_skip=2,++manager_env.config.render_height=360,++manager_env.config.render_results=true,++manager_env.config.render_width=640,++manager_env.config.save_rendering_dir=/mnt/data/code/Sonic-ActionReplay/public_outputs/sonic_walk_test,++manager_env.events.add_joint_default_pos=null,++manager_env.events.base_com=null,++manager_env.events.physics_material=null,++manager_env.events.randomize_rigid_body_mass=null,+headless=true,+max_render_steps=100,+num_envs=1,+use_wandb=false,checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt,manager_env/recorders=render + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260814_180351-TEST + choices: + manager_env/recorders: render + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_180351-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_180351-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6d24c89f4e523688f286380a11c7e12232d1c65d --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_180351-TEST/.hydra/overrides.yaml @@ -0,0 +1,18 @@ +- checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +- manager_env/recorders=render +- +num_envs=1 +- +headless=true +- +use_wandb=false +- +max_render_steps=100 +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered +- ++manager_env.config.render_results=true +- ++manager_env.config.render_width=640 +- ++manager_env.config.render_height=360 +- ++manager_env.config.render_frame_skip=2 +- ++manager_env.config.max_render_envs=1 +- ++manager_env.config.save_rendering_dir=/mnt/data/code/Sonic-ActionReplay/public_outputs/sonic_walk_test +- ++manager_env.events.physics_material=null +- ++manager_env.events.add_joint_default_pos=null +- ++manager_env.events.base_com=null +- ++manager_env.events.randomize_rigid_body_mass=null diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_180351-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260814_180351-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..2dbcaec17b69d3772071c8a4f79fda9c03839a41 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_180351-TEST/eval.log @@ -0,0 +1,175 @@ +2026-08-14 18:03:51.966 | INFO | __main__:main:90 - Loading training config file from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/config.yaml +2026-08-14 18:03:55.498 | WARNING | logging:callHandlers:1762 - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +2026-08-14 18:03:55.500 | INFO | logging:callHandlers:1762 - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +2026-08-14 18:03:55.500 | INFO | logging:callHandlers:1762 - Using device: cuda +2026-08-14 18:03:55.502 | INFO | logging:callHandlers:1762 - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.rendering.kit +2026-08-14 18:03:55.683 | DEBUG | logging:callHandlers:1762 - Using selector: EpollSelector +2026-08-14 18:04:05.600 | DEBUG | logging:callHandlers:1762 - Defining data type 'any' as 'Any' +2026-08-14 18:04:05.600 | DEBUG | logging:callHandlers:1762 - Defining data type 'bool' as 'Bool' and array 'BoolArray +2026-08-14 18:04:05.600 | DEBUG | logging:callHandlers:1762 - Defining data type 'bundle' as 'Bundle' +2026-08-14 18:04:05.601 | DEBUG | logging:callHandlers:1762 - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +2026-08-14 18:04:05.601 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +2026-08-14 18:04:05.601 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +2026-08-14 18:04:05.601 | DEBUG | logging:callHandlers:1762 - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +2026-08-14 18:04:05.601 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +2026-08-14 18:04:05.601 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +2026-08-14 18:04:05.601 | DEBUG | logging:callHandlers:1762 - Defining data type 'double' as 'Double' and array 'DoubleArray +2026-08-14 18:04:05.601 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +2026-08-14 18:04:05.602 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +2026-08-14 18:04:05.602 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +2026-08-14 18:04:05.602 | DEBUG | logging:callHandlers:1762 - Defining data type 'execution' as 'Execution' +2026-08-14 18:04:05.602 | DEBUG | logging:callHandlers:1762 - Defining data type 'float' as 'Float' and array 'FloatArray +2026-08-14 18:04:05.602 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +2026-08-14 18:04:05.602 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +2026-08-14 18:04:05.602 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +2026-08-14 18:04:05.602 | DEBUG | logging:callHandlers:1762 - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +2026-08-14 18:04:05.602 | DEBUG | logging:callHandlers:1762 - Defining data type 'half' as 'Half' and array 'HalfArray +2026-08-14 18:04:05.603 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +2026-08-14 18:04:05.603 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +2026-08-14 18:04:05.603 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +2026-08-14 18:04:05.603 | DEBUG | logging:callHandlers:1762 - Defining data type 'int' as 'Int' and array 'IntArray +2026-08-14 18:04:05.603 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +2026-08-14 18:04:05.603 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +2026-08-14 18:04:05.603 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +2026-08-14 18:04:05.603 | DEBUG | logging:callHandlers:1762 - Defining data type 'int64' as 'Int64' and array 'Int64Array +2026-08-14 18:04:05.603 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +2026-08-14 18:04:05.604 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +2026-08-14 18:04:05.604 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +2026-08-14 18:04:05.604 | DEBUG | logging:callHandlers:1762 - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +2026-08-14 18:04:05.604 | DEBUG | logging:callHandlers:1762 - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +2026-08-14 18:04:05.604 | DEBUG | logging:callHandlers:1762 - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +2026-08-14 18:04:05.604 | DEBUG | logging:callHandlers:1762 - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +2026-08-14 18:04:05.604 | DEBUG | logging:callHandlers:1762 - Defining data type 'path' as 'Path' +2026-08-14 18:04:05.604 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +2026-08-14 18:04:05.604 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +2026-08-14 18:04:05.605 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +2026-08-14 18:04:05.605 | DEBUG | logging:callHandlers:1762 - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +2026-08-14 18:04:05.605 | DEBUG | logging:callHandlers:1762 - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +2026-08-14 18:04:05.605 | DEBUG | logging:callHandlers:1762 - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +2026-08-14 18:04:05.605 | DEBUG | logging:callHandlers:1762 - Defining data type 'string' as 'String' +2026-08-14 18:04:05.605 | DEBUG | logging:callHandlers:1762 - Defining data type 'target' as 'Target' +2026-08-14 18:04:05.605 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +2026-08-14 18:04:05.605 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +2026-08-14 18:04:05.605 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +2026-08-14 18:04:05.605 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +2026-08-14 18:04:05.606 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +2026-08-14 18:04:05.606 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +2026-08-14 18:04:05.606 | DEBUG | logging:callHandlers:1762 - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +2026-08-14 18:04:05.606 | DEBUG | logging:callHandlers:1762 - Defining data type 'token' as 'Token' and array 'TokenArray +2026-08-14 18:04:05.606 | DEBUG | logging:callHandlers:1762 - Defining data type 'uchar' as 'UChar' and array 'UCharArray +2026-08-14 18:04:05.606 | DEBUG | logging:callHandlers:1762 - Defining data type 'uint' as 'UInt' and array 'UIntArray +2026-08-14 18:04:05.606 | DEBUG | logging:callHandlers:1762 - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +2026-08-14 18:04:05.606 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +2026-08-14 18:04:05.606 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +2026-08-14 18:04:05.607 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +2026-08-14 18:04:15.473 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch +2026-08-14 18:04:15.663 | WARNING | logging:callHandlers:1762 - TGS solver with enable_external_forces_every_iteration=False may cause noisy velocities. +2026-08-14 18:04:19.239 | INFO | logging:callHandlers:1762 - Registered backend 'physx' for factory Articulation. +2026-08-14 18:04:19.370 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +2026-08-14 18:04:19.382 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:04:19.618 | INFO | logging:callHandlers:1762 - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +2026-08-14 18:04:19.625 | INFO | logging:callHandlers:1762 - Applied RobotAPI to prim /g1 +2026-08-14 18:04:19.631 | INFO | logging:callHandlers:1762 - Set isaac:robotType = 'Default' on /g1 +2026-08-14 18:04:19.632 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.632 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.633 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.633 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.634 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.634 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.635 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.635 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.636 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.636 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.636 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.637 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.637 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.638 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.638 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.639 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.639 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.640 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.640 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.640 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.641 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.641 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.642 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.642 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.643 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.643 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.643 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.644 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.644 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:04:19.666 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:04:19.746 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_180419_6311/main/payloads/base.usda +2026-08-14 18:04:20.225 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_180419_6311/main/main.usda +2026-08-14 18:04:20.232 | INFO | logging:callHandlers:1762 - Skipping disabled rule: Delete Newton Redundant APIs +2026-08-14 18:04:20.463 | INFO | logging:callHandlers:1762 - Registered backend 'physx' for factory FrameView. +2026-08-14 18:04:20.520 | INFO | logging:callHandlers:1762 - Registered backend 'physx' for factory ContactSensor. +2026-08-14 18:04:20.523 | INFO | logging:callHandlers:1762 - Physics scene prim path: /physicsScene +2026-08-14 18:04:23.686 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory Renderer. +2026-08-14 18:04:23.686 | INFO | logging:callHandlers:1762 - Created new renderer for simulation: NewtonWarpRenderer +2026-08-14 18:04:42.305 | INFO | logging:callHandlers:1762 - Simulation parameters for joints in /World/envs/env_.*/Robot: ++---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Dynamic Friction | Viscous Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 2 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 3 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 4 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 5 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 6 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 7 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 8 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 9 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 11 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 12 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 13 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 14 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 15 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 16 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 17 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 18 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 19 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 20 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 21 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 22 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 23 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 24 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 25 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 26 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 27 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +2026-08-14 18:04:42.307 | INFO | logging:callHandlers:1762 - Using renderer: NewtonWarpRenderer +2026-08-14 18:04:42.529 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:235 - Loaded skeleton from gear_sonic/data/assets/robot_description/mjcf/g1_29dof_rev_1_0.xml +2026-08-14 18:04:42.529 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:236 - Loading motion data from /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered... +2026-08-14 18:04:42.530 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_data:472 - Loaded 2 motions +2026-08-14 18:04:43.699 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1091 - Loading 1 motions... +2026-08-14 18:04:43.702 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1092 - Sampling motion: tensor([1], device='cuda:0'), .... +2026-08-14 18:04:43.703 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1093 - Current motion keys: ['walk_forward_amateur_001__A001'], .... +2026-08-14 18:04:43.703 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1120 - Increased file descriptor limits from 2450/1048576 to 1048576/1048576 +2026-08-14 18:04:43.877 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1140 - Loading motions with 1 jobs... +2026-08-14 18:04:44.344 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1577 - Loaded 1 motions with a total length of 40.020s and 2002 frames. +2026-08-14 18:04:45.479 | INFO | gear_sonic.envs.manager_env.mdp.recorders:__init__:44 - === Start recording video to /mnt/data/code/Sonic-ActionReplay/public_outputs/sonic_walk_test === +2026-08-14 18:04:45.676 | INFO | logging:callHandlers:1762 - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'right_hip_pitch_joint', 'waist_yaw_joint', 'left_hip_roll_joint', 'right_hip_roll_joint', 'waist_roll_joint', 'left_hip_yaw_joint', 'right_hip_yaw_joint', 'waist_pitch_joint', 'left_knee_joint', 'right_knee_joint', 'left_shoulder_pitch_joint', 'right_shoulder_pitch_joint', 'left_ankle_pitch_joint', 'right_ankle_pitch_joint', 'left_shoulder_roll_joint', 'right_shoulder_roll_joint', 'left_ankle_roll_joint', 'right_ankle_roll_joint', 'left_shoulder_yaw_joint', 'right_shoulder_yaw_joint', 'left_elbow_joint', 'right_elbow_joint', 'left_wrist_roll_joint', 'right_wrist_roll_joint', 'left_wrist_pitch_joint', 'right_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] +2026-08-14 18:04:49.166 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:250 - Motion Encoder and Quantizer initialized with embedding dim: 64 (num_tokens=2, token_dim=32) +2026-08-14 18:04:49.329 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:319 - Initialized g1 encoder with input features: ['command_multi_future_nonflat', 'motion_anchor_ori_b_mf_nonflat'] +2026-08-14 18:04:49.375 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:319 - Initialized teleop encoder with input features: ['command_multi_future_lower_body', 'vr_3point_local_target', 'vr_3point_local_orn_target', 'motion_anchor_ori_b'] +2026-08-14 18:04:49.431 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:319 - Initialized smpl encoder with input features: ['smpl_joints_multi_future_local_nonflat', 'smpl_root_ori_b_multi_future', 'joint_pos_multi_future_wrist_for_smpl'] +2026-08-14 18:04:49.526 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:409 - Initialized g1_dyn decoder with input features: ['token_flattened', 'proprioception'] and output features: ['action'] +2026-08-14 18:04:49.545 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:409 - Initialized g1_kin decoder with input features: ['token'] and output features: ['command_multi_future_nonflat', 'motion_anchor_ori_b_mf_nonflat'] +2026-08-14 18:04:51.428 | INFO | __main__:main:433 - Loading checkpoint from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +2026-08-14 18:04:51.668 | INFO | __main__:main:449 - Model parameterization: std +2026-08-14 18:04:51.668 | INFO | __main__:main:450 - Checkpoint parameterization: std +2026-08-14 18:04:51.670 | INFO | __main__:main:462 - Successfully loaded policy state dict +2026-08-14 18:04:51.671 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:begin_seq_motion_samples:1016 - Loading motions for evaluation +2026-08-14 18:04:51.672 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1091 - Loading 1 motions... +2026-08-14 18:04:51.673 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1092 - Sampling motion: tensor([0], device='cuda:0'), .... +2026-08-14 18:04:51.673 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1093 - Current motion keys: ['walk_forward_amateur_001__A001_M'], .... +2026-08-14 18:04:51.750 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1140 - Loading motions with 1 jobs... +2026-08-14 18:04:51.954 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1577 - Loaded 1 motions with a total length of 40.020s and 2002 frames. +2026-08-14 18:04:53.063 | INFO | gear_sonic.envs.manager_env.mdp.recorders:_initialize_writers:57 - Saving rendering to /mnt/data/code/Sonic-ActionReplay/public_outputs/sonic_walk_test diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_180351-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260814_180351-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..0b9ebb487b9209c23f2f39fda2cc0f054424b112 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_180351-TEST/eval_agent_trl.log @@ -0,0 +1,146 @@ +[2026-08-14 18:03:55,498][isaaclab.app.app_launcher][WARNING] - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +[2026-08-14 18:03:55,500][isaaclab.app.app_launcher][INFO] - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +[2026-08-14 18:03:55,500][isaaclab.app.app_launcher][INFO] - Using device: cuda +[2026-08-14 18:03:55,501][isaaclab.app.app_launcher][INFO] - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.rendering.kit +[2026-08-14 18:03:55,683][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-14 18:04:05,600][AutoNode][DEBUG] - Defining data type 'any' as 'Any' +[2026-08-14 18:04:05,600][AutoNode][DEBUG] - Defining data type 'bool' as 'Bool' and array 'BoolArray +[2026-08-14 18:04:05,600][AutoNode][DEBUG] - Defining data type 'bundle' as 'Bundle' +[2026-08-14 18:04:05,601][AutoNode][DEBUG] - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +[2026-08-14 18:04:05,601][AutoNode][DEBUG] - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +[2026-08-14 18:04:05,601][AutoNode][DEBUG] - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +[2026-08-14 18:04:05,601][AutoNode][DEBUG] - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +[2026-08-14 18:04:05,601][AutoNode][DEBUG] - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +[2026-08-14 18:04:05,601][AutoNode][DEBUG] - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +[2026-08-14 18:04:05,601][AutoNode][DEBUG] - Defining data type 'double' as 'Double' and array 'DoubleArray +[2026-08-14 18:04:05,601][AutoNode][DEBUG] - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +[2026-08-14 18:04:05,601][AutoNode][DEBUG] - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +[2026-08-14 18:04:05,602][AutoNode][DEBUG] - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +[2026-08-14 18:04:05,602][AutoNode][DEBUG] - Defining data type 'execution' as 'Execution' +[2026-08-14 18:04:05,602][AutoNode][DEBUG] - Defining data type 'float' as 'Float' and array 'FloatArray +[2026-08-14 18:04:05,602][AutoNode][DEBUG] - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +[2026-08-14 18:04:05,602][AutoNode][DEBUG] - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +[2026-08-14 18:04:05,602][AutoNode][DEBUG] - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +[2026-08-14 18:04:05,602][AutoNode][DEBUG] - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +[2026-08-14 18:04:05,602][AutoNode][DEBUG] - Defining data type 'half' as 'Half' and array 'HalfArray +[2026-08-14 18:04:05,602][AutoNode][DEBUG] - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +[2026-08-14 18:04:05,603][AutoNode][DEBUG] - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +[2026-08-14 18:04:05,603][AutoNode][DEBUG] - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +[2026-08-14 18:04:05,603][AutoNode][DEBUG] - Defining data type 'int' as 'Int' and array 'IntArray +[2026-08-14 18:04:05,603][AutoNode][DEBUG] - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +[2026-08-14 18:04:05,603][AutoNode][DEBUG] - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +[2026-08-14 18:04:05,603][AutoNode][DEBUG] - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +[2026-08-14 18:04:05,603][AutoNode][DEBUG] - Defining data type 'int64' as 'Int64' and array 'Int64Array +[2026-08-14 18:04:05,603][AutoNode][DEBUG] - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +[2026-08-14 18:04:05,604][AutoNode][DEBUG] - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +[2026-08-14 18:04:05,604][AutoNode][DEBUG] - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +[2026-08-14 18:04:05,604][AutoNode][DEBUG] - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +[2026-08-14 18:04:05,604][AutoNode][DEBUG] - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +[2026-08-14 18:04:05,604][AutoNode][DEBUG] - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +[2026-08-14 18:04:05,604][AutoNode][DEBUG] - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +[2026-08-14 18:04:05,604][AutoNode][DEBUG] - Defining data type 'path' as 'Path' +[2026-08-14 18:04:05,604][AutoNode][DEBUG] - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +[2026-08-14 18:04:05,604][AutoNode][DEBUG] - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +[2026-08-14 18:04:05,604][AutoNode][DEBUG] - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +[2026-08-14 18:04:05,605][AutoNode][DEBUG] - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +[2026-08-14 18:04:05,605][AutoNode][DEBUG] - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +[2026-08-14 18:04:05,605][AutoNode][DEBUG] - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +[2026-08-14 18:04:05,605][AutoNode][DEBUG] - Defining data type 'string' as 'String' +[2026-08-14 18:04:05,605][AutoNode][DEBUG] - Defining data type 'target' as 'Target' +[2026-08-14 18:04:05,605][AutoNode][DEBUG] - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +[2026-08-14 18:04:05,605][AutoNode][DEBUG] - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +[2026-08-14 18:04:05,605][AutoNode][DEBUG] - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +[2026-08-14 18:04:05,605][AutoNode][DEBUG] - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +[2026-08-14 18:04:05,606][AutoNode][DEBUG] - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +[2026-08-14 18:04:05,606][AutoNode][DEBUG] - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +[2026-08-14 18:04:05,606][AutoNode][DEBUG] - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +[2026-08-14 18:04:05,606][AutoNode][DEBUG] - Defining data type 'token' as 'Token' and array 'TokenArray +[2026-08-14 18:04:05,606][AutoNode][DEBUG] - Defining data type 'uchar' as 'UChar' and array 'UCharArray +[2026-08-14 18:04:05,606][AutoNode][DEBUG] - Defining data type 'uint' as 'UInt' and array 'UIntArray +[2026-08-14 18:04:05,606][AutoNode][DEBUG] - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +[2026-08-14 18:04:05,606][AutoNode][DEBUG] - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +[2026-08-14 18:04:05,606][AutoNode][DEBUG] - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +[2026-08-14 18:04:05,606][AutoNode][DEBUG] - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +[2026-08-14 18:04:15,663][isaaclab_physx.physics.physx_manager][WARNING] - TGS solver with enable_external_forces_every_iteration=False may cause noisy velocities. +[2026-08-14 18:04:19,239][isaaclab.utils.backend_utils][INFO] - Registered backend 'physx' for factory Articulation. +[2026-08-14 18:04:19,370][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +[2026-08-14 18:04:19,382][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:04:19,618][isaacsim.asset.importer.utils.impl.asset_utils][INFO] - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +[2026-08-14 18:04:19,625][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Applied RobotAPI to prim /g1 +[2026-08-14 18:04:19,631][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Set isaac:robotType = 'Default' on /g1 +[2026-08-14 18:04:19,632][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,632][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,633][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,633][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,634][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,634][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,635][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,635][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,636][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,636][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,636][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,637][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,637][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,638][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,638][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,639][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,639][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,639][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,640][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,640][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,641][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,641][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,642][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,642][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,642][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,643][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,643][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,644][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,644][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:04:19,666][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:04:19,746][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_180419_6311/main/payloads/base.usda +[2026-08-14 18:04:20,225][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_180419_6311/main/main.usda +[2026-08-14 18:04:20,231][isaacsim.asset.transformer.manager][INFO] - Skipping disabled rule: Delete Newton Redundant APIs +[2026-08-14 18:04:20,463][isaaclab.utils.backend_utils][INFO] - Registered backend 'physx' for factory FrameView. +[2026-08-14 18:04:20,520][isaaclab.utils.backend_utils][INFO] - Registered backend 'physx' for factory ContactSensor. +[2026-08-14 18:04:20,522][isaaclab.scene.interactive_scene][INFO] - Physics scene prim path: /physicsScene +[2026-08-14 18:04:23,686][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory Renderer. +[2026-08-14 18:04:23,686][isaaclab.renderers.render_context][INFO] - Created new renderer for simulation: NewtonWarpRenderer +[2026-08-14 18:04:42,305][isaaclab_physx.assets.articulation.articulation][INFO] - Simulation parameters for joints in /World/envs/env_.*/Robot: ++---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Dynamic Friction | Viscous Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 2 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 3 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 4 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 5 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 6 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 7 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 8 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 9 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 11 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 12 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 13 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 14 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 15 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 16 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 17 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 18 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 19 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 20 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 21 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 22 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 23 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 24 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 25 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 26 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 27 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +[2026-08-14 18:04:42,306][isaaclab.sensors.camera.camera][INFO] - Using renderer: NewtonWarpRenderer +[2026-08-14 18:04:45,676][isaaclab.envs.mdp.actions.joint_actions][INFO] - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'right_hip_pitch_joint', 'waist_yaw_joint', 'left_hip_roll_joint', 'right_hip_roll_joint', 'waist_roll_joint', 'left_hip_yaw_joint', 'right_hip_yaw_joint', 'waist_pitch_joint', 'left_knee_joint', 'right_knee_joint', 'left_shoulder_pitch_joint', 'right_shoulder_pitch_joint', 'left_ankle_pitch_joint', 'right_ankle_pitch_joint', 'left_shoulder_roll_joint', 'right_shoulder_roll_joint', 'left_ankle_roll_joint', 'right_ankle_roll_joint', 'left_shoulder_yaw_joint', 'right_shoulder_yaw_joint', 'left_elbow_joint', 'right_elbow_joint', 'left_wrist_roll_joint', 'right_wrist_roll_joint', 'left_wrist_pitch_joint', 'right_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_180624-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_180624-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b718ea2e3c685104140369ee95910f097a95ddd8 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_180624-TEST/.hydra/config.yaml @@ -0,0 +1,48 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + render_envs: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RenderEnvsRecorderCfg + video_save_path: ${manager_env.config.save_rendering_dir} + video_quality: 5 + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + smpl_motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + config: + render_results: true + render_width: 640 + render_height: 360 + render_frame_skip: 2 + max_render_envs: 1 + save_rendering_dir: /mnt/data/code/Sonic-ActionReplay/public_outputs/sonic_walk_public + events: + physics_material: null + add_joint_default_pos: null + base_com: null + randomize_rigid_body_mass: null +checkpoint: /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +num_envs: 1 +headless: true +use_wandb: false +max_render_steps: 100 diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_180624-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_180624-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..13bfcd8033bee7316e1c13def2a5563b2880412b --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_180624-TEST/.hydra/hydra.yaml @@ -0,0 +1,173 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + - manager_env/recorders=render + - +num_envs=1 + - +headless=true + - +use_wandb=false + - +max_render_steps=100 + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + - ++manager_env.config.render_results=true + - ++manager_env.config.render_width=640 + - ++manager_env.config.render_height=360 + - ++manager_env.config.render_frame_skip=2 + - ++manager_env.config.max_render_envs=1 + - ++manager_env.config.save_rendering_dir=/mnt/data/code/Sonic-ActionReplay/public_outputs/sonic_walk_public + - ++manager_env.events.physics_material=null + - ++manager_env.events.add_joint_default_pos=null + - ++manager_env.events.base_com=null + - ++manager_env.events.randomize_rigid_body_mass=null + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered,++manager_env.config.max_render_envs=1,++manager_env.config.render_frame_skip=2,++manager_env.config.render_height=360,++manager_env.config.render_results=true,++manager_env.config.render_width=640,++manager_env.config.save_rendering_dir=/mnt/data/code/Sonic-ActionReplay/public_outputs/sonic_walk_public,++manager_env.events.add_joint_default_pos=null,++manager_env.events.base_com=null,++manager_env.events.physics_material=null,++manager_env.events.randomize_rigid_body_mass=null,+headless=true,+max_render_steps=100,+num_envs=1,+use_wandb=false,checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt,manager_env/recorders=render + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260814_180624-TEST + choices: + manager_env/recorders: render + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_180624-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_180624-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..531baa51394bbc931293d8dbfc6ea3513b3f6887 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_180624-TEST/.hydra/overrides.yaml @@ -0,0 +1,18 @@ +- checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +- manager_env/recorders=render +- +num_envs=1 +- +headless=true +- +use_wandb=false +- +max_render_steps=100 +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered +- ++manager_env.config.render_results=true +- ++manager_env.config.render_width=640 +- ++manager_env.config.render_height=360 +- ++manager_env.config.render_frame_skip=2 +- ++manager_env.config.max_render_envs=1 +- ++manager_env.config.save_rendering_dir=/mnt/data/code/Sonic-ActionReplay/public_outputs/sonic_walk_public +- ++manager_env.events.physics_material=null +- ++manager_env.events.add_joint_default_pos=null +- ++manager_env.events.base_com=null +- ++manager_env.events.randomize_rigid_body_mass=null diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_180624-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260814_180624-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..0298a3d26fbe787c958147a7682ae127b3260ede --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_180624-TEST/eval.log @@ -0,0 +1,179 @@ +2026-08-14 18:06:24.195 | INFO | __main__:main:90 - Loading training config file from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/config.yaml +2026-08-14 18:06:27.562 | WARNING | logging:callHandlers:1762 - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +2026-08-14 18:06:27.564 | INFO | logging:callHandlers:1762 - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +2026-08-14 18:06:27.565 | INFO | logging:callHandlers:1762 - Using device: cuda +2026-08-14 18:06:27.566 | INFO | logging:callHandlers:1762 - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.rendering.kit +2026-08-14 18:06:27.791 | DEBUG | logging:callHandlers:1762 - Using selector: EpollSelector +2026-08-14 18:06:36.085 | DEBUG | logging:callHandlers:1762 - Defining data type 'any' as 'Any' +2026-08-14 18:06:36.086 | DEBUG | logging:callHandlers:1762 - Defining data type 'bool' as 'Bool' and array 'BoolArray +2026-08-14 18:06:36.086 | DEBUG | logging:callHandlers:1762 - Defining data type 'bundle' as 'Bundle' +2026-08-14 18:06:36.086 | DEBUG | logging:callHandlers:1762 - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +2026-08-14 18:06:36.086 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +2026-08-14 18:06:36.086 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +2026-08-14 18:06:36.086 | DEBUG | logging:callHandlers:1762 - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +2026-08-14 18:06:36.086 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +2026-08-14 18:06:36.086 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +2026-08-14 18:06:36.086 | DEBUG | logging:callHandlers:1762 - Defining data type 'double' as 'Double' and array 'DoubleArray +2026-08-14 18:06:36.087 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +2026-08-14 18:06:36.087 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +2026-08-14 18:06:36.087 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +2026-08-14 18:06:36.087 | DEBUG | logging:callHandlers:1762 - Defining data type 'execution' as 'Execution' +2026-08-14 18:06:36.087 | DEBUG | logging:callHandlers:1762 - Defining data type 'float' as 'Float' and array 'FloatArray +2026-08-14 18:06:36.087 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +2026-08-14 18:06:36.087 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +2026-08-14 18:06:36.087 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +2026-08-14 18:06:36.087 | DEBUG | logging:callHandlers:1762 - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +2026-08-14 18:06:36.087 | DEBUG | logging:callHandlers:1762 - Defining data type 'half' as 'Half' and array 'HalfArray +2026-08-14 18:06:36.088 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +2026-08-14 18:06:36.088 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +2026-08-14 18:06:36.088 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +2026-08-14 18:06:36.088 | DEBUG | logging:callHandlers:1762 - Defining data type 'int' as 'Int' and array 'IntArray +2026-08-14 18:06:36.088 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +2026-08-14 18:06:36.088 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +2026-08-14 18:06:36.088 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +2026-08-14 18:06:36.088 | DEBUG | logging:callHandlers:1762 - Defining data type 'int64' as 'Int64' and array 'Int64Array +2026-08-14 18:06:36.088 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +2026-08-14 18:06:36.088 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +2026-08-14 18:06:36.089 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +2026-08-14 18:06:36.089 | DEBUG | logging:callHandlers:1762 - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +2026-08-14 18:06:36.089 | DEBUG | logging:callHandlers:1762 - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +2026-08-14 18:06:36.089 | DEBUG | logging:callHandlers:1762 - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +2026-08-14 18:06:36.089 | DEBUG | logging:callHandlers:1762 - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +2026-08-14 18:06:36.089 | DEBUG | logging:callHandlers:1762 - Defining data type 'path' as 'Path' +2026-08-14 18:06:36.089 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +2026-08-14 18:06:36.089 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +2026-08-14 18:06:36.089 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +2026-08-14 18:06:36.089 | DEBUG | logging:callHandlers:1762 - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +2026-08-14 18:06:36.090 | DEBUG | logging:callHandlers:1762 - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +2026-08-14 18:06:36.090 | DEBUG | logging:callHandlers:1762 - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +2026-08-14 18:06:36.090 | DEBUG | logging:callHandlers:1762 - Defining data type 'string' as 'String' +2026-08-14 18:06:36.090 | DEBUG | logging:callHandlers:1762 - Defining data type 'target' as 'Target' +2026-08-14 18:06:36.090 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +2026-08-14 18:06:36.090 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +2026-08-14 18:06:36.090 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +2026-08-14 18:06:36.090 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +2026-08-14 18:06:36.090 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +2026-08-14 18:06:36.090 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +2026-08-14 18:06:36.091 | DEBUG | logging:callHandlers:1762 - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +2026-08-14 18:06:36.091 | DEBUG | logging:callHandlers:1762 - Defining data type 'token' as 'Token' and array 'TokenArray +2026-08-14 18:06:36.091 | DEBUG | logging:callHandlers:1762 - Defining data type 'uchar' as 'UChar' and array 'UCharArray +2026-08-14 18:06:36.091 | DEBUG | logging:callHandlers:1762 - Defining data type 'uint' as 'UInt' and array 'UIntArray +2026-08-14 18:06:36.091 | DEBUG | logging:callHandlers:1762 - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +2026-08-14 18:06:36.091 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +2026-08-14 18:06:36.091 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +2026-08-14 18:06:36.091 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +2026-08-14 18:06:44.649 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch +2026-08-14 18:06:44.838 | WARNING | logging:callHandlers:1762 - TGS solver with enable_external_forces_every_iteration=False may cause noisy velocities. +2026-08-14 18:06:47.840 | INFO | logging:callHandlers:1762 - Registered backend 'physx' for factory Articulation. +2026-08-14 18:06:47.977 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +2026-08-14 18:06:47.988 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:06:48.223 | INFO | logging:callHandlers:1762 - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +2026-08-14 18:06:48.230 | INFO | logging:callHandlers:1762 - Applied RobotAPI to prim /g1 +2026-08-14 18:06:48.236 | INFO | logging:callHandlers:1762 - Set isaac:robotType = 'Default' on /g1 +2026-08-14 18:06:48.237 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.237 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.238 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.238 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.239 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.239 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.239 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.240 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.240 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.241 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.241 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.242 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.242 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.243 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.243 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.244 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.244 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.245 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.245 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.245 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.246 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.246 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.247 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.247 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.248 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.248 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.249 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.249 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.250 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:06:48.270 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:06:48.366 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_180647_6311/main/payloads/base.usda +2026-08-14 18:06:48.868 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_180647_6311/main/main.usda +2026-08-14 18:06:48.875 | INFO | logging:callHandlers:1762 - Skipping disabled rule: Delete Newton Redundant APIs +2026-08-14 18:06:49.105 | INFO | logging:callHandlers:1762 - Registered backend 'physx' for factory FrameView. +2026-08-14 18:06:49.164 | INFO | logging:callHandlers:1762 - Registered backend 'physx' for factory ContactSensor. +2026-08-14 18:06:49.167 | INFO | logging:callHandlers:1762 - Physics scene prim path: /physicsScene +2026-08-14 18:06:52.013 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory Renderer. +2026-08-14 18:06:52.013 | INFO | logging:callHandlers:1762 - Created new renderer for simulation: NewtonWarpRenderer +2026-08-14 18:07:09.629 | INFO | logging:callHandlers:1762 - Simulation parameters for joints in /World/envs/env_.*/Robot: ++---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Dynamic Friction | Viscous Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 2 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 3 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 4 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 5 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 6 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 7 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 8 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 9 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 11 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 12 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 13 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 14 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 15 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 16 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 17 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 18 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 19 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 20 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 21 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 22 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 23 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 24 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 25 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 26 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 27 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +2026-08-14 18:07:09.630 | INFO | logging:callHandlers:1762 - Using renderer: NewtonWarpRenderer +2026-08-14 18:07:09.755 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:235 - Loaded skeleton from gear_sonic/data/assets/robot_description/mjcf/g1_29dof_rev_1_0.xml +2026-08-14 18:07:09.755 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:236 - Loading motion data from /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered... +2026-08-14 18:07:09.755 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_data:472 - Loaded 2 motions +2026-08-14 18:07:10.746 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1091 - Loading 1 motions... +2026-08-14 18:07:10.749 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1092 - Sampling motion: tensor([1], device='cuda:0'), .... +2026-08-14 18:07:10.750 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1093 - Current motion keys: ['walk_forward_amateur_001__A001'], .... +2026-08-14 18:07:10.750 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1120 - Increased file descriptor limits from 2450/1048576 to 1048576/1048576 +2026-08-14 18:07:10.914 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1140 - Loading motions with 1 jobs... +2026-08-14 18:07:11.372 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1577 - Loaded 1 motions with a total length of 40.020s and 2002 frames. +2026-08-14 18:07:12.397 | INFO | gear_sonic.envs.manager_env.mdp.recorders:__init__:44 - === Start recording video to /mnt/data/code/Sonic-ActionReplay/public_outputs/sonic_walk_public === +2026-08-14 18:07:12.466 | INFO | logging:callHandlers:1762 - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'right_hip_pitch_joint', 'waist_yaw_joint', 'left_hip_roll_joint', 'right_hip_roll_joint', 'waist_roll_joint', 'left_hip_yaw_joint', 'right_hip_yaw_joint', 'waist_pitch_joint', 'left_knee_joint', 'right_knee_joint', 'left_shoulder_pitch_joint', 'right_shoulder_pitch_joint', 'left_ankle_pitch_joint', 'right_ankle_pitch_joint', 'left_shoulder_roll_joint', 'right_shoulder_roll_joint', 'left_ankle_roll_joint', 'right_ankle_roll_joint', 'left_shoulder_yaw_joint', 'right_shoulder_yaw_joint', 'left_elbow_joint', 'right_elbow_joint', 'left_wrist_roll_joint', 'right_wrist_roll_joint', 'left_wrist_pitch_joint', 'right_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] +2026-08-14 18:07:15.017 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:250 - Motion Encoder and Quantizer initialized with embedding dim: 64 (num_tokens=2, token_dim=32) +2026-08-14 18:07:15.298 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:319 - Initialized g1 encoder with input features: ['command_multi_future_nonflat', 'motion_anchor_ori_b_mf_nonflat'] +2026-08-14 18:07:15.344 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:319 - Initialized teleop encoder with input features: ['command_multi_future_lower_body', 'vr_3point_local_target', 'vr_3point_local_orn_target', 'motion_anchor_ori_b'] +2026-08-14 18:07:15.396 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:319 - Initialized smpl encoder with input features: ['smpl_joints_multi_future_local_nonflat', 'smpl_root_ori_b_multi_future', 'joint_pos_multi_future_wrist_for_smpl'] +2026-08-14 18:07:15.492 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:409 - Initialized g1_dyn decoder with input features: ['token_flattened', 'proprioception'] and output features: ['action'] +2026-08-14 18:07:15.534 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:409 - Initialized g1_kin decoder with input features: ['token'] and output features: ['command_multi_future_nonflat', 'motion_anchor_ori_b_mf_nonflat'] +2026-08-14 18:07:18.113 | INFO | __main__:main:433 - Loading checkpoint from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +2026-08-14 18:07:18.380 | INFO | __main__:main:449 - Model parameterization: std +2026-08-14 18:07:18.380 | INFO | __main__:main:450 - Checkpoint parameterization: std +2026-08-14 18:07:18.382 | INFO | __main__:main:462 - Successfully loaded policy state dict +2026-08-14 18:07:18.383 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:begin_seq_motion_samples:1016 - Loading motions for evaluation +2026-08-14 18:07:18.384 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1091 - Loading 1 motions... +2026-08-14 18:07:18.384 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1092 - Sampling motion: tensor([0], device='cuda:0'), .... +2026-08-14 18:07:18.384 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1093 - Current motion keys: ['walk_forward_amateur_001__A001_M'], .... +2026-08-14 18:07:18.463 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1140 - Loading motions with 1 jobs... +2026-08-14 18:07:18.817 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1577 - Loaded 1 motions with a total length of 40.020s and 2002 frames. +2026-08-14 18:07:19.887 | INFO | gear_sonic.envs.manager_env.mdp.recorders:_initialize_writers:57 - Saving rendering to /mnt/data/code/Sonic-ActionReplay/public_outputs/sonic_walk_public +2026-08-14 18:07:20.377 | WARNING | logging:callHandlers:1762 - IMAGEIO FFMPEG_WRITER WARNING: input image is not divisible by macro_block_size=16, resizing from (640, 360) to (640, 368) to ensure video compatibility with most codecs and players. To prevent resizing, make your input image divisible by the macro_block_size or set the macro_block_size to 1 (risking incompatibility). +2026-08-14 18:07:27.054 | INFO | __main__:main:623 - Reached max_render_steps=100. Exiting. +2026-08-14 18:07:27.106 | INFO | gear_sonic.envs.manager_env.mdp.recorders:close_writers:168 - Closed video writer 0 +2026-08-14 18:07:27.106 | INFO | gear_sonic.envs.manager_env.mdp.recorders:close_writers:177 - === All video writers closed === diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_180624-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260814_180624-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..92b5848e0efe4fe9662aa6dc244ff45c9355f6f0 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_180624-TEST/eval_agent_trl.log @@ -0,0 +1,147 @@ +[2026-08-14 18:06:27,562][isaaclab.app.app_launcher][WARNING] - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +[2026-08-14 18:06:27,564][isaaclab.app.app_launcher][INFO] - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +[2026-08-14 18:06:27,564][isaaclab.app.app_launcher][INFO] - Using device: cuda +[2026-08-14 18:06:27,566][isaaclab.app.app_launcher][INFO] - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.rendering.kit +[2026-08-14 18:06:27,790][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-14 18:06:36,085][AutoNode][DEBUG] - Defining data type 'any' as 'Any' +[2026-08-14 18:06:36,086][AutoNode][DEBUG] - Defining data type 'bool' as 'Bool' and array 'BoolArray +[2026-08-14 18:06:36,086][AutoNode][DEBUG] - Defining data type 'bundle' as 'Bundle' +[2026-08-14 18:06:36,086][AutoNode][DEBUG] - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +[2026-08-14 18:06:36,086][AutoNode][DEBUG] - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +[2026-08-14 18:06:36,086][AutoNode][DEBUG] - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +[2026-08-14 18:06:36,086][AutoNode][DEBUG] - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +[2026-08-14 18:06:36,086][AutoNode][DEBUG] - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +[2026-08-14 18:06:36,086][AutoNode][DEBUG] - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +[2026-08-14 18:06:36,086][AutoNode][DEBUG] - Defining data type 'double' as 'Double' and array 'DoubleArray +[2026-08-14 18:06:36,087][AutoNode][DEBUG] - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +[2026-08-14 18:06:36,087][AutoNode][DEBUG] - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +[2026-08-14 18:06:36,087][AutoNode][DEBUG] - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +[2026-08-14 18:06:36,087][AutoNode][DEBUG] - Defining data type 'execution' as 'Execution' +[2026-08-14 18:06:36,087][AutoNode][DEBUG] - Defining data type 'float' as 'Float' and array 'FloatArray +[2026-08-14 18:06:36,087][AutoNode][DEBUG] - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +[2026-08-14 18:06:36,087][AutoNode][DEBUG] - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +[2026-08-14 18:06:36,087][AutoNode][DEBUG] - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +[2026-08-14 18:06:36,087][AutoNode][DEBUG] - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +[2026-08-14 18:06:36,087][AutoNode][DEBUG] - Defining data type 'half' as 'Half' and array 'HalfArray +[2026-08-14 18:06:36,087][AutoNode][DEBUG] - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +[2026-08-14 18:06:36,088][AutoNode][DEBUG] - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +[2026-08-14 18:06:36,088][AutoNode][DEBUG] - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +[2026-08-14 18:06:36,088][AutoNode][DEBUG] - Defining data type 'int' as 'Int' and array 'IntArray +[2026-08-14 18:06:36,088][AutoNode][DEBUG] - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +[2026-08-14 18:06:36,088][AutoNode][DEBUG] - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +[2026-08-14 18:06:36,088][AutoNode][DEBUG] - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +[2026-08-14 18:06:36,088][AutoNode][DEBUG] - Defining data type 'int64' as 'Int64' and array 'Int64Array +[2026-08-14 18:06:36,088][AutoNode][DEBUG] - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +[2026-08-14 18:06:36,088][AutoNode][DEBUG] - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +[2026-08-14 18:06:36,088][AutoNode][DEBUG] - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +[2026-08-14 18:06:36,089][AutoNode][DEBUG] - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +[2026-08-14 18:06:36,089][AutoNode][DEBUG] - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +[2026-08-14 18:06:36,089][AutoNode][DEBUG] - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +[2026-08-14 18:06:36,089][AutoNode][DEBUG] - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +[2026-08-14 18:06:36,089][AutoNode][DEBUG] - Defining data type 'path' as 'Path' +[2026-08-14 18:06:36,089][AutoNode][DEBUG] - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +[2026-08-14 18:06:36,089][AutoNode][DEBUG] - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +[2026-08-14 18:06:36,089][AutoNode][DEBUG] - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +[2026-08-14 18:06:36,089][AutoNode][DEBUG] - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +[2026-08-14 18:06:36,090][AutoNode][DEBUG] - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +[2026-08-14 18:06:36,090][AutoNode][DEBUG] - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +[2026-08-14 18:06:36,090][AutoNode][DEBUG] - Defining data type 'string' as 'String' +[2026-08-14 18:06:36,090][AutoNode][DEBUG] - Defining data type 'target' as 'Target' +[2026-08-14 18:06:36,090][AutoNode][DEBUG] - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +[2026-08-14 18:06:36,090][AutoNode][DEBUG] - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +[2026-08-14 18:06:36,090][AutoNode][DEBUG] - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +[2026-08-14 18:06:36,090][AutoNode][DEBUG] - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +[2026-08-14 18:06:36,090][AutoNode][DEBUG] - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +[2026-08-14 18:06:36,090][AutoNode][DEBUG] - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +[2026-08-14 18:06:36,091][AutoNode][DEBUG] - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +[2026-08-14 18:06:36,091][AutoNode][DEBUG] - Defining data type 'token' as 'Token' and array 'TokenArray +[2026-08-14 18:06:36,091][AutoNode][DEBUG] - Defining data type 'uchar' as 'UChar' and array 'UCharArray +[2026-08-14 18:06:36,091][AutoNode][DEBUG] - Defining data type 'uint' as 'UInt' and array 'UIntArray +[2026-08-14 18:06:36,091][AutoNode][DEBUG] - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +[2026-08-14 18:06:36,091][AutoNode][DEBUG] - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +[2026-08-14 18:06:36,091][AutoNode][DEBUG] - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +[2026-08-14 18:06:36,091][AutoNode][DEBUG] - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +[2026-08-14 18:06:44,838][isaaclab_physx.physics.physx_manager][WARNING] - TGS solver with enable_external_forces_every_iteration=False may cause noisy velocities. +[2026-08-14 18:06:47,840][isaaclab.utils.backend_utils][INFO] - Registered backend 'physx' for factory Articulation. +[2026-08-14 18:06:47,977][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +[2026-08-14 18:06:47,988][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:06:48,222][isaacsim.asset.importer.utils.impl.asset_utils][INFO] - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +[2026-08-14 18:06:48,230][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Applied RobotAPI to prim /g1 +[2026-08-14 18:06:48,236][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Set isaac:robotType = 'Default' on /g1 +[2026-08-14 18:06:48,236][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,237][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,238][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,238][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,238][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,239][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,239][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,240][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,240][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,241][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,241][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,242][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,242][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,243][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,243][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,243][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,244][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,244][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,245][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,245][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,246][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,246][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,247][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,247][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,248][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,248][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,249][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,249][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,250][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:06:48,270][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:06:48,366][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_180647_6311/main/payloads/base.usda +[2026-08-14 18:06:48,868][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_180647_6311/main/main.usda +[2026-08-14 18:06:48,874][isaacsim.asset.transformer.manager][INFO] - Skipping disabled rule: Delete Newton Redundant APIs +[2026-08-14 18:06:49,105][isaaclab.utils.backend_utils][INFO] - Registered backend 'physx' for factory FrameView. +[2026-08-14 18:06:49,164][isaaclab.utils.backend_utils][INFO] - Registered backend 'physx' for factory ContactSensor. +[2026-08-14 18:06:49,167][isaaclab.scene.interactive_scene][INFO] - Physics scene prim path: /physicsScene +[2026-08-14 18:06:52,013][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory Renderer. +[2026-08-14 18:06:52,013][isaaclab.renderers.render_context][INFO] - Created new renderer for simulation: NewtonWarpRenderer +[2026-08-14 18:07:09,628][isaaclab_physx.assets.articulation.articulation][INFO] - Simulation parameters for joints in /World/envs/env_.*/Robot: ++---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Dynamic Friction | Viscous Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 2 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 3 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 4 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 5 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 6 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 7 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | 0.000 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 8 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 9 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | 0.000 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 11 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 12 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 13 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 14 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 15 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 16 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 17 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 18 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | 0.000 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 19 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 20 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 21 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 22 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 23 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 24 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 25 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 26 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 27 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | 0.000 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+------------------+------------------+-----------------+-----------------+---------------+ +[2026-08-14 18:07:09,630][isaaclab.sensors.camera.camera][INFO] - Using renderer: NewtonWarpRenderer +[2026-08-14 18:07:12,466][isaaclab.envs.mdp.actions.joint_actions][INFO] - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'right_hip_pitch_joint', 'waist_yaw_joint', 'left_hip_roll_joint', 'right_hip_roll_joint', 'waist_roll_joint', 'left_hip_yaw_joint', 'right_hip_yaw_joint', 'waist_pitch_joint', 'left_knee_joint', 'right_knee_joint', 'left_shoulder_pitch_joint', 'right_shoulder_pitch_joint', 'left_ankle_pitch_joint', 'right_ankle_pitch_joint', 'left_shoulder_roll_joint', 'right_shoulder_roll_joint', 'left_ankle_roll_joint', 'right_ankle_roll_joint', 'left_shoulder_yaw_joint', 'right_shoulder_yaw_joint', 'left_elbow_joint', 'right_elbow_joint', 'left_wrist_roll_joint', 'right_wrist_roll_joint', 'left_wrist_pitch_joint', 'right_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] +[2026-08-14 18:07:20,376][imageio_ffmpeg][WARNING] - IMAGEIO FFMPEG_WRITER WARNING: input image is not divisible by macro_block_size=16, resizing from (640, 360) to (640, 368) to ensure video compatibility with most codecs and players. To prevent resizing, make your input image divisible by the macro_block_size or set the macro_block_size to 1 (risking incompatibility). diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_181117-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_181117-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..33a692d68e735bd8d22f4c506974e5f73b0eb9e3 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_181117-TEST/.hydra/config.yaml @@ -0,0 +1,39 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + smpl_motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + config: + render_results: false + events: + physics_material: null + add_joint_default_pos: null + base_com: null + randomize_rigid_body_mass: null +checkpoint: /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +num_envs: 1 +headless: true +use_wandb: false +max_render_steps: 2 diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_181117-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_181117-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..fb87485301b8c65ce1b5440a3024432ff14413d6 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_181117-TEST/.hydra/hydra.yaml @@ -0,0 +1,167 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + - +num_envs=1 + - +headless=true + - +use_wandb=false + - +max_render_steps=2 + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + - ++manager_env.config.render_results=false + - ++manager_env.events.physics_material=null + - ++manager_env.events.add_joint_default_pos=null + - ++manager_env.events.base_com=null + - ++manager_env.events.randomize_rigid_body_mass=null + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered,++manager_env.config.render_results=false,++manager_env.events.add_joint_default_pos=null,++manager_env.events.base_com=null,++manager_env.events.physics_material=null,++manager_env.events.randomize_rigid_body_mass=null,+headless=true,+max_render_steps=2,+num_envs=1,+use_wandb=false,checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260814_181117-TEST + choices: + manager_env/recorders: empty + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_181117-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_181117-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..81b7d44e1b90d25cc467642cd364d5200c39ad5e --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_181117-TEST/.hydra/overrides.yaml @@ -0,0 +1,12 @@ +- checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +- +num_envs=1 +- +headless=true +- +use_wandb=false +- +max_render_steps=2 +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered +- ++manager_env.config.render_results=false +- ++manager_env.events.physics_material=null +- ++manager_env.events.add_joint_default_pos=null +- ++manager_env.events.base_com=null +- ++manager_env.events.randomize_rigid_body_mass=null diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_181117-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260814_181117-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..7c6c8ccca7cfba7a6e4d0dce0332c5f8c39377c0 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_181117-TEST/eval.log @@ -0,0 +1,6 @@ +2026-08-14 18:11:17.830 | INFO | __main__:main:90 - Loading training config file from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/config.yaml +2026-08-14 18:11:19.745 | WARNING | logging:callHandlers:1762 - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +2026-08-14 18:11:19.747 | INFO | logging:callHandlers:1762 - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +2026-08-14 18:11:19.748 | INFO | logging:callHandlers:1762 - Using device: cuda +2026-08-14 18:11:19.748 | INFO | logging:callHandlers:1762 - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.kit +2026-08-14 18:11:19.978 | DEBUG | logging:callHandlers:1762 - Using selector: EpollSelector diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_181117-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260814_181117-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..db78a5ed91fb2734750f5a6899b29470ffcbfd8c --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_181117-TEST/eval_agent_trl.log @@ -0,0 +1,5 @@ +[2026-08-14 18:11:19,745][isaaclab.app.app_launcher][WARNING] - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +[2026-08-14 18:11:19,747][isaaclab.app.app_launcher][INFO] - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +[2026-08-14 18:11:19,747][isaaclab.app.app_launcher][INFO] - Using device: cuda +[2026-08-14 18:11:19,748][isaaclab.app.app_launcher][INFO] - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.kit +[2026-08-14 18:11:19,978][asyncio][DEBUG] - Using selector: EpollSelector diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_181206-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_181206-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..33a692d68e735bd8d22f4c506974e5f73b0eb9e3 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_181206-TEST/.hydra/config.yaml @@ -0,0 +1,39 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + smpl_motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + config: + render_results: false + events: + physics_material: null + add_joint_default_pos: null + base_com: null + randomize_rigid_body_mass: null +checkpoint: /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +num_envs: 1 +headless: true +use_wandb: false +max_render_steps: 2 diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_181206-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_181206-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..28eb2888617b65e99bc686a482b48fbe33e17ecc --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_181206-TEST/.hydra/hydra.yaml @@ -0,0 +1,167 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + - +num_envs=1 + - +headless=true + - +use_wandb=false + - +max_render_steps=2 + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + - ++manager_env.config.render_results=false + - ++manager_env.events.physics_material=null + - ++manager_env.events.add_joint_default_pos=null + - ++manager_env.events.base_com=null + - ++manager_env.events.randomize_rigid_body_mass=null + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered,++manager_env.config.render_results=false,++manager_env.events.add_joint_default_pos=null,++manager_env.events.base_com=null,++manager_env.events.physics_material=null,++manager_env.events.randomize_rigid_body_mass=null,+headless=true,+max_render_steps=2,+num_envs=1,+use_wandb=false,checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260814_181206-TEST + choices: + manager_env/recorders: empty + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_181206-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_181206-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..81b7d44e1b90d25cc467642cd364d5200c39ad5e --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_181206-TEST/.hydra/overrides.yaml @@ -0,0 +1,12 @@ +- checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +- +num_envs=1 +- +headless=true +- +use_wandb=false +- +max_render_steps=2 +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered +- ++manager_env.config.render_results=false +- ++manager_env.events.physics_material=null +- ++manager_env.events.add_joint_default_pos=null +- ++manager_env.events.base_com=null +- ++manager_env.events.randomize_rigid_body_mass=null diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_181206-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260814_181206-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..c42e0c4983e505c9f478601e75e0fefc3e20471a --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_181206-TEST/eval.log @@ -0,0 +1,119 @@ +2026-08-14 18:12:06.717 | INFO | __main__:main:90 - Loading training config file from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/config.yaml +2026-08-14 18:12:10.420 | WARNING | logging:callHandlers:1762 - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +2026-08-14 18:12:10.422 | INFO | logging:callHandlers:1762 - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +2026-08-14 18:12:10.423 | INFO | logging:callHandlers:1762 - Using device: cuda +2026-08-14 18:12:10.423 | INFO | logging:callHandlers:1762 - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.kit +2026-08-14 18:12:10.817 | DEBUG | logging:callHandlers:1762 - Using selector: EpollSelector +2026-08-14 18:12:17.263 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch +2026-08-14 18:12:23.548 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory Articulation. +2026-08-14 18:12:23.643 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +2026-08-14 18:12:23.653 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:12:23.873 | INFO | logging:callHandlers:1762 - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +2026-08-14 18:12:23.880 | INFO | logging:callHandlers:1762 - Applied RobotAPI to prim /g1 +2026-08-14 18:12:23.886 | INFO | logging:callHandlers:1762 - Set isaac:robotType = 'Default' on /g1 +2026-08-14 18:12:23.887 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.887 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.888 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.888 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.889 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.890 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.890 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.891 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.891 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.892 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.892 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.893 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.894 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.894 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.895 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.895 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.896 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.896 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.897 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.897 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.898 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.899 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.899 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.900 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.900 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.901 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.901 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.902 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.902 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:12:23.924 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:12:23.991 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_181223_6311/main/payloads/base.usda +2026-08-14 18:12:24.471 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_181223_6311/main/main.usda +2026-08-14 18:12:24.481 | INFO | logging:callHandlers:1762 - Skipping disabled rule: Delete Newton Redundant APIs +2026-08-14 18:12:24.831 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory FrameView. +2026-08-14 18:12:24.849 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory ContactSensor. +2026-08-14 18:12:28.535 | INFO | logging:callHandlers:1762 - Dispatching MODEL_INIT callbacks +2026-08-14 18:12:28.535 | INFO | logging:callHandlers:1762 - Finalizing model on device: cuda:0 +2026-08-14 18:12:34.653 | INFO | logging:callHandlers:1762 - Dispatching PHYSICS_READY callbacks +2026-08-14 18:12:34.784 | INFO | logging:callHandlers:1762 - Simulation parameters for joints in /World/envs/env_.*/Robot: ++-------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 2 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 3 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 4 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 5 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 6 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 7 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 8 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 9 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 11 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 12 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 13 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 14 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 15 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 16 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 17 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 18 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 19 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 20 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 21 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 22 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 23 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 24 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 25 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 26 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 27 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +2026-08-14 18:12:34.785 | INFO | logging:callHandlers:1762 - Adding contact sensor for /World/envs/env_.*/Robot/.* with filter all bodies/shapes +2026-08-14 18:12:35.218 | INFO | logging:callHandlers:1762 - Contact sensor initialized with 30 sensors. +2026-08-14 18:12:35.218 | INFO | logging:callHandlers:1762 - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +2026-08-14 18:12:35.218 | INFO | logging:callHandlers:1762 - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +2026-08-14 18:13:50.035 | INFO | logging:callHandlers:1762 - Newton CUDA graph captured (standard Warp mode) +2026-08-14 18:13:50.045 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:235 - Loaded skeleton from gear_sonic/data/assets/robot_description/mjcf/g1_29dof_rev_1_0.xml +2026-08-14 18:13:50.045 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:236 - Loading motion data from /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered... +2026-08-14 18:13:50.046 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_data:472 - Loaded 2 motions +2026-08-14 18:13:50.507 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1091 - Loading 1 motions... +2026-08-14 18:13:50.509 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1092 - Sampling motion: tensor([1], device='cuda:0'), .... +2026-08-14 18:13:50.509 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1093 - Current motion keys: ['walk_forward_amateur_001__A001'], .... +2026-08-14 18:13:50.509 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1120 - Increased file descriptor limits from 1024/1048576 to 1048576/1048576 +2026-08-14 18:13:50.576 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1140 - Loading motions with 1 jobs... +2026-08-14 18:13:50.762 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1577 - Loaded 1 motions with a total length of 40.020s and 2002 frames. +2026-08-14 18:13:51.375 | INFO | logging:callHandlers:1762 - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'left_hip_roll_joint', 'left_hip_yaw_joint', 'left_knee_joint', 'left_ankle_pitch_joint', 'left_ankle_roll_joint', 'right_hip_pitch_joint', 'right_hip_roll_joint', 'right_hip_yaw_joint', 'right_knee_joint', 'right_ankle_pitch_joint', 'right_ankle_roll_joint', 'waist_yaw_joint', 'waist_roll_joint', 'waist_pitch_joint', 'left_shoulder_pitch_joint', 'left_shoulder_roll_joint', 'left_shoulder_yaw_joint', 'left_elbow_joint', 'left_wrist_roll_joint', 'left_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_shoulder_pitch_joint', 'right_shoulder_roll_joint', 'right_shoulder_yaw_joint', 'right_elbow_joint', 'right_wrist_roll_joint', 'right_wrist_pitch_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] +2026-08-14 18:13:53.919 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:250 - Motion Encoder and Quantizer initialized with embedding dim: 64 (num_tokens=2, token_dim=32) +2026-08-14 18:13:54.026 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:319 - Initialized g1 encoder with input features: ['command_multi_future_nonflat', 'motion_anchor_ori_b_mf_nonflat'] +2026-08-14 18:13:54.043 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:319 - Initialized teleop encoder with input features: ['command_multi_future_lower_body', 'vr_3point_local_target', 'vr_3point_local_orn_target', 'motion_anchor_ori_b'] +2026-08-14 18:13:54.064 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:319 - Initialized smpl encoder with input features: ['smpl_joints_multi_future_local_nonflat', 'smpl_root_ori_b_multi_future', 'joint_pos_multi_future_wrist_for_smpl'] +2026-08-14 18:13:54.103 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:409 - Initialized g1_dyn decoder with input features: ['token_flattened', 'proprioception'] and output features: ['action'] +2026-08-14 18:13:54.119 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:409 - Initialized g1_kin decoder with input features: ['token'] and output features: ['command_multi_future_nonflat', 'motion_anchor_ori_b_mf_nonflat'] +2026-08-14 18:13:55.465 | INFO | __main__:main:433 - Loading checkpoint from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +2026-08-14 18:13:55.640 | INFO | __main__:main:449 - Model parameterization: std +2026-08-14 18:13:55.640 | INFO | __main__:main:450 - Checkpoint parameterization: std +2026-08-14 18:13:55.642 | INFO | __main__:main:462 - Successfully loaded policy state dict +2026-08-14 18:13:55.642 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:begin_seq_motion_samples:1016 - Loading motions for evaluation +2026-08-14 18:13:55.643 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1091 - Loading 1 motions... +2026-08-14 18:13:55.643 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1092 - Sampling motion: tensor([0], device='cuda:0'), .... +2026-08-14 18:13:55.643 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1093 - Current motion keys: ['walk_forward_amateur_001__A001_M'], .... +2026-08-14 18:13:55.702 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1140 - Loading motions with 1 jobs... +2026-08-14 18:13:55.885 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1577 - Loaded 1 motions with a total length of 40.020s and 2002 frames. +2026-08-14 18:13:56.946 | INFO | __main__:main:623 - Reached max_render_steps=2. Exiting. diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_181206-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260814_181206-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..cf6d1aeec85c07fe5685877ac8b99ccaa3ca7fa8 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_181206-TEST/eval_agent_trl.log @@ -0,0 +1,91 @@ +[2026-08-14 18:12:10,420][isaaclab.app.app_launcher][WARNING] - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +[2026-08-14 18:12:10,422][isaaclab.app.app_launcher][INFO] - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +[2026-08-14 18:12:10,422][isaaclab.app.app_launcher][INFO] - Using device: cuda +[2026-08-14 18:12:10,423][isaaclab.app.app_launcher][INFO] - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.kit +[2026-08-14 18:12:10,816][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-14 18:12:23,547][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory Articulation. +[2026-08-14 18:12:23,642][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +[2026-08-14 18:12:23,652][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:12:23,873][isaacsim.asset.importer.utils.impl.asset_utils][INFO] - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +[2026-08-14 18:12:23,880][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Applied RobotAPI to prim /g1 +[2026-08-14 18:12:23,886][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Set isaac:robotType = 'Default' on /g1 +[2026-08-14 18:12:23,886][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,887][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,888][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,888][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,889][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,890][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,890][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,891][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,891][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,892][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,892][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,893][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,894][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,894][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,895][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,895][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,896][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,896][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,897][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,897][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,898][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,898][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,899][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,900][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,900][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,901][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,901][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,902][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,902][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:12:23,923][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:12:23,990][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_181223_6311/main/payloads/base.usda +[2026-08-14 18:12:24,471][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_181223_6311/main/main.usda +[2026-08-14 18:12:24,481][isaacsim.asset.transformer.manager][INFO] - Skipping disabled rule: Delete Newton Redundant APIs +[2026-08-14 18:12:24,831][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory FrameView. +[2026-08-14 18:12:24,849][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory ContactSensor. +[2026-08-14 18:12:28,534][isaaclab_newton.physics.newton_manager][INFO] - Dispatching MODEL_INIT callbacks +[2026-08-14 18:12:28,535][isaaclab_newton.physics.newton_manager][INFO] - Finalizing model on device: cuda:0 +[2026-08-14 18:12:34,652][isaaclab_newton.physics.newton_manager][INFO] - Dispatching PHYSICS_READY callbacks +[2026-08-14 18:12:34,784][isaaclab_newton.assets.articulation.articulation][INFO] - Simulation parameters for joints in /World/envs/env_.*/Robot: ++-------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 2 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 3 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 4 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 5 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 6 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 7 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 8 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 9 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 11 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 12 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 13 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 14 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 15 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 16 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 17 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 18 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 19 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 20 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 21 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 22 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 23 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 24 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 25 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 26 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 27 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +[2026-08-14 18:12:34,785][isaaclab_newton.physics.newton_manager][INFO] - Adding contact sensor for /World/envs/env_.*/Robot/.* with filter all bodies/shapes +[2026-08-14 18:12:35,218][isaaclab_newton.sensors.contact_sensor.contact_sensor][INFO] - Contact sensor initialized with 30 sensors. +[2026-08-14 18:12:35,218][isaaclab_newton.sensors.contact_sensor.contact_sensor][INFO] - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +[2026-08-14 18:12:35,218][isaaclab_newton.sensors.contact_sensor.contact_sensor_data][INFO] - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +[2026-08-14 18:13:50,035][isaaclab_newton.physics.newton_manager][INFO] - Newton CUDA graph captured (standard Warp mode) +[2026-08-14 18:13:51,375][isaaclab.envs.mdp.actions.joint_actions][INFO] - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'left_hip_roll_joint', 'left_hip_yaw_joint', 'left_knee_joint', 'left_ankle_pitch_joint', 'left_ankle_roll_joint', 'right_hip_pitch_joint', 'right_hip_roll_joint', 'right_hip_yaw_joint', 'right_knee_joint', 'right_ankle_pitch_joint', 'right_ankle_roll_joint', 'waist_yaw_joint', 'waist_roll_joint', 'waist_pitch_joint', 'left_shoulder_pitch_joint', 'left_shoulder_roll_joint', 'left_shoulder_yaw_joint', 'left_elbow_joint', 'left_wrist_roll_joint', 'left_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_shoulder_pitch_joint', 'right_shoulder_roll_joint', 'right_shoulder_yaw_joint', 'right_elbow_joint', 'right_wrist_roll_joint', 'right_wrist_pitch_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_181428-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_181428-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b524a6f8ec370fa6ab63ad1dae6d2e1fb6390f22 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_181428-TEST/.hydra/config.yaml @@ -0,0 +1,48 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + render_envs: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RenderEnvsRecorderCfg + video_save_path: ${manager_env.config.save_rendering_dir} + video_quality: 5 + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + smpl_motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + config: + render_results: true + render_width: 640 + render_height: 368 + render_frame_skip: 2 + max_render_envs: 1 + save_rendering_dir: /mnt/data/code/Sonic-ActionReplay/public_outputs/sonic_walk_newton + events: + physics_material: null + add_joint_default_pos: null + base_com: null + randomize_rigid_body_mass: null +checkpoint: /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +num_envs: 1 +headless: true +use_wandb: false +max_render_steps: 250 diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_181428-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_181428-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..cf971f60482f756f2f1f7af419c27eb8beb32b69 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_181428-TEST/.hydra/hydra.yaml @@ -0,0 +1,173 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + - manager_env/recorders=render + - +num_envs=1 + - +headless=true + - +use_wandb=false + - +max_render_steps=250 + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + - ++manager_env.config.render_results=true + - ++manager_env.config.render_width=640 + - ++manager_env.config.render_height=368 + - ++manager_env.config.render_frame_skip=2 + - ++manager_env.config.max_render_envs=1 + - ++manager_env.config.save_rendering_dir=/mnt/data/code/Sonic-ActionReplay/public_outputs/sonic_walk_newton + - ++manager_env.events.physics_material=null + - ++manager_env.events.add_joint_default_pos=null + - ++manager_env.events.base_com=null + - ++manager_env.events.randomize_rigid_body_mass=null + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered,++manager_env.config.max_render_envs=1,++manager_env.config.render_frame_skip=2,++manager_env.config.render_height=368,++manager_env.config.render_results=true,++manager_env.config.render_width=640,++manager_env.config.save_rendering_dir=/mnt/data/code/Sonic-ActionReplay/public_outputs/sonic_walk_newton,++manager_env.events.add_joint_default_pos=null,++manager_env.events.base_com=null,++manager_env.events.physics_material=null,++manager_env.events.randomize_rigid_body_mass=null,+headless=true,+max_render_steps=250,+num_envs=1,+use_wandb=false,checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt,manager_env/recorders=render + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260814_181428-TEST + choices: + manager_env/recorders: render + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_181428-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_181428-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..898724ecefc6bd5d2de06ee9e7832ccd8680fc53 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_181428-TEST/.hydra/overrides.yaml @@ -0,0 +1,18 @@ +- checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +- manager_env/recorders=render +- +num_envs=1 +- +headless=true +- +use_wandb=false +- +max_render_steps=250 +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered +- ++manager_env.config.render_results=true +- ++manager_env.config.render_width=640 +- ++manager_env.config.render_height=368 +- ++manager_env.config.render_frame_skip=2 +- ++manager_env.config.max_render_envs=1 +- ++manager_env.config.save_rendering_dir=/mnt/data/code/Sonic-ActionReplay/public_outputs/sonic_walk_newton +- ++manager_env.events.physics_material=null +- ++manager_env.events.add_joint_default_pos=null +- ++manager_env.events.base_com=null +- ++manager_env.events.randomize_rigid_body_mass=null diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_181428-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260814_181428-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..bbdbc578329157b568d03631f9ebe3a0d8b4147f --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_181428-TEST/eval.log @@ -0,0 +1,189 @@ +2026-08-14 18:14:28.587 | INFO | __main__:main:90 - Loading training config file from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/config.yaml +2026-08-14 18:14:32.177 | WARNING | logging:callHandlers:1762 - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +2026-08-14 18:14:32.179 | INFO | logging:callHandlers:1762 - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +2026-08-14 18:14:32.180 | INFO | logging:callHandlers:1762 - Using device: cuda +2026-08-14 18:14:32.181 | INFO | logging:callHandlers:1762 - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.rendering.kit +2026-08-14 18:14:32.438 | DEBUG | logging:callHandlers:1762 - Using selector: EpollSelector +2026-08-14 18:14:39.440 | DEBUG | logging:callHandlers:1762 - Defining data type 'any' as 'Any' +2026-08-14 18:14:39.440 | DEBUG | logging:callHandlers:1762 - Defining data type 'bool' as 'Bool' and array 'BoolArray +2026-08-14 18:14:39.440 | DEBUG | logging:callHandlers:1762 - Defining data type 'bundle' as 'Bundle' +2026-08-14 18:14:39.440 | DEBUG | logging:callHandlers:1762 - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +2026-08-14 18:14:39.440 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +2026-08-14 18:14:39.441 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +2026-08-14 18:14:39.441 | DEBUG | logging:callHandlers:1762 - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +2026-08-14 18:14:39.441 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +2026-08-14 18:14:39.441 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +2026-08-14 18:14:39.441 | DEBUG | logging:callHandlers:1762 - Defining data type 'double' as 'Double' and array 'DoubleArray +2026-08-14 18:14:39.441 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +2026-08-14 18:14:39.441 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +2026-08-14 18:14:39.441 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +2026-08-14 18:14:39.441 | DEBUG | logging:callHandlers:1762 - Defining data type 'execution' as 'Execution' +2026-08-14 18:14:39.442 | DEBUG | logging:callHandlers:1762 - Defining data type 'float' as 'Float' and array 'FloatArray +2026-08-14 18:14:39.442 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +2026-08-14 18:14:39.442 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +2026-08-14 18:14:39.442 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +2026-08-14 18:14:39.442 | DEBUG | logging:callHandlers:1762 - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +2026-08-14 18:14:39.442 | DEBUG | logging:callHandlers:1762 - Defining data type 'half' as 'Half' and array 'HalfArray +2026-08-14 18:14:39.442 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +2026-08-14 18:14:39.442 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +2026-08-14 18:14:39.443 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +2026-08-14 18:14:39.443 | DEBUG | logging:callHandlers:1762 - Defining data type 'int' as 'Int' and array 'IntArray +2026-08-14 18:14:39.443 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +2026-08-14 18:14:39.443 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +2026-08-14 18:14:39.443 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +2026-08-14 18:14:39.443 | DEBUG | logging:callHandlers:1762 - Defining data type 'int64' as 'Int64' and array 'Int64Array +2026-08-14 18:14:39.443 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +2026-08-14 18:14:39.443 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +2026-08-14 18:14:39.443 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +2026-08-14 18:14:39.444 | DEBUG | logging:callHandlers:1762 - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +2026-08-14 18:14:39.444 | DEBUG | logging:callHandlers:1762 - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +2026-08-14 18:14:39.444 | DEBUG | logging:callHandlers:1762 - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +2026-08-14 18:14:39.444 | DEBUG | logging:callHandlers:1762 - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +2026-08-14 18:14:39.444 | DEBUG | logging:callHandlers:1762 - Defining data type 'path' as 'Path' +2026-08-14 18:14:39.444 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +2026-08-14 18:14:39.444 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +2026-08-14 18:14:39.444 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +2026-08-14 18:14:39.445 | DEBUG | logging:callHandlers:1762 - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +2026-08-14 18:14:39.445 | DEBUG | logging:callHandlers:1762 - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +2026-08-14 18:14:39.445 | DEBUG | logging:callHandlers:1762 - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +2026-08-14 18:14:39.445 | DEBUG | logging:callHandlers:1762 - Defining data type 'string' as 'String' +2026-08-14 18:14:39.445 | DEBUG | logging:callHandlers:1762 - Defining data type 'target' as 'Target' +2026-08-14 18:14:39.445 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +2026-08-14 18:14:39.445 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +2026-08-14 18:14:39.445 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +2026-08-14 18:14:39.445 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +2026-08-14 18:14:39.446 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +2026-08-14 18:14:39.446 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +2026-08-14 18:14:39.446 | DEBUG | logging:callHandlers:1762 - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +2026-08-14 18:14:39.446 | DEBUG | logging:callHandlers:1762 - Defining data type 'token' as 'Token' and array 'TokenArray +2026-08-14 18:14:39.446 | DEBUG | logging:callHandlers:1762 - Defining data type 'uchar' as 'UChar' and array 'UCharArray +2026-08-14 18:14:39.446 | DEBUG | logging:callHandlers:1762 - Defining data type 'uint' as 'UInt' and array 'UIntArray +2026-08-14 18:14:39.446 | DEBUG | logging:callHandlers:1762 - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +2026-08-14 18:14:39.446 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +2026-08-14 18:14:39.446 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +2026-08-14 18:14:39.447 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +2026-08-14 18:14:45.978 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch +2026-08-14 18:14:52.403 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory Articulation. +2026-08-14 18:14:52.880 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +2026-08-14 18:14:52.890 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:14:53.120 | INFO | logging:callHandlers:1762 - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +2026-08-14 18:14:53.127 | INFO | logging:callHandlers:1762 - Applied RobotAPI to prim /g1 +2026-08-14 18:14:53.133 | INFO | logging:callHandlers:1762 - Set isaac:robotType = 'Default' on /g1 +2026-08-14 18:14:53.134 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.135 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.135 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.135 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.136 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.136 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.137 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.137 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.138 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.138 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.139 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.139 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.139 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.140 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.140 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.141 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.141 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.142 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.142 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.143 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.143 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.144 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.144 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.145 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.145 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.146 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.146 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.147 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.147 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:14:53.168 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:14:53.241 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_181452_6311/main/payloads/base.usda +2026-08-14 18:14:53.722 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_181452_6311/main/main.usda +2026-08-14 18:14:53.729 | INFO | logging:callHandlers:1762 - Skipping disabled rule: Delete Newton Redundant APIs +2026-08-14 18:14:54.068 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory FrameView. +2026-08-14 18:14:54.121 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory ContactSensor. +2026-08-14 18:14:57.810 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory Renderer. +2026-08-14 18:14:57.810 | INFO | logging:callHandlers:1762 - Created new renderer for simulation: NewtonWarpRenderer +2026-08-14 18:14:57.810 | INFO | logging:callHandlers:1762 - Dispatching MODEL_INIT callbacks +2026-08-14 18:14:57.811 | INFO | logging:callHandlers:1762 - Finalizing model on device: cuda:0 +2026-08-14 18:15:01.503 | INFO | logging:callHandlers:1762 - Dispatching PHYSICS_READY callbacks +2026-08-14 18:15:01.733 | INFO | logging:callHandlers:1762 - Simulation parameters for joints in /World/envs/env_.*/Robot: ++-------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 2 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 3 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 4 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 5 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 6 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 7 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 8 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 9 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 11 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 12 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 13 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 14 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 15 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 16 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 17 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 18 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 19 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 20 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 21 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 22 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 23 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 24 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 25 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 26 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 27 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +2026-08-14 18:15:01.734 | INFO | logging:callHandlers:1762 - Using renderer: NewtonWarpRenderer +2026-08-14 18:15:02.749 | INFO | logging:callHandlers:1762 - Adding contact sensor for /World/envs/env_.*/Robot/.* with filter all bodies/shapes +2026-08-14 18:15:02.754 | INFO | logging:callHandlers:1762 - Contact sensor initialized with 30 sensors. +2026-08-14 18:15:02.754 | INFO | logging:callHandlers:1762 - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +2026-08-14 18:15:02.754 | INFO | logging:callHandlers:1762 - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +2026-08-14 18:15:07.304 | WARNING | logging:callHandlers:1762 - cubric IAdapter minor version newer than this shim was validated against: plugin reports v0.2, shim is pinned to v0.1. Proceeding under semver minor-compatibility — if transforms misbehave, verify the vtable layout against omni/cubric/IAdapter.h. +2026-08-14 18:15:07.304 | INFO | logging:callHandlers:1762 - cubric IAdapter bindings ready +2026-08-14 18:15:07.304 | INFO | logging:callHandlers:1762 - cubric bindings ready (adapter deferred to first render) +2026-08-14 18:15:07.305 | INFO | logging:callHandlers:1762 - Newton CUDA graph capture deferred until first step() (RTX active) +2026-08-14 18:15:07.397 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:235 - Loaded skeleton from gear_sonic/data/assets/robot_description/mjcf/g1_29dof_rev_1_0.xml +2026-08-14 18:15:07.398 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:236 - Loading motion data from /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered... +2026-08-14 18:15:07.398 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_data:472 - Loaded 2 motions +2026-08-14 18:15:08.035 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1091 - Loading 1 motions... +2026-08-14 18:15:08.037 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1092 - Sampling motion: tensor([1], device='cuda:0'), .... +2026-08-14 18:15:08.037 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1093 - Current motion keys: ['walk_forward_amateur_001__A001'], .... +2026-08-14 18:15:08.037 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1120 - Increased file descriptor limits from 2450/1048576 to 1048576/1048576 +2026-08-14 18:15:08.110 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1140 - Loading motions with 1 jobs... +2026-08-14 18:15:08.303 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1577 - Loaded 1 motions with a total length of 40.020s and 2002 frames. +2026-08-14 18:15:08.896 | INFO | gear_sonic.envs.manager_env.mdp.recorders:__init__:44 - === Start recording video to /mnt/data/code/Sonic-ActionReplay/public_outputs/sonic_walk_newton === +2026-08-14 18:15:08.929 | INFO | logging:callHandlers:1762 - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'left_hip_roll_joint', 'left_hip_yaw_joint', 'left_knee_joint', 'left_ankle_pitch_joint', 'left_ankle_roll_joint', 'right_hip_pitch_joint', 'right_hip_roll_joint', 'right_hip_yaw_joint', 'right_knee_joint', 'right_ankle_pitch_joint', 'right_ankle_roll_joint', 'waist_yaw_joint', 'waist_roll_joint', 'waist_pitch_joint', 'left_shoulder_pitch_joint', 'left_shoulder_roll_joint', 'left_shoulder_yaw_joint', 'left_elbow_joint', 'left_wrist_roll_joint', 'left_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_shoulder_pitch_joint', 'right_shoulder_roll_joint', 'right_shoulder_yaw_joint', 'right_elbow_joint', 'right_wrist_roll_joint', 'right_wrist_pitch_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] +2026-08-14 18:15:10.905 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:250 - Motion Encoder and Quantizer initialized with embedding dim: 64 (num_tokens=2, token_dim=32) +2026-08-14 18:15:11.010 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:319 - Initialized g1 encoder with input features: ['command_multi_future_nonflat', 'motion_anchor_ori_b_mf_nonflat'] +2026-08-14 18:15:11.023 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:319 - Initialized teleop encoder with input features: ['command_multi_future_lower_body', 'vr_3point_local_target', 'vr_3point_local_orn_target', 'motion_anchor_ori_b'] +2026-08-14 18:15:11.042 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:319 - Initialized smpl encoder with input features: ['smpl_joints_multi_future_local_nonflat', 'smpl_root_ori_b_multi_future', 'joint_pos_multi_future_wrist_for_smpl'] +2026-08-14 18:15:11.077 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:409 - Initialized g1_dyn decoder with input features: ['token_flattened', 'proprioception'] and output features: ['action'] +2026-08-14 18:15:11.093 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:409 - Initialized g1_kin decoder with input features: ['token'] and output features: ['command_multi_future_nonflat', 'motion_anchor_ori_b_mf_nonflat'] +2026-08-14 18:15:12.450 | INFO | __main__:main:433 - Loading checkpoint from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +2026-08-14 18:15:12.629 | INFO | __main__:main:449 - Model parameterization: std +2026-08-14 18:15:12.629 | INFO | __main__:main:450 - Checkpoint parameterization: std +2026-08-14 18:15:12.631 | INFO | __main__:main:462 - Successfully loaded policy state dict +2026-08-14 18:15:12.632 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:begin_seq_motion_samples:1016 - Loading motions for evaluation +2026-08-14 18:15:12.633 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1091 - Loading 1 motions... +2026-08-14 18:15:12.633 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1092 - Sampling motion: tensor([0], device='cuda:0'), .... +2026-08-14 18:15:12.633 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1093 - Current motion keys: ['walk_forward_amateur_001__A001_M'], .... +2026-08-14 18:15:12.699 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1140 - Loading motions with 1 jobs... +2026-08-14 18:15:12.879 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1577 - Loaded 1 motions with a total length of 40.020s and 2002 frames. +2026-08-14 18:15:14.927 | INFO | logging:callHandlers:1762 - Newton CUDA graph captured (deferred relaxed mode, RTX-compatible) +2026-08-14 18:15:14.938 | INFO | logging:callHandlers:1762 - cubric GPU transform hierarchy enabled +2026-08-14 18:15:15.092 | INFO | gear_sonic.envs.manager_env.mdp.recorders:_initialize_writers:57 - Saving rendering to /mnt/data/code/Sonic-ActionReplay/public_outputs/sonic_walk_newton +2026-08-14 18:15:28.082 | INFO | __main__:main:623 - Reached max_render_steps=250. Exiting. +2026-08-14 18:15:28.102 | INFO | gear_sonic.envs.manager_env.mdp.recorders:close_writers:168 - Closed video writer 0 +2026-08-14 18:15:28.102 | INFO | gear_sonic.envs.manager_env.mdp.recorders:close_writers:177 - === All video writers closed === diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_181428-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260814_181428-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..3cefd0507a966aad0521b5f4d48c2a6773d7cb43 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_181428-TEST/eval_agent_trl.log @@ -0,0 +1,157 @@ +[2026-08-14 18:14:32,177][isaaclab.app.app_launcher][WARNING] - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +[2026-08-14 18:14:32,179][isaaclab.app.app_launcher][INFO] - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +[2026-08-14 18:14:32,179][isaaclab.app.app_launcher][INFO] - Using device: cuda +[2026-08-14 18:14:32,181][isaaclab.app.app_launcher][INFO] - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.rendering.kit +[2026-08-14 18:14:32,437][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-14 18:14:39,439][AutoNode][DEBUG] - Defining data type 'any' as 'Any' +[2026-08-14 18:14:39,440][AutoNode][DEBUG] - Defining data type 'bool' as 'Bool' and array 'BoolArray +[2026-08-14 18:14:39,440][AutoNode][DEBUG] - Defining data type 'bundle' as 'Bundle' +[2026-08-14 18:14:39,440][AutoNode][DEBUG] - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +[2026-08-14 18:14:39,440][AutoNode][DEBUG] - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +[2026-08-14 18:14:39,440][AutoNode][DEBUG] - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +[2026-08-14 18:14:39,441][AutoNode][DEBUG] - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +[2026-08-14 18:14:39,441][AutoNode][DEBUG] - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +[2026-08-14 18:14:39,441][AutoNode][DEBUG] - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +[2026-08-14 18:14:39,441][AutoNode][DEBUG] - Defining data type 'double' as 'Double' and array 'DoubleArray +[2026-08-14 18:14:39,441][AutoNode][DEBUG] - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +[2026-08-14 18:14:39,441][AutoNode][DEBUG] - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +[2026-08-14 18:14:39,441][AutoNode][DEBUG] - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +[2026-08-14 18:14:39,441][AutoNode][DEBUG] - Defining data type 'execution' as 'Execution' +[2026-08-14 18:14:39,442][AutoNode][DEBUG] - Defining data type 'float' as 'Float' and array 'FloatArray +[2026-08-14 18:14:39,442][AutoNode][DEBUG] - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +[2026-08-14 18:14:39,442][AutoNode][DEBUG] - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +[2026-08-14 18:14:39,442][AutoNode][DEBUG] - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +[2026-08-14 18:14:39,442][AutoNode][DEBUG] - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +[2026-08-14 18:14:39,442][AutoNode][DEBUG] - Defining data type 'half' as 'Half' and array 'HalfArray +[2026-08-14 18:14:39,442][AutoNode][DEBUG] - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +[2026-08-14 18:14:39,442][AutoNode][DEBUG] - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +[2026-08-14 18:14:39,442][AutoNode][DEBUG] - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +[2026-08-14 18:14:39,443][AutoNode][DEBUG] - Defining data type 'int' as 'Int' and array 'IntArray +[2026-08-14 18:14:39,443][AutoNode][DEBUG] - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +[2026-08-14 18:14:39,443][AutoNode][DEBUG] - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +[2026-08-14 18:14:39,443][AutoNode][DEBUG] - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +[2026-08-14 18:14:39,443][AutoNode][DEBUG] - Defining data type 'int64' as 'Int64' and array 'Int64Array +[2026-08-14 18:14:39,443][AutoNode][DEBUG] - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +[2026-08-14 18:14:39,443][AutoNode][DEBUG] - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +[2026-08-14 18:14:39,443][AutoNode][DEBUG] - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +[2026-08-14 18:14:39,444][AutoNode][DEBUG] - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +[2026-08-14 18:14:39,444][AutoNode][DEBUG] - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +[2026-08-14 18:14:39,444][AutoNode][DEBUG] - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +[2026-08-14 18:14:39,444][AutoNode][DEBUG] - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +[2026-08-14 18:14:39,444][AutoNode][DEBUG] - Defining data type 'path' as 'Path' +[2026-08-14 18:14:39,444][AutoNode][DEBUG] - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +[2026-08-14 18:14:39,444][AutoNode][DEBUG] - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +[2026-08-14 18:14:39,444][AutoNode][DEBUG] - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +[2026-08-14 18:14:39,444][AutoNode][DEBUG] - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +[2026-08-14 18:14:39,445][AutoNode][DEBUG] - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +[2026-08-14 18:14:39,445][AutoNode][DEBUG] - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +[2026-08-14 18:14:39,445][AutoNode][DEBUG] - Defining data type 'string' as 'String' +[2026-08-14 18:14:39,445][AutoNode][DEBUG] - Defining data type 'target' as 'Target' +[2026-08-14 18:14:39,445][AutoNode][DEBUG] - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +[2026-08-14 18:14:39,445][AutoNode][DEBUG] - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +[2026-08-14 18:14:39,445][AutoNode][DEBUG] - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +[2026-08-14 18:14:39,445][AutoNode][DEBUG] - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +[2026-08-14 18:14:39,446][AutoNode][DEBUG] - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +[2026-08-14 18:14:39,446][AutoNode][DEBUG] - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +[2026-08-14 18:14:39,446][AutoNode][DEBUG] - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +[2026-08-14 18:14:39,446][AutoNode][DEBUG] - Defining data type 'token' as 'Token' and array 'TokenArray +[2026-08-14 18:14:39,446][AutoNode][DEBUG] - Defining data type 'uchar' as 'UChar' and array 'UCharArray +[2026-08-14 18:14:39,446][AutoNode][DEBUG] - Defining data type 'uint' as 'UInt' and array 'UIntArray +[2026-08-14 18:14:39,446][AutoNode][DEBUG] - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +[2026-08-14 18:14:39,446][AutoNode][DEBUG] - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +[2026-08-14 18:14:39,446][AutoNode][DEBUG] - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +[2026-08-14 18:14:39,447][AutoNode][DEBUG] - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +[2026-08-14 18:14:52,403][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory Articulation. +[2026-08-14 18:14:52,880][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +[2026-08-14 18:14:52,890][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:14:53,120][isaacsim.asset.importer.utils.impl.asset_utils][INFO] - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +[2026-08-14 18:14:53,127][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Applied RobotAPI to prim /g1 +[2026-08-14 18:14:53,133][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Set isaac:robotType = 'Default' on /g1 +[2026-08-14 18:14:53,134][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,134][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,135][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,135][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,136][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,136][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,137][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,137][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,138][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,138][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,138][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,139][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,139][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,140][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,140][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,141][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,141][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,142][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,142][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,143][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,143][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,144][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,144][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,145][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,145][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,146][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,146][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,146][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,147][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:14:53,168][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:14:53,240][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_181452_6311/main/payloads/base.usda +[2026-08-14 18:14:53,722][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_181452_6311/main/main.usda +[2026-08-14 18:14:53,728][isaacsim.asset.transformer.manager][INFO] - Skipping disabled rule: Delete Newton Redundant APIs +[2026-08-14 18:14:54,068][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory FrameView. +[2026-08-14 18:14:54,121][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory ContactSensor. +[2026-08-14 18:14:57,809][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory Renderer. +[2026-08-14 18:14:57,810][isaaclab.renderers.render_context][INFO] - Created new renderer for simulation: NewtonWarpRenderer +[2026-08-14 18:14:57,810][isaaclab_newton.physics.newton_manager][INFO] - Dispatching MODEL_INIT callbacks +[2026-08-14 18:14:57,811][isaaclab_newton.physics.newton_manager][INFO] - Finalizing model on device: cuda:0 +[2026-08-14 18:15:01,503][isaaclab_newton.physics.newton_manager][INFO] - Dispatching PHYSICS_READY callbacks +[2026-08-14 18:15:01,732][isaaclab_newton.assets.articulation.articulation][INFO] - Simulation parameters for joints in /World/envs/env_.*/Robot: ++-------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 2 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 3 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 4 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 5 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 6 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 7 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 8 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 9 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 11 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 12 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 13 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 14 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 15 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 16 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 17 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 18 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 19 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 20 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 21 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 22 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 23 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 24 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 25 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 26 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 27 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +[2026-08-14 18:15:01,734][isaaclab.sensors.camera.camera][INFO] - Using renderer: NewtonWarpRenderer +[2026-08-14 18:15:02,749][isaaclab_newton.physics.newton_manager][INFO] - Adding contact sensor for /World/envs/env_.*/Robot/.* with filter all bodies/shapes +[2026-08-14 18:15:02,754][isaaclab_newton.sensors.contact_sensor.contact_sensor][INFO] - Contact sensor initialized with 30 sensors. +[2026-08-14 18:15:02,754][isaaclab_newton.sensors.contact_sensor.contact_sensor][INFO] - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +[2026-08-14 18:15:02,754][isaaclab_newton.sensors.contact_sensor.contact_sensor_data][INFO] - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +[2026-08-14 18:15:07,303][isaaclab_newton.physics._cubric][WARNING] - cubric IAdapter minor version newer than this shim was validated against: plugin reports v0.2, shim is pinned to v0.1. Proceeding under semver minor-compatibility — if transforms misbehave, verify the vtable layout against omni/cubric/IAdapter.h. +[2026-08-14 18:15:07,304][isaaclab_newton.physics._cubric][INFO] - cubric IAdapter bindings ready +[2026-08-14 18:15:07,304][isaaclab_newton.physics.newton_manager][INFO] - cubric bindings ready (adapter deferred to first render) +[2026-08-14 18:15:07,305][isaaclab_newton.physics.newton_manager][INFO] - Newton CUDA graph capture deferred until first step() (RTX active) +[2026-08-14 18:15:08,929][isaaclab.envs.mdp.actions.joint_actions][INFO] - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'left_hip_roll_joint', 'left_hip_yaw_joint', 'left_knee_joint', 'left_ankle_pitch_joint', 'left_ankle_roll_joint', 'right_hip_pitch_joint', 'right_hip_roll_joint', 'right_hip_yaw_joint', 'right_knee_joint', 'right_ankle_pitch_joint', 'right_ankle_roll_joint', 'waist_yaw_joint', 'waist_roll_joint', 'waist_pitch_joint', 'left_shoulder_pitch_joint', 'left_shoulder_roll_joint', 'left_shoulder_yaw_joint', 'left_elbow_joint', 'left_wrist_roll_joint', 'left_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_shoulder_pitch_joint', 'right_shoulder_roll_joint', 'right_shoulder_yaw_joint', 'right_elbow_joint', 'right_wrist_roll_joint', 'right_wrist_pitch_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] +[2026-08-14 18:15:14,926][isaaclab_newton.physics.newton_manager][INFO] - Newton CUDA graph captured (deferred relaxed mode, RTX-compatible) +[2026-08-14 18:15:14,938][isaaclab_newton.physics.newton_manager][INFO] - cubric GPU transform hierarchy enabled diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_181916-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_181916-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..35b05e2291929bc56f854f05d606a5fcf8c15ed7 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_181916-TEST/.hydra/config.yaml @@ -0,0 +1,40 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + smpl_motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + config: + render_results: true + render_width: 640 + render_height: 368 + events: + physics_material: null + add_joint_default_pos: null + base_com: null + randomize_rigid_body_mass: null +checkpoint: /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +num_envs: 1 +headless: true +use_wandb: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_181916-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_181916-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d7365a804155fa4fb6691f215289f8b224a659ce --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_181916-TEST/.hydra/hydra.yaml @@ -0,0 +1,168 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + - +num_envs=1 + - +headless=true + - +use_wandb=false + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + - ++manager_env.config.render_results=true + - ++manager_env.config.render_width=640 + - ++manager_env.config.render_height=368 + - ++manager_env.events.physics_material=null + - ++manager_env.events.add_joint_default_pos=null + - ++manager_env.events.base_com=null + - ++manager_env.events.randomize_rigid_body_mass=null + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered,++manager_env.config.render_height=368,++manager_env.config.render_results=true,++manager_env.config.render_width=640,++manager_env.events.add_joint_default_pos=null,++manager_env.events.base_com=null,++manager_env.events.physics_material=null,++manager_env.events.randomize_rigid_body_mass=null,+headless=true,+num_envs=1,+use_wandb=false,checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260814_181916-TEST + choices: + manager_env/recorders: empty + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_181916-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_181916-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..122746eb732d9716968ccf0003c50c9f0ae475ca --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_181916-TEST/.hydra/overrides.yaml @@ -0,0 +1,13 @@ +- checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +- +num_envs=1 +- +headless=true +- +use_wandb=false +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered +- ++manager_env.config.render_results=true +- ++manager_env.config.render_width=640 +- ++manager_env.config.render_height=368 +- ++manager_env.events.physics_material=null +- ++manager_env.events.add_joint_default_pos=null +- ++manager_env.events.base_com=null +- ++manager_env.events.randomize_rigid_body_mass=null diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_181916-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260814_181916-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..ff45969799d5278fd43c9535bd50d53fd61056be --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_181916-TEST/eval.log @@ -0,0 +1,191 @@ +2026-08-14 18:19:16.795 | INFO | __main__:main:90 - Loading training config file from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/config.yaml +2026-08-14 18:19:20.211 | WARNING | logging:callHandlers:1762 - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +2026-08-14 18:19:20.213 | INFO | logging:callHandlers:1762 - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +2026-08-14 18:19:20.214 | INFO | logging:callHandlers:1762 - Using device: cuda +2026-08-14 18:19:20.215 | INFO | logging:callHandlers:1762 - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.rendering.kit +2026-08-14 18:19:20.471 | DEBUG | logging:callHandlers:1762 - Using selector: EpollSelector +2026-08-14 18:19:28.361 | DEBUG | logging:callHandlers:1762 - Defining data type 'any' as 'Any' +2026-08-14 18:19:28.361 | DEBUG | logging:callHandlers:1762 - Defining data type 'bool' as 'Bool' and array 'BoolArray +2026-08-14 18:19:28.361 | DEBUG | logging:callHandlers:1762 - Defining data type 'bundle' as 'Bundle' +2026-08-14 18:19:28.361 | DEBUG | logging:callHandlers:1762 - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +2026-08-14 18:19:28.362 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +2026-08-14 18:19:28.362 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +2026-08-14 18:19:28.362 | DEBUG | logging:callHandlers:1762 - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +2026-08-14 18:19:28.362 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +2026-08-14 18:19:28.362 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +2026-08-14 18:19:28.362 | DEBUG | logging:callHandlers:1762 - Defining data type 'double' as 'Double' and array 'DoubleArray +2026-08-14 18:19:28.362 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +2026-08-14 18:19:28.362 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +2026-08-14 18:19:28.362 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +2026-08-14 18:19:28.362 | DEBUG | logging:callHandlers:1762 - Defining data type 'execution' as 'Execution' +2026-08-14 18:19:28.363 | DEBUG | logging:callHandlers:1762 - Defining data type 'float' as 'Float' and array 'FloatArray +2026-08-14 18:19:28.363 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +2026-08-14 18:19:28.363 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +2026-08-14 18:19:28.363 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +2026-08-14 18:19:28.363 | DEBUG | logging:callHandlers:1762 - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +2026-08-14 18:19:28.363 | DEBUG | logging:callHandlers:1762 - Defining data type 'half' as 'Half' and array 'HalfArray +2026-08-14 18:19:28.363 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +2026-08-14 18:19:28.363 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +2026-08-14 18:19:28.363 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +2026-08-14 18:19:28.363 | DEBUG | logging:callHandlers:1762 - Defining data type 'int' as 'Int' and array 'IntArray +2026-08-14 18:19:28.364 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +2026-08-14 18:19:28.364 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +2026-08-14 18:19:28.364 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +2026-08-14 18:19:28.364 | DEBUG | logging:callHandlers:1762 - Defining data type 'int64' as 'Int64' and array 'Int64Array +2026-08-14 18:19:28.364 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +2026-08-14 18:19:28.364 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +2026-08-14 18:19:28.364 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +2026-08-14 18:19:28.364 | DEBUG | logging:callHandlers:1762 - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +2026-08-14 18:19:28.364 | DEBUG | logging:callHandlers:1762 - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +2026-08-14 18:19:28.364 | DEBUG | logging:callHandlers:1762 - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +2026-08-14 18:19:28.365 | DEBUG | logging:callHandlers:1762 - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +2026-08-14 18:19:28.365 | DEBUG | logging:callHandlers:1762 - Defining data type 'path' as 'Path' +2026-08-14 18:19:28.365 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +2026-08-14 18:19:28.365 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +2026-08-14 18:19:28.365 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +2026-08-14 18:19:28.365 | DEBUG | logging:callHandlers:1762 - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +2026-08-14 18:19:28.365 | DEBUG | logging:callHandlers:1762 - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +2026-08-14 18:19:28.365 | DEBUG | logging:callHandlers:1762 - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +2026-08-14 18:19:28.365 | DEBUG | logging:callHandlers:1762 - Defining data type 'string' as 'String' +2026-08-14 18:19:28.365 | DEBUG | logging:callHandlers:1762 - Defining data type 'target' as 'Target' +2026-08-14 18:19:28.366 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +2026-08-14 18:19:28.366 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +2026-08-14 18:19:28.366 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +2026-08-14 18:19:28.366 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +2026-08-14 18:19:28.366 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +2026-08-14 18:19:28.366 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +2026-08-14 18:19:28.366 | DEBUG | logging:callHandlers:1762 - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +2026-08-14 18:19:28.366 | DEBUG | logging:callHandlers:1762 - Defining data type 'token' as 'Token' and array 'TokenArray +2026-08-14 18:19:28.366 | DEBUG | logging:callHandlers:1762 - Defining data type 'uchar' as 'UChar' and array 'UCharArray +2026-08-14 18:19:28.366 | DEBUG | logging:callHandlers:1762 - Defining data type 'uint' as 'UInt' and array 'UIntArray +2026-08-14 18:19:28.367 | DEBUG | logging:callHandlers:1762 - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +2026-08-14 18:19:28.367 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +2026-08-14 18:19:28.367 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +2026-08-14 18:19:28.367 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +2026-08-14 18:19:35.224 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch +2026-08-14 18:19:41.556 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory Articulation. +2026-08-14 18:19:41.679 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +2026-08-14 18:19:41.692 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:19:42.340 | INFO | logging:callHandlers:1762 - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +2026-08-14 18:19:42.348 | INFO | logging:callHandlers:1762 - Applied RobotAPI to prim /g1 +2026-08-14 18:19:42.355 | INFO | logging:callHandlers:1762 - Set isaac:robotType = 'Default' on /g1 +2026-08-14 18:19:42.356 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.356 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.357 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.357 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.358 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.358 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.359 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.359 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.360 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.360 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.361 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.361 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.362 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.362 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.363 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.363 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.364 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.364 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.365 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.365 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.366 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.366 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.367 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.367 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.368 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.368 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.369 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.369 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.370 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:19:42.394 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:19:42.475 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_181941_6311/main/payloads/base.usda +2026-08-14 18:19:43.049 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_181941_6311/main/main.usda +2026-08-14 18:19:43.056 | INFO | logging:callHandlers:1762 - Skipping disabled rule: Delete Newton Redundant APIs +2026-08-14 18:19:43.421 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory FrameView. +2026-08-14 18:19:43.472 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory ContactSensor. +2026-08-14 18:19:47.352 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory Renderer. +2026-08-14 18:19:47.352 | INFO | logging:callHandlers:1762 - Created new renderer for simulation: NewtonWarpRenderer +2026-08-14 18:19:47.353 | INFO | logging:callHandlers:1762 - Dispatching MODEL_INIT callbacks +2026-08-14 18:19:47.353 | INFO | logging:callHandlers:1762 - Finalizing model on device: cuda:0 +2026-08-14 18:19:51.900 | INFO | logging:callHandlers:1762 - Dispatching PHYSICS_READY callbacks +2026-08-14 18:19:52.146 | INFO | logging:callHandlers:1762 - Simulation parameters for joints in /World/envs/env_.*/Robot: ++-------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 2 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 3 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 4 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 5 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 6 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 7 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 8 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 9 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 11 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 12 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 13 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 14 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 15 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 16 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 17 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 18 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 19 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 20 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 21 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 22 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 23 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 24 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 25 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 26 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 27 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +2026-08-14 18:19:52.147 | INFO | logging:callHandlers:1762 - Using renderer: NewtonWarpRenderer +2026-08-14 18:19:52.175 | INFO | logging:callHandlers:1762 - Adding contact sensor for /World/envs/env_.*/Robot/.* with filter all bodies/shapes +2026-08-14 18:19:52.180 | INFO | logging:callHandlers:1762 - Contact sensor initialized with 30 sensors. +2026-08-14 18:19:52.180 | INFO | logging:callHandlers:1762 - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +2026-08-14 18:19:52.180 | INFO | logging:callHandlers:1762 - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +2026-08-14 18:19:57.084 | WARNING | logging:callHandlers:1762 - cubric IAdapter minor version newer than this shim was validated against: plugin reports v0.2, shim is pinned to v0.1. Proceeding under semver minor-compatibility — if transforms misbehave, verify the vtable layout against omni/cubric/IAdapter.h. +2026-08-14 18:19:57.084 | INFO | logging:callHandlers:1762 - cubric IAdapter bindings ready +2026-08-14 18:19:57.084 | INFO | logging:callHandlers:1762 - cubric bindings ready (adapter deferred to first render) +2026-08-14 18:19:57.084 | INFO | logging:callHandlers:1762 - Newton CUDA graph capture deferred until first step() (RTX active) +2026-08-14 18:19:57.180 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:235 - Loaded skeleton from gear_sonic/data/assets/robot_description/mjcf/g1_29dof_rev_1_0.xml +2026-08-14 18:19:57.180 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:236 - Loading motion data from /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered... +2026-08-14 18:19:57.181 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_data:472 - Loaded 2 motions +2026-08-14 18:19:57.701 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1091 - Loading 1 motions... +2026-08-14 18:19:57.703 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1092 - Sampling motion: tensor([1], device='cuda:0'), .... +2026-08-14 18:19:57.703 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1093 - Current motion keys: ['walk_forward_amateur_001__A001'], .... +2026-08-14 18:19:57.703 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1120 - Increased file descriptor limits from 2450/1048576 to 1048576/1048576 +2026-08-14 18:19:57.786 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1140 - Loading motions with 1 jobs... +2026-08-14 18:19:57.984 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1577 - Loaded 1 motions with a total length of 40.020s and 2002 frames. +2026-08-14 18:19:58.980 | INFO | logging:callHandlers:1762 - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'left_hip_roll_joint', 'left_hip_yaw_joint', 'left_knee_joint', 'left_ankle_pitch_joint', 'left_ankle_roll_joint', 'right_hip_pitch_joint', 'right_hip_roll_joint', 'right_hip_yaw_joint', 'right_knee_joint', 'right_ankle_pitch_joint', 'right_ankle_roll_joint', 'waist_yaw_joint', 'waist_roll_joint', 'waist_pitch_joint', 'left_shoulder_pitch_joint', 'left_shoulder_roll_joint', 'left_shoulder_yaw_joint', 'left_elbow_joint', 'left_wrist_roll_joint', 'left_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_shoulder_pitch_joint', 'right_shoulder_roll_joint', 'right_shoulder_yaw_joint', 'right_elbow_joint', 'right_wrist_roll_joint', 'right_wrist_pitch_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] +2026-08-14 18:19:59.721 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_grid:1227 - Setting up replay grid: 1 rows x 1 cols with 2.0m spacing +2026-08-14 18:19:59.721 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_grid:1247 - Grid bounds: X=[0.0, 0.0], Y=[0.0, 0.0] +2026-08-14 18:19:59.753 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1440 - +============================================================ +2026-08-14 18:19:59.753 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1441 - Batch Replaying 1 Environments +2026-08-14 18:19:59.753 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1442 - Unique motion IDs: [0] +2026-08-14 18:19:59.753 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1443 - Max frames: 100 +2026-08-14 18:19:59.753 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1444 - Max duration: 2.00s (@ 50 FPS) +2026-08-14 18:19:59.753 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1445 - Speed: 1.0x +2026-08-14 18:19:59.753 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1446 - ============================================================ + +2026-08-14 18:19:59.754 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1667 - Replay Controls: +2026-08-14 18:19:59.754 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1668 - G: Pause/Resume +2026-08-14 18:19:59.754 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1669 - B: Toggle Reverse Play +2026-08-14 18:19:59.754 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1670 - LEFT/RIGHT: Step backward/forward (when paused) +2026-08-14 18:19:59.754 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1671 - R: Restart from beginning +2026-08-14 18:19:59.754 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1672 - ESC: Exit replay +2026-08-14 18:19:59.754 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1673 - +/-: Increase/Decrease speed +2026-08-14 18:19:59.754 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1674 - +2026-08-14 18:19:59.757 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:run_replay:1324 - [Video] Recording to: /mnt/data/code/Sonic-ActionReplay/public_outputs/sonic_reference_kinematic_test.mp4 +2026-08-14 18:20:00.393 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:step_replay:2096 - Progress: 50.0% (max frame 50/100) +2026-08-14 18:20:00.758 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:step_replay:2085 - Replay complete! +2026-08-14 18:20:00.779 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:run_replay:1375 - [Video] Saved 99 frames to: /mnt/data/code/Sonic-ActionReplay/public_outputs/sonic_reference_kinematic_test.mp4 +2026-08-14 18:20:00.779 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:run_replay:1377 - +Replay complete! diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_181916-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260814_181916-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..5e517ab679316bc9513a8490c8e097d5a56a02ed --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_181916-TEST/eval_agent_trl.log @@ -0,0 +1,155 @@ +[2026-08-14 18:19:20,210][isaaclab.app.app_launcher][WARNING] - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +[2026-08-14 18:19:20,213][isaaclab.app.app_launcher][INFO] - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +[2026-08-14 18:19:20,213][isaaclab.app.app_launcher][INFO] - Using device: cuda +[2026-08-14 18:19:20,215][isaaclab.app.app_launcher][INFO] - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.rendering.kit +[2026-08-14 18:19:20,471][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-14 18:19:28,361][AutoNode][DEBUG] - Defining data type 'any' as 'Any' +[2026-08-14 18:19:28,361][AutoNode][DEBUG] - Defining data type 'bool' as 'Bool' and array 'BoolArray +[2026-08-14 18:19:28,361][AutoNode][DEBUG] - Defining data type 'bundle' as 'Bundle' +[2026-08-14 18:19:28,361][AutoNode][DEBUG] - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +[2026-08-14 18:19:28,362][AutoNode][DEBUG] - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +[2026-08-14 18:19:28,362][AutoNode][DEBUG] - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +[2026-08-14 18:19:28,362][AutoNode][DEBUG] - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +[2026-08-14 18:19:28,362][AutoNode][DEBUG] - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +[2026-08-14 18:19:28,362][AutoNode][DEBUG] - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +[2026-08-14 18:19:28,362][AutoNode][DEBUG] - Defining data type 'double' as 'Double' and array 'DoubleArray +[2026-08-14 18:19:28,362][AutoNode][DEBUG] - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +[2026-08-14 18:19:28,362][AutoNode][DEBUG] - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +[2026-08-14 18:19:28,362][AutoNode][DEBUG] - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +[2026-08-14 18:19:28,362][AutoNode][DEBUG] - Defining data type 'execution' as 'Execution' +[2026-08-14 18:19:28,363][AutoNode][DEBUG] - Defining data type 'float' as 'Float' and array 'FloatArray +[2026-08-14 18:19:28,363][AutoNode][DEBUG] - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +[2026-08-14 18:19:28,363][AutoNode][DEBUG] - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +[2026-08-14 18:19:28,363][AutoNode][DEBUG] - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +[2026-08-14 18:19:28,363][AutoNode][DEBUG] - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +[2026-08-14 18:19:28,363][AutoNode][DEBUG] - Defining data type 'half' as 'Half' and array 'HalfArray +[2026-08-14 18:19:28,363][AutoNode][DEBUG] - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +[2026-08-14 18:19:28,363][AutoNode][DEBUG] - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +[2026-08-14 18:19:28,363][AutoNode][DEBUG] - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +[2026-08-14 18:19:28,363][AutoNode][DEBUG] - Defining data type 'int' as 'Int' and array 'IntArray +[2026-08-14 18:19:28,364][AutoNode][DEBUG] - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +[2026-08-14 18:19:28,364][AutoNode][DEBUG] - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +[2026-08-14 18:19:28,364][AutoNode][DEBUG] - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +[2026-08-14 18:19:28,364][AutoNode][DEBUG] - Defining data type 'int64' as 'Int64' and array 'Int64Array +[2026-08-14 18:19:28,364][AutoNode][DEBUG] - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +[2026-08-14 18:19:28,364][AutoNode][DEBUG] - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +[2026-08-14 18:19:28,364][AutoNode][DEBUG] - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +[2026-08-14 18:19:28,364][AutoNode][DEBUG] - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +[2026-08-14 18:19:28,364][AutoNode][DEBUG] - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +[2026-08-14 18:19:28,364][AutoNode][DEBUG] - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +[2026-08-14 18:19:28,365][AutoNode][DEBUG] - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +[2026-08-14 18:19:28,365][AutoNode][DEBUG] - Defining data type 'path' as 'Path' +[2026-08-14 18:19:28,365][AutoNode][DEBUG] - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +[2026-08-14 18:19:28,365][AutoNode][DEBUG] - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +[2026-08-14 18:19:28,365][AutoNode][DEBUG] - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +[2026-08-14 18:19:28,365][AutoNode][DEBUG] - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +[2026-08-14 18:19:28,365][AutoNode][DEBUG] - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +[2026-08-14 18:19:28,365][AutoNode][DEBUG] - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +[2026-08-14 18:19:28,365][AutoNode][DEBUG] - Defining data type 'string' as 'String' +[2026-08-14 18:19:28,365][AutoNode][DEBUG] - Defining data type 'target' as 'Target' +[2026-08-14 18:19:28,366][AutoNode][DEBUG] - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +[2026-08-14 18:19:28,366][AutoNode][DEBUG] - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +[2026-08-14 18:19:28,366][AutoNode][DEBUG] - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +[2026-08-14 18:19:28,366][AutoNode][DEBUG] - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +[2026-08-14 18:19:28,366][AutoNode][DEBUG] - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +[2026-08-14 18:19:28,366][AutoNode][DEBUG] - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +[2026-08-14 18:19:28,366][AutoNode][DEBUG] - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +[2026-08-14 18:19:28,366][AutoNode][DEBUG] - Defining data type 'token' as 'Token' and array 'TokenArray +[2026-08-14 18:19:28,366][AutoNode][DEBUG] - Defining data type 'uchar' as 'UChar' and array 'UCharArray +[2026-08-14 18:19:28,366][AutoNode][DEBUG] - Defining data type 'uint' as 'UInt' and array 'UIntArray +[2026-08-14 18:19:28,366][AutoNode][DEBUG] - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +[2026-08-14 18:19:28,367][AutoNode][DEBUG] - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +[2026-08-14 18:19:28,367][AutoNode][DEBUG] - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +[2026-08-14 18:19:28,367][AutoNode][DEBUG] - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +[2026-08-14 18:19:41,556][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory Articulation. +[2026-08-14 18:19:41,679][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +[2026-08-14 18:19:41,692][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:19:42,339][isaacsim.asset.importer.utils.impl.asset_utils][INFO] - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +[2026-08-14 18:19:42,348][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Applied RobotAPI to prim /g1 +[2026-08-14 18:19:42,355][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Set isaac:robotType = 'Default' on /g1 +[2026-08-14 18:19:42,356][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,356][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,357][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,357][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,358][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,358][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,359][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,359][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,360][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,360][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,361][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,361][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,362][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,362][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,363][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,363][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,364][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,364][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,365][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,365][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,366][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,366][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,367][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,367][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,368][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,368][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,369][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,369][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,370][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:19:42,393][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:19:42,475][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_181941_6311/main/payloads/base.usda +[2026-08-14 18:19:43,049][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_181941_6311/main/main.usda +[2026-08-14 18:19:43,055][isaacsim.asset.transformer.manager][INFO] - Skipping disabled rule: Delete Newton Redundant APIs +[2026-08-14 18:19:43,421][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory FrameView. +[2026-08-14 18:19:43,471][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory ContactSensor. +[2026-08-14 18:19:47,352][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory Renderer. +[2026-08-14 18:19:47,352][isaaclab.renderers.render_context][INFO] - Created new renderer for simulation: NewtonWarpRenderer +[2026-08-14 18:19:47,353][isaaclab_newton.physics.newton_manager][INFO] - Dispatching MODEL_INIT callbacks +[2026-08-14 18:19:47,353][isaaclab_newton.physics.newton_manager][INFO] - Finalizing model on device: cuda:0 +[2026-08-14 18:19:51,900][isaaclab_newton.physics.newton_manager][INFO] - Dispatching PHYSICS_READY callbacks +[2026-08-14 18:19:52,146][isaaclab_newton.assets.articulation.articulation][INFO] - Simulation parameters for joints in /World/envs/env_.*/Robot: ++-------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 2 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 3 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 4 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 5 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 6 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 7 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 8 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 9 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 11 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 12 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 13 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 14 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 15 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 16 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 17 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 18 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 19 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 20 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 21 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 22 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 23 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 24 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 25 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 26 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 27 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +[2026-08-14 18:19:52,147][isaaclab.sensors.camera.camera][INFO] - Using renderer: NewtonWarpRenderer +[2026-08-14 18:19:52,175][isaaclab_newton.physics.newton_manager][INFO] - Adding contact sensor for /World/envs/env_.*/Robot/.* with filter all bodies/shapes +[2026-08-14 18:19:52,180][isaaclab_newton.sensors.contact_sensor.contact_sensor][INFO] - Contact sensor initialized with 30 sensors. +[2026-08-14 18:19:52,180][isaaclab_newton.sensors.contact_sensor.contact_sensor][INFO] - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +[2026-08-14 18:19:52,180][isaaclab_newton.sensors.contact_sensor.contact_sensor_data][INFO] - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +[2026-08-14 18:19:57,083][isaaclab_newton.physics._cubric][WARNING] - cubric IAdapter minor version newer than this shim was validated against: plugin reports v0.2, shim is pinned to v0.1. Proceeding under semver minor-compatibility — if transforms misbehave, verify the vtable layout against omni/cubric/IAdapter.h. +[2026-08-14 18:19:57,084][isaaclab_newton.physics._cubric][INFO] - cubric IAdapter bindings ready +[2026-08-14 18:19:57,084][isaaclab_newton.physics.newton_manager][INFO] - cubric bindings ready (adapter deferred to first render) +[2026-08-14 18:19:57,084][isaaclab_newton.physics.newton_manager][INFO] - Newton CUDA graph capture deferred until first step() (RTX active) +[2026-08-14 18:19:58,980][isaaclab.envs.mdp.actions.joint_actions][INFO] - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'left_hip_roll_joint', 'left_hip_yaw_joint', 'left_knee_joint', 'left_ankle_pitch_joint', 'left_ankle_roll_joint', 'right_hip_pitch_joint', 'right_hip_roll_joint', 'right_hip_yaw_joint', 'right_knee_joint', 'right_ankle_pitch_joint', 'right_ankle_roll_joint', 'waist_yaw_joint', 'waist_roll_joint', 'waist_pitch_joint', 'left_shoulder_pitch_joint', 'left_shoulder_roll_joint', 'left_shoulder_yaw_joint', 'left_elbow_joint', 'left_wrist_roll_joint', 'left_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_shoulder_pitch_joint', 'right_shoulder_roll_joint', 'right_shoulder_yaw_joint', 'right_elbow_joint', 'right_wrist_roll_joint', 'right_wrist_pitch_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_182206-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_182206-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..35b05e2291929bc56f854f05d606a5fcf8c15ed7 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_182206-TEST/.hydra/config.yaml @@ -0,0 +1,40 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + smpl_motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + config: + render_results: true + render_width: 640 + render_height: 368 + events: + physics_material: null + add_joint_default_pos: null + base_com: null + randomize_rigid_body_mass: null +checkpoint: /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +num_envs: 1 +headless: true +use_wandb: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_182206-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_182206-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..35807ed4b9240ea96fbdeae141eb769a6bb66526 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_182206-TEST/.hydra/hydra.yaml @@ -0,0 +1,168 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + - +num_envs=1 + - +headless=true + - +use_wandb=false + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + - ++manager_env.config.render_results=true + - ++manager_env.config.render_width=640 + - ++manager_env.config.render_height=368 + - ++manager_env.events.physics_material=null + - ++manager_env.events.add_joint_default_pos=null + - ++manager_env.events.base_com=null + - ++manager_env.events.randomize_rigid_body_mass=null + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered,++manager_env.config.render_height=368,++manager_env.config.render_results=true,++manager_env.config.render_width=640,++manager_env.events.add_joint_default_pos=null,++manager_env.events.base_com=null,++manager_env.events.physics_material=null,++manager_env.events.randomize_rigid_body_mass=null,+headless=true,+num_envs=1,+use_wandb=false,checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260814_182206-TEST + choices: + manager_env/recorders: empty + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_182206-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_182206-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..122746eb732d9716968ccf0003c50c9f0ae475ca --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_182206-TEST/.hydra/overrides.yaml @@ -0,0 +1,13 @@ +- checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +- +num_envs=1 +- +headless=true +- +use_wandb=false +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered +- ++manager_env.config.render_results=true +- ++manager_env.config.render_width=640 +- ++manager_env.config.render_height=368 +- ++manager_env.events.physics_material=null +- ++manager_env.events.add_joint_default_pos=null +- ++manager_env.events.base_com=null +- ++manager_env.events.randomize_rigid_body_mass=null diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_182206-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260814_182206-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..d863d3b2832d82245f41311592dfb94272396704 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_182206-TEST/eval.log @@ -0,0 +1,187 @@ +2026-08-14 18:22:06.548 | INFO | __main__:main:90 - Loading training config file from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/config.yaml +2026-08-14 18:22:10.261 | WARNING | logging:callHandlers:1762 - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +2026-08-14 18:22:10.264 | INFO | logging:callHandlers:1762 - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +2026-08-14 18:22:10.265 | INFO | logging:callHandlers:1762 - Using device: cuda +2026-08-14 18:22:10.266 | INFO | logging:callHandlers:1762 - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.rendering.kit +2026-08-14 18:22:10.490 | DEBUG | logging:callHandlers:1762 - Using selector: EpollSelector +2026-08-14 18:22:18.468 | DEBUG | logging:callHandlers:1762 - Defining data type 'any' as 'Any' +2026-08-14 18:22:18.469 | DEBUG | logging:callHandlers:1762 - Defining data type 'bool' as 'Bool' and array 'BoolArray +2026-08-14 18:22:18.469 | DEBUG | logging:callHandlers:1762 - Defining data type 'bundle' as 'Bundle' +2026-08-14 18:22:18.470 | DEBUG | logging:callHandlers:1762 - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +2026-08-14 18:22:18.470 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +2026-08-14 18:22:18.470 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +2026-08-14 18:22:18.471 | DEBUG | logging:callHandlers:1762 - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +2026-08-14 18:22:18.471 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +2026-08-14 18:22:18.471 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +2026-08-14 18:22:18.472 | DEBUG | logging:callHandlers:1762 - Defining data type 'double' as 'Double' and array 'DoubleArray +2026-08-14 18:22:18.472 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +2026-08-14 18:22:18.472 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +2026-08-14 18:22:18.472 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +2026-08-14 18:22:18.473 | DEBUG | logging:callHandlers:1762 - Defining data type 'execution' as 'Execution' +2026-08-14 18:22:18.473 | DEBUG | logging:callHandlers:1762 - Defining data type 'float' as 'Float' and array 'FloatArray +2026-08-14 18:22:18.473 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +2026-08-14 18:22:18.474 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +2026-08-14 18:22:18.474 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +2026-08-14 18:22:18.474 | DEBUG | logging:callHandlers:1762 - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +2026-08-14 18:22:18.475 | DEBUG | logging:callHandlers:1762 - Defining data type 'half' as 'Half' and array 'HalfArray +2026-08-14 18:22:18.475 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +2026-08-14 18:22:18.475 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +2026-08-14 18:22:18.475 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +2026-08-14 18:22:18.476 | DEBUG | logging:callHandlers:1762 - Defining data type 'int' as 'Int' and array 'IntArray +2026-08-14 18:22:18.476 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +2026-08-14 18:22:18.476 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +2026-08-14 18:22:18.477 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +2026-08-14 18:22:18.477 | DEBUG | logging:callHandlers:1762 - Defining data type 'int64' as 'Int64' and array 'Int64Array +2026-08-14 18:22:18.477 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +2026-08-14 18:22:18.478 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +2026-08-14 18:22:18.478 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +2026-08-14 18:22:18.478 | DEBUG | logging:callHandlers:1762 - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +2026-08-14 18:22:18.479 | DEBUG | logging:callHandlers:1762 - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +2026-08-14 18:22:18.479 | DEBUG | logging:callHandlers:1762 - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +2026-08-14 18:22:18.479 | DEBUG | logging:callHandlers:1762 - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +2026-08-14 18:22:18.479 | DEBUG | logging:callHandlers:1762 - Defining data type 'path' as 'Path' +2026-08-14 18:22:18.480 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +2026-08-14 18:22:18.480 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +2026-08-14 18:22:18.480 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +2026-08-14 18:22:18.481 | DEBUG | logging:callHandlers:1762 - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +2026-08-14 18:22:18.481 | DEBUG | logging:callHandlers:1762 - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +2026-08-14 18:22:18.481 | DEBUG | logging:callHandlers:1762 - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +2026-08-14 18:22:18.481 | DEBUG | logging:callHandlers:1762 - Defining data type 'string' as 'String' +2026-08-14 18:22:18.482 | DEBUG | logging:callHandlers:1762 - Defining data type 'target' as 'Target' +2026-08-14 18:22:18.482 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +2026-08-14 18:22:18.482 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +2026-08-14 18:22:18.483 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +2026-08-14 18:22:18.483 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +2026-08-14 18:22:18.483 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +2026-08-14 18:22:18.483 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +2026-08-14 18:22:18.484 | DEBUG | logging:callHandlers:1762 - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +2026-08-14 18:22:18.484 | DEBUG | logging:callHandlers:1762 - Defining data type 'token' as 'Token' and array 'TokenArray +2026-08-14 18:22:18.484 | DEBUG | logging:callHandlers:1762 - Defining data type 'uchar' as 'UChar' and array 'UCharArray +2026-08-14 18:22:18.485 | DEBUG | logging:callHandlers:1762 - Defining data type 'uint' as 'UInt' and array 'UIntArray +2026-08-14 18:22:18.485 | DEBUG | logging:callHandlers:1762 - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +2026-08-14 18:22:18.485 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +2026-08-14 18:22:18.486 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +2026-08-14 18:22:18.486 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +2026-08-14 18:22:25.934 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch +2026-08-14 18:22:32.448 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory Articulation. +2026-08-14 18:22:32.594 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +2026-08-14 18:22:32.609 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:22:33.286 | INFO | logging:callHandlers:1762 - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +2026-08-14 18:22:33.294 | INFO | logging:callHandlers:1762 - Applied RobotAPI to prim /g1 +2026-08-14 18:22:33.301 | INFO | logging:callHandlers:1762 - Set isaac:robotType = 'Default' on /g1 +2026-08-14 18:22:33.302 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.302 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.303 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.303 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.304 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.304 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.305 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.305 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.306 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.306 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.307 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.307 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.308 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.308 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.309 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.309 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.310 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.310 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.311 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.311 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.312 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.312 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.313 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.313 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.314 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.314 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.315 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.315 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.316 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:22:33.338 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:22:33.419 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_182232_6311/main/payloads/base.usda +2026-08-14 18:22:33.962 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_182232_6311/main/main.usda +2026-08-14 18:22:33.968 | INFO | logging:callHandlers:1762 - Skipping disabled rule: Delete Newton Redundant APIs +2026-08-14 18:22:34.360 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory FrameView. +2026-08-14 18:22:34.418 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory ContactSensor. +2026-08-14 18:22:38.701 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory Renderer. +2026-08-14 18:22:38.702 | INFO | logging:callHandlers:1762 - Created new renderer for simulation: NewtonWarpRenderer +2026-08-14 18:22:38.703 | INFO | logging:callHandlers:1762 - Dispatching MODEL_INIT callbacks +2026-08-14 18:22:38.703 | INFO | logging:callHandlers:1762 - Finalizing model on device: cuda:0 +2026-08-14 18:22:42.322 | INFO | logging:callHandlers:1762 - Dispatching PHYSICS_READY callbacks +2026-08-14 18:22:42.568 | INFO | logging:callHandlers:1762 - Simulation parameters for joints in /World/envs/env_.*/Robot: ++-------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 2 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 3 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 4 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 5 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 6 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 7 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 8 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 9 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 11 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 12 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 13 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 14 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 15 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 16 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 17 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 18 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 19 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 20 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 21 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 22 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 23 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 24 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 25 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 26 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 27 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +2026-08-14 18:22:42.571 | INFO | logging:callHandlers:1762 - Using renderer: NewtonWarpRenderer +2026-08-14 18:22:42.599 | INFO | logging:callHandlers:1762 - Adding contact sensor for /World/envs/env_.*/Robot/.* with filter all bodies/shapes +2026-08-14 18:22:42.604 | INFO | logging:callHandlers:1762 - Contact sensor initialized with 30 sensors. +2026-08-14 18:22:42.604 | INFO | logging:callHandlers:1762 - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +2026-08-14 18:22:42.605 | INFO | logging:callHandlers:1762 - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +2026-08-14 18:22:47.734 | WARNING | logging:callHandlers:1762 - cubric IAdapter minor version newer than this shim was validated against: plugin reports v0.2, shim is pinned to v0.1. Proceeding under semver minor-compatibility — if transforms misbehave, verify the vtable layout against omni/cubric/IAdapter.h. +2026-08-14 18:22:47.735 | INFO | logging:callHandlers:1762 - cubric IAdapter bindings ready +2026-08-14 18:22:47.735 | INFO | logging:callHandlers:1762 - cubric bindings ready (adapter deferred to first render) +2026-08-14 18:22:47.735 | INFO | logging:callHandlers:1762 - Newton CUDA graph capture deferred until first step() (RTX active) +2026-08-14 18:22:47.843 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:235 - Loaded skeleton from gear_sonic/data/assets/robot_description/mjcf/g1_29dof_rev_1_0.xml +2026-08-14 18:22:47.843 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:236 - Loading motion data from /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered... +2026-08-14 18:22:47.844 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_data:472 - Loaded 2 motions +2026-08-14 18:22:48.789 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1091 - Loading 1 motions... +2026-08-14 18:22:48.791 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1092 - Sampling motion: tensor([1], device='cuda:0'), .... +2026-08-14 18:22:48.791 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1093 - Current motion keys: ['walk_forward_amateur_001__A001'], .... +2026-08-14 18:22:48.791 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1120 - Increased file descriptor limits from 2450/1048576 to 1048576/1048576 +2026-08-14 18:22:48.875 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1140 - Loading motions with 1 jobs... +2026-08-14 18:22:49.114 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1577 - Loaded 1 motions with a total length of 40.020s and 2002 frames. +2026-08-14 18:22:49.806 | INFO | logging:callHandlers:1762 - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'left_hip_roll_joint', 'left_hip_yaw_joint', 'left_knee_joint', 'left_ankle_pitch_joint', 'left_ankle_roll_joint', 'right_hip_pitch_joint', 'right_hip_roll_joint', 'right_hip_yaw_joint', 'right_knee_joint', 'right_ankle_pitch_joint', 'right_ankle_roll_joint', 'waist_yaw_joint', 'waist_roll_joint', 'waist_pitch_joint', 'left_shoulder_pitch_joint', 'left_shoulder_roll_joint', 'left_shoulder_yaw_joint', 'left_elbow_joint', 'left_wrist_roll_joint', 'left_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_shoulder_pitch_joint', 'right_shoulder_roll_joint', 'right_shoulder_yaw_joint', 'right_elbow_joint', 'right_wrist_roll_joint', 'right_wrist_pitch_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] +2026-08-14 18:22:50.573 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_grid:1227 - Setting up replay grid: 1 rows x 1 cols with 2.0m spacing +2026-08-14 18:22:50.573 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_grid:1247 - Grid bounds: X=[0.0, 0.0], Y=[0.0, 0.0] +2026-08-14 18:22:50.582 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1440 - +============================================================ +2026-08-14 18:22:50.582 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1441 - Batch Replaying 1 Environments +2026-08-14 18:22:50.582 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1442 - Unique motion IDs: [0] +2026-08-14 18:22:50.583 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1443 - Max frames: 100 +2026-08-14 18:22:50.583 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1444 - Max duration: 2.00s (@ 50 FPS) +2026-08-14 18:22:50.583 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1445 - Speed: 1.0x +2026-08-14 18:22:50.583 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1446 - ============================================================ + +2026-08-14 18:22:50.583 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1667 - Replay Controls: +2026-08-14 18:22:50.583 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1668 - G: Pause/Resume +2026-08-14 18:22:50.583 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1669 - B: Toggle Reverse Play +2026-08-14 18:22:50.583 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1670 - LEFT/RIGHT: Step backward/forward (when paused) +2026-08-14 18:22:50.583 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1671 - R: Restart from beginning +2026-08-14 18:22:50.583 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1672 - ESC: Exit replay +2026-08-14 18:22:50.583 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1673 - +/-: Increase/Decrease speed +2026-08-14 18:22:50.583 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1674 - +2026-08-14 18:22:51.191 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:step_replay:2096 - Progress: 50.0% (max frame 50/100) +2026-08-14 18:22:51.539 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:step_replay:2085 - Replay complete! diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_182206-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260814_182206-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..ca611133db39b69cb7cc027c4e486f6914490a19 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_182206-TEST/eval_agent_trl.log @@ -0,0 +1,155 @@ +[2026-08-14 18:22:10,261][isaaclab.app.app_launcher][WARNING] - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +[2026-08-14 18:22:10,264][isaaclab.app.app_launcher][INFO] - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +[2026-08-14 18:22:10,264][isaaclab.app.app_launcher][INFO] - Using device: cuda +[2026-08-14 18:22:10,266][isaaclab.app.app_launcher][INFO] - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.rendering.kit +[2026-08-14 18:22:10,490][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-14 18:22:18,467][AutoNode][DEBUG] - Defining data type 'any' as 'Any' +[2026-08-14 18:22:18,468][AutoNode][DEBUG] - Defining data type 'bool' as 'Bool' and array 'BoolArray +[2026-08-14 18:22:18,469][AutoNode][DEBUG] - Defining data type 'bundle' as 'Bundle' +[2026-08-14 18:22:18,469][AutoNode][DEBUG] - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +[2026-08-14 18:22:18,470][AutoNode][DEBUG] - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +[2026-08-14 18:22:18,470][AutoNode][DEBUG] - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +[2026-08-14 18:22:18,470][AutoNode][DEBUG] - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +[2026-08-14 18:22:18,471][AutoNode][DEBUG] - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +[2026-08-14 18:22:18,471][AutoNode][DEBUG] - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +[2026-08-14 18:22:18,471][AutoNode][DEBUG] - Defining data type 'double' as 'Double' and array 'DoubleArray +[2026-08-14 18:22:18,472][AutoNode][DEBUG] - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +[2026-08-14 18:22:18,472][AutoNode][DEBUG] - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +[2026-08-14 18:22:18,472][AutoNode][DEBUG] - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +[2026-08-14 18:22:18,473][AutoNode][DEBUG] - Defining data type 'execution' as 'Execution' +[2026-08-14 18:22:18,473][AutoNode][DEBUG] - Defining data type 'float' as 'Float' and array 'FloatArray +[2026-08-14 18:22:18,473][AutoNode][DEBUG] - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +[2026-08-14 18:22:18,474][AutoNode][DEBUG] - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +[2026-08-14 18:22:18,474][AutoNode][DEBUG] - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +[2026-08-14 18:22:18,474][AutoNode][DEBUG] - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +[2026-08-14 18:22:18,474][AutoNode][DEBUG] - Defining data type 'half' as 'Half' and array 'HalfArray +[2026-08-14 18:22:18,475][AutoNode][DEBUG] - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +[2026-08-14 18:22:18,475][AutoNode][DEBUG] - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +[2026-08-14 18:22:18,475][AutoNode][DEBUG] - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +[2026-08-14 18:22:18,476][AutoNode][DEBUG] - Defining data type 'int' as 'Int' and array 'IntArray +[2026-08-14 18:22:18,476][AutoNode][DEBUG] - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +[2026-08-14 18:22:18,476][AutoNode][DEBUG] - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +[2026-08-14 18:22:18,477][AutoNode][DEBUG] - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +[2026-08-14 18:22:18,477][AutoNode][DEBUG] - Defining data type 'int64' as 'Int64' and array 'Int64Array +[2026-08-14 18:22:18,477][AutoNode][DEBUG] - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +[2026-08-14 18:22:18,478][AutoNode][DEBUG] - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +[2026-08-14 18:22:18,478][AutoNode][DEBUG] - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +[2026-08-14 18:22:18,478][AutoNode][DEBUG] - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +[2026-08-14 18:22:18,478][AutoNode][DEBUG] - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +[2026-08-14 18:22:18,479][AutoNode][DEBUG] - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +[2026-08-14 18:22:18,479][AutoNode][DEBUG] - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +[2026-08-14 18:22:18,479][AutoNode][DEBUG] - Defining data type 'path' as 'Path' +[2026-08-14 18:22:18,480][AutoNode][DEBUG] - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +[2026-08-14 18:22:18,480][AutoNode][DEBUG] - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +[2026-08-14 18:22:18,480][AutoNode][DEBUG] - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +[2026-08-14 18:22:18,481][AutoNode][DEBUG] - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +[2026-08-14 18:22:18,481][AutoNode][DEBUG] - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +[2026-08-14 18:22:18,481][AutoNode][DEBUG] - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +[2026-08-14 18:22:18,481][AutoNode][DEBUG] - Defining data type 'string' as 'String' +[2026-08-14 18:22:18,482][AutoNode][DEBUG] - Defining data type 'target' as 'Target' +[2026-08-14 18:22:18,482][AutoNode][DEBUG] - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +[2026-08-14 18:22:18,482][AutoNode][DEBUG] - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +[2026-08-14 18:22:18,482][AutoNode][DEBUG] - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +[2026-08-14 18:22:18,483][AutoNode][DEBUG] - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +[2026-08-14 18:22:18,483][AutoNode][DEBUG] - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +[2026-08-14 18:22:18,483][AutoNode][DEBUG] - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +[2026-08-14 18:22:18,484][AutoNode][DEBUG] - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +[2026-08-14 18:22:18,484][AutoNode][DEBUG] - Defining data type 'token' as 'Token' and array 'TokenArray +[2026-08-14 18:22:18,484][AutoNode][DEBUG] - Defining data type 'uchar' as 'UChar' and array 'UCharArray +[2026-08-14 18:22:18,484][AutoNode][DEBUG] - Defining data type 'uint' as 'UInt' and array 'UIntArray +[2026-08-14 18:22:18,485][AutoNode][DEBUG] - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +[2026-08-14 18:22:18,485][AutoNode][DEBUG] - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +[2026-08-14 18:22:18,485][AutoNode][DEBUG] - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +[2026-08-14 18:22:18,486][AutoNode][DEBUG] - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +[2026-08-14 18:22:32,448][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory Articulation. +[2026-08-14 18:22:32,594][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +[2026-08-14 18:22:32,608][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:22:33,286][isaacsim.asset.importer.utils.impl.asset_utils][INFO] - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +[2026-08-14 18:22:33,294][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Applied RobotAPI to prim /g1 +[2026-08-14 18:22:33,300][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Set isaac:robotType = 'Default' on /g1 +[2026-08-14 18:22:33,302][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,302][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,303][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,303][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,304][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,304][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,305][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,305][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,306][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,306][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,307][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,307][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,308][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,308][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,309][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,309][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,310][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,310][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,311][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,311][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,312][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,312][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,313][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,313][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,314][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,314][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,315][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,315][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,316][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:22:33,338][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:22:33,418][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_182232_6311/main/payloads/base.usda +[2026-08-14 18:22:33,962][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_182232_6311/main/main.usda +[2026-08-14 18:22:33,968][isaacsim.asset.transformer.manager][INFO] - Skipping disabled rule: Delete Newton Redundant APIs +[2026-08-14 18:22:34,360][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory FrameView. +[2026-08-14 18:22:34,418][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory ContactSensor. +[2026-08-14 18:22:38,701][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory Renderer. +[2026-08-14 18:22:38,702][isaaclab.renderers.render_context][INFO] - Created new renderer for simulation: NewtonWarpRenderer +[2026-08-14 18:22:38,702][isaaclab_newton.physics.newton_manager][INFO] - Dispatching MODEL_INIT callbacks +[2026-08-14 18:22:38,703][isaaclab_newton.physics.newton_manager][INFO] - Finalizing model on device: cuda:0 +[2026-08-14 18:22:42,322][isaaclab_newton.physics.newton_manager][INFO] - Dispatching PHYSICS_READY callbacks +[2026-08-14 18:22:42,568][isaaclab_newton.assets.articulation.articulation][INFO] - Simulation parameters for joints in /World/envs/env_.*/Robot: ++-------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 2 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 3 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 4 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 5 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 6 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 7 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 8 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 9 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 11 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 12 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 13 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 14 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 15 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 16 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 17 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 18 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 19 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 20 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 21 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 22 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 23 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 24 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 25 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 26 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 27 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +[2026-08-14 18:22:42,570][isaaclab.sensors.camera.camera][INFO] - Using renderer: NewtonWarpRenderer +[2026-08-14 18:22:42,599][isaaclab_newton.physics.newton_manager][INFO] - Adding contact sensor for /World/envs/env_.*/Robot/.* with filter all bodies/shapes +[2026-08-14 18:22:42,604][isaaclab_newton.sensors.contact_sensor.contact_sensor][INFO] - Contact sensor initialized with 30 sensors. +[2026-08-14 18:22:42,604][isaaclab_newton.sensors.contact_sensor.contact_sensor][INFO] - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +[2026-08-14 18:22:42,605][isaaclab_newton.sensors.contact_sensor.contact_sensor_data][INFO] - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +[2026-08-14 18:22:47,734][isaaclab_newton.physics._cubric][WARNING] - cubric IAdapter minor version newer than this shim was validated against: plugin reports v0.2, shim is pinned to v0.1. Proceeding under semver minor-compatibility — if transforms misbehave, verify the vtable layout against omni/cubric/IAdapter.h. +[2026-08-14 18:22:47,735][isaaclab_newton.physics._cubric][INFO] - cubric IAdapter bindings ready +[2026-08-14 18:22:47,735][isaaclab_newton.physics.newton_manager][INFO] - cubric bindings ready (adapter deferred to first render) +[2026-08-14 18:22:47,735][isaaclab_newton.physics.newton_manager][INFO] - Newton CUDA graph capture deferred until first step() (RTX active) +[2026-08-14 18:22:49,806][isaaclab.envs.mdp.actions.joint_actions][INFO] - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'left_hip_roll_joint', 'left_hip_yaw_joint', 'left_knee_joint', 'left_ankle_pitch_joint', 'left_ankle_roll_joint', 'right_hip_pitch_joint', 'right_hip_roll_joint', 'right_hip_yaw_joint', 'right_knee_joint', 'right_ankle_pitch_joint', 'right_ankle_roll_joint', 'waist_yaw_joint', 'waist_roll_joint', 'waist_pitch_joint', 'left_shoulder_pitch_joint', 'left_shoulder_roll_joint', 'left_shoulder_yaw_joint', 'left_elbow_joint', 'left_wrist_roll_joint', 'left_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_shoulder_pitch_joint', 'right_shoulder_roll_joint', 'right_shoulder_yaw_joint', 'right_elbow_joint', 'right_wrist_roll_joint', 'right_wrist_pitch_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_182433-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_182433-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..35b05e2291929bc56f854f05d606a5fcf8c15ed7 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_182433-TEST/.hydra/config.yaml @@ -0,0 +1,40 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + smpl_motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + config: + render_results: true + render_width: 640 + render_height: 368 + events: + physics_material: null + add_joint_default_pos: null + base_com: null + randomize_rigid_body_mass: null +checkpoint: /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +num_envs: 1 +headless: true +use_wandb: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_182433-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_182433-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..80ca73b424436baa9e5e76cf6cc41519f115ea6b --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_182433-TEST/.hydra/hydra.yaml @@ -0,0 +1,168 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + - +num_envs=1 + - +headless=true + - +use_wandb=false + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + - ++manager_env.config.render_results=true + - ++manager_env.config.render_width=640 + - ++manager_env.config.render_height=368 + - ++manager_env.events.physics_material=null + - ++manager_env.events.add_joint_default_pos=null + - ++manager_env.events.base_com=null + - ++manager_env.events.randomize_rigid_body_mass=null + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered,++manager_env.config.render_height=368,++manager_env.config.render_results=true,++manager_env.config.render_width=640,++manager_env.events.add_joint_default_pos=null,++manager_env.events.base_com=null,++manager_env.events.physics_material=null,++manager_env.events.randomize_rigid_body_mass=null,+headless=true,+num_envs=1,+use_wandb=false,checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260814_182433-TEST + choices: + manager_env/recorders: empty + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_182433-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_182433-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..122746eb732d9716968ccf0003c50c9f0ae475ca --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_182433-TEST/.hydra/overrides.yaml @@ -0,0 +1,13 @@ +- checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +- +num_envs=1 +- +headless=true +- +use_wandb=false +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered +- ++manager_env.config.render_results=true +- ++manager_env.config.render_width=640 +- ++manager_env.config.render_height=368 +- ++manager_env.events.physics_material=null +- ++manager_env.events.add_joint_default_pos=null +- ++manager_env.events.base_com=null +- ++manager_env.events.randomize_rigid_body_mass=null diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_182433-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260814_182433-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..3744a23d094b0906b9961a87265b96e0f205ed7b --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_182433-TEST/eval.log @@ -0,0 +1,185 @@ +2026-08-14 18:24:33.059 | INFO | __main__:main:90 - Loading training config file from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/config.yaml +2026-08-14 18:24:36.728 | WARNING | logging:callHandlers:1762 - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +2026-08-14 18:24:36.731 | INFO | logging:callHandlers:1762 - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +2026-08-14 18:24:36.731 | INFO | logging:callHandlers:1762 - Using device: cuda +2026-08-14 18:24:36.733 | INFO | logging:callHandlers:1762 - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.rendering.kit +2026-08-14 18:24:36.948 | DEBUG | logging:callHandlers:1762 - Using selector: EpollSelector +2026-08-14 18:24:44.936 | DEBUG | logging:callHandlers:1762 - Defining data type 'any' as 'Any' +2026-08-14 18:24:44.936 | DEBUG | logging:callHandlers:1762 - Defining data type 'bool' as 'Bool' and array 'BoolArray +2026-08-14 18:24:44.936 | DEBUG | logging:callHandlers:1762 - Defining data type 'bundle' as 'Bundle' +2026-08-14 18:24:44.936 | DEBUG | logging:callHandlers:1762 - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +2026-08-14 18:24:44.936 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +2026-08-14 18:24:44.936 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +2026-08-14 18:24:44.937 | DEBUG | logging:callHandlers:1762 - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +2026-08-14 18:24:44.937 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +2026-08-14 18:24:44.937 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +2026-08-14 18:24:44.937 | DEBUG | logging:callHandlers:1762 - Defining data type 'double' as 'Double' and array 'DoubleArray +2026-08-14 18:24:44.937 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +2026-08-14 18:24:44.937 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +2026-08-14 18:24:44.937 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +2026-08-14 18:24:44.937 | DEBUG | logging:callHandlers:1762 - Defining data type 'execution' as 'Execution' +2026-08-14 18:24:44.937 | DEBUG | logging:callHandlers:1762 - Defining data type 'float' as 'Float' and array 'FloatArray +2026-08-14 18:24:44.937 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +2026-08-14 18:24:44.938 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +2026-08-14 18:24:44.938 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +2026-08-14 18:24:44.938 | DEBUG | logging:callHandlers:1762 - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +2026-08-14 18:24:44.938 | DEBUG | logging:callHandlers:1762 - Defining data type 'half' as 'Half' and array 'HalfArray +2026-08-14 18:24:44.938 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +2026-08-14 18:24:44.938 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +2026-08-14 18:24:44.938 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +2026-08-14 18:24:44.938 | DEBUG | logging:callHandlers:1762 - Defining data type 'int' as 'Int' and array 'IntArray +2026-08-14 18:24:44.938 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +2026-08-14 18:24:44.939 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +2026-08-14 18:24:44.939 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +2026-08-14 18:24:44.939 | DEBUG | logging:callHandlers:1762 - Defining data type 'int64' as 'Int64' and array 'Int64Array +2026-08-14 18:24:44.939 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +2026-08-14 18:24:44.939 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +2026-08-14 18:24:44.939 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +2026-08-14 18:24:44.939 | DEBUG | logging:callHandlers:1762 - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +2026-08-14 18:24:44.939 | DEBUG | logging:callHandlers:1762 - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +2026-08-14 18:24:44.939 | DEBUG | logging:callHandlers:1762 - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +2026-08-14 18:24:44.940 | DEBUG | logging:callHandlers:1762 - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +2026-08-14 18:24:44.940 | DEBUG | logging:callHandlers:1762 - Defining data type 'path' as 'Path' +2026-08-14 18:24:44.940 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +2026-08-14 18:24:44.940 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +2026-08-14 18:24:44.940 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +2026-08-14 18:24:44.940 | DEBUG | logging:callHandlers:1762 - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +2026-08-14 18:24:44.940 | DEBUG | logging:callHandlers:1762 - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +2026-08-14 18:24:44.940 | DEBUG | logging:callHandlers:1762 - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +2026-08-14 18:24:44.940 | DEBUG | logging:callHandlers:1762 - Defining data type 'string' as 'String' +2026-08-14 18:24:44.941 | DEBUG | logging:callHandlers:1762 - Defining data type 'target' as 'Target' +2026-08-14 18:24:44.941 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +2026-08-14 18:24:44.941 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +2026-08-14 18:24:44.941 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +2026-08-14 18:24:44.941 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +2026-08-14 18:24:44.941 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +2026-08-14 18:24:44.941 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +2026-08-14 18:24:44.941 | DEBUG | logging:callHandlers:1762 - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +2026-08-14 18:24:44.941 | DEBUG | logging:callHandlers:1762 - Defining data type 'token' as 'Token' and array 'TokenArray +2026-08-14 18:24:44.941 | DEBUG | logging:callHandlers:1762 - Defining data type 'uchar' as 'UChar' and array 'UCharArray +2026-08-14 18:24:44.942 | DEBUG | logging:callHandlers:1762 - Defining data type 'uint' as 'UInt' and array 'UIntArray +2026-08-14 18:24:44.942 | DEBUG | logging:callHandlers:1762 - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +2026-08-14 18:24:44.942 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +2026-08-14 18:24:44.942 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +2026-08-14 18:24:44.942 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +2026-08-14 18:24:51.098 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch +2026-08-14 18:24:57.889 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory Articulation. +2026-08-14 18:24:58.030 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +2026-08-14 18:24:58.041 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:24:58.654 | INFO | logging:callHandlers:1762 - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +2026-08-14 18:24:58.661 | INFO | logging:callHandlers:1762 - Applied RobotAPI to prim /g1 +2026-08-14 18:24:58.667 | INFO | logging:callHandlers:1762 - Set isaac:robotType = 'Default' on /g1 +2026-08-14 18:24:58.668 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.669 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.669 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.670 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.670 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.671 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.671 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.672 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.672 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.673 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.673 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.674 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.674 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.675 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.675 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.676 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.676 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.677 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.677 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.678 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.679 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.679 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.680 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.680 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.681 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.681 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.682 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.682 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.683 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:24:58.706 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:24:58.785 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_182458_6311/main/payloads/base.usda +2026-08-14 18:24:59.317 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_182458_6311/main/main.usda +2026-08-14 18:24:59.323 | INFO | logging:callHandlers:1762 - Skipping disabled rule: Delete Newton Redundant APIs +2026-08-14 18:24:59.711 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory FrameView. +2026-08-14 18:24:59.765 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory ContactSensor. +2026-08-14 18:25:03.920 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory Renderer. +2026-08-14 18:25:03.920 | INFO | logging:callHandlers:1762 - Created new renderer for simulation: NewtonWarpRenderer +2026-08-14 18:25:03.921 | INFO | logging:callHandlers:1762 - Dispatching MODEL_INIT callbacks +2026-08-14 18:25:03.921 | INFO | logging:callHandlers:1762 - Finalizing model on device: cuda:0 +2026-08-14 18:25:08.013 | INFO | logging:callHandlers:1762 - Dispatching PHYSICS_READY callbacks +2026-08-14 18:25:08.261 | INFO | logging:callHandlers:1762 - Simulation parameters for joints in /World/envs/env_.*/Robot: ++-------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 2 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 3 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 4 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 5 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 6 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 7 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 8 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 9 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 11 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 12 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 13 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 14 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 15 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 16 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 17 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 18 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 19 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 20 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 21 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 22 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 23 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 24 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 25 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 26 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 27 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +2026-08-14 18:25:08.262 | INFO | logging:callHandlers:1762 - Using renderer: NewtonWarpRenderer +2026-08-14 18:25:08.289 | INFO | logging:callHandlers:1762 - Adding contact sensor for /World/envs/env_.*/Robot/.* with filter all bodies/shapes +2026-08-14 18:25:08.293 | INFO | logging:callHandlers:1762 - Contact sensor initialized with 30 sensors. +2026-08-14 18:25:08.293 | INFO | logging:callHandlers:1762 - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +2026-08-14 18:25:08.293 | INFO | logging:callHandlers:1762 - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +2026-08-14 18:25:13.539 | WARNING | logging:callHandlers:1762 - cubric IAdapter minor version newer than this shim was validated against: plugin reports v0.2, shim is pinned to v0.1. Proceeding under semver minor-compatibility — if transforms misbehave, verify the vtable layout against omni/cubric/IAdapter.h. +2026-08-14 18:25:13.539 | INFO | logging:callHandlers:1762 - cubric IAdapter bindings ready +2026-08-14 18:25:13.539 | INFO | logging:callHandlers:1762 - cubric bindings ready (adapter deferred to first render) +2026-08-14 18:25:13.539 | INFO | logging:callHandlers:1762 - Newton CUDA graph capture deferred until first step() (RTX active) +2026-08-14 18:25:13.635 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:235 - Loaded skeleton from gear_sonic/data/assets/robot_description/mjcf/g1_29dof_rev_1_0.xml +2026-08-14 18:25:13.635 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:236 - Loading motion data from /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered... +2026-08-14 18:25:13.636 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_data:472 - Loaded 2 motions +2026-08-14 18:25:14.188 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1091 - Loading 1 motions... +2026-08-14 18:25:14.189 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1092 - Sampling motion: tensor([1], device='cuda:0'), .... +2026-08-14 18:25:14.190 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1093 - Current motion keys: ['walk_forward_amateur_001__A001'], .... +2026-08-14 18:25:14.190 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1120 - Increased file descriptor limits from 2450/1048576 to 1048576/1048576 +2026-08-14 18:25:14.268 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1140 - Loading motions with 1 jobs... +2026-08-14 18:25:14.484 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1577 - Loaded 1 motions with a total length of 40.020s and 2002 frames. +2026-08-14 18:25:15.155 | INFO | logging:callHandlers:1762 - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'left_hip_roll_joint', 'left_hip_yaw_joint', 'left_knee_joint', 'left_ankle_pitch_joint', 'left_ankle_roll_joint', 'right_hip_pitch_joint', 'right_hip_roll_joint', 'right_hip_yaw_joint', 'right_knee_joint', 'right_ankle_pitch_joint', 'right_ankle_roll_joint', 'waist_yaw_joint', 'waist_roll_joint', 'waist_pitch_joint', 'left_shoulder_pitch_joint', 'left_shoulder_roll_joint', 'left_shoulder_yaw_joint', 'left_elbow_joint', 'left_wrist_roll_joint', 'left_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_shoulder_pitch_joint', 'right_shoulder_roll_joint', 'right_shoulder_yaw_joint', 'right_elbow_joint', 'right_wrist_roll_joint', 'right_wrist_pitch_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] +2026-08-14 18:25:15.920 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_grid:1227 - Setting up replay grid: 1 rows x 1 cols with 2.0m spacing +2026-08-14 18:25:15.921 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_grid:1247 - Grid bounds: X=[0.0, 0.0], Y=[0.0, 0.0] +2026-08-14 18:25:15.929 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1440 - +============================================================ +2026-08-14 18:25:15.929 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1441 - Batch Replaying 1 Environments +2026-08-14 18:25:15.929 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1442 - Unique motion IDs: [0] +2026-08-14 18:25:15.929 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1443 - Max frames: 2 +2026-08-14 18:25:15.929 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1444 - Max duration: 0.04s (@ 50 FPS) +2026-08-14 18:25:15.929 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1445 - Speed: 1.0x +2026-08-14 18:25:15.930 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1446 - ============================================================ + +2026-08-14 18:25:15.930 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1667 - Replay Controls: +2026-08-14 18:25:15.930 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1668 - G: Pause/Resume +2026-08-14 18:25:15.930 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1669 - B: Toggle Reverse Play +2026-08-14 18:25:15.930 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1670 - LEFT/RIGHT: Step backward/forward (when paused) +2026-08-14 18:25:15.930 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1671 - R: Restart from beginning +2026-08-14 18:25:15.930 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1672 - ESC: Exit replay +2026-08-14 18:25:15.930 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1673 - +/-: Increase/Decrease speed +2026-08-14 18:25:15.930 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1674 - diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_182433-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260814_182433-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..b2634053432a2850cd98b3bcd9418fc02d12dd94 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_182433-TEST/eval_agent_trl.log @@ -0,0 +1,155 @@ +[2026-08-14 18:24:36,728][isaaclab.app.app_launcher][WARNING] - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +[2026-08-14 18:24:36,731][isaaclab.app.app_launcher][INFO] - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +[2026-08-14 18:24:36,731][isaaclab.app.app_launcher][INFO] - Using device: cuda +[2026-08-14 18:24:36,732][isaaclab.app.app_launcher][INFO] - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.rendering.kit +[2026-08-14 18:24:36,948][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-14 18:24:44,935][AutoNode][DEBUG] - Defining data type 'any' as 'Any' +[2026-08-14 18:24:44,936][AutoNode][DEBUG] - Defining data type 'bool' as 'Bool' and array 'BoolArray +[2026-08-14 18:24:44,936][AutoNode][DEBUG] - Defining data type 'bundle' as 'Bundle' +[2026-08-14 18:24:44,936][AutoNode][DEBUG] - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +[2026-08-14 18:24:44,936][AutoNode][DEBUG] - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +[2026-08-14 18:24:44,936][AutoNode][DEBUG] - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +[2026-08-14 18:24:44,936][AutoNode][DEBUG] - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +[2026-08-14 18:24:44,937][AutoNode][DEBUG] - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +[2026-08-14 18:24:44,937][AutoNode][DEBUG] - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +[2026-08-14 18:24:44,937][AutoNode][DEBUG] - Defining data type 'double' as 'Double' and array 'DoubleArray +[2026-08-14 18:24:44,937][AutoNode][DEBUG] - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +[2026-08-14 18:24:44,937][AutoNode][DEBUG] - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +[2026-08-14 18:24:44,937][AutoNode][DEBUG] - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +[2026-08-14 18:24:44,937][AutoNode][DEBUG] - Defining data type 'execution' as 'Execution' +[2026-08-14 18:24:44,937][AutoNode][DEBUG] - Defining data type 'float' as 'Float' and array 'FloatArray +[2026-08-14 18:24:44,937][AutoNode][DEBUG] - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +[2026-08-14 18:24:44,938][AutoNode][DEBUG] - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +[2026-08-14 18:24:44,938][AutoNode][DEBUG] - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +[2026-08-14 18:24:44,938][AutoNode][DEBUG] - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +[2026-08-14 18:24:44,938][AutoNode][DEBUG] - Defining data type 'half' as 'Half' and array 'HalfArray +[2026-08-14 18:24:44,938][AutoNode][DEBUG] - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +[2026-08-14 18:24:44,938][AutoNode][DEBUG] - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +[2026-08-14 18:24:44,938][AutoNode][DEBUG] - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +[2026-08-14 18:24:44,938][AutoNode][DEBUG] - Defining data type 'int' as 'Int' and array 'IntArray +[2026-08-14 18:24:44,938][AutoNode][DEBUG] - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +[2026-08-14 18:24:44,939][AutoNode][DEBUG] - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +[2026-08-14 18:24:44,939][AutoNode][DEBUG] - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +[2026-08-14 18:24:44,939][AutoNode][DEBUG] - Defining data type 'int64' as 'Int64' and array 'Int64Array +[2026-08-14 18:24:44,939][AutoNode][DEBUG] - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +[2026-08-14 18:24:44,939][AutoNode][DEBUG] - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +[2026-08-14 18:24:44,939][AutoNode][DEBUG] - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +[2026-08-14 18:24:44,939][AutoNode][DEBUG] - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +[2026-08-14 18:24:44,939][AutoNode][DEBUG] - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +[2026-08-14 18:24:44,939][AutoNode][DEBUG] - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +[2026-08-14 18:24:44,940][AutoNode][DEBUG] - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +[2026-08-14 18:24:44,940][AutoNode][DEBUG] - Defining data type 'path' as 'Path' +[2026-08-14 18:24:44,940][AutoNode][DEBUG] - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +[2026-08-14 18:24:44,940][AutoNode][DEBUG] - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +[2026-08-14 18:24:44,940][AutoNode][DEBUG] - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +[2026-08-14 18:24:44,940][AutoNode][DEBUG] - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +[2026-08-14 18:24:44,940][AutoNode][DEBUG] - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +[2026-08-14 18:24:44,940][AutoNode][DEBUG] - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +[2026-08-14 18:24:44,940][AutoNode][DEBUG] - Defining data type 'string' as 'String' +[2026-08-14 18:24:44,940][AutoNode][DEBUG] - Defining data type 'target' as 'Target' +[2026-08-14 18:24:44,941][AutoNode][DEBUG] - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +[2026-08-14 18:24:44,941][AutoNode][DEBUG] - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +[2026-08-14 18:24:44,941][AutoNode][DEBUG] - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +[2026-08-14 18:24:44,941][AutoNode][DEBUG] - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +[2026-08-14 18:24:44,941][AutoNode][DEBUG] - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +[2026-08-14 18:24:44,941][AutoNode][DEBUG] - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +[2026-08-14 18:24:44,941][AutoNode][DEBUG] - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +[2026-08-14 18:24:44,941][AutoNode][DEBUG] - Defining data type 'token' as 'Token' and array 'TokenArray +[2026-08-14 18:24:44,941][AutoNode][DEBUG] - Defining data type 'uchar' as 'UChar' and array 'UCharArray +[2026-08-14 18:24:44,942][AutoNode][DEBUG] - Defining data type 'uint' as 'UInt' and array 'UIntArray +[2026-08-14 18:24:44,942][AutoNode][DEBUG] - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +[2026-08-14 18:24:44,942][AutoNode][DEBUG] - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +[2026-08-14 18:24:44,942][AutoNode][DEBUG] - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +[2026-08-14 18:24:44,942][AutoNode][DEBUG] - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +[2026-08-14 18:24:57,889][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory Articulation. +[2026-08-14 18:24:58,029][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +[2026-08-14 18:24:58,041][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:24:58,653][isaacsim.asset.importer.utils.impl.asset_utils][INFO] - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +[2026-08-14 18:24:58,661][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Applied RobotAPI to prim /g1 +[2026-08-14 18:24:58,667][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Set isaac:robotType = 'Default' on /g1 +[2026-08-14 18:24:58,668][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,669][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,669][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,670][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,670][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,671][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,671][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,672][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,672][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,673][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,673][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,674][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,674][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,675][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,675][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,676][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,676][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,677][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,677][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,678][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,678][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,679][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,680][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,680][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,681][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,681][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,682][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,682][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,683][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:24:58,706][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:24:58,785][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_182458_6311/main/payloads/base.usda +[2026-08-14 18:24:59,317][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_182458_6311/main/main.usda +[2026-08-14 18:24:59,323][isaacsim.asset.transformer.manager][INFO] - Skipping disabled rule: Delete Newton Redundant APIs +[2026-08-14 18:24:59,711][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory FrameView. +[2026-08-14 18:24:59,765][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory ContactSensor. +[2026-08-14 18:25:03,920][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory Renderer. +[2026-08-14 18:25:03,920][isaaclab.renderers.render_context][INFO] - Created new renderer for simulation: NewtonWarpRenderer +[2026-08-14 18:25:03,921][isaaclab_newton.physics.newton_manager][INFO] - Dispatching MODEL_INIT callbacks +[2026-08-14 18:25:03,921][isaaclab_newton.physics.newton_manager][INFO] - Finalizing model on device: cuda:0 +[2026-08-14 18:25:08,012][isaaclab_newton.physics.newton_manager][INFO] - Dispatching PHYSICS_READY callbacks +[2026-08-14 18:25:08,261][isaaclab_newton.assets.articulation.articulation][INFO] - Simulation parameters for joints in /World/envs/env_.*/Robot: ++-------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 2 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 3 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 4 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 5 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 6 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 7 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 8 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 9 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 11 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 12 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 13 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 14 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 15 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 16 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 17 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 18 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 19 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 20 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 21 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 22 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 23 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 24 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 25 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 26 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 27 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +[2026-08-14 18:25:08,262][isaaclab.sensors.camera.camera][INFO] - Using renderer: NewtonWarpRenderer +[2026-08-14 18:25:08,288][isaaclab_newton.physics.newton_manager][INFO] - Adding contact sensor for /World/envs/env_.*/Robot/.* with filter all bodies/shapes +[2026-08-14 18:25:08,293][isaaclab_newton.sensors.contact_sensor.contact_sensor][INFO] - Contact sensor initialized with 30 sensors. +[2026-08-14 18:25:08,293][isaaclab_newton.sensors.contact_sensor.contact_sensor][INFO] - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +[2026-08-14 18:25:08,293][isaaclab_newton.sensors.contact_sensor.contact_sensor_data][INFO] - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +[2026-08-14 18:25:13,539][isaaclab_newton.physics._cubric][WARNING] - cubric IAdapter minor version newer than this shim was validated against: plugin reports v0.2, shim is pinned to v0.1. Proceeding under semver minor-compatibility — if transforms misbehave, verify the vtable layout against omni/cubric/IAdapter.h. +[2026-08-14 18:25:13,539][isaaclab_newton.physics._cubric][INFO] - cubric IAdapter bindings ready +[2026-08-14 18:25:13,539][isaaclab_newton.physics.newton_manager][INFO] - cubric bindings ready (adapter deferred to first render) +[2026-08-14 18:25:13,539][isaaclab_newton.physics.newton_manager][INFO] - Newton CUDA graph capture deferred until first step() (RTX active) +[2026-08-14 18:25:15,154][isaaclab.envs.mdp.actions.joint_actions][INFO] - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'left_hip_roll_joint', 'left_hip_yaw_joint', 'left_knee_joint', 'left_ankle_pitch_joint', 'left_ankle_roll_joint', 'right_hip_pitch_joint', 'right_hip_roll_joint', 'right_hip_yaw_joint', 'right_knee_joint', 'right_ankle_pitch_joint', 'right_ankle_roll_joint', 'waist_yaw_joint', 'waist_roll_joint', 'waist_pitch_joint', 'left_shoulder_pitch_joint', 'left_shoulder_roll_joint', 'left_shoulder_yaw_joint', 'left_elbow_joint', 'left_wrist_roll_joint', 'left_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_shoulder_pitch_joint', 'right_shoulder_roll_joint', 'right_shoulder_yaw_joint', 'right_elbow_joint', 'right_wrist_roll_joint', 'right_wrist_pitch_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_182553-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_182553-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..35b05e2291929bc56f854f05d606a5fcf8c15ed7 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_182553-TEST/.hydra/config.yaml @@ -0,0 +1,40 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + smpl_motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + config: + render_results: true + render_width: 640 + render_height: 368 + events: + physics_material: null + add_joint_default_pos: null + base_com: null + randomize_rigid_body_mass: null +checkpoint: /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +num_envs: 1 +headless: true +use_wandb: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_182553-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_182553-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..613123e45b9460d1bebce820abb89e952abcaea1 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_182553-TEST/.hydra/hydra.yaml @@ -0,0 +1,168 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + - +num_envs=1 + - +headless=true + - +use_wandb=false + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + - ++manager_env.config.render_results=true + - ++manager_env.config.render_width=640 + - ++manager_env.config.render_height=368 + - ++manager_env.events.physics_material=null + - ++manager_env.events.add_joint_default_pos=null + - ++manager_env.events.base_com=null + - ++manager_env.events.randomize_rigid_body_mass=null + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered,++manager_env.config.render_height=368,++manager_env.config.render_results=true,++manager_env.config.render_width=640,++manager_env.events.add_joint_default_pos=null,++manager_env.events.base_com=null,++manager_env.events.physics_material=null,++manager_env.events.randomize_rigid_body_mass=null,+headless=true,+num_envs=1,+use_wandb=false,checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260814_182553-TEST + choices: + manager_env/recorders: empty + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_182553-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_182553-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..122746eb732d9716968ccf0003c50c9f0ae475ca --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_182553-TEST/.hydra/overrides.yaml @@ -0,0 +1,13 @@ +- checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +- +num_envs=1 +- +headless=true +- +use_wandb=false +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered +- ++manager_env.config.render_results=true +- ++manager_env.config.render_width=640 +- ++manager_env.config.render_height=368 +- ++manager_env.events.physics_material=null +- ++manager_env.events.add_joint_default_pos=null +- ++manager_env.events.base_com=null +- ++manager_env.events.randomize_rigid_body_mass=null diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_182553-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260814_182553-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..ea39df8e4f0f98b94e110a346bc7cacbe6868455 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_182553-TEST/eval.log @@ -0,0 +1,187 @@ +2026-08-14 18:25:53.687 | INFO | __main__:main:90 - Loading training config file from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/config.yaml +2026-08-14 18:25:57.222 | WARNING | logging:callHandlers:1762 - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +2026-08-14 18:25:57.224 | INFO | logging:callHandlers:1762 - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +2026-08-14 18:25:57.225 | INFO | logging:callHandlers:1762 - Using device: cuda +2026-08-14 18:25:57.226 | INFO | logging:callHandlers:1762 - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.rendering.kit +2026-08-14 18:25:57.439 | DEBUG | logging:callHandlers:1762 - Using selector: EpollSelector +2026-08-14 18:26:05.496 | DEBUG | logging:callHandlers:1762 - Defining data type 'any' as 'Any' +2026-08-14 18:26:05.497 | DEBUG | logging:callHandlers:1762 - Defining data type 'bool' as 'Bool' and array 'BoolArray +2026-08-14 18:26:05.497 | DEBUG | logging:callHandlers:1762 - Defining data type 'bundle' as 'Bundle' +2026-08-14 18:26:05.497 | DEBUG | logging:callHandlers:1762 - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +2026-08-14 18:26:05.497 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +2026-08-14 18:26:05.497 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +2026-08-14 18:26:05.497 | DEBUG | logging:callHandlers:1762 - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +2026-08-14 18:26:05.497 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +2026-08-14 18:26:05.497 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +2026-08-14 18:26:05.498 | DEBUG | logging:callHandlers:1762 - Defining data type 'double' as 'Double' and array 'DoubleArray +2026-08-14 18:26:05.498 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +2026-08-14 18:26:05.498 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +2026-08-14 18:26:05.498 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +2026-08-14 18:26:05.498 | DEBUG | logging:callHandlers:1762 - Defining data type 'execution' as 'Execution' +2026-08-14 18:26:05.498 | DEBUG | logging:callHandlers:1762 - Defining data type 'float' as 'Float' and array 'FloatArray +2026-08-14 18:26:05.498 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +2026-08-14 18:26:05.498 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +2026-08-14 18:26:05.498 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +2026-08-14 18:26:05.499 | DEBUG | logging:callHandlers:1762 - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +2026-08-14 18:26:05.499 | DEBUG | logging:callHandlers:1762 - Defining data type 'half' as 'Half' and array 'HalfArray +2026-08-14 18:26:05.499 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +2026-08-14 18:26:05.499 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +2026-08-14 18:26:05.499 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +2026-08-14 18:26:05.499 | DEBUG | logging:callHandlers:1762 - Defining data type 'int' as 'Int' and array 'IntArray +2026-08-14 18:26:05.499 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +2026-08-14 18:26:05.499 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +2026-08-14 18:26:05.499 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +2026-08-14 18:26:05.499 | DEBUG | logging:callHandlers:1762 - Defining data type 'int64' as 'Int64' and array 'Int64Array +2026-08-14 18:26:05.500 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +2026-08-14 18:26:05.500 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +2026-08-14 18:26:05.500 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +2026-08-14 18:26:05.500 | DEBUG | logging:callHandlers:1762 - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +2026-08-14 18:26:05.500 | DEBUG | logging:callHandlers:1762 - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +2026-08-14 18:26:05.500 | DEBUG | logging:callHandlers:1762 - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +2026-08-14 18:26:05.500 | DEBUG | logging:callHandlers:1762 - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +2026-08-14 18:26:05.500 | DEBUG | logging:callHandlers:1762 - Defining data type 'path' as 'Path' +2026-08-14 18:26:05.500 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +2026-08-14 18:26:05.501 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +2026-08-14 18:26:05.501 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +2026-08-14 18:26:05.501 | DEBUG | logging:callHandlers:1762 - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +2026-08-14 18:26:05.501 | DEBUG | logging:callHandlers:1762 - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +2026-08-14 18:26:05.501 | DEBUG | logging:callHandlers:1762 - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +2026-08-14 18:26:05.501 | DEBUG | logging:callHandlers:1762 - Defining data type 'string' as 'String' +2026-08-14 18:26:05.501 | DEBUG | logging:callHandlers:1762 - Defining data type 'target' as 'Target' +2026-08-14 18:26:05.501 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +2026-08-14 18:26:05.501 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +2026-08-14 18:26:05.501 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +2026-08-14 18:26:05.502 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +2026-08-14 18:26:05.502 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +2026-08-14 18:26:05.502 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +2026-08-14 18:26:05.502 | DEBUG | logging:callHandlers:1762 - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +2026-08-14 18:26:05.502 | DEBUG | logging:callHandlers:1762 - Defining data type 'token' as 'Token' and array 'TokenArray +2026-08-14 18:26:05.502 | DEBUG | logging:callHandlers:1762 - Defining data type 'uchar' as 'UChar' and array 'UCharArray +2026-08-14 18:26:05.502 | DEBUG | logging:callHandlers:1762 - Defining data type 'uint' as 'UInt' and array 'UIntArray +2026-08-14 18:26:05.502 | DEBUG | logging:callHandlers:1762 - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +2026-08-14 18:26:05.502 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +2026-08-14 18:26:05.503 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +2026-08-14 18:26:05.503 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +2026-08-14 18:26:13.821 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch +2026-08-14 18:26:19.537 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory Articulation. +2026-08-14 18:26:19.664 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +2026-08-14 18:26:19.675 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:26:20.310 | INFO | logging:callHandlers:1762 - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +2026-08-14 18:26:20.317 | INFO | logging:callHandlers:1762 - Applied RobotAPI to prim /g1 +2026-08-14 18:26:20.323 | INFO | logging:callHandlers:1762 - Set isaac:robotType = 'Default' on /g1 +2026-08-14 18:26:20.323 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.324 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.324 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.325 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.325 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.326 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.327 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.327 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.328 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.328 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.328 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.329 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.329 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.330 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.330 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.331 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.331 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.332 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.332 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.333 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.333 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.334 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.334 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.335 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.335 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.336 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.336 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.337 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.337 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:26:20.358 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:26:20.438 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_182619_6311/main/payloads/base.usda +2026-08-14 18:26:20.926 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_182619_6311/main/main.usda +2026-08-14 18:26:20.933 | INFO | logging:callHandlers:1762 - Skipping disabled rule: Delete Newton Redundant APIs +2026-08-14 18:26:21.247 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory FrameView. +2026-08-14 18:26:21.299 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory ContactSensor. +2026-08-14 18:26:25.286 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory Renderer. +2026-08-14 18:26:25.286 | INFO | logging:callHandlers:1762 - Created new renderer for simulation: NewtonWarpRenderer +2026-08-14 18:26:25.287 | INFO | logging:callHandlers:1762 - Dispatching MODEL_INIT callbacks +2026-08-14 18:26:25.287 | INFO | logging:callHandlers:1762 - Finalizing model on device: cuda:0 +2026-08-14 18:26:29.882 | INFO | logging:callHandlers:1762 - Dispatching PHYSICS_READY callbacks +2026-08-14 18:26:30.118 | INFO | logging:callHandlers:1762 - Simulation parameters for joints in /World/envs/env_.*/Robot: ++-------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 2 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 3 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 4 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 5 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 6 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 7 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 8 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 9 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 11 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 12 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 13 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 14 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 15 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 16 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 17 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 18 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 19 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 20 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 21 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 22 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 23 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 24 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 25 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 26 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 27 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +2026-08-14 18:26:30.119 | INFO | logging:callHandlers:1762 - Using renderer: NewtonWarpRenderer +2026-08-14 18:26:30.145 | INFO | logging:callHandlers:1762 - Adding contact sensor for /World/envs/env_.*/Robot/.* with filter all bodies/shapes +2026-08-14 18:26:30.149 | INFO | logging:callHandlers:1762 - Contact sensor initialized with 30 sensors. +2026-08-14 18:26:30.149 | INFO | logging:callHandlers:1762 - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +2026-08-14 18:26:30.149 | INFO | logging:callHandlers:1762 - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +2026-08-14 18:26:34.909 | WARNING | logging:callHandlers:1762 - cubric IAdapter minor version newer than this shim was validated against: plugin reports v0.2, shim is pinned to v0.1. Proceeding under semver minor-compatibility — if transforms misbehave, verify the vtable layout against omni/cubric/IAdapter.h. +2026-08-14 18:26:34.909 | INFO | logging:callHandlers:1762 - cubric IAdapter bindings ready +2026-08-14 18:26:34.909 | INFO | logging:callHandlers:1762 - cubric bindings ready (adapter deferred to first render) +2026-08-14 18:26:34.910 | INFO | logging:callHandlers:1762 - Newton CUDA graph capture deferred until first step() (RTX active) +2026-08-14 18:26:35.002 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:235 - Loaded skeleton from gear_sonic/data/assets/robot_description/mjcf/g1_29dof_rev_1_0.xml +2026-08-14 18:26:35.002 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:236 - Loading motion data from /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered... +2026-08-14 18:26:35.003 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_data:472 - Loaded 2 motions +2026-08-14 18:26:35.489 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1091 - Loading 1 motions... +2026-08-14 18:26:35.490 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1092 - Sampling motion: tensor([1], device='cuda:0'), .... +2026-08-14 18:26:35.490 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1093 - Current motion keys: ['walk_forward_amateur_001__A001'], .... +2026-08-14 18:26:35.491 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1120 - Increased file descriptor limits from 2450/1048576 to 1048576/1048576 +2026-08-14 18:26:35.573 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1140 - Loading motions with 1 jobs... +2026-08-14 18:26:35.770 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1577 - Loaded 1 motions with a total length of 40.020s and 2002 frames. +2026-08-14 18:26:36.398 | INFO | logging:callHandlers:1762 - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'left_hip_roll_joint', 'left_hip_yaw_joint', 'left_knee_joint', 'left_ankle_pitch_joint', 'left_ankle_roll_joint', 'right_hip_pitch_joint', 'right_hip_roll_joint', 'right_hip_yaw_joint', 'right_knee_joint', 'right_ankle_pitch_joint', 'right_ankle_roll_joint', 'waist_yaw_joint', 'waist_roll_joint', 'waist_pitch_joint', 'left_shoulder_pitch_joint', 'left_shoulder_roll_joint', 'left_shoulder_yaw_joint', 'left_elbow_joint', 'left_wrist_roll_joint', 'left_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_shoulder_pitch_joint', 'right_shoulder_roll_joint', 'right_shoulder_yaw_joint', 'right_elbow_joint', 'right_wrist_roll_joint', 'right_wrist_pitch_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] +2026-08-14 18:26:37.114 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_grid:1227 - Setting up replay grid: 1 rows x 1 cols with 2.0m spacing +2026-08-14 18:26:37.114 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_grid:1247 - Grid bounds: X=[0.0, 0.0], Y=[0.0, 0.0] +2026-08-14 18:26:37.123 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1440 - +============================================================ +2026-08-14 18:26:37.123 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1441 - Batch Replaying 1 Environments +2026-08-14 18:26:37.123 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1442 - Unique motion IDs: [0] +2026-08-14 18:26:37.123 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1443 - Max frames: 100 +2026-08-14 18:26:37.123 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1444 - Max duration: 2.00s (@ 50 FPS) +2026-08-14 18:26:37.124 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1445 - Speed: 1.0x +2026-08-14 18:26:37.124 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1446 - ============================================================ + +2026-08-14 18:26:37.124 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1667 - Replay Controls: +2026-08-14 18:26:37.124 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1668 - G: Pause/Resume +2026-08-14 18:26:37.124 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1669 - B: Toggle Reverse Play +2026-08-14 18:26:37.124 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1670 - LEFT/RIGHT: Step backward/forward (when paused) +2026-08-14 18:26:37.124 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1671 - R: Restart from beginning +2026-08-14 18:26:37.124 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1672 - ESC: Exit replay +2026-08-14 18:26:37.124 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1673 - +/-: Increase/Decrease speed +2026-08-14 18:26:37.124 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1674 - +2026-08-14 18:26:37.716 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:step_replay:2096 - Progress: 50.0% (max frame 50/100) +2026-08-14 18:26:38.059 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:step_replay:2085 - Replay complete! diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_182553-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260814_182553-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..611e8c2a42976ab08ba0919a4ea3576a5cf424ee --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_182553-TEST/eval_agent_trl.log @@ -0,0 +1,155 @@ +[2026-08-14 18:25:57,222][isaaclab.app.app_launcher][WARNING] - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +[2026-08-14 18:25:57,224][isaaclab.app.app_launcher][INFO] - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +[2026-08-14 18:25:57,225][isaaclab.app.app_launcher][INFO] - Using device: cuda +[2026-08-14 18:25:57,226][isaaclab.app.app_launcher][INFO] - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.rendering.kit +[2026-08-14 18:25:57,439][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-14 18:26:05,496][AutoNode][DEBUG] - Defining data type 'any' as 'Any' +[2026-08-14 18:26:05,496][AutoNode][DEBUG] - Defining data type 'bool' as 'Bool' and array 'BoolArray +[2026-08-14 18:26:05,497][AutoNode][DEBUG] - Defining data type 'bundle' as 'Bundle' +[2026-08-14 18:26:05,497][AutoNode][DEBUG] - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +[2026-08-14 18:26:05,497][AutoNode][DEBUG] - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +[2026-08-14 18:26:05,497][AutoNode][DEBUG] - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +[2026-08-14 18:26:05,497][AutoNode][DEBUG] - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +[2026-08-14 18:26:05,497][AutoNode][DEBUG] - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +[2026-08-14 18:26:05,497][AutoNode][DEBUG] - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +[2026-08-14 18:26:05,497][AutoNode][DEBUG] - Defining data type 'double' as 'Double' and array 'DoubleArray +[2026-08-14 18:26:05,498][AutoNode][DEBUG] - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +[2026-08-14 18:26:05,498][AutoNode][DEBUG] - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +[2026-08-14 18:26:05,498][AutoNode][DEBUG] - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +[2026-08-14 18:26:05,498][AutoNode][DEBUG] - Defining data type 'execution' as 'Execution' +[2026-08-14 18:26:05,498][AutoNode][DEBUG] - Defining data type 'float' as 'Float' and array 'FloatArray +[2026-08-14 18:26:05,498][AutoNode][DEBUG] - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +[2026-08-14 18:26:05,498][AutoNode][DEBUG] - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +[2026-08-14 18:26:05,498][AutoNode][DEBUG] - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +[2026-08-14 18:26:05,498][AutoNode][DEBUG] - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +[2026-08-14 18:26:05,499][AutoNode][DEBUG] - Defining data type 'half' as 'Half' and array 'HalfArray +[2026-08-14 18:26:05,499][AutoNode][DEBUG] - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +[2026-08-14 18:26:05,499][AutoNode][DEBUG] - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +[2026-08-14 18:26:05,499][AutoNode][DEBUG] - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +[2026-08-14 18:26:05,499][AutoNode][DEBUG] - Defining data type 'int' as 'Int' and array 'IntArray +[2026-08-14 18:26:05,499][AutoNode][DEBUG] - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +[2026-08-14 18:26:05,499][AutoNode][DEBUG] - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +[2026-08-14 18:26:05,499][AutoNode][DEBUG] - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +[2026-08-14 18:26:05,499][AutoNode][DEBUG] - Defining data type 'int64' as 'Int64' and array 'Int64Array +[2026-08-14 18:26:05,500][AutoNode][DEBUG] - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +[2026-08-14 18:26:05,500][AutoNode][DEBUG] - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +[2026-08-14 18:26:05,500][AutoNode][DEBUG] - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +[2026-08-14 18:26:05,500][AutoNode][DEBUG] - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +[2026-08-14 18:26:05,500][AutoNode][DEBUG] - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +[2026-08-14 18:26:05,500][AutoNode][DEBUG] - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +[2026-08-14 18:26:05,500][AutoNode][DEBUG] - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +[2026-08-14 18:26:05,500][AutoNode][DEBUG] - Defining data type 'path' as 'Path' +[2026-08-14 18:26:05,500][AutoNode][DEBUG] - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +[2026-08-14 18:26:05,500][AutoNode][DEBUG] - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +[2026-08-14 18:26:05,501][AutoNode][DEBUG] - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +[2026-08-14 18:26:05,501][AutoNode][DEBUG] - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +[2026-08-14 18:26:05,501][AutoNode][DEBUG] - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +[2026-08-14 18:26:05,501][AutoNode][DEBUG] - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +[2026-08-14 18:26:05,501][AutoNode][DEBUG] - Defining data type 'string' as 'String' +[2026-08-14 18:26:05,501][AutoNode][DEBUG] - Defining data type 'target' as 'Target' +[2026-08-14 18:26:05,501][AutoNode][DEBUG] - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +[2026-08-14 18:26:05,501][AutoNode][DEBUG] - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +[2026-08-14 18:26:05,501][AutoNode][DEBUG] - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +[2026-08-14 18:26:05,502][AutoNode][DEBUG] - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +[2026-08-14 18:26:05,502][AutoNode][DEBUG] - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +[2026-08-14 18:26:05,502][AutoNode][DEBUG] - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +[2026-08-14 18:26:05,502][AutoNode][DEBUG] - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +[2026-08-14 18:26:05,502][AutoNode][DEBUG] - Defining data type 'token' as 'Token' and array 'TokenArray +[2026-08-14 18:26:05,502][AutoNode][DEBUG] - Defining data type 'uchar' as 'UChar' and array 'UCharArray +[2026-08-14 18:26:05,502][AutoNode][DEBUG] - Defining data type 'uint' as 'UInt' and array 'UIntArray +[2026-08-14 18:26:05,502][AutoNode][DEBUG] - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +[2026-08-14 18:26:05,502][AutoNode][DEBUG] - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +[2026-08-14 18:26:05,502][AutoNode][DEBUG] - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +[2026-08-14 18:26:05,503][AutoNode][DEBUG] - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +[2026-08-14 18:26:19,536][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory Articulation. +[2026-08-14 18:26:19,664][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +[2026-08-14 18:26:19,675][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:26:20,309][isaacsim.asset.importer.utils.impl.asset_utils][INFO] - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +[2026-08-14 18:26:20,316][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Applied RobotAPI to prim /g1 +[2026-08-14 18:26:20,322][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Set isaac:robotType = 'Default' on /g1 +[2026-08-14 18:26:20,323][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,324][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,324][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,325][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,325][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,326][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,326][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,327][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,327][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,328][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,328][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,329][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,329][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,330][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,330][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,331][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,331][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,332][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,332][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,333][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,333][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,334][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,334][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,335][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,335][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,336][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,336][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,337][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,337][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:26:20,358][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:26:20,438][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_182619_6311/main/payloads/base.usda +[2026-08-14 18:26:20,926][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_182619_6311/main/main.usda +[2026-08-14 18:26:20,932][isaacsim.asset.transformer.manager][INFO] - Skipping disabled rule: Delete Newton Redundant APIs +[2026-08-14 18:26:21,247][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory FrameView. +[2026-08-14 18:26:21,299][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory ContactSensor. +[2026-08-14 18:26:25,285][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory Renderer. +[2026-08-14 18:26:25,286][isaaclab.renderers.render_context][INFO] - Created new renderer for simulation: NewtonWarpRenderer +[2026-08-14 18:26:25,286][isaaclab_newton.physics.newton_manager][INFO] - Dispatching MODEL_INIT callbacks +[2026-08-14 18:26:25,287][isaaclab_newton.physics.newton_manager][INFO] - Finalizing model on device: cuda:0 +[2026-08-14 18:26:29,882][isaaclab_newton.physics.newton_manager][INFO] - Dispatching PHYSICS_READY callbacks +[2026-08-14 18:26:30,118][isaaclab_newton.assets.articulation.articulation][INFO] - Simulation parameters for joints in /World/envs/env_.*/Robot: ++-------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 2 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 3 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 4 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 5 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 6 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 7 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 8 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 9 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 11 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 12 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 13 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 14 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 15 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 16 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 17 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 18 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 19 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 20 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 21 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 22 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 23 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 24 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 25 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 26 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 27 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +[2026-08-14 18:26:30,119][isaaclab.sensors.camera.camera][INFO] - Using renderer: NewtonWarpRenderer +[2026-08-14 18:26:30,145][isaaclab_newton.physics.newton_manager][INFO] - Adding contact sensor for /World/envs/env_.*/Robot/.* with filter all bodies/shapes +[2026-08-14 18:26:30,149][isaaclab_newton.sensors.contact_sensor.contact_sensor][INFO] - Contact sensor initialized with 30 sensors. +[2026-08-14 18:26:30,149][isaaclab_newton.sensors.contact_sensor.contact_sensor][INFO] - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +[2026-08-14 18:26:30,149][isaaclab_newton.sensors.contact_sensor.contact_sensor_data][INFO] - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +[2026-08-14 18:26:34,909][isaaclab_newton.physics._cubric][WARNING] - cubric IAdapter minor version newer than this shim was validated against: plugin reports v0.2, shim is pinned to v0.1. Proceeding under semver minor-compatibility — if transforms misbehave, verify the vtable layout against omni/cubric/IAdapter.h. +[2026-08-14 18:26:34,909][isaaclab_newton.physics._cubric][INFO] - cubric IAdapter bindings ready +[2026-08-14 18:26:34,909][isaaclab_newton.physics.newton_manager][INFO] - cubric bindings ready (adapter deferred to first render) +[2026-08-14 18:26:34,910][isaaclab_newton.physics.newton_manager][INFO] - Newton CUDA graph capture deferred until first step() (RTX active) +[2026-08-14 18:26:36,398][isaaclab.envs.mdp.actions.joint_actions][INFO] - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'left_hip_roll_joint', 'left_hip_yaw_joint', 'left_knee_joint', 'left_ankle_pitch_joint', 'left_ankle_roll_joint', 'right_hip_pitch_joint', 'right_hip_roll_joint', 'right_hip_yaw_joint', 'right_knee_joint', 'right_ankle_pitch_joint', 'right_ankle_roll_joint', 'waist_yaw_joint', 'waist_roll_joint', 'waist_pitch_joint', 'left_shoulder_pitch_joint', 'left_shoulder_roll_joint', 'left_shoulder_yaw_joint', 'left_elbow_joint', 'left_wrist_roll_joint', 'left_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_shoulder_pitch_joint', 'right_shoulder_roll_joint', 'right_shoulder_yaw_joint', 'right_elbow_joint', 'right_wrist_roll_joint', 'right_wrist_pitch_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_182737-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_182737-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..35b05e2291929bc56f854f05d606a5fcf8c15ed7 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_182737-TEST/.hydra/config.yaml @@ -0,0 +1,40 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + smpl_motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + config: + render_results: true + render_width: 640 + render_height: 368 + events: + physics_material: null + add_joint_default_pos: null + base_com: null + randomize_rigid_body_mass: null +checkpoint: /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +num_envs: 1 +headless: true +use_wandb: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_182737-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_182737-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..884f4fe64afdcfff29756b3ca1cec3ff49c698df --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_182737-TEST/.hydra/hydra.yaml @@ -0,0 +1,168 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + - +num_envs=1 + - +headless=true + - +use_wandb=false + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + - ++manager_env.config.render_results=true + - ++manager_env.config.render_width=640 + - ++manager_env.config.render_height=368 + - ++manager_env.events.physics_material=null + - ++manager_env.events.add_joint_default_pos=null + - ++manager_env.events.base_com=null + - ++manager_env.events.randomize_rigid_body_mass=null + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered,++manager_env.config.render_height=368,++manager_env.config.render_results=true,++manager_env.config.render_width=640,++manager_env.events.add_joint_default_pos=null,++manager_env.events.base_com=null,++manager_env.events.physics_material=null,++manager_env.events.randomize_rigid_body_mass=null,+headless=true,+num_envs=1,+use_wandb=false,checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260814_182737-TEST + choices: + manager_env/recorders: empty + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_182737-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_182737-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..122746eb732d9716968ccf0003c50c9f0ae475ca --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_182737-TEST/.hydra/overrides.yaml @@ -0,0 +1,13 @@ +- checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +- +num_envs=1 +- +headless=true +- +use_wandb=false +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered +- ++manager_env.config.render_results=true +- ++manager_env.config.render_width=640 +- ++manager_env.config.render_height=368 +- ++manager_env.events.physics_material=null +- ++manager_env.events.add_joint_default_pos=null +- ++manager_env.events.base_com=null +- ++manager_env.events.randomize_rigid_body_mass=null diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_182737-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260814_182737-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..0589c52297f0366d1d2e140148f776e891707c7a --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_182737-TEST/eval.log @@ -0,0 +1,187 @@ +2026-08-14 18:27:37.476 | INFO | __main__:main:90 - Loading training config file from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/config.yaml +2026-08-14 18:27:41.291 | WARNING | logging:callHandlers:1762 - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +2026-08-14 18:27:41.294 | INFO | logging:callHandlers:1762 - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +2026-08-14 18:27:41.294 | INFO | logging:callHandlers:1762 - Using device: cuda +2026-08-14 18:27:41.295 | INFO | logging:callHandlers:1762 - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.rendering.kit +2026-08-14 18:27:41.683 | DEBUG | logging:callHandlers:1762 - Using selector: EpollSelector +2026-08-14 18:27:50.979 | DEBUG | logging:callHandlers:1762 - Defining data type 'any' as 'Any' +2026-08-14 18:27:50.979 | DEBUG | logging:callHandlers:1762 - Defining data type 'bool' as 'Bool' and array 'BoolArray +2026-08-14 18:27:50.980 | DEBUG | logging:callHandlers:1762 - Defining data type 'bundle' as 'Bundle' +2026-08-14 18:27:50.980 | DEBUG | logging:callHandlers:1762 - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +2026-08-14 18:27:50.980 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +2026-08-14 18:27:50.980 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +2026-08-14 18:27:50.980 | DEBUG | logging:callHandlers:1762 - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +2026-08-14 18:27:50.980 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +2026-08-14 18:27:50.980 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +2026-08-14 18:27:50.980 | DEBUG | logging:callHandlers:1762 - Defining data type 'double' as 'Double' and array 'DoubleArray +2026-08-14 18:27:50.980 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +2026-08-14 18:27:50.980 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +2026-08-14 18:27:50.981 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +2026-08-14 18:27:50.981 | DEBUG | logging:callHandlers:1762 - Defining data type 'execution' as 'Execution' +2026-08-14 18:27:50.981 | DEBUG | logging:callHandlers:1762 - Defining data type 'float' as 'Float' and array 'FloatArray +2026-08-14 18:27:50.981 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +2026-08-14 18:27:50.981 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +2026-08-14 18:27:50.981 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +2026-08-14 18:27:50.981 | DEBUG | logging:callHandlers:1762 - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +2026-08-14 18:27:50.981 | DEBUG | logging:callHandlers:1762 - Defining data type 'half' as 'Half' and array 'HalfArray +2026-08-14 18:27:50.981 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +2026-08-14 18:27:50.981 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +2026-08-14 18:27:50.982 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +2026-08-14 18:27:50.982 | DEBUG | logging:callHandlers:1762 - Defining data type 'int' as 'Int' and array 'IntArray +2026-08-14 18:27:50.982 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +2026-08-14 18:27:50.982 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +2026-08-14 18:27:50.982 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +2026-08-14 18:27:50.982 | DEBUG | logging:callHandlers:1762 - Defining data type 'int64' as 'Int64' and array 'Int64Array +2026-08-14 18:27:50.982 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +2026-08-14 18:27:50.982 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +2026-08-14 18:27:50.982 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +2026-08-14 18:27:50.982 | DEBUG | logging:callHandlers:1762 - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +2026-08-14 18:27:50.983 | DEBUG | logging:callHandlers:1762 - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +2026-08-14 18:27:50.983 | DEBUG | logging:callHandlers:1762 - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +2026-08-14 18:27:50.983 | DEBUG | logging:callHandlers:1762 - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +2026-08-14 18:27:50.983 | DEBUG | logging:callHandlers:1762 - Defining data type 'path' as 'Path' +2026-08-14 18:27:50.983 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +2026-08-14 18:27:50.983 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +2026-08-14 18:27:50.983 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +2026-08-14 18:27:50.983 | DEBUG | logging:callHandlers:1762 - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +2026-08-14 18:27:50.983 | DEBUG | logging:callHandlers:1762 - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +2026-08-14 18:27:50.983 | DEBUG | logging:callHandlers:1762 - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +2026-08-14 18:27:50.984 | DEBUG | logging:callHandlers:1762 - Defining data type 'string' as 'String' +2026-08-14 18:27:50.984 | DEBUG | logging:callHandlers:1762 - Defining data type 'target' as 'Target' +2026-08-14 18:27:50.984 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +2026-08-14 18:27:50.984 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +2026-08-14 18:27:50.984 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +2026-08-14 18:27:50.984 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +2026-08-14 18:27:50.984 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +2026-08-14 18:27:50.984 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +2026-08-14 18:27:50.984 | DEBUG | logging:callHandlers:1762 - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +2026-08-14 18:27:50.984 | DEBUG | logging:callHandlers:1762 - Defining data type 'token' as 'Token' and array 'TokenArray +2026-08-14 18:27:50.985 | DEBUG | logging:callHandlers:1762 - Defining data type 'uchar' as 'UChar' and array 'UCharArray +2026-08-14 18:27:50.985 | DEBUG | logging:callHandlers:1762 - Defining data type 'uint' as 'UInt' and array 'UIntArray +2026-08-14 18:27:50.985 | DEBUG | logging:callHandlers:1762 - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +2026-08-14 18:27:50.985 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +2026-08-14 18:27:50.985 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +2026-08-14 18:27:50.985 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +2026-08-14 18:27:59.539 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch +2026-08-14 18:28:05.319 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory Articulation. +2026-08-14 18:28:05.443 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +2026-08-14 18:28:05.454 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:28:06.138 | INFO | logging:callHandlers:1762 - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +2026-08-14 18:28:06.146 | INFO | logging:callHandlers:1762 - Applied RobotAPI to prim /g1 +2026-08-14 18:28:06.152 | INFO | logging:callHandlers:1762 - Set isaac:robotType = 'Default' on /g1 +2026-08-14 18:28:06.153 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.154 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.154 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.155 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.156 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.156 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.157 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.158 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.159 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.159 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.160 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.161 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.161 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.162 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.163 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.163 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.164 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.165 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.165 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.166 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.167 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.167 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.168 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.169 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.169 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.170 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.171 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.171 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.172 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:28:06.196 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:28:06.278 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_182805_6311/main/payloads/base.usda +2026-08-14 18:28:06.896 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_182805_6311/main/main.usda +2026-08-14 18:28:06.902 | INFO | logging:callHandlers:1762 - Skipping disabled rule: Delete Newton Redundant APIs +2026-08-14 18:28:07.275 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory FrameView. +2026-08-14 18:28:07.326 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory ContactSensor. +2026-08-14 18:28:11.617 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory Renderer. +2026-08-14 18:28:11.617 | INFO | logging:callHandlers:1762 - Created new renderer for simulation: NewtonWarpRenderer +2026-08-14 18:28:11.618 | INFO | logging:callHandlers:1762 - Dispatching MODEL_INIT callbacks +2026-08-14 18:28:11.618 | INFO | logging:callHandlers:1762 - Finalizing model on device: cuda:0 +2026-08-14 18:28:20.507 | INFO | logging:callHandlers:1762 - Dispatching PHYSICS_READY callbacks +2026-08-14 18:28:20.740 | INFO | logging:callHandlers:1762 - Simulation parameters for joints in /World/envs/env_.*/Robot: ++-------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 2 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 3 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 4 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 5 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 6 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 7 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 8 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 9 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 11 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 12 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 13 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 14 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 15 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 16 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 17 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 18 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 19 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 20 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 21 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 22 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 23 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 24 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 25 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 26 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 27 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +2026-08-14 18:28:20.741 | INFO | logging:callHandlers:1762 - Using renderer: NewtonWarpRenderer +2026-08-14 18:28:20.765 | INFO | logging:callHandlers:1762 - Adding contact sensor for /World/envs/env_.*/Robot/.* with filter all bodies/shapes +2026-08-14 18:28:20.769 | INFO | logging:callHandlers:1762 - Contact sensor initialized with 30 sensors. +2026-08-14 18:28:20.770 | INFO | logging:callHandlers:1762 - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +2026-08-14 18:28:20.770 | INFO | logging:callHandlers:1762 - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +2026-08-14 18:28:25.418 | WARNING | logging:callHandlers:1762 - cubric IAdapter minor version newer than this shim was validated against: plugin reports v0.2, shim is pinned to v0.1. Proceeding under semver minor-compatibility — if transforms misbehave, verify the vtable layout against omni/cubric/IAdapter.h. +2026-08-14 18:28:25.419 | INFO | logging:callHandlers:1762 - cubric IAdapter bindings ready +2026-08-14 18:28:25.419 | INFO | logging:callHandlers:1762 - cubric bindings ready (adapter deferred to first render) +2026-08-14 18:28:25.419 | INFO | logging:callHandlers:1762 - Newton CUDA graph capture deferred until first step() (RTX active) +2026-08-14 18:28:25.516 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:235 - Loaded skeleton from gear_sonic/data/assets/robot_description/mjcf/g1_29dof_rev_1_0.xml +2026-08-14 18:28:25.516 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:236 - Loading motion data from /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered... +2026-08-14 18:28:25.517 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_data:472 - Loaded 2 motions +2026-08-14 18:28:26.016 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1091 - Loading 1 motions... +2026-08-14 18:28:26.017 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1092 - Sampling motion: tensor([1], device='cuda:0'), .... +2026-08-14 18:28:26.018 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1093 - Current motion keys: ['walk_forward_amateur_001__A001'], .... +2026-08-14 18:28:26.018 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1120 - Increased file descriptor limits from 2450/1048576 to 1048576/1048576 +2026-08-14 18:28:26.104 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1140 - Loading motions with 1 jobs... +2026-08-14 18:28:26.303 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1577 - Loaded 1 motions with a total length of 40.020s and 2002 frames. +2026-08-14 18:28:26.940 | INFO | logging:callHandlers:1762 - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'left_hip_roll_joint', 'left_hip_yaw_joint', 'left_knee_joint', 'left_ankle_pitch_joint', 'left_ankle_roll_joint', 'right_hip_pitch_joint', 'right_hip_roll_joint', 'right_hip_yaw_joint', 'right_knee_joint', 'right_ankle_pitch_joint', 'right_ankle_roll_joint', 'waist_yaw_joint', 'waist_roll_joint', 'waist_pitch_joint', 'left_shoulder_pitch_joint', 'left_shoulder_roll_joint', 'left_shoulder_yaw_joint', 'left_elbow_joint', 'left_wrist_roll_joint', 'left_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_shoulder_pitch_joint', 'right_shoulder_roll_joint', 'right_shoulder_yaw_joint', 'right_elbow_joint', 'right_wrist_roll_joint', 'right_wrist_pitch_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] +2026-08-14 18:28:27.638 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_grid:1227 - Setting up replay grid: 1 rows x 1 cols with 2.0m spacing +2026-08-14 18:28:27.638 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_grid:1247 - Grid bounds: X=[0.0, 0.0], Y=[0.0, 0.0] +2026-08-14 18:28:27.646 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1440 - +============================================================ +2026-08-14 18:28:27.647 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1441 - Batch Replaying 1 Environments +2026-08-14 18:28:27.647 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1442 - Unique motion IDs: [0] +2026-08-14 18:28:27.647 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1443 - Max frames: 100 +2026-08-14 18:28:27.647 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1444 - Max duration: 2.00s (@ 50 FPS) +2026-08-14 18:28:27.647 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1445 - Speed: 1.0x +2026-08-14 18:28:27.647 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1446 - ============================================================ + +2026-08-14 18:28:27.647 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1667 - Replay Controls: +2026-08-14 18:28:27.647 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1668 - G: Pause/Resume +2026-08-14 18:28:27.647 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1669 - B: Toggle Reverse Play +2026-08-14 18:28:27.647 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1670 - LEFT/RIGHT: Step backward/forward (when paused) +2026-08-14 18:28:27.647 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1671 - R: Restart from beginning +2026-08-14 18:28:27.647 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1672 - ESC: Exit replay +2026-08-14 18:28:27.647 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1673 - +/-: Increase/Decrease speed +2026-08-14 18:28:27.647 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1674 - +2026-08-14 18:28:28.288 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:step_replay:2096 - Progress: 50.0% (max frame 50/100) +2026-08-14 18:28:28.627 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:step_replay:2085 - Replay complete! diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_182737-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260814_182737-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..32865a2b7989d30f5f6aafe5dc35b21131c93a10 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_182737-TEST/eval_agent_trl.log @@ -0,0 +1,155 @@ +[2026-08-14 18:27:41,291][isaaclab.app.app_launcher][WARNING] - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +[2026-08-14 18:27:41,294][isaaclab.app.app_launcher][INFO] - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +[2026-08-14 18:27:41,294][isaaclab.app.app_launcher][INFO] - Using device: cuda +[2026-08-14 18:27:41,295][isaaclab.app.app_launcher][INFO] - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.rendering.kit +[2026-08-14 18:27:41,683][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-14 18:27:50,979][AutoNode][DEBUG] - Defining data type 'any' as 'Any' +[2026-08-14 18:27:50,979][AutoNode][DEBUG] - Defining data type 'bool' as 'Bool' and array 'BoolArray +[2026-08-14 18:27:50,979][AutoNode][DEBUG] - Defining data type 'bundle' as 'Bundle' +[2026-08-14 18:27:50,980][AutoNode][DEBUG] - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +[2026-08-14 18:27:50,980][AutoNode][DEBUG] - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +[2026-08-14 18:27:50,980][AutoNode][DEBUG] - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +[2026-08-14 18:27:50,980][AutoNode][DEBUG] - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +[2026-08-14 18:27:50,980][AutoNode][DEBUG] - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +[2026-08-14 18:27:50,980][AutoNode][DEBUG] - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +[2026-08-14 18:27:50,980][AutoNode][DEBUG] - Defining data type 'double' as 'Double' and array 'DoubleArray +[2026-08-14 18:27:50,980][AutoNode][DEBUG] - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +[2026-08-14 18:27:50,980][AutoNode][DEBUG] - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +[2026-08-14 18:27:50,980][AutoNode][DEBUG] - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +[2026-08-14 18:27:50,981][AutoNode][DEBUG] - Defining data type 'execution' as 'Execution' +[2026-08-14 18:27:50,981][AutoNode][DEBUG] - Defining data type 'float' as 'Float' and array 'FloatArray +[2026-08-14 18:27:50,981][AutoNode][DEBUG] - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +[2026-08-14 18:27:50,981][AutoNode][DEBUG] - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +[2026-08-14 18:27:50,981][AutoNode][DEBUG] - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +[2026-08-14 18:27:50,981][AutoNode][DEBUG] - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +[2026-08-14 18:27:50,981][AutoNode][DEBUG] - Defining data type 'half' as 'Half' and array 'HalfArray +[2026-08-14 18:27:50,981][AutoNode][DEBUG] - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +[2026-08-14 18:27:50,981][AutoNode][DEBUG] - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +[2026-08-14 18:27:50,981][AutoNode][DEBUG] - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +[2026-08-14 18:27:50,982][AutoNode][DEBUG] - Defining data type 'int' as 'Int' and array 'IntArray +[2026-08-14 18:27:50,982][AutoNode][DEBUG] - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +[2026-08-14 18:27:50,982][AutoNode][DEBUG] - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +[2026-08-14 18:27:50,982][AutoNode][DEBUG] - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +[2026-08-14 18:27:50,982][AutoNode][DEBUG] - Defining data type 'int64' as 'Int64' and array 'Int64Array +[2026-08-14 18:27:50,982][AutoNode][DEBUG] - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +[2026-08-14 18:27:50,982][AutoNode][DEBUG] - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +[2026-08-14 18:27:50,982][AutoNode][DEBUG] - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +[2026-08-14 18:27:50,982][AutoNode][DEBUG] - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +[2026-08-14 18:27:50,983][AutoNode][DEBUG] - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +[2026-08-14 18:27:50,983][AutoNode][DEBUG] - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +[2026-08-14 18:27:50,983][AutoNode][DEBUG] - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +[2026-08-14 18:27:50,983][AutoNode][DEBUG] - Defining data type 'path' as 'Path' +[2026-08-14 18:27:50,983][AutoNode][DEBUG] - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +[2026-08-14 18:27:50,983][AutoNode][DEBUG] - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +[2026-08-14 18:27:50,983][AutoNode][DEBUG] - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +[2026-08-14 18:27:50,983][AutoNode][DEBUG] - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +[2026-08-14 18:27:50,983][AutoNode][DEBUG] - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +[2026-08-14 18:27:50,983][AutoNode][DEBUG] - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +[2026-08-14 18:27:50,983][AutoNode][DEBUG] - Defining data type 'string' as 'String' +[2026-08-14 18:27:50,984][AutoNode][DEBUG] - Defining data type 'target' as 'Target' +[2026-08-14 18:27:50,984][AutoNode][DEBUG] - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +[2026-08-14 18:27:50,984][AutoNode][DEBUG] - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +[2026-08-14 18:27:50,984][AutoNode][DEBUG] - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +[2026-08-14 18:27:50,984][AutoNode][DEBUG] - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +[2026-08-14 18:27:50,984][AutoNode][DEBUG] - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +[2026-08-14 18:27:50,984][AutoNode][DEBUG] - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +[2026-08-14 18:27:50,984][AutoNode][DEBUG] - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +[2026-08-14 18:27:50,984][AutoNode][DEBUG] - Defining data type 'token' as 'Token' and array 'TokenArray +[2026-08-14 18:27:50,984][AutoNode][DEBUG] - Defining data type 'uchar' as 'UChar' and array 'UCharArray +[2026-08-14 18:27:50,985][AutoNode][DEBUG] - Defining data type 'uint' as 'UInt' and array 'UIntArray +[2026-08-14 18:27:50,985][AutoNode][DEBUG] - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +[2026-08-14 18:27:50,985][AutoNode][DEBUG] - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +[2026-08-14 18:27:50,985][AutoNode][DEBUG] - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +[2026-08-14 18:27:50,985][AutoNode][DEBUG] - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +[2026-08-14 18:28:05,319][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory Articulation. +[2026-08-14 18:28:05,443][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +[2026-08-14 18:28:05,454][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:28:06,137][isaacsim.asset.importer.utils.impl.asset_utils][INFO] - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +[2026-08-14 18:28:06,145][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Applied RobotAPI to prim /g1 +[2026-08-14 18:28:06,151][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Set isaac:robotType = 'Default' on /g1 +[2026-08-14 18:28:06,153][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,153][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,154][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,155][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,156][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,156][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,157][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,158][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,158][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,159][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,160][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,160][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,161][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,162][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,163][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,163][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,164][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,165][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,165][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,166][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,167][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,167][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,168][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,169][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,169][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,170][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,171][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,171][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,172][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:28:06,196][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:28:06,277][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_182805_6311/main/payloads/base.usda +[2026-08-14 18:28:06,896][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_182805_6311/main/main.usda +[2026-08-14 18:28:06,902][isaacsim.asset.transformer.manager][INFO] - Skipping disabled rule: Delete Newton Redundant APIs +[2026-08-14 18:28:07,275][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory FrameView. +[2026-08-14 18:28:07,326][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory ContactSensor. +[2026-08-14 18:28:11,617][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory Renderer. +[2026-08-14 18:28:11,617][isaaclab.renderers.render_context][INFO] - Created new renderer for simulation: NewtonWarpRenderer +[2026-08-14 18:28:11,618][isaaclab_newton.physics.newton_manager][INFO] - Dispatching MODEL_INIT callbacks +[2026-08-14 18:28:11,618][isaaclab_newton.physics.newton_manager][INFO] - Finalizing model on device: cuda:0 +[2026-08-14 18:28:20,507][isaaclab_newton.physics.newton_manager][INFO] - Dispatching PHYSICS_READY callbacks +[2026-08-14 18:28:20,740][isaaclab_newton.assets.articulation.articulation][INFO] - Simulation parameters for joints in /World/envs/env_.*/Robot: ++-------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 2 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 3 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 4 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 5 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 6 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 7 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 8 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 9 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 11 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 12 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 13 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 14 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 15 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 16 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 17 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 18 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 19 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 20 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 21 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 22 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 23 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 24 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 25 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 26 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 27 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +[2026-08-14 18:28:20,741][isaaclab.sensors.camera.camera][INFO] - Using renderer: NewtonWarpRenderer +[2026-08-14 18:28:20,765][isaaclab_newton.physics.newton_manager][INFO] - Adding contact sensor for /World/envs/env_.*/Robot/.* with filter all bodies/shapes +[2026-08-14 18:28:20,769][isaaclab_newton.sensors.contact_sensor.contact_sensor][INFO] - Contact sensor initialized with 30 sensors. +[2026-08-14 18:28:20,769][isaaclab_newton.sensors.contact_sensor.contact_sensor][INFO] - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +[2026-08-14 18:28:20,770][isaaclab_newton.sensors.contact_sensor.contact_sensor_data][INFO] - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +[2026-08-14 18:28:25,418][isaaclab_newton.physics._cubric][WARNING] - cubric IAdapter minor version newer than this shim was validated against: plugin reports v0.2, shim is pinned to v0.1. Proceeding under semver minor-compatibility — if transforms misbehave, verify the vtable layout against omni/cubric/IAdapter.h. +[2026-08-14 18:28:25,419][isaaclab_newton.physics._cubric][INFO] - cubric IAdapter bindings ready +[2026-08-14 18:28:25,419][isaaclab_newton.physics.newton_manager][INFO] - cubric bindings ready (adapter deferred to first render) +[2026-08-14 18:28:25,419][isaaclab_newton.physics.newton_manager][INFO] - Newton CUDA graph capture deferred until first step() (RTX active) +[2026-08-14 18:28:26,940][isaaclab.envs.mdp.actions.joint_actions][INFO] - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'left_hip_roll_joint', 'left_hip_yaw_joint', 'left_knee_joint', 'left_ankle_pitch_joint', 'left_ankle_roll_joint', 'right_hip_pitch_joint', 'right_hip_roll_joint', 'right_hip_yaw_joint', 'right_knee_joint', 'right_ankle_pitch_joint', 'right_ankle_roll_joint', 'waist_yaw_joint', 'waist_roll_joint', 'waist_pitch_joint', 'left_shoulder_pitch_joint', 'left_shoulder_roll_joint', 'left_shoulder_yaw_joint', 'left_elbow_joint', 'left_wrist_roll_joint', 'left_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_shoulder_pitch_joint', 'right_shoulder_roll_joint', 'right_shoulder_yaw_joint', 'right_elbow_joint', 'right_wrist_roll_joint', 'right_wrist_pitch_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_183032-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_183032-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..35b05e2291929bc56f854f05d606a5fcf8c15ed7 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_183032-TEST/.hydra/config.yaml @@ -0,0 +1,40 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + smpl_motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + config: + render_results: true + render_width: 640 + render_height: 368 + events: + physics_material: null + add_joint_default_pos: null + base_com: null + randomize_rigid_body_mass: null +checkpoint: /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +num_envs: 1 +headless: true +use_wandb: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_183032-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_183032-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..39127d654f934f8eb83600cb7843b99725404ae7 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_183032-TEST/.hydra/hydra.yaml @@ -0,0 +1,168 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + - +num_envs=1 + - +headless=true + - +use_wandb=false + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + - ++manager_env.config.render_results=true + - ++manager_env.config.render_width=640 + - ++manager_env.config.render_height=368 + - ++manager_env.events.physics_material=null + - ++manager_env.events.add_joint_default_pos=null + - ++manager_env.events.base_com=null + - ++manager_env.events.randomize_rigid_body_mass=null + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered,++manager_env.config.render_height=368,++manager_env.config.render_results=true,++manager_env.config.render_width=640,++manager_env.events.add_joint_default_pos=null,++manager_env.events.base_com=null,++manager_env.events.physics_material=null,++manager_env.events.randomize_rigid_body_mass=null,+headless=true,+num_envs=1,+use_wandb=false,checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260814_183032-TEST + choices: + manager_env/recorders: empty + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_183032-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_183032-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..122746eb732d9716968ccf0003c50c9f0ae475ca --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_183032-TEST/.hydra/overrides.yaml @@ -0,0 +1,13 @@ +- checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +- +num_envs=1 +- +headless=true +- +use_wandb=false +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered +- ++manager_env.config.render_results=true +- ++manager_env.config.render_width=640 +- ++manager_env.config.render_height=368 +- ++manager_env.events.physics_material=null +- ++manager_env.events.add_joint_default_pos=null +- ++manager_env.events.base_com=null +- ++manager_env.events.randomize_rigid_body_mass=null diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_183032-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260814_183032-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..90d9b78d690ee274f9516dcf273cb7dc9250ecc1 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_183032-TEST/eval.log @@ -0,0 +1,188 @@ +2026-08-14 18:30:32.761 | INFO | __main__:main:90 - Loading training config file from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/config.yaml +2026-08-14 18:30:36.212 | WARNING | logging:callHandlers:1762 - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +2026-08-14 18:30:36.215 | INFO | logging:callHandlers:1762 - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +2026-08-14 18:30:36.215 | INFO | logging:callHandlers:1762 - Using device: cuda +2026-08-14 18:30:36.216 | INFO | logging:callHandlers:1762 - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.rendering.kit +2026-08-14 18:30:36.506 | DEBUG | logging:callHandlers:1762 - Using selector: EpollSelector +2026-08-14 18:30:44.711 | DEBUG | logging:callHandlers:1762 - Defining data type 'any' as 'Any' +2026-08-14 18:30:44.711 | DEBUG | logging:callHandlers:1762 - Defining data type 'bool' as 'Bool' and array 'BoolArray +2026-08-14 18:30:44.711 | DEBUG | logging:callHandlers:1762 - Defining data type 'bundle' as 'Bundle' +2026-08-14 18:30:44.711 | DEBUG | logging:callHandlers:1762 - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +2026-08-14 18:30:44.712 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +2026-08-14 18:30:44.712 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +2026-08-14 18:30:44.712 | DEBUG | logging:callHandlers:1762 - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +2026-08-14 18:30:44.712 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +2026-08-14 18:30:44.712 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +2026-08-14 18:30:44.712 | DEBUG | logging:callHandlers:1762 - Defining data type 'double' as 'Double' and array 'DoubleArray +2026-08-14 18:30:44.712 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +2026-08-14 18:30:44.712 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +2026-08-14 18:30:44.712 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +2026-08-14 18:30:44.712 | DEBUG | logging:callHandlers:1762 - Defining data type 'execution' as 'Execution' +2026-08-14 18:30:44.712 | DEBUG | logging:callHandlers:1762 - Defining data type 'float' as 'Float' and array 'FloatArray +2026-08-14 18:30:44.713 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +2026-08-14 18:30:44.713 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +2026-08-14 18:30:44.713 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +2026-08-14 18:30:44.713 | DEBUG | logging:callHandlers:1762 - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +2026-08-14 18:30:44.713 | DEBUG | logging:callHandlers:1762 - Defining data type 'half' as 'Half' and array 'HalfArray +2026-08-14 18:30:44.713 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +2026-08-14 18:30:44.713 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +2026-08-14 18:30:44.713 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +2026-08-14 18:30:44.713 | DEBUG | logging:callHandlers:1762 - Defining data type 'int' as 'Int' and array 'IntArray +2026-08-14 18:30:44.714 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +2026-08-14 18:30:44.714 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +2026-08-14 18:30:44.714 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +2026-08-14 18:30:44.714 | DEBUG | logging:callHandlers:1762 - Defining data type 'int64' as 'Int64' and array 'Int64Array +2026-08-14 18:30:44.714 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +2026-08-14 18:30:44.714 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +2026-08-14 18:30:44.714 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +2026-08-14 18:30:44.714 | DEBUG | logging:callHandlers:1762 - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +2026-08-14 18:30:44.714 | DEBUG | logging:callHandlers:1762 - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +2026-08-14 18:30:44.714 | DEBUG | logging:callHandlers:1762 - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +2026-08-14 18:30:44.715 | DEBUG | logging:callHandlers:1762 - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +2026-08-14 18:30:44.715 | DEBUG | logging:callHandlers:1762 - Defining data type 'path' as 'Path' +2026-08-14 18:30:44.715 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +2026-08-14 18:30:44.715 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +2026-08-14 18:30:44.715 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +2026-08-14 18:30:44.715 | DEBUG | logging:callHandlers:1762 - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +2026-08-14 18:30:44.715 | DEBUG | logging:callHandlers:1762 - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +2026-08-14 18:30:44.715 | DEBUG | logging:callHandlers:1762 - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +2026-08-14 18:30:44.715 | DEBUG | logging:callHandlers:1762 - Defining data type 'string' as 'String' +2026-08-14 18:30:44.715 | DEBUG | logging:callHandlers:1762 - Defining data type 'target' as 'Target' +2026-08-14 18:30:44.715 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +2026-08-14 18:30:44.716 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +2026-08-14 18:30:44.716 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +2026-08-14 18:30:44.716 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +2026-08-14 18:30:44.716 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +2026-08-14 18:30:44.716 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +2026-08-14 18:30:44.716 | DEBUG | logging:callHandlers:1762 - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +2026-08-14 18:30:44.716 | DEBUG | logging:callHandlers:1762 - Defining data type 'token' as 'Token' and array 'TokenArray +2026-08-14 18:30:44.716 | DEBUG | logging:callHandlers:1762 - Defining data type 'uchar' as 'UChar' and array 'UCharArray +2026-08-14 18:30:44.716 | DEBUG | logging:callHandlers:1762 - Defining data type 'uint' as 'UInt' and array 'UIntArray +2026-08-14 18:30:44.716 | DEBUG | logging:callHandlers:1762 - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +2026-08-14 18:30:44.717 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +2026-08-14 18:30:44.717 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +2026-08-14 18:30:44.717 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +2026-08-14 18:30:50.774 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch +2026-08-14 18:30:57.488 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory Articulation. +2026-08-14 18:30:57.612 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +2026-08-14 18:30:57.624 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:30:58.277 | INFO | logging:callHandlers:1762 - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +2026-08-14 18:30:58.285 | INFO | logging:callHandlers:1762 - Applied RobotAPI to prim /g1 +2026-08-14 18:30:58.291 | INFO | logging:callHandlers:1762 - Set isaac:robotType = 'Default' on /g1 +2026-08-14 18:30:58.292 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.293 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.293 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.294 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.294 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.295 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.295 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.296 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.297 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.297 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.298 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.298 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.299 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.299 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.300 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.300 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.301 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.301 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.302 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.302 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.303 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.303 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.304 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.304 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.305 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.305 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.306 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.306 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.307 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:30:58.328 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:30:58.404 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_183057_6311/main/payloads/base.usda +2026-08-14 18:30:58.932 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_183057_6311/main/main.usda +2026-08-14 18:30:58.939 | INFO | logging:callHandlers:1762 - Skipping disabled rule: Delete Newton Redundant APIs +2026-08-14 18:30:59.305 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory FrameView. +2026-08-14 18:30:59.359 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory ContactSensor. +2026-08-14 18:31:03.297 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory Renderer. +2026-08-14 18:31:03.297 | INFO | logging:callHandlers:1762 - Created new renderer for simulation: NewtonWarpRenderer +2026-08-14 18:31:03.298 | INFO | logging:callHandlers:1762 - Dispatching MODEL_INIT callbacks +2026-08-14 18:31:03.298 | INFO | logging:callHandlers:1762 - Finalizing model on device: cuda:0 +2026-08-14 18:31:07.664 | INFO | logging:callHandlers:1762 - Dispatching PHYSICS_READY callbacks +2026-08-14 18:31:07.919 | INFO | logging:callHandlers:1762 - Simulation parameters for joints in /World/envs/env_.*/Robot: ++-------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 2 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 3 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 4 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 5 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 6 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 7 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 8 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 9 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 11 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 12 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 13 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 14 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 15 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 16 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 17 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 18 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 19 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 20 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 21 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 22 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 23 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 24 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 25 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 26 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 27 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +2026-08-14 18:31:07.920 | INFO | logging:callHandlers:1762 - Using renderer: NewtonWarpRenderer +2026-08-14 18:31:07.961 | INFO | logging:callHandlers:1762 - Adding contact sensor for /World/envs/env_.*/Robot/.* with filter all bodies/shapes +2026-08-14 18:31:07.966 | INFO | logging:callHandlers:1762 - Contact sensor initialized with 30 sensors. +2026-08-14 18:31:07.967 | INFO | logging:callHandlers:1762 - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +2026-08-14 18:31:07.967 | INFO | logging:callHandlers:1762 - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +2026-08-14 18:31:12.954 | WARNING | logging:callHandlers:1762 - cubric IAdapter minor version newer than this shim was validated against: plugin reports v0.2, shim is pinned to v0.1. Proceeding under semver minor-compatibility — if transforms misbehave, verify the vtable layout against omni/cubric/IAdapter.h. +2026-08-14 18:31:12.954 | INFO | logging:callHandlers:1762 - cubric IAdapter bindings ready +2026-08-14 18:31:12.955 | INFO | logging:callHandlers:1762 - cubric bindings ready (adapter deferred to first render) +2026-08-14 18:31:12.955 | INFO | logging:callHandlers:1762 - Newton CUDA graph capture deferred until first step() (RTX active) +2026-08-14 18:31:13.049 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:235 - Loaded skeleton from gear_sonic/data/assets/robot_description/mjcf/g1_29dof_rev_1_0.xml +2026-08-14 18:31:13.049 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:236 - Loading motion data from /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered... +2026-08-14 18:31:13.050 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_data:472 - Loaded 2 motions +2026-08-14 18:31:13.548 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1091 - Loading 1 motions... +2026-08-14 18:31:13.550 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1092 - Sampling motion: tensor([1], device='cuda:0'), .... +2026-08-14 18:31:13.550 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1093 - Current motion keys: ['walk_forward_amateur_001__A001'], .... +2026-08-14 18:31:13.550 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1120 - Increased file descriptor limits from 2450/1048576 to 1048576/1048576 +2026-08-14 18:31:13.632 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1140 - Loading motions with 1 jobs... +2026-08-14 18:31:13.828 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1577 - Loaded 1 motions with a total length of 40.020s and 2002 frames. +2026-08-14 18:31:14.467 | INFO | logging:callHandlers:1762 - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'left_hip_roll_joint', 'left_hip_yaw_joint', 'left_knee_joint', 'left_ankle_pitch_joint', 'left_ankle_roll_joint', 'right_hip_pitch_joint', 'right_hip_roll_joint', 'right_hip_yaw_joint', 'right_knee_joint', 'right_ankle_pitch_joint', 'right_ankle_roll_joint', 'waist_yaw_joint', 'waist_roll_joint', 'waist_pitch_joint', 'left_shoulder_pitch_joint', 'left_shoulder_roll_joint', 'left_shoulder_yaw_joint', 'left_elbow_joint', 'left_wrist_roll_joint', 'left_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_shoulder_pitch_joint', 'right_shoulder_roll_joint', 'right_shoulder_yaw_joint', 'right_elbow_joint', 'right_wrist_roll_joint', 'right_wrist_pitch_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] +2026-08-14 18:31:15.165 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_grid:1227 - Setting up replay grid: 1 rows x 1 cols with 2.0m spacing +2026-08-14 18:31:15.165 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_grid:1247 - Grid bounds: X=[0.0, 0.0], Y=[0.0, 0.0] +2026-08-14 18:31:15.173 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1440 - +============================================================ +2026-08-14 18:31:15.173 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1441 - Batch Replaying 1 Environments +2026-08-14 18:31:15.174 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1442 - Unique motion IDs: [0] +2026-08-14 18:31:15.174 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1443 - Max frames: 20 +2026-08-14 18:31:15.174 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1444 - Max duration: 0.40s (@ 50 FPS) +2026-08-14 18:31:15.174 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1445 - Speed: 1.0x +2026-08-14 18:31:15.174 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1446 - ============================================================ + +2026-08-14 18:31:15.174 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1667 - Replay Controls: +2026-08-14 18:31:15.174 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1668 - G: Pause/Resume +2026-08-14 18:31:15.174 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1669 - B: Toggle Reverse Play +2026-08-14 18:31:15.174 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1670 - LEFT/RIGHT: Step backward/forward (when paused) +2026-08-14 18:31:15.174 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1671 - R: Restart from beginning +2026-08-14 18:31:15.174 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1672 - ESC: Exit replay +2026-08-14 18:31:15.174 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1673 - +/-: Increase/Decrease speed +2026-08-14 18:31:15.174 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1674 - +2026-08-14 18:31:16.381 | INFO | logging:callHandlers:1762 - Newton CUDA graph captured (deferred relaxed mode, RTX-compatible) +2026-08-14 18:31:16.405 | INFO | logging:callHandlers:1762 - cubric GPU transform hierarchy enabled +2026-08-14 18:31:16.829 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:step_replay:2085 - Replay complete! diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_183032-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260814_183032-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..867041bdaa64dbdd2258ed5a8bbe30a0689bfbc9 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_183032-TEST/eval_agent_trl.log @@ -0,0 +1,157 @@ +[2026-08-14 18:30:36,212][isaaclab.app.app_launcher][WARNING] - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +[2026-08-14 18:30:36,215][isaaclab.app.app_launcher][INFO] - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +[2026-08-14 18:30:36,215][isaaclab.app.app_launcher][INFO] - Using device: cuda +[2026-08-14 18:30:36,216][isaaclab.app.app_launcher][INFO] - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.rendering.kit +[2026-08-14 18:30:36,506][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-14 18:30:44,711][AutoNode][DEBUG] - Defining data type 'any' as 'Any' +[2026-08-14 18:30:44,711][AutoNode][DEBUG] - Defining data type 'bool' as 'Bool' and array 'BoolArray +[2026-08-14 18:30:44,711][AutoNode][DEBUG] - Defining data type 'bundle' as 'Bundle' +[2026-08-14 18:30:44,711][AutoNode][DEBUG] - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +[2026-08-14 18:30:44,711][AutoNode][DEBUG] - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +[2026-08-14 18:30:44,712][AutoNode][DEBUG] - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +[2026-08-14 18:30:44,712][AutoNode][DEBUG] - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +[2026-08-14 18:30:44,712][AutoNode][DEBUG] - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +[2026-08-14 18:30:44,712][AutoNode][DEBUG] - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +[2026-08-14 18:30:44,712][AutoNode][DEBUG] - Defining data type 'double' as 'Double' and array 'DoubleArray +[2026-08-14 18:30:44,712][AutoNode][DEBUG] - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +[2026-08-14 18:30:44,712][AutoNode][DEBUG] - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +[2026-08-14 18:30:44,712][AutoNode][DEBUG] - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +[2026-08-14 18:30:44,712][AutoNode][DEBUG] - Defining data type 'execution' as 'Execution' +[2026-08-14 18:30:44,712][AutoNode][DEBUG] - Defining data type 'float' as 'Float' and array 'FloatArray +[2026-08-14 18:30:44,713][AutoNode][DEBUG] - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +[2026-08-14 18:30:44,713][AutoNode][DEBUG] - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +[2026-08-14 18:30:44,713][AutoNode][DEBUG] - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +[2026-08-14 18:30:44,713][AutoNode][DEBUG] - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +[2026-08-14 18:30:44,713][AutoNode][DEBUG] - Defining data type 'half' as 'Half' and array 'HalfArray +[2026-08-14 18:30:44,713][AutoNode][DEBUG] - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +[2026-08-14 18:30:44,713][AutoNode][DEBUG] - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +[2026-08-14 18:30:44,713][AutoNode][DEBUG] - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +[2026-08-14 18:30:44,713][AutoNode][DEBUG] - Defining data type 'int' as 'Int' and array 'IntArray +[2026-08-14 18:30:44,713][AutoNode][DEBUG] - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +[2026-08-14 18:30:44,714][AutoNode][DEBUG] - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +[2026-08-14 18:30:44,714][AutoNode][DEBUG] - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +[2026-08-14 18:30:44,714][AutoNode][DEBUG] - Defining data type 'int64' as 'Int64' and array 'Int64Array +[2026-08-14 18:30:44,714][AutoNode][DEBUG] - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +[2026-08-14 18:30:44,714][AutoNode][DEBUG] - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +[2026-08-14 18:30:44,714][AutoNode][DEBUG] - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +[2026-08-14 18:30:44,714][AutoNode][DEBUG] - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +[2026-08-14 18:30:44,714][AutoNode][DEBUG] - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +[2026-08-14 18:30:44,714][AutoNode][DEBUG] - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +[2026-08-14 18:30:44,714][AutoNode][DEBUG] - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +[2026-08-14 18:30:44,715][AutoNode][DEBUG] - Defining data type 'path' as 'Path' +[2026-08-14 18:30:44,715][AutoNode][DEBUG] - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +[2026-08-14 18:30:44,715][AutoNode][DEBUG] - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +[2026-08-14 18:30:44,715][AutoNode][DEBUG] - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +[2026-08-14 18:30:44,715][AutoNode][DEBUG] - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +[2026-08-14 18:30:44,715][AutoNode][DEBUG] - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +[2026-08-14 18:30:44,715][AutoNode][DEBUG] - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +[2026-08-14 18:30:44,715][AutoNode][DEBUG] - Defining data type 'string' as 'String' +[2026-08-14 18:30:44,715][AutoNode][DEBUG] - Defining data type 'target' as 'Target' +[2026-08-14 18:30:44,715][AutoNode][DEBUG] - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +[2026-08-14 18:30:44,716][AutoNode][DEBUG] - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +[2026-08-14 18:30:44,716][AutoNode][DEBUG] - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +[2026-08-14 18:30:44,716][AutoNode][DEBUG] - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +[2026-08-14 18:30:44,716][AutoNode][DEBUG] - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +[2026-08-14 18:30:44,716][AutoNode][DEBUG] - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +[2026-08-14 18:30:44,716][AutoNode][DEBUG] - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +[2026-08-14 18:30:44,716][AutoNode][DEBUG] - Defining data type 'token' as 'Token' and array 'TokenArray +[2026-08-14 18:30:44,716][AutoNode][DEBUG] - Defining data type 'uchar' as 'UChar' and array 'UCharArray +[2026-08-14 18:30:44,716][AutoNode][DEBUG] - Defining data type 'uint' as 'UInt' and array 'UIntArray +[2026-08-14 18:30:44,716][AutoNode][DEBUG] - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +[2026-08-14 18:30:44,716][AutoNode][DEBUG] - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +[2026-08-14 18:30:44,717][AutoNode][DEBUG] - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +[2026-08-14 18:30:44,717][AutoNode][DEBUG] - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +[2026-08-14 18:30:57,488][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory Articulation. +[2026-08-14 18:30:57,612][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +[2026-08-14 18:30:57,623][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:30:58,277][isaacsim.asset.importer.utils.impl.asset_utils][INFO] - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +[2026-08-14 18:30:58,285][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Applied RobotAPI to prim /g1 +[2026-08-14 18:30:58,291][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Set isaac:robotType = 'Default' on /g1 +[2026-08-14 18:30:58,292][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,293][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,293][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,294][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,294][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,295][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,295][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,296][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,297][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,297][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,298][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,298][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,299][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,299][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,300][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,300][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,301][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,301][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,302][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,302][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,303][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,303][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,304][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,304][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,305][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,305][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,305][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,306][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,306][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:30:58,328][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:30:58,403][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_183057_6311/main/payloads/base.usda +[2026-08-14 18:30:58,932][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_183057_6311/main/main.usda +[2026-08-14 18:30:58,939][isaacsim.asset.transformer.manager][INFO] - Skipping disabled rule: Delete Newton Redundant APIs +[2026-08-14 18:30:59,305][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory FrameView. +[2026-08-14 18:30:59,358][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory ContactSensor. +[2026-08-14 18:31:03,297][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory Renderer. +[2026-08-14 18:31:03,297][isaaclab.renderers.render_context][INFO] - Created new renderer for simulation: NewtonWarpRenderer +[2026-08-14 18:31:03,298][isaaclab_newton.physics.newton_manager][INFO] - Dispatching MODEL_INIT callbacks +[2026-08-14 18:31:03,298][isaaclab_newton.physics.newton_manager][INFO] - Finalizing model on device: cuda:0 +[2026-08-14 18:31:07,664][isaaclab_newton.physics.newton_manager][INFO] - Dispatching PHYSICS_READY callbacks +[2026-08-14 18:31:07,918][isaaclab_newton.assets.articulation.articulation][INFO] - Simulation parameters for joints in /World/envs/env_.*/Robot: ++-------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 2 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 3 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 4 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 5 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 6 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 7 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 8 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 9 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 11 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 12 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 13 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 14 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 15 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 16 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 17 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 18 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 19 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 20 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 21 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 22 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 23 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 24 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 25 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 26 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 27 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +[2026-08-14 18:31:07,920][isaaclab.sensors.camera.camera][INFO] - Using renderer: NewtonWarpRenderer +[2026-08-14 18:31:07,960][isaaclab_newton.physics.newton_manager][INFO] - Adding contact sensor for /World/envs/env_.*/Robot/.* with filter all bodies/shapes +[2026-08-14 18:31:07,966][isaaclab_newton.sensors.contact_sensor.contact_sensor][INFO] - Contact sensor initialized with 30 sensors. +[2026-08-14 18:31:07,967][isaaclab_newton.sensors.contact_sensor.contact_sensor][INFO] - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +[2026-08-14 18:31:07,967][isaaclab_newton.sensors.contact_sensor.contact_sensor_data][INFO] - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +[2026-08-14 18:31:12,954][isaaclab_newton.physics._cubric][WARNING] - cubric IAdapter minor version newer than this shim was validated against: plugin reports v0.2, shim is pinned to v0.1. Proceeding under semver minor-compatibility — if transforms misbehave, verify the vtable layout against omni/cubric/IAdapter.h. +[2026-08-14 18:31:12,954][isaaclab_newton.physics._cubric][INFO] - cubric IAdapter bindings ready +[2026-08-14 18:31:12,955][isaaclab_newton.physics.newton_manager][INFO] - cubric bindings ready (adapter deferred to first render) +[2026-08-14 18:31:12,955][isaaclab_newton.physics.newton_manager][INFO] - Newton CUDA graph capture deferred until first step() (RTX active) +[2026-08-14 18:31:14,467][isaaclab.envs.mdp.actions.joint_actions][INFO] - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'left_hip_roll_joint', 'left_hip_yaw_joint', 'left_knee_joint', 'left_ankle_pitch_joint', 'left_ankle_roll_joint', 'right_hip_pitch_joint', 'right_hip_roll_joint', 'right_hip_yaw_joint', 'right_knee_joint', 'right_ankle_pitch_joint', 'right_ankle_roll_joint', 'waist_yaw_joint', 'waist_roll_joint', 'waist_pitch_joint', 'left_shoulder_pitch_joint', 'left_shoulder_roll_joint', 'left_shoulder_yaw_joint', 'left_elbow_joint', 'left_wrist_roll_joint', 'left_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_shoulder_pitch_joint', 'right_shoulder_roll_joint', 'right_shoulder_yaw_joint', 'right_elbow_joint', 'right_wrist_roll_joint', 'right_wrist_pitch_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] +[2026-08-14 18:31:16,381][isaaclab_newton.physics.newton_manager][INFO] - Newton CUDA graph captured (deferred relaxed mode, RTX-compatible) +[2026-08-14 18:31:16,405][isaaclab_newton.physics.newton_manager][INFO] - cubric GPU transform hierarchy enabled diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_183245-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_183245-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..35b05e2291929bc56f854f05d606a5fcf8c15ed7 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_183245-TEST/.hydra/config.yaml @@ -0,0 +1,40 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + smpl_motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + config: + render_results: true + render_width: 640 + render_height: 368 + events: + physics_material: null + add_joint_default_pos: null + base_com: null + randomize_rigid_body_mass: null +checkpoint: /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +num_envs: 1 +headless: true +use_wandb: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_183245-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_183245-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2edab6e2b672f4071be2b0ad0ffe9c951dd91b06 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_183245-TEST/.hydra/hydra.yaml @@ -0,0 +1,168 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + - +num_envs=1 + - +headless=true + - +use_wandb=false + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + - ++manager_env.config.render_results=true + - ++manager_env.config.render_width=640 + - ++manager_env.config.render_height=368 + - ++manager_env.events.physics_material=null + - ++manager_env.events.add_joint_default_pos=null + - ++manager_env.events.base_com=null + - ++manager_env.events.randomize_rigid_body_mass=null + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered,++manager_env.config.render_height=368,++manager_env.config.render_results=true,++manager_env.config.render_width=640,++manager_env.events.add_joint_default_pos=null,++manager_env.events.base_com=null,++manager_env.events.physics_material=null,++manager_env.events.randomize_rigid_body_mass=null,+headless=true,+num_envs=1,+use_wandb=false,checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260814_183245-TEST + choices: + manager_env/recorders: empty + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_183245-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_183245-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..122746eb732d9716968ccf0003c50c9f0ae475ca --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_183245-TEST/.hydra/overrides.yaml @@ -0,0 +1,13 @@ +- checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +- +num_envs=1 +- +headless=true +- +use_wandb=false +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered +- ++manager_env.config.render_results=true +- ++manager_env.config.render_width=640 +- ++manager_env.config.render_height=368 +- ++manager_env.events.physics_material=null +- ++manager_env.events.add_joint_default_pos=null +- ++manager_env.events.base_com=null +- ++manager_env.events.randomize_rigid_body_mass=null diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_183245-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260814_183245-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..2f61d68c4bea5f7d4ba1db6d35ef19135fa9a6a9 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_183245-TEST/eval.log @@ -0,0 +1,188 @@ +2026-08-14 18:32:45.970 | INFO | __main__:main:90 - Loading training config file from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/config.yaml +2026-08-14 18:32:51.322 | WARNING | logging:callHandlers:1762 - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +2026-08-14 18:32:51.324 | INFO | logging:callHandlers:1762 - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +2026-08-14 18:32:51.325 | INFO | logging:callHandlers:1762 - Using device: cuda +2026-08-14 18:32:51.326 | INFO | logging:callHandlers:1762 - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.rendering.kit +2026-08-14 18:32:51.592 | DEBUG | logging:callHandlers:1762 - Using selector: EpollSelector +2026-08-14 18:33:00.283 | DEBUG | logging:callHandlers:1762 - Defining data type 'any' as 'Any' +2026-08-14 18:33:00.283 | DEBUG | logging:callHandlers:1762 - Defining data type 'bool' as 'Bool' and array 'BoolArray +2026-08-14 18:33:00.283 | DEBUG | logging:callHandlers:1762 - Defining data type 'bundle' as 'Bundle' +2026-08-14 18:33:00.283 | DEBUG | logging:callHandlers:1762 - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +2026-08-14 18:33:00.283 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +2026-08-14 18:33:00.284 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +2026-08-14 18:33:00.284 | DEBUG | logging:callHandlers:1762 - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +2026-08-14 18:33:00.284 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +2026-08-14 18:33:00.284 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +2026-08-14 18:33:00.284 | DEBUG | logging:callHandlers:1762 - Defining data type 'double' as 'Double' and array 'DoubleArray +2026-08-14 18:33:00.284 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +2026-08-14 18:33:00.284 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +2026-08-14 18:33:00.284 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +2026-08-14 18:33:00.284 | DEBUG | logging:callHandlers:1762 - Defining data type 'execution' as 'Execution' +2026-08-14 18:33:00.284 | DEBUG | logging:callHandlers:1762 - Defining data type 'float' as 'Float' and array 'FloatArray +2026-08-14 18:33:00.285 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +2026-08-14 18:33:00.285 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +2026-08-14 18:33:00.285 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +2026-08-14 18:33:00.285 | DEBUG | logging:callHandlers:1762 - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +2026-08-14 18:33:00.285 | DEBUG | logging:callHandlers:1762 - Defining data type 'half' as 'Half' and array 'HalfArray +2026-08-14 18:33:00.285 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +2026-08-14 18:33:00.285 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +2026-08-14 18:33:00.285 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +2026-08-14 18:33:00.285 | DEBUG | logging:callHandlers:1762 - Defining data type 'int' as 'Int' and array 'IntArray +2026-08-14 18:33:00.285 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +2026-08-14 18:33:00.286 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +2026-08-14 18:33:00.286 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +2026-08-14 18:33:00.286 | DEBUG | logging:callHandlers:1762 - Defining data type 'int64' as 'Int64' and array 'Int64Array +2026-08-14 18:33:00.286 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +2026-08-14 18:33:00.286 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +2026-08-14 18:33:00.286 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +2026-08-14 18:33:00.286 | DEBUG | logging:callHandlers:1762 - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +2026-08-14 18:33:00.286 | DEBUG | logging:callHandlers:1762 - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +2026-08-14 18:33:00.286 | DEBUG | logging:callHandlers:1762 - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +2026-08-14 18:33:00.286 | DEBUG | logging:callHandlers:1762 - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +2026-08-14 18:33:00.287 | DEBUG | logging:callHandlers:1762 - Defining data type 'path' as 'Path' +2026-08-14 18:33:00.287 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +2026-08-14 18:33:00.287 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +2026-08-14 18:33:00.287 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +2026-08-14 18:33:00.287 | DEBUG | logging:callHandlers:1762 - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +2026-08-14 18:33:00.287 | DEBUG | logging:callHandlers:1762 - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +2026-08-14 18:33:00.287 | DEBUG | logging:callHandlers:1762 - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +2026-08-14 18:33:00.287 | DEBUG | logging:callHandlers:1762 - Defining data type 'string' as 'String' +2026-08-14 18:33:00.287 | DEBUG | logging:callHandlers:1762 - Defining data type 'target' as 'Target' +2026-08-14 18:33:00.287 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +2026-08-14 18:33:00.288 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +2026-08-14 18:33:00.288 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +2026-08-14 18:33:00.288 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +2026-08-14 18:33:00.288 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +2026-08-14 18:33:00.288 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +2026-08-14 18:33:00.288 | DEBUG | logging:callHandlers:1762 - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +2026-08-14 18:33:00.288 | DEBUG | logging:callHandlers:1762 - Defining data type 'token' as 'Token' and array 'TokenArray +2026-08-14 18:33:00.288 | DEBUG | logging:callHandlers:1762 - Defining data type 'uchar' as 'UChar' and array 'UCharArray +2026-08-14 18:33:00.288 | DEBUG | logging:callHandlers:1762 - Defining data type 'uint' as 'UInt' and array 'UIntArray +2026-08-14 18:33:00.288 | DEBUG | logging:callHandlers:1762 - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +2026-08-14 18:33:00.288 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +2026-08-14 18:33:00.289 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +2026-08-14 18:33:00.289 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +2026-08-14 18:33:06.047 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch +2026-08-14 18:33:12.163 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory Articulation. +2026-08-14 18:33:12.284 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +2026-08-14 18:33:12.294 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:33:12.876 | INFO | logging:callHandlers:1762 - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +2026-08-14 18:33:12.883 | INFO | logging:callHandlers:1762 - Applied RobotAPI to prim /g1 +2026-08-14 18:33:12.889 | INFO | logging:callHandlers:1762 - Set isaac:robotType = 'Default' on /g1 +2026-08-14 18:33:12.890 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.891 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.891 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.892 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.892 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.893 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.894 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.894 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.895 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.895 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.896 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.896 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.897 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.898 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.898 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.899 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.899 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.900 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.901 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.901 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.902 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.902 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.903 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.903 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.904 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.904 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.904 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.905 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.906 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:33:12.927 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:33:13.003 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_183312_6311/main/payloads/base.usda +2026-08-14 18:33:13.499 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_183312_6311/main/main.usda +2026-08-14 18:33:13.506 | INFO | logging:callHandlers:1762 - Skipping disabled rule: Delete Newton Redundant APIs +2026-08-14 18:33:13.867 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory FrameView. +2026-08-14 18:33:13.917 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory ContactSensor. +2026-08-14 18:33:17.714 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory Renderer. +2026-08-14 18:33:17.715 | INFO | logging:callHandlers:1762 - Created new renderer for simulation: NewtonWarpRenderer +2026-08-14 18:33:17.715 | INFO | logging:callHandlers:1762 - Dispatching MODEL_INIT callbacks +2026-08-14 18:33:17.715 | INFO | logging:callHandlers:1762 - Finalizing model on device: cuda:0 +2026-08-14 18:33:21.048 | INFO | logging:callHandlers:1762 - Dispatching PHYSICS_READY callbacks +2026-08-14 18:33:21.278 | INFO | logging:callHandlers:1762 - Simulation parameters for joints in /World/envs/env_.*/Robot: ++-------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 2 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 3 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 4 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 5 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 6 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 7 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 8 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 9 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 11 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 12 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 13 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 14 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 15 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 16 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 17 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 18 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 19 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 20 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 21 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 22 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 23 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 24 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 25 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 26 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 27 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +2026-08-14 18:33:21.280 | INFO | logging:callHandlers:1762 - Using renderer: NewtonWarpRenderer +2026-08-14 18:33:21.305 | INFO | logging:callHandlers:1762 - Adding contact sensor for /World/envs/env_.*/Robot/.* with filter all bodies/shapes +2026-08-14 18:33:21.309 | INFO | logging:callHandlers:1762 - Contact sensor initialized with 30 sensors. +2026-08-14 18:33:21.310 | INFO | logging:callHandlers:1762 - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +2026-08-14 18:33:21.310 | INFO | logging:callHandlers:1762 - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +2026-08-14 18:33:25.960 | WARNING | logging:callHandlers:1762 - cubric IAdapter minor version newer than this shim was validated against: plugin reports v0.2, shim is pinned to v0.1. Proceeding under semver minor-compatibility — if transforms misbehave, verify the vtable layout against omni/cubric/IAdapter.h. +2026-08-14 18:33:25.960 | INFO | logging:callHandlers:1762 - cubric IAdapter bindings ready +2026-08-14 18:33:25.960 | INFO | logging:callHandlers:1762 - cubric bindings ready (adapter deferred to first render) +2026-08-14 18:33:25.960 | INFO | logging:callHandlers:1762 - Newton CUDA graph capture deferred until first step() (RTX active) +2026-08-14 18:33:26.054 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:235 - Loaded skeleton from gear_sonic/data/assets/robot_description/mjcf/g1_29dof_rev_1_0.xml +2026-08-14 18:33:26.054 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:236 - Loading motion data from /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered... +2026-08-14 18:33:26.054 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_data:472 - Loaded 2 motions +2026-08-14 18:33:26.648 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1091 - Loading 1 motions... +2026-08-14 18:33:26.650 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1092 - Sampling motion: tensor([1], device='cuda:0'), .... +2026-08-14 18:33:26.650 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1093 - Current motion keys: ['walk_forward_amateur_001__A001'], .... +2026-08-14 18:33:26.650 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1120 - Increased file descriptor limits from 2450/1048576 to 1048576/1048576 +2026-08-14 18:33:26.726 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1140 - Loading motions with 1 jobs... +2026-08-14 18:33:26.931 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1577 - Loaded 1 motions with a total length of 40.020s and 2002 frames. +2026-08-14 18:33:27.587 | INFO | logging:callHandlers:1762 - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'left_hip_roll_joint', 'left_hip_yaw_joint', 'left_knee_joint', 'left_ankle_pitch_joint', 'left_ankle_roll_joint', 'right_hip_pitch_joint', 'right_hip_roll_joint', 'right_hip_yaw_joint', 'right_knee_joint', 'right_ankle_pitch_joint', 'right_ankle_roll_joint', 'waist_yaw_joint', 'waist_roll_joint', 'waist_pitch_joint', 'left_shoulder_pitch_joint', 'left_shoulder_roll_joint', 'left_shoulder_yaw_joint', 'left_elbow_joint', 'left_wrist_roll_joint', 'left_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_shoulder_pitch_joint', 'right_shoulder_roll_joint', 'right_shoulder_yaw_joint', 'right_elbow_joint', 'right_wrist_roll_joint', 'right_wrist_pitch_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] +2026-08-14 18:33:28.286 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_grid:1227 - Setting up replay grid: 1 rows x 1 cols with 2.0m spacing +2026-08-14 18:33:28.287 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_grid:1247 - Grid bounds: X=[0.0, 0.0], Y=[0.0, 0.0] +2026-08-14 18:33:28.294 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1440 - +============================================================ +2026-08-14 18:33:28.294 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1441 - Batch Replaying 1 Environments +2026-08-14 18:33:28.295 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1442 - Unique motion IDs: [0] +2026-08-14 18:33:28.295 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1443 - Max frames: 20 +2026-08-14 18:33:28.295 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1444 - Max duration: 0.40s (@ 50 FPS) +2026-08-14 18:33:28.295 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1445 - Speed: 1.0x +2026-08-14 18:33:28.295 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1446 - ============================================================ + +2026-08-14 18:33:28.295 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1667 - Replay Controls: +2026-08-14 18:33:28.295 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1668 - G: Pause/Resume +2026-08-14 18:33:28.295 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1669 - B: Toggle Reverse Play +2026-08-14 18:33:28.295 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1670 - LEFT/RIGHT: Step backward/forward (when paused) +2026-08-14 18:33:28.295 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1671 - R: Restart from beginning +2026-08-14 18:33:28.295 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1672 - ESC: Exit replay +2026-08-14 18:33:28.295 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1673 - +/-: Increase/Decrease speed +2026-08-14 18:33:28.295 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1674 - +2026-08-14 18:33:29.525 | INFO | logging:callHandlers:1762 - Newton CUDA graph captured (deferred relaxed mode, RTX-compatible) +2026-08-14 18:33:29.530 | INFO | logging:callHandlers:1762 - cubric GPU transform hierarchy enabled +2026-08-14 18:33:29.857 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:step_replay:2085 - Replay complete! diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_183245-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260814_183245-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..2363745435a301d9870d09c9f7da49dd653688d9 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_183245-TEST/eval_agent_trl.log @@ -0,0 +1,157 @@ +[2026-08-14 18:32:51,321][isaaclab.app.app_launcher][WARNING] - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +[2026-08-14 18:32:51,324][isaaclab.app.app_launcher][INFO] - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +[2026-08-14 18:32:51,324][isaaclab.app.app_launcher][INFO] - Using device: cuda +[2026-08-14 18:32:51,326][isaaclab.app.app_launcher][INFO] - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.rendering.kit +[2026-08-14 18:32:51,592][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-14 18:33:00,283][AutoNode][DEBUG] - Defining data type 'any' as 'Any' +[2026-08-14 18:33:00,283][AutoNode][DEBUG] - Defining data type 'bool' as 'Bool' and array 'BoolArray +[2026-08-14 18:33:00,283][AutoNode][DEBUG] - Defining data type 'bundle' as 'Bundle' +[2026-08-14 18:33:00,283][AutoNode][DEBUG] - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +[2026-08-14 18:33:00,283][AutoNode][DEBUG] - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +[2026-08-14 18:33:00,283][AutoNode][DEBUG] - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +[2026-08-14 18:33:00,284][AutoNode][DEBUG] - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +[2026-08-14 18:33:00,284][AutoNode][DEBUG] - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +[2026-08-14 18:33:00,284][AutoNode][DEBUG] - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +[2026-08-14 18:33:00,284][AutoNode][DEBUG] - Defining data type 'double' as 'Double' and array 'DoubleArray +[2026-08-14 18:33:00,284][AutoNode][DEBUG] - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +[2026-08-14 18:33:00,284][AutoNode][DEBUG] - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +[2026-08-14 18:33:00,284][AutoNode][DEBUG] - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +[2026-08-14 18:33:00,284][AutoNode][DEBUG] - Defining data type 'execution' as 'Execution' +[2026-08-14 18:33:00,284][AutoNode][DEBUG] - Defining data type 'float' as 'Float' and array 'FloatArray +[2026-08-14 18:33:00,284][AutoNode][DEBUG] - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +[2026-08-14 18:33:00,285][AutoNode][DEBUG] - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +[2026-08-14 18:33:00,285][AutoNode][DEBUG] - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +[2026-08-14 18:33:00,285][AutoNode][DEBUG] - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +[2026-08-14 18:33:00,285][AutoNode][DEBUG] - Defining data type 'half' as 'Half' and array 'HalfArray +[2026-08-14 18:33:00,285][AutoNode][DEBUG] - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +[2026-08-14 18:33:00,285][AutoNode][DEBUG] - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +[2026-08-14 18:33:00,285][AutoNode][DEBUG] - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +[2026-08-14 18:33:00,285][AutoNode][DEBUG] - Defining data type 'int' as 'Int' and array 'IntArray +[2026-08-14 18:33:00,285][AutoNode][DEBUG] - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +[2026-08-14 18:33:00,285][AutoNode][DEBUG] - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +[2026-08-14 18:33:00,286][AutoNode][DEBUG] - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +[2026-08-14 18:33:00,286][AutoNode][DEBUG] - Defining data type 'int64' as 'Int64' and array 'Int64Array +[2026-08-14 18:33:00,286][AutoNode][DEBUG] - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +[2026-08-14 18:33:00,286][AutoNode][DEBUG] - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +[2026-08-14 18:33:00,286][AutoNode][DEBUG] - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +[2026-08-14 18:33:00,286][AutoNode][DEBUG] - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +[2026-08-14 18:33:00,286][AutoNode][DEBUG] - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +[2026-08-14 18:33:00,286][AutoNode][DEBUG] - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +[2026-08-14 18:33:00,286][AutoNode][DEBUG] - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +[2026-08-14 18:33:00,286][AutoNode][DEBUG] - Defining data type 'path' as 'Path' +[2026-08-14 18:33:00,287][AutoNode][DEBUG] - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +[2026-08-14 18:33:00,287][AutoNode][DEBUG] - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +[2026-08-14 18:33:00,287][AutoNode][DEBUG] - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +[2026-08-14 18:33:00,287][AutoNode][DEBUG] - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +[2026-08-14 18:33:00,287][AutoNode][DEBUG] - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +[2026-08-14 18:33:00,287][AutoNode][DEBUG] - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +[2026-08-14 18:33:00,287][AutoNode][DEBUG] - Defining data type 'string' as 'String' +[2026-08-14 18:33:00,287][AutoNode][DEBUG] - Defining data type 'target' as 'Target' +[2026-08-14 18:33:00,287][AutoNode][DEBUG] - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +[2026-08-14 18:33:00,287][AutoNode][DEBUG] - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +[2026-08-14 18:33:00,288][AutoNode][DEBUG] - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +[2026-08-14 18:33:00,288][AutoNode][DEBUG] - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +[2026-08-14 18:33:00,288][AutoNode][DEBUG] - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +[2026-08-14 18:33:00,288][AutoNode][DEBUG] - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +[2026-08-14 18:33:00,288][AutoNode][DEBUG] - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +[2026-08-14 18:33:00,288][AutoNode][DEBUG] - Defining data type 'token' as 'Token' and array 'TokenArray +[2026-08-14 18:33:00,288][AutoNode][DEBUG] - Defining data type 'uchar' as 'UChar' and array 'UCharArray +[2026-08-14 18:33:00,288][AutoNode][DEBUG] - Defining data type 'uint' as 'UInt' and array 'UIntArray +[2026-08-14 18:33:00,288][AutoNode][DEBUG] - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +[2026-08-14 18:33:00,288][AutoNode][DEBUG] - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +[2026-08-14 18:33:00,289][AutoNode][DEBUG] - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +[2026-08-14 18:33:00,289][AutoNode][DEBUG] - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +[2026-08-14 18:33:12,163][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory Articulation. +[2026-08-14 18:33:12,284][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +[2026-08-14 18:33:12,294][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:33:12,875][isaacsim.asset.importer.utils.impl.asset_utils][INFO] - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +[2026-08-14 18:33:12,883][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Applied RobotAPI to prim /g1 +[2026-08-14 18:33:12,889][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Set isaac:robotType = 'Default' on /g1 +[2026-08-14 18:33:12,890][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,891][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,891][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,892][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,892][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,893][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,894][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,894][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,895][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,895][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,896][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,896][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,897][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,898][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,898][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,899][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,899][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,900][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,900][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,901][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,902][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,902][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,903][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,903][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,903][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,904][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,904][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,905][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,905][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:33:12,927][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:33:13,003][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_183312_6311/main/payloads/base.usda +[2026-08-14 18:33:13,499][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_183312_6311/main/main.usda +[2026-08-14 18:33:13,506][isaacsim.asset.transformer.manager][INFO] - Skipping disabled rule: Delete Newton Redundant APIs +[2026-08-14 18:33:13,867][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory FrameView. +[2026-08-14 18:33:13,917][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory ContactSensor. +[2026-08-14 18:33:17,714][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory Renderer. +[2026-08-14 18:33:17,714][isaaclab.renderers.render_context][INFO] - Created new renderer for simulation: NewtonWarpRenderer +[2026-08-14 18:33:17,715][isaaclab_newton.physics.newton_manager][INFO] - Dispatching MODEL_INIT callbacks +[2026-08-14 18:33:17,715][isaaclab_newton.physics.newton_manager][INFO] - Finalizing model on device: cuda:0 +[2026-08-14 18:33:21,048][isaaclab_newton.physics.newton_manager][INFO] - Dispatching PHYSICS_READY callbacks +[2026-08-14 18:33:21,278][isaaclab_newton.assets.articulation.articulation][INFO] - Simulation parameters for joints in /World/envs/env_.*/Robot: ++-------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 2 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 3 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 4 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 5 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 6 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 7 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 8 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 9 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 11 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 12 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 13 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 14 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 15 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 16 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 17 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 18 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 19 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 20 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 21 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 22 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 23 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 24 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 25 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 26 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 27 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +[2026-08-14 18:33:21,279][isaaclab.sensors.camera.camera][INFO] - Using renderer: NewtonWarpRenderer +[2026-08-14 18:33:21,305][isaaclab_newton.physics.newton_manager][INFO] - Adding contact sensor for /World/envs/env_.*/Robot/.* with filter all bodies/shapes +[2026-08-14 18:33:21,309][isaaclab_newton.sensors.contact_sensor.contact_sensor][INFO] - Contact sensor initialized with 30 sensors. +[2026-08-14 18:33:21,309][isaaclab_newton.sensors.contact_sensor.contact_sensor][INFO] - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +[2026-08-14 18:33:21,310][isaaclab_newton.sensors.contact_sensor.contact_sensor_data][INFO] - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +[2026-08-14 18:33:25,959][isaaclab_newton.physics._cubric][WARNING] - cubric IAdapter minor version newer than this shim was validated against: plugin reports v0.2, shim is pinned to v0.1. Proceeding under semver minor-compatibility — if transforms misbehave, verify the vtable layout against omni/cubric/IAdapter.h. +[2026-08-14 18:33:25,960][isaaclab_newton.physics._cubric][INFO] - cubric IAdapter bindings ready +[2026-08-14 18:33:25,960][isaaclab_newton.physics.newton_manager][INFO] - cubric bindings ready (adapter deferred to first render) +[2026-08-14 18:33:25,960][isaaclab_newton.physics.newton_manager][INFO] - Newton CUDA graph capture deferred until first step() (RTX active) +[2026-08-14 18:33:27,587][isaaclab.envs.mdp.actions.joint_actions][INFO] - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'left_hip_roll_joint', 'left_hip_yaw_joint', 'left_knee_joint', 'left_ankle_pitch_joint', 'left_ankle_roll_joint', 'right_hip_pitch_joint', 'right_hip_roll_joint', 'right_hip_yaw_joint', 'right_knee_joint', 'right_ankle_pitch_joint', 'right_ankle_roll_joint', 'waist_yaw_joint', 'waist_roll_joint', 'waist_pitch_joint', 'left_shoulder_pitch_joint', 'left_shoulder_roll_joint', 'left_shoulder_yaw_joint', 'left_elbow_joint', 'left_wrist_roll_joint', 'left_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_shoulder_pitch_joint', 'right_shoulder_roll_joint', 'right_shoulder_yaw_joint', 'right_elbow_joint', 'right_wrist_roll_joint', 'right_wrist_pitch_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] +[2026-08-14 18:33:29,525][isaaclab_newton.physics.newton_manager][INFO] - Newton CUDA graph captured (deferred relaxed mode, RTX-compatible) +[2026-08-14 18:33:29,530][isaaclab_newton.physics.newton_manager][INFO] - cubric GPU transform hierarchy enabled diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_183512-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_183512-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..35b05e2291929bc56f854f05d606a5fcf8c15ed7 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_183512-TEST/.hydra/config.yaml @@ -0,0 +1,40 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + smpl_motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + config: + render_results: true + render_width: 640 + render_height: 368 + events: + physics_material: null + add_joint_default_pos: null + base_com: null + randomize_rigid_body_mass: null +checkpoint: /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +num_envs: 1 +headless: true +use_wandb: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_183512-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_183512-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..23c9e9978211557ccf7ac07eeb616b0bc9abbe2e --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_183512-TEST/.hydra/hydra.yaml @@ -0,0 +1,168 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + - +num_envs=1 + - +headless=true + - +use_wandb=false + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + - ++manager_env.config.render_results=true + - ++manager_env.config.render_width=640 + - ++manager_env.config.render_height=368 + - ++manager_env.events.physics_material=null + - ++manager_env.events.add_joint_default_pos=null + - ++manager_env.events.base_com=null + - ++manager_env.events.randomize_rigid_body_mass=null + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered,++manager_env.config.render_height=368,++manager_env.config.render_results=true,++manager_env.config.render_width=640,++manager_env.events.add_joint_default_pos=null,++manager_env.events.base_com=null,++manager_env.events.physics_material=null,++manager_env.events.randomize_rigid_body_mass=null,+headless=true,+num_envs=1,+use_wandb=false,checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260814_183512-TEST + choices: + manager_env/recorders: empty + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_183512-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_183512-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..122746eb732d9716968ccf0003c50c9f0ae475ca --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_183512-TEST/.hydra/overrides.yaml @@ -0,0 +1,13 @@ +- checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +- +num_envs=1 +- +headless=true +- +use_wandb=false +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered +- ++manager_env.config.render_results=true +- ++manager_env.config.render_width=640 +- ++manager_env.config.render_height=368 +- ++manager_env.events.physics_material=null +- ++manager_env.events.add_joint_default_pos=null +- ++manager_env.events.base_com=null +- ++manager_env.events.randomize_rigid_body_mass=null diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_183512-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260814_183512-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..6407d785999aa94eac7150de4b67d3c6817cfcf1 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_183512-TEST/eval.log @@ -0,0 +1,188 @@ +2026-08-14 18:35:12.882 | INFO | __main__:main:90 - Loading training config file from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/config.yaml +2026-08-14 18:35:16.613 | WARNING | logging:callHandlers:1762 - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +2026-08-14 18:35:16.616 | INFO | logging:callHandlers:1762 - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +2026-08-14 18:35:16.616 | INFO | logging:callHandlers:1762 - Using device: cuda +2026-08-14 18:35:16.618 | INFO | logging:callHandlers:1762 - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.rendering.kit +2026-08-14 18:35:16.898 | DEBUG | logging:callHandlers:1762 - Using selector: EpollSelector +2026-08-14 18:35:22.359 | DEBUG | logging:callHandlers:1762 - Defining data type 'any' as 'Any' +2026-08-14 18:35:22.359 | DEBUG | logging:callHandlers:1762 - Defining data type 'bool' as 'Bool' and array 'BoolArray +2026-08-14 18:35:22.359 | DEBUG | logging:callHandlers:1762 - Defining data type 'bundle' as 'Bundle' +2026-08-14 18:35:22.359 | DEBUG | logging:callHandlers:1762 - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +2026-08-14 18:35:22.359 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +2026-08-14 18:35:22.359 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +2026-08-14 18:35:22.359 | DEBUG | logging:callHandlers:1762 - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +2026-08-14 18:35:22.360 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +2026-08-14 18:35:22.360 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +2026-08-14 18:35:22.360 | DEBUG | logging:callHandlers:1762 - Defining data type 'double' as 'Double' and array 'DoubleArray +2026-08-14 18:35:22.360 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +2026-08-14 18:35:22.360 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +2026-08-14 18:35:22.360 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +2026-08-14 18:35:22.360 | DEBUG | logging:callHandlers:1762 - Defining data type 'execution' as 'Execution' +2026-08-14 18:35:22.360 | DEBUG | logging:callHandlers:1762 - Defining data type 'float' as 'Float' and array 'FloatArray +2026-08-14 18:35:22.360 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +2026-08-14 18:35:22.360 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +2026-08-14 18:35:22.361 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +2026-08-14 18:35:22.361 | DEBUG | logging:callHandlers:1762 - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +2026-08-14 18:35:22.361 | DEBUG | logging:callHandlers:1762 - Defining data type 'half' as 'Half' and array 'HalfArray +2026-08-14 18:35:22.361 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +2026-08-14 18:35:22.361 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +2026-08-14 18:35:22.361 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +2026-08-14 18:35:22.361 | DEBUG | logging:callHandlers:1762 - Defining data type 'int' as 'Int' and array 'IntArray +2026-08-14 18:35:22.361 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +2026-08-14 18:35:22.361 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +2026-08-14 18:35:22.361 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +2026-08-14 18:35:22.362 | DEBUG | logging:callHandlers:1762 - Defining data type 'int64' as 'Int64' and array 'Int64Array +2026-08-14 18:35:22.362 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +2026-08-14 18:35:22.362 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +2026-08-14 18:35:22.362 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +2026-08-14 18:35:22.362 | DEBUG | logging:callHandlers:1762 - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +2026-08-14 18:35:22.362 | DEBUG | logging:callHandlers:1762 - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +2026-08-14 18:35:22.362 | DEBUG | logging:callHandlers:1762 - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +2026-08-14 18:35:22.362 | DEBUG | logging:callHandlers:1762 - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +2026-08-14 18:35:22.362 | DEBUG | logging:callHandlers:1762 - Defining data type 'path' as 'Path' +2026-08-14 18:35:22.362 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +2026-08-14 18:35:22.363 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +2026-08-14 18:35:22.363 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +2026-08-14 18:35:22.363 | DEBUG | logging:callHandlers:1762 - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +2026-08-14 18:35:22.363 | DEBUG | logging:callHandlers:1762 - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +2026-08-14 18:35:22.363 | DEBUG | logging:callHandlers:1762 - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +2026-08-14 18:35:22.363 | DEBUG | logging:callHandlers:1762 - Defining data type 'string' as 'String' +2026-08-14 18:35:22.363 | DEBUG | logging:callHandlers:1762 - Defining data type 'target' as 'Target' +2026-08-14 18:35:22.363 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +2026-08-14 18:35:22.363 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +2026-08-14 18:35:22.363 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +2026-08-14 18:35:22.364 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +2026-08-14 18:35:22.364 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +2026-08-14 18:35:22.364 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +2026-08-14 18:35:22.364 | DEBUG | logging:callHandlers:1762 - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +2026-08-14 18:35:22.364 | DEBUG | logging:callHandlers:1762 - Defining data type 'token' as 'Token' and array 'TokenArray +2026-08-14 18:35:22.364 | DEBUG | logging:callHandlers:1762 - Defining data type 'uchar' as 'UChar' and array 'UCharArray +2026-08-14 18:35:22.364 | DEBUG | logging:callHandlers:1762 - Defining data type 'uint' as 'UInt' and array 'UIntArray +2026-08-14 18:35:22.364 | DEBUG | logging:callHandlers:1762 - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +2026-08-14 18:35:22.364 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +2026-08-14 18:35:22.365 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +2026-08-14 18:35:22.365 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +2026-08-14 18:35:31.084 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch +2026-08-14 18:35:37.460 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory Articulation. +2026-08-14 18:35:37.579 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +2026-08-14 18:35:37.589 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:35:38.255 | INFO | logging:callHandlers:1762 - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +2026-08-14 18:35:38.263 | INFO | logging:callHandlers:1762 - Applied RobotAPI to prim /g1 +2026-08-14 18:35:38.269 | INFO | logging:callHandlers:1762 - Set isaac:robotType = 'Default' on /g1 +2026-08-14 18:35:38.270 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.271 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.271 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.272 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.273 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.273 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.274 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.274 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.275 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.275 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.276 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.276 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.277 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.277 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.278 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.278 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.279 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.279 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.280 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.280 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.281 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.281 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.282 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.282 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.283 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.283 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.284 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.284 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.285 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:35:38.307 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:35:38.388 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_183537_6311/main/payloads/base.usda +2026-08-14 18:35:38.902 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_183537_6311/main/main.usda +2026-08-14 18:35:38.908 | INFO | logging:callHandlers:1762 - Skipping disabled rule: Delete Newton Redundant APIs +2026-08-14 18:35:39.245 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory FrameView. +2026-08-14 18:35:39.296 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory ContactSensor. +2026-08-14 18:35:43.199 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory Renderer. +2026-08-14 18:35:43.199 | INFO | logging:callHandlers:1762 - Created new renderer for simulation: NewtonWarpRenderer +2026-08-14 18:35:43.200 | INFO | logging:callHandlers:1762 - Dispatching MODEL_INIT callbacks +2026-08-14 18:35:43.200 | INFO | logging:callHandlers:1762 - Finalizing model on device: cuda:0 +2026-08-14 18:35:46.962 | INFO | logging:callHandlers:1762 - Dispatching PHYSICS_READY callbacks +2026-08-14 18:35:47.204 | INFO | logging:callHandlers:1762 - Simulation parameters for joints in /World/envs/env_.*/Robot: ++-------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 2 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 3 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 4 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 5 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 6 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 7 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 8 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 9 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 11 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 12 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 13 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 14 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 15 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 16 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 17 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 18 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 19 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 20 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 21 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 22 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 23 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 24 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 25 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 26 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 27 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +2026-08-14 18:35:47.205 | INFO | logging:callHandlers:1762 - Using renderer: NewtonWarpRenderer +2026-08-14 18:35:47.236 | INFO | logging:callHandlers:1762 - Adding contact sensor for /World/envs/env_.*/Robot/.* with filter all bodies/shapes +2026-08-14 18:35:47.240 | INFO | logging:callHandlers:1762 - Contact sensor initialized with 30 sensors. +2026-08-14 18:35:47.241 | INFO | logging:callHandlers:1762 - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +2026-08-14 18:35:47.241 | INFO | logging:callHandlers:1762 - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +2026-08-14 18:35:52.127 | WARNING | logging:callHandlers:1762 - cubric IAdapter minor version newer than this shim was validated against: plugin reports v0.2, shim is pinned to v0.1. Proceeding under semver minor-compatibility — if transforms misbehave, verify the vtable layout against omni/cubric/IAdapter.h. +2026-08-14 18:35:52.127 | INFO | logging:callHandlers:1762 - cubric IAdapter bindings ready +2026-08-14 18:35:52.127 | INFO | logging:callHandlers:1762 - cubric bindings ready (adapter deferred to first render) +2026-08-14 18:35:52.127 | INFO | logging:callHandlers:1762 - Newton CUDA graph capture deferred until first step() (RTX active) +2026-08-14 18:35:52.219 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:235 - Loaded skeleton from gear_sonic/data/assets/robot_description/mjcf/g1_29dof_rev_1_0.xml +2026-08-14 18:35:52.219 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:236 - Loading motion data from /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered... +2026-08-14 18:35:52.220 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_data:472 - Loaded 2 motions +2026-08-14 18:35:52.721 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1091 - Loading 1 motions... +2026-08-14 18:35:52.723 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1092 - Sampling motion: tensor([1], device='cuda:0'), .... +2026-08-14 18:35:52.723 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1093 - Current motion keys: ['walk_forward_amateur_001__A001'], .... +2026-08-14 18:35:52.723 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1120 - Increased file descriptor limits from 2450/1048576 to 1048576/1048576 +2026-08-14 18:35:52.797 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1140 - Loading motions with 1 jobs... +2026-08-14 18:35:52.993 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1577 - Loaded 1 motions with a total length of 40.020s and 2002 frames. +2026-08-14 18:35:53.843 | INFO | logging:callHandlers:1762 - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'left_hip_roll_joint', 'left_hip_yaw_joint', 'left_knee_joint', 'left_ankle_pitch_joint', 'left_ankle_roll_joint', 'right_hip_pitch_joint', 'right_hip_roll_joint', 'right_hip_yaw_joint', 'right_knee_joint', 'right_ankle_pitch_joint', 'right_ankle_roll_joint', 'waist_yaw_joint', 'waist_roll_joint', 'waist_pitch_joint', 'left_shoulder_pitch_joint', 'left_shoulder_roll_joint', 'left_shoulder_yaw_joint', 'left_elbow_joint', 'left_wrist_roll_joint', 'left_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_shoulder_pitch_joint', 'right_shoulder_roll_joint', 'right_shoulder_yaw_joint', 'right_elbow_joint', 'right_wrist_roll_joint', 'right_wrist_pitch_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] +2026-08-14 18:35:54.536 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_grid:1227 - Setting up replay grid: 1 rows x 1 cols with 2.0m spacing +2026-08-14 18:35:54.537 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_grid:1247 - Grid bounds: X=[0.0, 0.0], Y=[0.0, 0.0] +2026-08-14 18:35:54.544 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1440 - +============================================================ +2026-08-14 18:35:54.544 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1441 - Batch Replaying 1 Environments +2026-08-14 18:35:54.544 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1442 - Unique motion IDs: [0] +2026-08-14 18:35:54.544 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1443 - Max frames: 20 +2026-08-14 18:35:54.544 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1444 - Max duration: 0.40s (@ 50 FPS) +2026-08-14 18:35:54.544 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1445 - Speed: 1.0x +2026-08-14 18:35:54.544 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1446 - ============================================================ + +2026-08-14 18:35:54.545 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1667 - Replay Controls: +2026-08-14 18:35:54.545 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1668 - G: Pause/Resume +2026-08-14 18:35:54.545 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1669 - B: Toggle Reverse Play +2026-08-14 18:35:54.545 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1670 - LEFT/RIGHT: Step backward/forward (when paused) +2026-08-14 18:35:54.545 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1671 - R: Restart from beginning +2026-08-14 18:35:54.545 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1672 - ESC: Exit replay +2026-08-14 18:35:54.545 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1673 - +/-: Increase/Decrease speed +2026-08-14 18:35:54.545 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1674 - +2026-08-14 18:35:55.726 | INFO | logging:callHandlers:1762 - Newton CUDA graph captured (deferred relaxed mode, RTX-compatible) +2026-08-14 18:35:55.732 | INFO | logging:callHandlers:1762 - cubric GPU transform hierarchy enabled +2026-08-14 18:35:56.087 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:step_replay:2085 - Replay complete! diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_183512-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260814_183512-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..2c5bc271ee5eac5db3fd449c4dd4a05bf29c18a6 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_183512-TEST/eval_agent_trl.log @@ -0,0 +1,157 @@ +[2026-08-14 18:35:16,613][isaaclab.app.app_launcher][WARNING] - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +[2026-08-14 18:35:16,616][isaaclab.app.app_launcher][INFO] - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +[2026-08-14 18:35:16,616][isaaclab.app.app_launcher][INFO] - Using device: cuda +[2026-08-14 18:35:16,617][isaaclab.app.app_launcher][INFO] - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.rendering.kit +[2026-08-14 18:35:16,898][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-14 18:35:22,358][AutoNode][DEBUG] - Defining data type 'any' as 'Any' +[2026-08-14 18:35:22,359][AutoNode][DEBUG] - Defining data type 'bool' as 'Bool' and array 'BoolArray +[2026-08-14 18:35:22,359][AutoNode][DEBUG] - Defining data type 'bundle' as 'Bundle' +[2026-08-14 18:35:22,359][AutoNode][DEBUG] - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +[2026-08-14 18:35:22,359][AutoNode][DEBUG] - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +[2026-08-14 18:35:22,359][AutoNode][DEBUG] - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +[2026-08-14 18:35:22,359][AutoNode][DEBUG] - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +[2026-08-14 18:35:22,360][AutoNode][DEBUG] - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +[2026-08-14 18:35:22,360][AutoNode][DEBUG] - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +[2026-08-14 18:35:22,360][AutoNode][DEBUG] - Defining data type 'double' as 'Double' and array 'DoubleArray +[2026-08-14 18:35:22,360][AutoNode][DEBUG] - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +[2026-08-14 18:35:22,360][AutoNode][DEBUG] - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +[2026-08-14 18:35:22,360][AutoNode][DEBUG] - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +[2026-08-14 18:35:22,360][AutoNode][DEBUG] - Defining data type 'execution' as 'Execution' +[2026-08-14 18:35:22,360][AutoNode][DEBUG] - Defining data type 'float' as 'Float' and array 'FloatArray +[2026-08-14 18:35:22,360][AutoNode][DEBUG] - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +[2026-08-14 18:35:22,360][AutoNode][DEBUG] - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +[2026-08-14 18:35:22,360][AutoNode][DEBUG] - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +[2026-08-14 18:35:22,361][AutoNode][DEBUG] - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +[2026-08-14 18:35:22,361][AutoNode][DEBUG] - Defining data type 'half' as 'Half' and array 'HalfArray +[2026-08-14 18:35:22,361][AutoNode][DEBUG] - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +[2026-08-14 18:35:22,361][AutoNode][DEBUG] - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +[2026-08-14 18:35:22,361][AutoNode][DEBUG] - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +[2026-08-14 18:35:22,361][AutoNode][DEBUG] - Defining data type 'int' as 'Int' and array 'IntArray +[2026-08-14 18:35:22,361][AutoNode][DEBUG] - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +[2026-08-14 18:35:22,361][AutoNode][DEBUG] - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +[2026-08-14 18:35:22,361][AutoNode][DEBUG] - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +[2026-08-14 18:35:22,361][AutoNode][DEBUG] - Defining data type 'int64' as 'Int64' and array 'Int64Array +[2026-08-14 18:35:22,362][AutoNode][DEBUG] - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +[2026-08-14 18:35:22,362][AutoNode][DEBUG] - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +[2026-08-14 18:35:22,362][AutoNode][DEBUG] - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +[2026-08-14 18:35:22,362][AutoNode][DEBUG] - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +[2026-08-14 18:35:22,362][AutoNode][DEBUG] - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +[2026-08-14 18:35:22,362][AutoNode][DEBUG] - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +[2026-08-14 18:35:22,362][AutoNode][DEBUG] - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +[2026-08-14 18:35:22,362][AutoNode][DEBUG] - Defining data type 'path' as 'Path' +[2026-08-14 18:35:22,362][AutoNode][DEBUG] - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +[2026-08-14 18:35:22,362][AutoNode][DEBUG] - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +[2026-08-14 18:35:22,363][AutoNode][DEBUG] - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +[2026-08-14 18:35:22,363][AutoNode][DEBUG] - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +[2026-08-14 18:35:22,363][AutoNode][DEBUG] - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +[2026-08-14 18:35:22,363][AutoNode][DEBUG] - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +[2026-08-14 18:35:22,363][AutoNode][DEBUG] - Defining data type 'string' as 'String' +[2026-08-14 18:35:22,363][AutoNode][DEBUG] - Defining data type 'target' as 'Target' +[2026-08-14 18:35:22,363][AutoNode][DEBUG] - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +[2026-08-14 18:35:22,363][AutoNode][DEBUG] - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +[2026-08-14 18:35:22,363][AutoNode][DEBUG] - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +[2026-08-14 18:35:22,364][AutoNode][DEBUG] - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +[2026-08-14 18:35:22,364][AutoNode][DEBUG] - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +[2026-08-14 18:35:22,364][AutoNode][DEBUG] - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +[2026-08-14 18:35:22,364][AutoNode][DEBUG] - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +[2026-08-14 18:35:22,364][AutoNode][DEBUG] - Defining data type 'token' as 'Token' and array 'TokenArray +[2026-08-14 18:35:22,364][AutoNode][DEBUG] - Defining data type 'uchar' as 'UChar' and array 'UCharArray +[2026-08-14 18:35:22,364][AutoNode][DEBUG] - Defining data type 'uint' as 'UInt' and array 'UIntArray +[2026-08-14 18:35:22,364][AutoNode][DEBUG] - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +[2026-08-14 18:35:22,364][AutoNode][DEBUG] - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +[2026-08-14 18:35:22,364][AutoNode][DEBUG] - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +[2026-08-14 18:35:22,365][AutoNode][DEBUG] - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +[2026-08-14 18:35:37,460][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory Articulation. +[2026-08-14 18:35:37,579][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +[2026-08-14 18:35:37,588][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:35:38,255][isaacsim.asset.importer.utils.impl.asset_utils][INFO] - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +[2026-08-14 18:35:38,263][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Applied RobotAPI to prim /g1 +[2026-08-14 18:35:38,269][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Set isaac:robotType = 'Default' on /g1 +[2026-08-14 18:35:38,270][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,271][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,271][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,272][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,272][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,273][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,274][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,274][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,275][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,275][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,276][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,276][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,277][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,277][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,278][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,278][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,279][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,279][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,280][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,280][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,280][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,281][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,282][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,282][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,283][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,283][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,284][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,284][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,284][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:35:38,307][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:35:38,388][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_183537_6311/main/payloads/base.usda +[2026-08-14 18:35:38,901][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_183537_6311/main/main.usda +[2026-08-14 18:35:38,908][isaacsim.asset.transformer.manager][INFO] - Skipping disabled rule: Delete Newton Redundant APIs +[2026-08-14 18:35:39,245][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory FrameView. +[2026-08-14 18:35:39,296][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory ContactSensor. +[2026-08-14 18:35:43,199][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory Renderer. +[2026-08-14 18:35:43,199][isaaclab.renderers.render_context][INFO] - Created new renderer for simulation: NewtonWarpRenderer +[2026-08-14 18:35:43,200][isaaclab_newton.physics.newton_manager][INFO] - Dispatching MODEL_INIT callbacks +[2026-08-14 18:35:43,200][isaaclab_newton.physics.newton_manager][INFO] - Finalizing model on device: cuda:0 +[2026-08-14 18:35:46,962][isaaclab_newton.physics.newton_manager][INFO] - Dispatching PHYSICS_READY callbacks +[2026-08-14 18:35:47,204][isaaclab_newton.assets.articulation.articulation][INFO] - Simulation parameters for joints in /World/envs/env_.*/Robot: ++-------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 2 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 3 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 4 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 5 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 6 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 7 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 8 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 9 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 11 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 12 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 13 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 14 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 15 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 16 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 17 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 18 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 19 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 20 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 21 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 22 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 23 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 24 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 25 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 26 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 27 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +[2026-08-14 18:35:47,205][isaaclab.sensors.camera.camera][INFO] - Using renderer: NewtonWarpRenderer +[2026-08-14 18:35:47,236][isaaclab_newton.physics.newton_manager][INFO] - Adding contact sensor for /World/envs/env_.*/Robot/.* with filter all bodies/shapes +[2026-08-14 18:35:47,240][isaaclab_newton.sensors.contact_sensor.contact_sensor][INFO] - Contact sensor initialized with 30 sensors. +[2026-08-14 18:35:47,241][isaaclab_newton.sensors.contact_sensor.contact_sensor][INFO] - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +[2026-08-14 18:35:47,241][isaaclab_newton.sensors.contact_sensor.contact_sensor_data][INFO] - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +[2026-08-14 18:35:52,126][isaaclab_newton.physics._cubric][WARNING] - cubric IAdapter minor version newer than this shim was validated against: plugin reports v0.2, shim is pinned to v0.1. Proceeding under semver minor-compatibility — if transforms misbehave, verify the vtable layout against omni/cubric/IAdapter.h. +[2026-08-14 18:35:52,127][isaaclab_newton.physics._cubric][INFO] - cubric IAdapter bindings ready +[2026-08-14 18:35:52,127][isaaclab_newton.physics.newton_manager][INFO] - cubric bindings ready (adapter deferred to first render) +[2026-08-14 18:35:52,127][isaaclab_newton.physics.newton_manager][INFO] - Newton CUDA graph capture deferred until first step() (RTX active) +[2026-08-14 18:35:53,843][isaaclab.envs.mdp.actions.joint_actions][INFO] - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'left_hip_roll_joint', 'left_hip_yaw_joint', 'left_knee_joint', 'left_ankle_pitch_joint', 'left_ankle_roll_joint', 'right_hip_pitch_joint', 'right_hip_roll_joint', 'right_hip_yaw_joint', 'right_knee_joint', 'right_ankle_pitch_joint', 'right_ankle_roll_joint', 'waist_yaw_joint', 'waist_roll_joint', 'waist_pitch_joint', 'left_shoulder_pitch_joint', 'left_shoulder_roll_joint', 'left_shoulder_yaw_joint', 'left_elbow_joint', 'left_wrist_roll_joint', 'left_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_shoulder_pitch_joint', 'right_shoulder_roll_joint', 'right_shoulder_yaw_joint', 'right_elbow_joint', 'right_wrist_roll_joint', 'right_wrist_pitch_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] +[2026-08-14 18:35:55,726][isaaclab_newton.physics.newton_manager][INFO] - Newton CUDA graph captured (deferred relaxed mode, RTX-compatible) +[2026-08-14 18:35:55,731][isaaclab_newton.physics.newton_manager][INFO] - cubric GPU transform hierarchy enabled diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_184135-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_184135-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..35b05e2291929bc56f854f05d606a5fcf8c15ed7 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_184135-TEST/.hydra/config.yaml @@ -0,0 +1,40 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + smpl_motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + config: + render_results: true + render_width: 640 + render_height: 368 + events: + physics_material: null + add_joint_default_pos: null + base_com: null + randomize_rigid_body_mass: null +checkpoint: /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +num_envs: 1 +headless: true +use_wandb: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_184135-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_184135-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..679cc23e9af193db512d1efc436c48a49ce8d4f5 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_184135-TEST/.hydra/hydra.yaml @@ -0,0 +1,168 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + - +num_envs=1 + - +headless=true + - +use_wandb=false + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + - ++manager_env.config.render_results=true + - ++manager_env.config.render_width=640 + - ++manager_env.config.render_height=368 + - ++manager_env.events.physics_material=null + - ++manager_env.events.add_joint_default_pos=null + - ++manager_env.events.base_com=null + - ++manager_env.events.randomize_rigid_body_mass=null + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered,++manager_env.config.render_height=368,++manager_env.config.render_results=true,++manager_env.config.render_width=640,++manager_env.events.add_joint_default_pos=null,++manager_env.events.base_com=null,++manager_env.events.physics_material=null,++manager_env.events.randomize_rigid_body_mass=null,+headless=true,+num_envs=1,+use_wandb=false,checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260814_184135-TEST + choices: + manager_env/recorders: empty + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_184135-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_184135-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..122746eb732d9716968ccf0003c50c9f0ae475ca --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_184135-TEST/.hydra/overrides.yaml @@ -0,0 +1,13 @@ +- checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +- +num_envs=1 +- +headless=true +- +use_wandb=false +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered +- ++manager_env.config.render_results=true +- ++manager_env.config.render_width=640 +- ++manager_env.config.render_height=368 +- ++manager_env.events.physics_material=null +- ++manager_env.events.add_joint_default_pos=null +- ++manager_env.events.base_com=null +- ++manager_env.events.randomize_rigid_body_mass=null diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_184135-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260814_184135-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..8bae542f9941d84c3f1a367f290f616c4dcb1815 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_184135-TEST/eval.log @@ -0,0 +1,188 @@ +2026-08-14 18:41:35.296 | INFO | __main__:main:90 - Loading training config file from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/config.yaml +2026-08-14 18:41:39.856 | WARNING | logging:callHandlers:1762 - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +2026-08-14 18:41:39.859 | INFO | logging:callHandlers:1762 - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +2026-08-14 18:41:39.859 | INFO | logging:callHandlers:1762 - Using device: cuda +2026-08-14 18:41:39.860 | INFO | logging:callHandlers:1762 - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.rendering.kit +2026-08-14 18:41:40.379 | DEBUG | logging:callHandlers:1762 - Using selector: EpollSelector +2026-08-14 18:41:47.896 | DEBUG | logging:callHandlers:1762 - Defining data type 'any' as 'Any' +2026-08-14 18:41:47.897 | DEBUG | logging:callHandlers:1762 - Defining data type 'bool' as 'Bool' and array 'BoolArray +2026-08-14 18:41:47.897 | DEBUG | logging:callHandlers:1762 - Defining data type 'bundle' as 'Bundle' +2026-08-14 18:41:47.897 | DEBUG | logging:callHandlers:1762 - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +2026-08-14 18:41:47.897 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +2026-08-14 18:41:47.897 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +2026-08-14 18:41:47.897 | DEBUG | logging:callHandlers:1762 - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +2026-08-14 18:41:47.897 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +2026-08-14 18:41:47.897 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +2026-08-14 18:41:47.898 | DEBUG | logging:callHandlers:1762 - Defining data type 'double' as 'Double' and array 'DoubleArray +2026-08-14 18:41:47.898 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +2026-08-14 18:41:47.898 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +2026-08-14 18:41:47.898 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +2026-08-14 18:41:47.898 | DEBUG | logging:callHandlers:1762 - Defining data type 'execution' as 'Execution' +2026-08-14 18:41:47.898 | DEBUG | logging:callHandlers:1762 - Defining data type 'float' as 'Float' and array 'FloatArray +2026-08-14 18:41:47.898 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +2026-08-14 18:41:47.898 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +2026-08-14 18:41:47.898 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +2026-08-14 18:41:47.898 | DEBUG | logging:callHandlers:1762 - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +2026-08-14 18:41:47.899 | DEBUG | logging:callHandlers:1762 - Defining data type 'half' as 'Half' and array 'HalfArray +2026-08-14 18:41:47.899 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +2026-08-14 18:41:47.899 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +2026-08-14 18:41:47.899 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +2026-08-14 18:41:47.899 | DEBUG | logging:callHandlers:1762 - Defining data type 'int' as 'Int' and array 'IntArray +2026-08-14 18:41:47.899 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +2026-08-14 18:41:47.899 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +2026-08-14 18:41:47.899 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +2026-08-14 18:41:47.899 | DEBUG | logging:callHandlers:1762 - Defining data type 'int64' as 'Int64' and array 'Int64Array +2026-08-14 18:41:47.900 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +2026-08-14 18:41:47.900 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +2026-08-14 18:41:47.900 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +2026-08-14 18:41:47.900 | DEBUG | logging:callHandlers:1762 - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +2026-08-14 18:41:47.900 | DEBUG | logging:callHandlers:1762 - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +2026-08-14 18:41:47.900 | DEBUG | logging:callHandlers:1762 - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +2026-08-14 18:41:47.900 | DEBUG | logging:callHandlers:1762 - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +2026-08-14 18:41:47.900 | DEBUG | logging:callHandlers:1762 - Defining data type 'path' as 'Path' +2026-08-14 18:41:47.900 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +2026-08-14 18:41:47.900 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +2026-08-14 18:41:47.901 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +2026-08-14 18:41:47.901 | DEBUG | logging:callHandlers:1762 - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +2026-08-14 18:41:47.901 | DEBUG | logging:callHandlers:1762 - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +2026-08-14 18:41:47.901 | DEBUG | logging:callHandlers:1762 - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +2026-08-14 18:41:47.901 | DEBUG | logging:callHandlers:1762 - Defining data type 'string' as 'String' +2026-08-14 18:41:47.901 | DEBUG | logging:callHandlers:1762 - Defining data type 'target' as 'Target' +2026-08-14 18:41:47.901 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +2026-08-14 18:41:47.901 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +2026-08-14 18:41:47.901 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +2026-08-14 18:41:47.902 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +2026-08-14 18:41:47.902 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +2026-08-14 18:41:47.902 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +2026-08-14 18:41:47.902 | DEBUG | logging:callHandlers:1762 - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +2026-08-14 18:41:47.902 | DEBUG | logging:callHandlers:1762 - Defining data type 'token' as 'Token' and array 'TokenArray +2026-08-14 18:41:47.902 | DEBUG | logging:callHandlers:1762 - Defining data type 'uchar' as 'UChar' and array 'UCharArray +2026-08-14 18:41:47.902 | DEBUG | logging:callHandlers:1762 - Defining data type 'uint' as 'UInt' and array 'UIntArray +2026-08-14 18:41:47.902 | DEBUG | logging:callHandlers:1762 - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +2026-08-14 18:41:47.902 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +2026-08-14 18:41:47.902 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +2026-08-14 18:41:47.903 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +2026-08-14 18:41:55.627 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch +2026-08-14 18:42:01.640 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory Articulation. +2026-08-14 18:42:01.766 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +2026-08-14 18:42:01.780 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:42:02.422 | INFO | logging:callHandlers:1762 - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +2026-08-14 18:42:02.430 | INFO | logging:callHandlers:1762 - Applied RobotAPI to prim /g1 +2026-08-14 18:42:02.436 | INFO | logging:callHandlers:1762 - Set isaac:robotType = 'Default' on /g1 +2026-08-14 18:42:02.437 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.438 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.438 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.439 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.439 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.440 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.440 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.441 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.441 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.442 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.442 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.443 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.443 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.444 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.444 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.445 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.445 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.446 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.446 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.447 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.447 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.448 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.449 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.449 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.449 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.450 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.450 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.451 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.452 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:42:02.474 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:42:02.553 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_184201_6311/main/payloads/base.usda +2026-08-14 18:42:03.096 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_184201_6311/main/main.usda +2026-08-14 18:42:03.103 | INFO | logging:callHandlers:1762 - Skipping disabled rule: Delete Newton Redundant APIs +2026-08-14 18:42:03.458 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory FrameView. +2026-08-14 18:42:03.508 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory ContactSensor. +2026-08-14 18:42:07.611 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory Renderer. +2026-08-14 18:42:07.611 | INFO | logging:callHandlers:1762 - Created new renderer for simulation: NewtonWarpRenderer +2026-08-14 18:42:07.612 | INFO | logging:callHandlers:1762 - Dispatching MODEL_INIT callbacks +2026-08-14 18:42:07.612 | INFO | logging:callHandlers:1762 - Finalizing model on device: cuda:0 +2026-08-14 18:42:11.384 | INFO | logging:callHandlers:1762 - Dispatching PHYSICS_READY callbacks +2026-08-14 18:42:11.625 | INFO | logging:callHandlers:1762 - Simulation parameters for joints in /World/envs/env_.*/Robot: ++-------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 2 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 3 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 4 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 5 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 6 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 7 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 8 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 9 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 11 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 12 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 13 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 14 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 15 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 16 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 17 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 18 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 19 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 20 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 21 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 22 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 23 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 24 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 25 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 26 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 27 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +2026-08-14 18:42:11.626 | INFO | logging:callHandlers:1762 - Using renderer: NewtonWarpRenderer +2026-08-14 18:42:11.652 | INFO | logging:callHandlers:1762 - Adding contact sensor for /World/envs/env_.*/Robot/.* with filter all bodies/shapes +2026-08-14 18:42:11.656 | INFO | logging:callHandlers:1762 - Contact sensor initialized with 30 sensors. +2026-08-14 18:42:11.656 | INFO | logging:callHandlers:1762 - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +2026-08-14 18:42:11.656 | INFO | logging:callHandlers:1762 - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +2026-08-14 18:42:16.539 | WARNING | logging:callHandlers:1762 - cubric IAdapter minor version newer than this shim was validated against: plugin reports v0.2, shim is pinned to v0.1. Proceeding under semver minor-compatibility — if transforms misbehave, verify the vtable layout against omni/cubric/IAdapter.h. +2026-08-14 18:42:16.539 | INFO | logging:callHandlers:1762 - cubric IAdapter bindings ready +2026-08-14 18:42:16.540 | INFO | logging:callHandlers:1762 - cubric bindings ready (adapter deferred to first render) +2026-08-14 18:42:16.540 | INFO | logging:callHandlers:1762 - Newton CUDA graph capture deferred until first step() (RTX active) +2026-08-14 18:42:16.633 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:235 - Loaded skeleton from gear_sonic/data/assets/robot_description/mjcf/g1_29dof_rev_1_0.xml +2026-08-14 18:42:16.633 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:236 - Loading motion data from /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered... +2026-08-14 18:42:16.634 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_data:472 - Loaded 2 motions +2026-08-14 18:42:17.150 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1091 - Loading 1 motions... +2026-08-14 18:42:17.152 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1092 - Sampling motion: tensor([1], device='cuda:0'), .... +2026-08-14 18:42:17.153 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1093 - Current motion keys: ['walk_forward_amateur_001__A001'], .... +2026-08-14 18:42:17.153 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1120 - Increased file descriptor limits from 2450/1048576 to 1048576/1048576 +2026-08-14 18:42:17.235 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1140 - Loading motions with 1 jobs... +2026-08-14 18:42:17.440 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1577 - Loaded 1 motions with a total length of 40.020s and 2002 frames. +2026-08-14 18:42:18.129 | INFO | logging:callHandlers:1762 - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'left_hip_roll_joint', 'left_hip_yaw_joint', 'left_knee_joint', 'left_ankle_pitch_joint', 'left_ankle_roll_joint', 'right_hip_pitch_joint', 'right_hip_roll_joint', 'right_hip_yaw_joint', 'right_knee_joint', 'right_ankle_pitch_joint', 'right_ankle_roll_joint', 'waist_yaw_joint', 'waist_roll_joint', 'waist_pitch_joint', 'left_shoulder_pitch_joint', 'left_shoulder_roll_joint', 'left_shoulder_yaw_joint', 'left_elbow_joint', 'left_wrist_roll_joint', 'left_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_shoulder_pitch_joint', 'right_shoulder_roll_joint', 'right_shoulder_yaw_joint', 'right_elbow_joint', 'right_wrist_roll_joint', 'right_wrist_pitch_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] +2026-08-14 18:42:18.855 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_grid:1227 - Setting up replay grid: 1 rows x 1 cols with 2.0m spacing +2026-08-14 18:42:18.856 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_grid:1247 - Grid bounds: X=[0.0, 0.0], Y=[0.0, 0.0] +2026-08-14 18:42:20.058 | INFO | logging:callHandlers:1762 - Newton CUDA graph captured (deferred relaxed mode, RTX-compatible) +2026-08-14 18:42:20.063 | INFO | logging:callHandlers:1762 - cubric GPU transform hierarchy enabled +2026-08-14 18:42:20.088 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1440 - +============================================================ +2026-08-14 18:42:20.088 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1441 - Batch Replaying 1 Environments +2026-08-14 18:42:20.088 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1442 - Unique motion IDs: [0] +2026-08-14 18:42:20.089 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1443 - Max frames: 50 +2026-08-14 18:42:20.089 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1444 - Max duration: 1.00s (@ 50 FPS) +2026-08-14 18:42:20.089 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1445 - Speed: 1.0x +2026-08-14 18:42:20.089 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1446 - ============================================================ + +2026-08-14 18:42:20.089 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1667 - Replay Controls: +2026-08-14 18:42:20.089 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1668 - G: Pause/Resume +2026-08-14 18:42:20.089 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1669 - B: Toggle Reverse Play +2026-08-14 18:42:20.089 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1670 - LEFT/RIGHT: Step backward/forward (when paused) +2026-08-14 18:42:20.089 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1671 - R: Restart from beginning +2026-08-14 18:42:20.089 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1672 - ESC: Exit replay +2026-08-14 18:42:20.089 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1673 - +/-: Increase/Decrease speed +2026-08-14 18:42:20.089 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1674 - +2026-08-14 18:42:20.554 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:step_replay:2085 - Replay complete! diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_184135-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260814_184135-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..f6e09286988147ce1b1c19e5519f0093f17b3783 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_184135-TEST/eval_agent_trl.log @@ -0,0 +1,157 @@ +[2026-08-14 18:41:39,856][isaaclab.app.app_launcher][WARNING] - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +[2026-08-14 18:41:39,859][isaaclab.app.app_launcher][INFO] - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +[2026-08-14 18:41:39,859][isaaclab.app.app_launcher][INFO] - Using device: cuda +[2026-08-14 18:41:39,860][isaaclab.app.app_launcher][INFO] - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.rendering.kit +[2026-08-14 18:41:40,378][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-14 18:41:47,896][AutoNode][DEBUG] - Defining data type 'any' as 'Any' +[2026-08-14 18:41:47,897][AutoNode][DEBUG] - Defining data type 'bool' as 'Bool' and array 'BoolArray +[2026-08-14 18:41:47,897][AutoNode][DEBUG] - Defining data type 'bundle' as 'Bundle' +[2026-08-14 18:41:47,897][AutoNode][DEBUG] - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +[2026-08-14 18:41:47,897][AutoNode][DEBUG] - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +[2026-08-14 18:41:47,897][AutoNode][DEBUG] - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +[2026-08-14 18:41:47,897][AutoNode][DEBUG] - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +[2026-08-14 18:41:47,897][AutoNode][DEBUG] - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +[2026-08-14 18:41:47,897][AutoNode][DEBUG] - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +[2026-08-14 18:41:47,897][AutoNode][DEBUG] - Defining data type 'double' as 'Double' and array 'DoubleArray +[2026-08-14 18:41:47,898][AutoNode][DEBUG] - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +[2026-08-14 18:41:47,898][AutoNode][DEBUG] - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +[2026-08-14 18:41:47,898][AutoNode][DEBUG] - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +[2026-08-14 18:41:47,898][AutoNode][DEBUG] - Defining data type 'execution' as 'Execution' +[2026-08-14 18:41:47,898][AutoNode][DEBUG] - Defining data type 'float' as 'Float' and array 'FloatArray +[2026-08-14 18:41:47,898][AutoNode][DEBUG] - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +[2026-08-14 18:41:47,898][AutoNode][DEBUG] - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +[2026-08-14 18:41:47,898][AutoNode][DEBUG] - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +[2026-08-14 18:41:47,898][AutoNode][DEBUG] - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +[2026-08-14 18:41:47,899][AutoNode][DEBUG] - Defining data type 'half' as 'Half' and array 'HalfArray +[2026-08-14 18:41:47,899][AutoNode][DEBUG] - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +[2026-08-14 18:41:47,899][AutoNode][DEBUG] - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +[2026-08-14 18:41:47,899][AutoNode][DEBUG] - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +[2026-08-14 18:41:47,899][AutoNode][DEBUG] - Defining data type 'int' as 'Int' and array 'IntArray +[2026-08-14 18:41:47,899][AutoNode][DEBUG] - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +[2026-08-14 18:41:47,899][AutoNode][DEBUG] - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +[2026-08-14 18:41:47,899][AutoNode][DEBUG] - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +[2026-08-14 18:41:47,899][AutoNode][DEBUG] - Defining data type 'int64' as 'Int64' and array 'Int64Array +[2026-08-14 18:41:47,899][AutoNode][DEBUG] - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +[2026-08-14 18:41:47,900][AutoNode][DEBUG] - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +[2026-08-14 18:41:47,900][AutoNode][DEBUG] - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +[2026-08-14 18:41:47,900][AutoNode][DEBUG] - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +[2026-08-14 18:41:47,900][AutoNode][DEBUG] - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +[2026-08-14 18:41:47,900][AutoNode][DEBUG] - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +[2026-08-14 18:41:47,900][AutoNode][DEBUG] - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +[2026-08-14 18:41:47,900][AutoNode][DEBUG] - Defining data type 'path' as 'Path' +[2026-08-14 18:41:47,900][AutoNode][DEBUG] - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +[2026-08-14 18:41:47,900][AutoNode][DEBUG] - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +[2026-08-14 18:41:47,900][AutoNode][DEBUG] - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +[2026-08-14 18:41:47,901][AutoNode][DEBUG] - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +[2026-08-14 18:41:47,901][AutoNode][DEBUG] - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +[2026-08-14 18:41:47,901][AutoNode][DEBUG] - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +[2026-08-14 18:41:47,901][AutoNode][DEBUG] - Defining data type 'string' as 'String' +[2026-08-14 18:41:47,901][AutoNode][DEBUG] - Defining data type 'target' as 'Target' +[2026-08-14 18:41:47,901][AutoNode][DEBUG] - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +[2026-08-14 18:41:47,901][AutoNode][DEBUG] - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +[2026-08-14 18:41:47,901][AutoNode][DEBUG] - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +[2026-08-14 18:41:47,901][AutoNode][DEBUG] - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +[2026-08-14 18:41:47,902][AutoNode][DEBUG] - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +[2026-08-14 18:41:47,902][AutoNode][DEBUG] - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +[2026-08-14 18:41:47,902][AutoNode][DEBUG] - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +[2026-08-14 18:41:47,902][AutoNode][DEBUG] - Defining data type 'token' as 'Token' and array 'TokenArray +[2026-08-14 18:41:47,902][AutoNode][DEBUG] - Defining data type 'uchar' as 'UChar' and array 'UCharArray +[2026-08-14 18:41:47,902][AutoNode][DEBUG] - Defining data type 'uint' as 'UInt' and array 'UIntArray +[2026-08-14 18:41:47,902][AutoNode][DEBUG] - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +[2026-08-14 18:41:47,902][AutoNode][DEBUG] - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +[2026-08-14 18:41:47,902][AutoNode][DEBUG] - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +[2026-08-14 18:41:47,902][AutoNode][DEBUG] - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +[2026-08-14 18:42:01,640][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory Articulation. +[2026-08-14 18:42:01,766][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +[2026-08-14 18:42:01,780][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:42:02,421][isaacsim.asset.importer.utils.impl.asset_utils][INFO] - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +[2026-08-14 18:42:02,430][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Applied RobotAPI to prim /g1 +[2026-08-14 18:42:02,436][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Set isaac:robotType = 'Default' on /g1 +[2026-08-14 18:42:02,437][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,438][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,438][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,439][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,439][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,440][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,440][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,441][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,441][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,442][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,442][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,443][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,443][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,444][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,444][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,445][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,445][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,446][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,446][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,447][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,447][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,448][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,448][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,449][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,449][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,450][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,450][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,451][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,451][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:42:02,474][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:42:02,552][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_184201_6311/main/payloads/base.usda +[2026-08-14 18:42:03,096][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_184201_6311/main/main.usda +[2026-08-14 18:42:03,102][isaacsim.asset.transformer.manager][INFO] - Skipping disabled rule: Delete Newton Redundant APIs +[2026-08-14 18:42:03,458][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory FrameView. +[2026-08-14 18:42:03,508][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory ContactSensor. +[2026-08-14 18:42:07,611][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory Renderer. +[2026-08-14 18:42:07,611][isaaclab.renderers.render_context][INFO] - Created new renderer for simulation: NewtonWarpRenderer +[2026-08-14 18:42:07,612][isaaclab_newton.physics.newton_manager][INFO] - Dispatching MODEL_INIT callbacks +[2026-08-14 18:42:07,612][isaaclab_newton.physics.newton_manager][INFO] - Finalizing model on device: cuda:0 +[2026-08-14 18:42:11,384][isaaclab_newton.physics.newton_manager][INFO] - Dispatching PHYSICS_READY callbacks +[2026-08-14 18:42:11,624][isaaclab_newton.assets.articulation.articulation][INFO] - Simulation parameters for joints in /World/envs/env_.*/Robot: ++-------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 2 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 3 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 4 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 5 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 6 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 7 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 8 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 9 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 11 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 12 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 13 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 14 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 15 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 16 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 17 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 18 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 19 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 20 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 21 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 22 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 23 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 24 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 25 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 26 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 27 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +[2026-08-14 18:42:11,625][isaaclab.sensors.camera.camera][INFO] - Using renderer: NewtonWarpRenderer +[2026-08-14 18:42:11,652][isaaclab_newton.physics.newton_manager][INFO] - Adding contact sensor for /World/envs/env_.*/Robot/.* with filter all bodies/shapes +[2026-08-14 18:42:11,656][isaaclab_newton.sensors.contact_sensor.contact_sensor][INFO] - Contact sensor initialized with 30 sensors. +[2026-08-14 18:42:11,656][isaaclab_newton.sensors.contact_sensor.contact_sensor][INFO] - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +[2026-08-14 18:42:11,656][isaaclab_newton.sensors.contact_sensor.contact_sensor_data][INFO] - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +[2026-08-14 18:42:16,539][isaaclab_newton.physics._cubric][WARNING] - cubric IAdapter minor version newer than this shim was validated against: plugin reports v0.2, shim is pinned to v0.1. Proceeding under semver minor-compatibility — if transforms misbehave, verify the vtable layout against omni/cubric/IAdapter.h. +[2026-08-14 18:42:16,539][isaaclab_newton.physics._cubric][INFO] - cubric IAdapter bindings ready +[2026-08-14 18:42:16,540][isaaclab_newton.physics.newton_manager][INFO] - cubric bindings ready (adapter deferred to first render) +[2026-08-14 18:42:16,540][isaaclab_newton.physics.newton_manager][INFO] - Newton CUDA graph capture deferred until first step() (RTX active) +[2026-08-14 18:42:18,129][isaaclab.envs.mdp.actions.joint_actions][INFO] - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'left_hip_roll_joint', 'left_hip_yaw_joint', 'left_knee_joint', 'left_ankle_pitch_joint', 'left_ankle_roll_joint', 'right_hip_pitch_joint', 'right_hip_roll_joint', 'right_hip_yaw_joint', 'right_knee_joint', 'right_ankle_pitch_joint', 'right_ankle_roll_joint', 'waist_yaw_joint', 'waist_roll_joint', 'waist_pitch_joint', 'left_shoulder_pitch_joint', 'left_shoulder_roll_joint', 'left_shoulder_yaw_joint', 'left_elbow_joint', 'left_wrist_roll_joint', 'left_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_shoulder_pitch_joint', 'right_shoulder_roll_joint', 'right_shoulder_yaw_joint', 'right_elbow_joint', 'right_wrist_roll_joint', 'right_wrist_pitch_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] +[2026-08-14 18:42:20,058][isaaclab_newton.physics.newton_manager][INFO] - Newton CUDA graph captured (deferred relaxed mode, RTX-compatible) +[2026-08-14 18:42:20,063][isaaclab_newton.physics.newton_manager][INFO] - cubric GPU transform hierarchy enabled diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_184315-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_184315-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..35b05e2291929bc56f854f05d606a5fcf8c15ed7 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_184315-TEST/.hydra/config.yaml @@ -0,0 +1,40 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + smpl_motion_file: /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + config: + render_results: true + render_width: 640 + render_height: 368 + events: + physics_material: null + add_joint_default_pos: null + base_com: null + randomize_rigid_body_mass: null +checkpoint: /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +num_envs: 1 +headless: true +use_wandb: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_184315-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_184315-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4ee4ebfa40eb29a80923a0686f25f7862e020927 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_184315-TEST/.hydra/hydra.yaml @@ -0,0 +1,168 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + - +num_envs=1 + - +headless=true + - +use_wandb=false + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered + - ++manager_env.config.render_results=true + - ++manager_env.config.render_width=640 + - ++manager_env.config.render_height=368 + - ++manager_env.events.physics_material=null + - ++manager_env.events.add_joint_default_pos=null + - ++manager_env.events.base_com=null + - ++manager_env.events.randomize_rigid_body_mass=null + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered,++manager_env.config.render_height=368,++manager_env.config.render_results=true,++manager_env.config.render_width=640,++manager_env.events.add_joint_default_pos=null,++manager_env.events.base_com=null,++manager_env.events.physics_material=null,++manager_env.events.randomize_rigid_body_mass=null,+headless=true,+num_envs=1,+use_wandb=false,checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260814_184315-TEST + choices: + manager_env/recorders: empty + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_184315-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260814_184315-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..122746eb732d9716968ccf0003c50c9f0ae475ca --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_184315-TEST/.hydra/overrides.yaml @@ -0,0 +1,13 @@ +- checkpoint=/mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/last.pt +- +num_envs=1 +- +headless=true +- +use_wandb=false +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/smpl_filtered +- ++manager_env.config.render_results=true +- ++manager_env.config.render_width=640 +- ++manager_env.config.render_height=368 +- ++manager_env.events.physics_material=null +- ++manager_env.events.add_joint_default_pos=null +- ++manager_env.events.base_com=null +- ++manager_env.events.randomize_rigid_body_mass=null diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_184315-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260814_184315-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..89a2f2598e147ed8ea1889301b7501b097a57810 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_184315-TEST/eval.log @@ -0,0 +1,192 @@ +2026-08-14 18:43:15.584 | INFO | __main__:main:90 - Loading training config file from /mnt/data/code/Sonic-ActionReplay/public_assets/sonic_release/config.yaml +2026-08-14 18:43:20.098 | WARNING | logging:callHandlers:1762 - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +2026-08-14 18:43:20.101 | INFO | logging:callHandlers:1762 - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +2026-08-14 18:43:20.101 | INFO | logging:callHandlers:1762 - Using device: cuda +2026-08-14 18:43:20.103 | INFO | logging:callHandlers:1762 - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.rendering.kit +2026-08-14 18:43:20.382 | DEBUG | logging:callHandlers:1762 - Using selector: EpollSelector +2026-08-14 18:43:28.080 | DEBUG | logging:callHandlers:1762 - Defining data type 'any' as 'Any' +2026-08-14 18:43:28.080 | DEBUG | logging:callHandlers:1762 - Defining data type 'bool' as 'Bool' and array 'BoolArray +2026-08-14 18:43:28.080 | DEBUG | logging:callHandlers:1762 - Defining data type 'bundle' as 'Bundle' +2026-08-14 18:43:28.080 | DEBUG | logging:callHandlers:1762 - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +2026-08-14 18:43:28.080 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +2026-08-14 18:43:28.081 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +2026-08-14 18:43:28.081 | DEBUG | logging:callHandlers:1762 - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +2026-08-14 18:43:28.081 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +2026-08-14 18:43:28.081 | DEBUG | logging:callHandlers:1762 - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +2026-08-14 18:43:28.081 | DEBUG | logging:callHandlers:1762 - Defining data type 'double' as 'Double' and array 'DoubleArray +2026-08-14 18:43:28.081 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +2026-08-14 18:43:28.081 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +2026-08-14 18:43:28.081 | DEBUG | logging:callHandlers:1762 - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +2026-08-14 18:43:28.081 | DEBUG | logging:callHandlers:1762 - Defining data type 'execution' as 'Execution' +2026-08-14 18:43:28.081 | DEBUG | logging:callHandlers:1762 - Defining data type 'float' as 'Float' and array 'FloatArray +2026-08-14 18:43:28.082 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +2026-08-14 18:43:28.082 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +2026-08-14 18:43:28.082 | DEBUG | logging:callHandlers:1762 - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +2026-08-14 18:43:28.082 | DEBUG | logging:callHandlers:1762 - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +2026-08-14 18:43:28.082 | DEBUG | logging:callHandlers:1762 - Defining data type 'half' as 'Half' and array 'HalfArray +2026-08-14 18:43:28.082 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +2026-08-14 18:43:28.082 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +2026-08-14 18:43:28.082 | DEBUG | logging:callHandlers:1762 - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +2026-08-14 18:43:28.082 | DEBUG | logging:callHandlers:1762 - Defining data type 'int' as 'Int' and array 'IntArray +2026-08-14 18:43:28.082 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +2026-08-14 18:43:28.083 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +2026-08-14 18:43:28.083 | DEBUG | logging:callHandlers:1762 - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +2026-08-14 18:43:28.083 | DEBUG | logging:callHandlers:1762 - Defining data type 'int64' as 'Int64' and array 'Int64Array +2026-08-14 18:43:28.083 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +2026-08-14 18:43:28.083 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +2026-08-14 18:43:28.083 | DEBUG | logging:callHandlers:1762 - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +2026-08-14 18:43:28.083 | DEBUG | logging:callHandlers:1762 - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +2026-08-14 18:43:28.083 | DEBUG | logging:callHandlers:1762 - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +2026-08-14 18:43:28.083 | DEBUG | logging:callHandlers:1762 - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +2026-08-14 18:43:28.083 | DEBUG | logging:callHandlers:1762 - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +2026-08-14 18:43:28.084 | DEBUG | logging:callHandlers:1762 - Defining data type 'path' as 'Path' +2026-08-14 18:43:28.084 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +2026-08-14 18:43:28.084 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +2026-08-14 18:43:28.084 | DEBUG | logging:callHandlers:1762 - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +2026-08-14 18:43:28.084 | DEBUG | logging:callHandlers:1762 - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +2026-08-14 18:43:28.084 | DEBUG | logging:callHandlers:1762 - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +2026-08-14 18:43:28.084 | DEBUG | logging:callHandlers:1762 - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +2026-08-14 18:43:28.084 | DEBUG | logging:callHandlers:1762 - Defining data type 'string' as 'String' +2026-08-14 18:43:28.084 | DEBUG | logging:callHandlers:1762 - Defining data type 'target' as 'Target' +2026-08-14 18:43:28.084 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +2026-08-14 18:43:28.085 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +2026-08-14 18:43:28.085 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +2026-08-14 18:43:28.085 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +2026-08-14 18:43:28.085 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +2026-08-14 18:43:28.085 | DEBUG | logging:callHandlers:1762 - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +2026-08-14 18:43:28.085 | DEBUG | logging:callHandlers:1762 - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +2026-08-14 18:43:28.085 | DEBUG | logging:callHandlers:1762 - Defining data type 'token' as 'Token' and array 'TokenArray +2026-08-14 18:43:28.085 | DEBUG | logging:callHandlers:1762 - Defining data type 'uchar' as 'UChar' and array 'UCharArray +2026-08-14 18:43:28.085 | DEBUG | logging:callHandlers:1762 - Defining data type 'uint' as 'UInt' and array 'UIntArray +2026-08-14 18:43:28.086 | DEBUG | logging:callHandlers:1762 - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +2026-08-14 18:43:28.086 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +2026-08-14 18:43:28.086 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +2026-08-14 18:43:28.086 | DEBUG | logging:callHandlers:1762 - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +2026-08-14 18:43:35.079 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch +2026-08-14 18:43:41.054 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory Articulation. +2026-08-14 18:43:41.175 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +2026-08-14 18:43:41.185 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:43:41.752 | INFO | logging:callHandlers:1762 - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +2026-08-14 18:43:41.758 | INFO | logging:callHandlers:1762 - Applied RobotAPI to prim /g1 +2026-08-14 18:43:41.764 | INFO | logging:callHandlers:1762 - Set isaac:robotType = 'Default' on /g1 +2026-08-14 18:43:41.764 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.765 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.765 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.766 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.766 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.767 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.767 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.768 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.768 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.768 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.769 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.769 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.770 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.770 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.771 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.771 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.771 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.772 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.772 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.773 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.773 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.773 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.774 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.774 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.775 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.775 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.776 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.776 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.776 | WARNING | logging:callHandlers:1762 - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +2026-08-14 18:43:41.797 | INFO | logging:callHandlers:1762 - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +2026-08-14 18:43:41.873 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_184341_6311/main/payloads/base.usda +2026-08-14 18:43:42.336 | INFO | logging:callHandlers:1762 - Switched working stage to: /tmp/IsaacLab/usd_20260814_184341_6311/main/main.usda +2026-08-14 18:43:42.342 | INFO | logging:callHandlers:1762 - Skipping disabled rule: Delete Newton Redundant APIs +2026-08-14 18:43:42.647 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory FrameView. +2026-08-14 18:43:42.697 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory ContactSensor. +2026-08-14 18:43:46.505 | INFO | logging:callHandlers:1762 - Registered backend 'newton' for factory Renderer. +2026-08-14 18:43:46.505 | INFO | logging:callHandlers:1762 - Created new renderer for simulation: NewtonWarpRenderer +2026-08-14 18:43:46.506 | INFO | logging:callHandlers:1762 - Dispatching MODEL_INIT callbacks +2026-08-14 18:43:46.506 | INFO | logging:callHandlers:1762 - Finalizing model on device: cuda:0 +2026-08-14 18:43:50.957 | INFO | logging:callHandlers:1762 - Dispatching PHYSICS_READY callbacks +2026-08-14 18:43:51.188 | INFO | logging:callHandlers:1762 - Simulation parameters for joints in /World/envs/env_.*/Robot: ++-------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 2 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 3 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 4 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 5 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 6 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 7 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 8 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 9 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 11 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 12 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 13 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 14 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 15 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 16 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 17 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 18 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 19 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 20 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 21 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 22 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 23 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 24 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 25 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 26 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 27 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +2026-08-14 18:43:51.189 | INFO | logging:callHandlers:1762 - Using renderer: NewtonWarpRenderer +2026-08-14 18:43:51.212 | INFO | logging:callHandlers:1762 - Adding contact sensor for /World/envs/env_.*/Robot/.* with filter all bodies/shapes +2026-08-14 18:43:51.216 | INFO | logging:callHandlers:1762 - Contact sensor initialized with 30 sensors. +2026-08-14 18:43:51.216 | INFO | logging:callHandlers:1762 - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +2026-08-14 18:43:51.216 | INFO | logging:callHandlers:1762 - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +2026-08-14 18:43:56.075 | WARNING | logging:callHandlers:1762 - cubric IAdapter minor version newer than this shim was validated against: plugin reports v0.2, shim is pinned to v0.1. Proceeding under semver minor-compatibility — if transforms misbehave, verify the vtable layout against omni/cubric/IAdapter.h. +2026-08-14 18:43:56.075 | INFO | logging:callHandlers:1762 - cubric IAdapter bindings ready +2026-08-14 18:43:56.075 | INFO | logging:callHandlers:1762 - cubric bindings ready (adapter deferred to first render) +2026-08-14 18:43:56.075 | INFO | logging:callHandlers:1762 - Newton CUDA graph capture deferred until first step() (RTX active) +2026-08-14 18:43:56.163 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:235 - Loaded skeleton from gear_sonic/data/assets/robot_description/mjcf/g1_29dof_rev_1_0.xml +2026-08-14 18:43:56.163 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:236 - Loading motion data from /mnt/data/code/Sonic-ActionReplay/public_assets/sample_data/robot_filtered... +2026-08-14 18:43:56.163 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_data:472 - Loaded 2 motions +2026-08-14 18:43:56.655 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1091 - Loading 1 motions... +2026-08-14 18:43:56.656 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1092 - Sampling motion: tensor([1], device='cuda:0'), .... +2026-08-14 18:43:56.656 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1093 - Current motion keys: ['walk_forward_amateur_001__A001'], .... +2026-08-14 18:43:56.656 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1120 - Increased file descriptor limits from 2450/1048576 to 1048576/1048576 +2026-08-14 18:43:56.728 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1140 - Loading motions with 1 jobs... +2026-08-14 18:43:56.925 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1577 - Loaded 1 motions with a total length of 40.020s and 2002 frames. +2026-08-14 18:43:57.511 | INFO | logging:callHandlers:1762 - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'left_hip_roll_joint', 'left_hip_yaw_joint', 'left_knee_joint', 'left_ankle_pitch_joint', 'left_ankle_roll_joint', 'right_hip_pitch_joint', 'right_hip_roll_joint', 'right_hip_yaw_joint', 'right_knee_joint', 'right_ankle_pitch_joint', 'right_ankle_roll_joint', 'waist_yaw_joint', 'waist_roll_joint', 'waist_pitch_joint', 'left_shoulder_pitch_joint', 'left_shoulder_roll_joint', 'left_shoulder_yaw_joint', 'left_elbow_joint', 'left_wrist_roll_joint', 'left_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_shoulder_pitch_joint', 'right_shoulder_roll_joint', 'right_shoulder_yaw_joint', 'right_elbow_joint', 'right_wrist_roll_joint', 'right_wrist_pitch_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] +2026-08-14 18:43:58.209 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_grid:1227 - Setting up replay grid: 1 rows x 1 cols with 2.0m spacing +2026-08-14 18:43:58.210 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_grid:1247 - Grid bounds: X=[0.0, 0.0], Y=[0.0, 0.0] +2026-08-14 18:43:59.447 | INFO | logging:callHandlers:1762 - Newton CUDA graph captured (deferred relaxed mode, RTX-compatible) +2026-08-14 18:43:59.452 | INFO | logging:callHandlers:1762 - cubric GPU transform hierarchy enabled +2026-08-14 18:43:59.478 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1440 - +============================================================ +2026-08-14 18:43:59.478 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1441 - Batch Replaying 1 Environments +2026-08-14 18:43:59.478 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1442 - Unique motion IDs: [0] +2026-08-14 18:43:59.478 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1443 - Max frames: 250 +2026-08-14 18:43:59.478 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1444 - Max duration: 5.00s (@ 50 FPS) +2026-08-14 18:43:59.478 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1445 - Speed: 1.0x +2026-08-14 18:43:59.478 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1446 - ============================================================ + +2026-08-14 18:43:59.478 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1667 - Replay Controls: +2026-08-14 18:43:59.478 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1668 - G: Pause/Resume +2026-08-14 18:43:59.478 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1669 - B: Toggle Reverse Play +2026-08-14 18:43:59.479 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1670 - LEFT/RIGHT: Step backward/forward (when paused) +2026-08-14 18:43:59.479 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1671 - R: Restart from beginning +2026-08-14 18:43:59.479 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1672 - ESC: Exit replay +2026-08-14 18:43:59.479 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1673 - +/-: Increase/Decrease speed +2026-08-14 18:43:59.479 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:setup_replay_motion:1674 - +2026-08-14 18:43:59.921 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:step_replay:2096 - Progress: 20.0% (max frame 50/250) +2026-08-14 18:44:00.148 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:step_replay:2096 - Progress: 40.0% (max frame 100/250) +2026-08-14 18:44:00.377 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:step_replay:2096 - Progress: 60.0% (max frame 150/250) +2026-08-14 18:44:00.607 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:step_replay:2096 - Progress: 80.0% (max frame 200/250) +2026-08-14 18:44:00.834 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:step_replay:2085 - Replay complete! diff --git a/GR00T-WholeBodyControl/logs_eval/20260814_184315-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260814_184315-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..7fd09045550e7c62f7bcb629046c98b2199d38fe --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260814_184315-TEST/eval_agent_trl.log @@ -0,0 +1,157 @@ +[2026-08-14 18:43:20,098][isaaclab.app.app_launcher][WARNING] - [WARN][AppLauncher]: There are no arguments attached to the ArgumentParser object. If you have your own arguments, please load your own arguments before calling the `AppLauncher.add_app_launcher_args` method. This allows the method to check the validity of the arguments and perform checks for argument names. +[2026-08-14 18:43:20,101][isaaclab.app.app_launcher][INFO] - No visualizer was selected, so running in headless mode. To launch a visualizer app, pass '--viz ' (for example '--viz kit'). +[2026-08-14 18:43:20,101][isaaclab.app.app_launcher][INFO] - Using device: cuda +[2026-08-14 18:43:20,102][isaaclab.app.app_launcher][INFO] - Loading experience file: /mnt/data/code/github/IsaacLab/apps/isaaclab.python.headless.rendering.kit +[2026-08-14 18:43:20,382][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-14 18:43:28,080][AutoNode][DEBUG] - Defining data type 'any' as 'Any' +[2026-08-14 18:43:28,080][AutoNode][DEBUG] - Defining data type 'bool' as 'Bool' and array 'BoolArray +[2026-08-14 18:43:28,080][AutoNode][DEBUG] - Defining data type 'bundle' as 'Bundle' +[2026-08-14 18:43:28,080][AutoNode][DEBUG] - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +[2026-08-14 18:43:28,080][AutoNode][DEBUG] - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +[2026-08-14 18:43:28,080][AutoNode][DEBUG] - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +[2026-08-14 18:43:28,081][AutoNode][DEBUG] - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +[2026-08-14 18:43:28,081][AutoNode][DEBUG] - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +[2026-08-14 18:43:28,081][AutoNode][DEBUG] - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +[2026-08-14 18:43:28,081][AutoNode][DEBUG] - Defining data type 'double' as 'Double' and array 'DoubleArray +[2026-08-14 18:43:28,081][AutoNode][DEBUG] - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +[2026-08-14 18:43:28,081][AutoNode][DEBUG] - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +[2026-08-14 18:43:28,081][AutoNode][DEBUG] - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +[2026-08-14 18:43:28,081][AutoNode][DEBUG] - Defining data type 'execution' as 'Execution' +[2026-08-14 18:43:28,081][AutoNode][DEBUG] - Defining data type 'float' as 'Float' and array 'FloatArray +[2026-08-14 18:43:28,081][AutoNode][DEBUG] - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +[2026-08-14 18:43:28,082][AutoNode][DEBUG] - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +[2026-08-14 18:43:28,082][AutoNode][DEBUG] - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +[2026-08-14 18:43:28,082][AutoNode][DEBUG] - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +[2026-08-14 18:43:28,082][AutoNode][DEBUG] - Defining data type 'half' as 'Half' and array 'HalfArray +[2026-08-14 18:43:28,082][AutoNode][DEBUG] - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +[2026-08-14 18:43:28,082][AutoNode][DEBUG] - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +[2026-08-14 18:43:28,082][AutoNode][DEBUG] - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +[2026-08-14 18:43:28,082][AutoNode][DEBUG] - Defining data type 'int' as 'Int' and array 'IntArray +[2026-08-14 18:43:28,082][AutoNode][DEBUG] - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +[2026-08-14 18:43:28,083][AutoNode][DEBUG] - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +[2026-08-14 18:43:28,083][AutoNode][DEBUG] - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +[2026-08-14 18:43:28,083][AutoNode][DEBUG] - Defining data type 'int64' as 'Int64' and array 'Int64Array +[2026-08-14 18:43:28,083][AutoNode][DEBUG] - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +[2026-08-14 18:43:28,083][AutoNode][DEBUG] - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +[2026-08-14 18:43:28,083][AutoNode][DEBUG] - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +[2026-08-14 18:43:28,083][AutoNode][DEBUG] - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +[2026-08-14 18:43:28,083][AutoNode][DEBUG] - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +[2026-08-14 18:43:28,083][AutoNode][DEBUG] - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +[2026-08-14 18:43:28,083][AutoNode][DEBUG] - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +[2026-08-14 18:43:28,083][AutoNode][DEBUG] - Defining data type 'path' as 'Path' +[2026-08-14 18:43:28,084][AutoNode][DEBUG] - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +[2026-08-14 18:43:28,084][AutoNode][DEBUG] - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +[2026-08-14 18:43:28,084][AutoNode][DEBUG] - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +[2026-08-14 18:43:28,084][AutoNode][DEBUG] - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +[2026-08-14 18:43:28,084][AutoNode][DEBUG] - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +[2026-08-14 18:43:28,084][AutoNode][DEBUG] - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +[2026-08-14 18:43:28,084][AutoNode][DEBUG] - Defining data type 'string' as 'String' +[2026-08-14 18:43:28,084][AutoNode][DEBUG] - Defining data type 'target' as 'Target' +[2026-08-14 18:43:28,084][AutoNode][DEBUG] - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +[2026-08-14 18:43:28,085][AutoNode][DEBUG] - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +[2026-08-14 18:43:28,085][AutoNode][DEBUG] - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +[2026-08-14 18:43:28,085][AutoNode][DEBUG] - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +[2026-08-14 18:43:28,085][AutoNode][DEBUG] - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +[2026-08-14 18:43:28,085][AutoNode][DEBUG] - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +[2026-08-14 18:43:28,085][AutoNode][DEBUG] - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +[2026-08-14 18:43:28,085][AutoNode][DEBUG] - Defining data type 'token' as 'Token' and array 'TokenArray +[2026-08-14 18:43:28,085][AutoNode][DEBUG] - Defining data type 'uchar' as 'UChar' and array 'UCharArray +[2026-08-14 18:43:28,085][AutoNode][DEBUG] - Defining data type 'uint' as 'UInt' and array 'UIntArray +[2026-08-14 18:43:28,086][AutoNode][DEBUG] - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +[2026-08-14 18:43:28,086][AutoNode][DEBUG] - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +[2026-08-14 18:43:28,086][AutoNode][DEBUG] - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +[2026-08-14 18:43:28,086][AutoNode][DEBUG] - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +[2026-08-14 18:43:41,054][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory Articulation. +[2026-08-14 18:43:41,175][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Startup: isaacsim.asset.transformer.rules-1.7.10 +[2026-08-14 18:43:41,185][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:43:41,751][isaacsim.asset.importer.utils.impl.asset_utils][INFO] - Removing world-anchoring fixed joint /g1/Physics/root_joint for floating base. +[2026-08-14 18:43:41,758][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Applied RobotAPI to prim /g1 +[2026-08-14 18:43:41,763][isaacsim.asset.importer.utils.impl.importer_utils][INFO] - Set isaac:robotType = 'Default' on /g1 +[2026-08-14 18:43:41,764][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,765][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,765][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,766][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,766][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,767][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,767][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,767][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,768][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_hip_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,768][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_knee_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,769][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,769][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_ankle_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,770][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,770][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,770][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/waist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,771][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,771][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,772][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,772][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,773][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,773][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,773][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/left_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,774][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,774][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,775][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_shoulder_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,775][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_elbow_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,776][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_roll_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,776][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_pitch_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,776][isaacsim.asset.importer.utils.impl.urdf_to_mjc_physx_conversion_utils][WARNING] - Stiffness and damping not available joint /g1/Physics/right_wrist_yaw_joint, actuator will be created without gain parameters +[2026-08-14 18:43:41,797][isaacsim.asset.transformer.rules.extension][INFO] - [isaacsim.asset.transformer.rules] Registered 16 rule(s) +[2026-08-14 18:43:41,872][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_184341_6311/main/payloads/base.usda +[2026-08-14 18:43:42,335][isaacsim.asset.transformer.manager][INFO] - Switched working stage to: /tmp/IsaacLab/usd_20260814_184341_6311/main/main.usda +[2026-08-14 18:43:42,342][isaacsim.asset.transformer.manager][INFO] - Skipping disabled rule: Delete Newton Redundant APIs +[2026-08-14 18:43:42,647][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory FrameView. +[2026-08-14 18:43:42,697][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory ContactSensor. +[2026-08-14 18:43:46,505][isaaclab.utils.backend_utils][INFO] - Registered backend 'newton' for factory Renderer. +[2026-08-14 18:43:46,505][isaaclab.renderers.render_context][INFO] - Created new renderer for simulation: NewtonWarpRenderer +[2026-08-14 18:43:46,506][isaaclab_newton.physics.newton_manager][INFO] - Dispatching MODEL_INIT callbacks +[2026-08-14 18:43:46,506][isaaclab_newton.physics.newton_manager][INFO] - Finalizing model on device: cuda:0 +[2026-08-14 18:43:50,957][isaaclab_newton.physics.newton_manager][INFO] - Dispatching PHYSICS_READY callbacks +[2026-08-14 18:43:51,187][isaaclab_newton.assets.articulation.articulation][INFO] - Simulation parameters for joints in /World/envs/env_.*/Robot: ++-------------------------------------------------------------------------------------------------------------------------------------------+ +| Simulation Joint Information (Prim path: /World/envs/env_.*/Robot) | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| Index | Name | Stiffness | Damping | Armature | Static Friction | Position Limits | Velocity Limits | Effort Limits | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +| 0 | left_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 1 | left_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.524, 2.967] | 20.000 | 139.000 | +| 2 | left_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 3 | left_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 4 | left_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 5 | left_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 6 | right_hip_pitch_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.531, 2.880] | 20.000 | 139.000 | +| 7 | right_hip_roll_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-2.967, 0.524] | 20.000 | 139.000 | +| 8 | right_hip_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.758, 2.758] | 32.000 | 88.000 | +| 9 | right_knee_joint | 99.098 | 6.309 | 0.025 | 0.000 | [-0.087, 2.880] | 20.000 | 139.000 | +| 10 | right_ankle_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.873, 0.524] | 37.000 | 50.000 | +| 11 | right_ankle_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.262, 0.262] | 37.000 | 50.000 | +| 12 | waist_yaw_joint | 40.179 | 2.558 | 0.010 | 0.000 | [-2.618, 2.618] | 32.000 | 88.000 | +| 13 | waist_roll_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 14 | waist_pitch_joint | 28.501 | 1.814 | 0.007 | 0.000 | [-0.520, 0.520] | 37.000 | 50.000 | +| 15 | left_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 16 | left_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.588, 2.252] | 37.000 | 25.000 | +| 17 | left_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 18 | left_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 19 | left_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 20 | left_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 21 | left_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 22 | right_shoulder_pitch_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-3.089, 2.670] | 37.000 | 25.000 | +| 23 | right_shoulder_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.252, 1.588] | 37.000 | 25.000 | +| 24 | right_shoulder_yaw_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-2.618, 2.618] | 37.000 | 25.000 | +| 25 | right_elbow_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.047, 2.094] | 37.000 | 25.000 | +| 26 | right_wrist_roll_joint | 14.251 | 0.907 | 0.004 | 0.000 | [-1.972, 1.972] | 37.000 | 25.000 | +| 27 | right_wrist_pitch_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | +| 28 | right_wrist_yaw_joint | 16.778 | 1.068 | 0.004 | 0.000 | [-1.614, 1.614] | 22.000 | 5.000 | ++-------+----------------------------+-----------+---------+----------+-----------------+-----------------+-----------------+---------------+ +[2026-08-14 18:43:51,189][isaaclab.sensors.camera.camera][INFO] - Using renderer: NewtonWarpRenderer +[2026-08-14 18:43:51,212][isaaclab_newton.physics.newton_manager][INFO] - Adding contact sensor for /World/envs/env_.*/Robot/.* with filter all bodies/shapes +[2026-08-14 18:43:51,216][isaaclab_newton.sensors.contact_sensor.contact_sensor][INFO] - Contact sensor initialized with 30 sensors. +[2026-08-14 18:43:51,216][isaaclab_newton.sensors.contact_sensor.contact_sensor][INFO] - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +[2026-08-14 18:43:51,216][isaaclab_newton.sensors.contact_sensor.contact_sensor_data][INFO] - Creating buffers for contact sensor data with num_envs: 1, num_sensors: 30, num_filter_objects: 0, history_length: 3, generate_force_matrix: False, track_air_time: True, track_pose: False, device: cuda:0 +[2026-08-14 18:43:56,074][isaaclab_newton.physics._cubric][WARNING] - cubric IAdapter minor version newer than this shim was validated against: plugin reports v0.2, shim is pinned to v0.1. Proceeding under semver minor-compatibility — if transforms misbehave, verify the vtable layout against omni/cubric/IAdapter.h. +[2026-08-14 18:43:56,075][isaaclab_newton.physics._cubric][INFO] - cubric IAdapter bindings ready +[2026-08-14 18:43:56,075][isaaclab_newton.physics.newton_manager][INFO] - cubric bindings ready (adapter deferred to first render) +[2026-08-14 18:43:56,075][isaaclab_newton.physics.newton_manager][INFO] - Newton CUDA graph capture deferred until first step() (RTX active) +[2026-08-14 18:43:57,511][isaaclab.envs.mdp.actions.joint_actions][INFO] - Resolved joint names for the action term JointPositionAction: ['left_hip_pitch_joint', 'left_hip_roll_joint', 'left_hip_yaw_joint', 'left_knee_joint', 'left_ankle_pitch_joint', 'left_ankle_roll_joint', 'right_hip_pitch_joint', 'right_hip_roll_joint', 'right_hip_yaw_joint', 'right_knee_joint', 'right_ankle_pitch_joint', 'right_ankle_roll_joint', 'waist_yaw_joint', 'waist_roll_joint', 'waist_pitch_joint', 'left_shoulder_pitch_joint', 'left_shoulder_roll_joint', 'left_shoulder_yaw_joint', 'left_elbow_joint', 'left_wrist_roll_joint', 'left_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_shoulder_pitch_joint', 'right_shoulder_roll_joint', 'right_shoulder_yaw_joint', 'right_elbow_joint', 'right_wrist_roll_joint', 'right_wrist_pitch_joint', 'right_wrist_yaw_joint'] [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]] +[2026-08-14 18:43:59,447][isaaclab_newton.physics.newton_manager][INFO] - Newton CUDA graph captured (deferred relaxed mode, RTX-compatible) +[2026-08-14 18:43:59,452][isaaclab_newton.physics.newton_manager][INFO] - cubric GPU transform hierarchy enabled diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_160202-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_160202-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4b068e5a895db8b4dc10300ce8f1a90b807ed02f --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_160202-TEST/.hydra/config.yaml @@ -0,0 +1,43 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + render_envs: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RenderEnvsRecorderCfg + video_save_path: ${manager_env.config.save_rendering_dir} + video_quality: 5 + observations: + policy: + enable_corruption: false + tokenizer: + enable_corruption: false + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered + smpl_motion_file: /mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered + config: + save_rendering_dir: /mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818 + render_results: true +checkpoint: /mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +headless: true +num_envs: 1 +max_render_steps: 300 diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_160202-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_160202-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..00fe1b8cc6a6f577153f49f0e5da665cca8bcab8 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_160202-TEST/.hydra/hydra.yaml @@ -0,0 +1,166 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - +checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt + - +headless=True + - ++num_envs=1 + - ++manager_env.observations.policy.enable_corruption=False + - ++manager_env.observations.tokenizer.enable_corruption=False + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered + - ++manager_env.config.save_rendering_dir=/mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818 + - ++manager_env.config.render_results=True + - manager_env/recorders=render + - +max_render_steps=300 + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered,++manager_env.config.render_results=True,++manager_env.config.save_rendering_dir=/mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818,++manager_env.observations.policy.enable_corruption=False,++manager_env.observations.tokenizer.enable_corruption=False,++num_envs=1,+checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt,+headless=True,+max_render_steps=300,manager_env/recorders=render + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260818_160202-TEST + choices: + manager_env/recorders: render + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_160202-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_160202-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..5986e5c39f8e46eac057f46d049f895526a1484e --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_160202-TEST/.hydra/overrides.yaml @@ -0,0 +1,11 @@ +- +checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt +- +headless=True +- ++num_envs=1 +- ++manager_env.observations.policy.enable_corruption=False +- ++manager_env.observations.tokenizer.enable_corruption=False +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered +- ++manager_env.config.save_rendering_dir=/mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818 +- ++manager_env.config.render_results=True +- manager_env/recorders=render +- +max_render_steps=300 diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_160202-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260818_160202-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..a32fdf320e8dc353dc66c502163f21d9c8c05253 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_160202-TEST/eval.log @@ -0,0 +1,70 @@ +2026-08-18 16:02:02.931 | INFO | __main__:main:90 - Loading training config file from /mnt/data/model/nvidia/GEAR-SONIC/low_latency/config.yaml +2026-08-18 16:02:04.835 | DEBUG | logging:callHandlers:1706 - Using selector: EpollSelector +2026-08-18 16:02:11.634 | DEBUG | logging:callHandlers:1706 - Defining data type 'any' as 'Any' +2026-08-18 16:02:11.634 | DEBUG | logging:callHandlers:1706 - Defining data type 'bool' as 'Bool' and array 'BoolArray +2026-08-18 16:02:11.634 | DEBUG | logging:callHandlers:1706 - Defining data type 'bundle' as 'Bundle' +2026-08-18 16:02:11.634 | DEBUG | logging:callHandlers:1706 - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +2026-08-18 16:02:11.635 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +2026-08-18 16:02:11.635 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +2026-08-18 16:02:11.635 | DEBUG | logging:callHandlers:1706 - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +2026-08-18 16:02:11.635 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +2026-08-18 16:02:11.635 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +2026-08-18 16:02:11.635 | DEBUG | logging:callHandlers:1706 - Defining data type 'double' as 'Double' and array 'DoubleArray +2026-08-18 16:02:11.635 | DEBUG | logging:callHandlers:1706 - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +2026-08-18 16:02:11.635 | DEBUG | logging:callHandlers:1706 - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +2026-08-18 16:02:11.635 | DEBUG | logging:callHandlers:1706 - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +2026-08-18 16:02:11.635 | DEBUG | logging:callHandlers:1706 - Defining data type 'execution' as 'Execution' +2026-08-18 16:02:11.636 | DEBUG | logging:callHandlers:1706 - Defining data type 'float' as 'Float' and array 'FloatArray +2026-08-18 16:02:11.636 | DEBUG | logging:callHandlers:1706 - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +2026-08-18 16:02:11.636 | DEBUG | logging:callHandlers:1706 - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +2026-08-18 16:02:11.636 | DEBUG | logging:callHandlers:1706 - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +2026-08-18 16:02:11.636 | DEBUG | logging:callHandlers:1706 - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +2026-08-18 16:02:11.636 | DEBUG | logging:callHandlers:1706 - Defining data type 'half' as 'Half' and array 'HalfArray +2026-08-18 16:02:11.637 | DEBUG | logging:callHandlers:1706 - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +2026-08-18 16:02:11.637 | DEBUG | logging:callHandlers:1706 - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +2026-08-18 16:02:11.637 | DEBUG | logging:callHandlers:1706 - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +2026-08-18 16:02:11.637 | DEBUG | logging:callHandlers:1706 - Defining data type 'int' as 'Int' and array 'IntArray +2026-08-18 16:02:11.637 | DEBUG | logging:callHandlers:1706 - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +2026-08-18 16:02:11.637 | DEBUG | logging:callHandlers:1706 - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +2026-08-18 16:02:11.637 | DEBUG | logging:callHandlers:1706 - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +2026-08-18 16:02:11.637 | DEBUG | logging:callHandlers:1706 - Defining data type 'int64' as 'Int64' and array 'Int64Array +2026-08-18 16:02:11.637 | DEBUG | logging:callHandlers:1706 - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +2026-08-18 16:02:11.638 | DEBUG | logging:callHandlers:1706 - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +2026-08-18 16:02:11.638 | DEBUG | logging:callHandlers:1706 - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +2026-08-18 16:02:11.638 | DEBUG | logging:callHandlers:1706 - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +2026-08-18 16:02:11.638 | DEBUG | logging:callHandlers:1706 - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +2026-08-18 16:02:11.638 | DEBUG | logging:callHandlers:1706 - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +2026-08-18 16:02:11.638 | DEBUG | logging:callHandlers:1706 - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +2026-08-18 16:02:11.638 | DEBUG | logging:callHandlers:1706 - Defining data type 'path' as 'Path' +2026-08-18 16:02:11.638 | DEBUG | logging:callHandlers:1706 - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +2026-08-18 16:02:11.638 | DEBUG | logging:callHandlers:1706 - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +2026-08-18 16:02:11.638 | DEBUG | logging:callHandlers:1706 - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +2026-08-18 16:02:11.639 | DEBUG | logging:callHandlers:1706 - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +2026-08-18 16:02:11.639 | DEBUG | logging:callHandlers:1706 - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +2026-08-18 16:02:11.639 | DEBUG | logging:callHandlers:1706 - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +2026-08-18 16:02:11.639 | DEBUG | logging:callHandlers:1706 - Defining data type 'string' as 'String' +2026-08-18 16:02:11.639 | DEBUG | logging:callHandlers:1706 - Defining data type 'target' as 'Target' +2026-08-18 16:02:11.639 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +2026-08-18 16:02:11.639 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +2026-08-18 16:02:11.639 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +2026-08-18 16:02:11.639 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +2026-08-18 16:02:11.640 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +2026-08-18 16:02:11.640 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +2026-08-18 16:02:11.640 | DEBUG | logging:callHandlers:1706 - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +2026-08-18 16:02:11.640 | DEBUG | logging:callHandlers:1706 - Defining data type 'token' as 'Token' and array 'TokenArray +2026-08-18 16:02:11.640 | DEBUG | logging:callHandlers:1706 - Defining data type 'uchar' as 'UChar' and array 'UCharArray +2026-08-18 16:02:11.640 | DEBUG | logging:callHandlers:1706 - Defining data type 'uint' as 'UInt' and array 'UIntArray +2026-08-18 16:02:11.640 | DEBUG | logging:callHandlers:1706 - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +2026-08-18 16:02:11.640 | DEBUG | logging:callHandlers:1706 - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +2026-08-18 16:02:11.641 | DEBUG | logging:callHandlers:1706 - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +2026-08-18 16:02:11.641 | DEBUG | logging:callHandlers:1706 - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +2026-08-18 16:02:17.323 | DEBUG | logging:callHandlers:1706 - Creating converter from 7 to 5 +2026-08-18 16:02:17.323 | DEBUG | logging:callHandlers:1706 - Creating converter from 5 to 7 +2026-08-18 16:02:17.324 | DEBUG | logging:callHandlers:1706 - Creating converter from 7 to 5 +2026-08-18 16:02:17.324 | DEBUG | logging:callHandlers:1706 - Creating converter from 5 to 7 +2026-08-18 16:02:17.594 | DEBUG | logging:callHandlers:1706 - matplotlib data path: /mnt/data/miniconda3/envs/sonic/lib/python3.11/site-packages/matplotlib/mpl-data +2026-08-18 16:02:17.602 | DEBUG | logging:callHandlers:1706 - CONFIGDIR=/root/.config/matplotlib +2026-08-18 16:02:17.604 | DEBUG | logging:callHandlers:1706 - interactive is False +2026-08-18 16:02:17.604 | DEBUG | logging:callHandlers:1706 - platform is linux +2026-08-18 16:03:46.952 | DEBUG | logging:callHandlers:1706 - Attempting to release lock 140094738918096 on /tmp/isaaclab_app_launcher.lock +2026-08-18 16:03:46.952 | DEBUG | logging:callHandlers:1706 - Lock 140094738918096 released on /tmp/isaaclab_app_launcher.lock diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_160202-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260818_160202-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..c14eca6cfb7028270eec5a6e97a0364a9a98ab08 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_160202-TEST/eval_agent_trl.log @@ -0,0 +1,69 @@ +[2026-08-18 16:02:04,835][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-18 16:02:11,633][AutoNode][DEBUG] - Defining data type 'any' as 'Any' +[2026-08-18 16:02:11,634][AutoNode][DEBUG] - Defining data type 'bool' as 'Bool' and array 'BoolArray +[2026-08-18 16:02:11,634][AutoNode][DEBUG] - Defining data type 'bundle' as 'Bundle' +[2026-08-18 16:02:11,634][AutoNode][DEBUG] - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +[2026-08-18 16:02:11,634][AutoNode][DEBUG] - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +[2026-08-18 16:02:11,635][AutoNode][DEBUG] - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +[2026-08-18 16:02:11,635][AutoNode][DEBUG] - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +[2026-08-18 16:02:11,635][AutoNode][DEBUG] - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +[2026-08-18 16:02:11,635][AutoNode][DEBUG] - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +[2026-08-18 16:02:11,635][AutoNode][DEBUG] - Defining data type 'double' as 'Double' and array 'DoubleArray +[2026-08-18 16:02:11,635][AutoNode][DEBUG] - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +[2026-08-18 16:02:11,635][AutoNode][DEBUG] - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +[2026-08-18 16:02:11,635][AutoNode][DEBUG] - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +[2026-08-18 16:02:11,635][AutoNode][DEBUG] - Defining data type 'execution' as 'Execution' +[2026-08-18 16:02:11,636][AutoNode][DEBUG] - Defining data type 'float' as 'Float' and array 'FloatArray +[2026-08-18 16:02:11,636][AutoNode][DEBUG] - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +[2026-08-18 16:02:11,636][AutoNode][DEBUG] - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +[2026-08-18 16:02:11,636][AutoNode][DEBUG] - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +[2026-08-18 16:02:11,636][AutoNode][DEBUG] - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +[2026-08-18 16:02:11,636][AutoNode][DEBUG] - Defining data type 'half' as 'Half' and array 'HalfArray +[2026-08-18 16:02:11,636][AutoNode][DEBUG] - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +[2026-08-18 16:02:11,637][AutoNode][DEBUG] - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +[2026-08-18 16:02:11,637][AutoNode][DEBUG] - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +[2026-08-18 16:02:11,637][AutoNode][DEBUG] - Defining data type 'int' as 'Int' and array 'IntArray +[2026-08-18 16:02:11,637][AutoNode][DEBUG] - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +[2026-08-18 16:02:11,637][AutoNode][DEBUG] - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +[2026-08-18 16:02:11,637][AutoNode][DEBUG] - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +[2026-08-18 16:02:11,637][AutoNode][DEBUG] - Defining data type 'int64' as 'Int64' and array 'Int64Array +[2026-08-18 16:02:11,637][AutoNode][DEBUG] - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +[2026-08-18 16:02:11,638][AutoNode][DEBUG] - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +[2026-08-18 16:02:11,638][AutoNode][DEBUG] - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +[2026-08-18 16:02:11,638][AutoNode][DEBUG] - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +[2026-08-18 16:02:11,638][AutoNode][DEBUG] - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +[2026-08-18 16:02:11,638][AutoNode][DEBUG] - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +[2026-08-18 16:02:11,638][AutoNode][DEBUG] - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +[2026-08-18 16:02:11,638][AutoNode][DEBUG] - Defining data type 'path' as 'Path' +[2026-08-18 16:02:11,638][AutoNode][DEBUG] - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +[2026-08-18 16:02:11,638][AutoNode][DEBUG] - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +[2026-08-18 16:02:11,638][AutoNode][DEBUG] - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +[2026-08-18 16:02:11,639][AutoNode][DEBUG] - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +[2026-08-18 16:02:11,639][AutoNode][DEBUG] - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +[2026-08-18 16:02:11,639][AutoNode][DEBUG] - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +[2026-08-18 16:02:11,639][AutoNode][DEBUG] - Defining data type 'string' as 'String' +[2026-08-18 16:02:11,639][AutoNode][DEBUG] - Defining data type 'target' as 'Target' +[2026-08-18 16:02:11,639][AutoNode][DEBUG] - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +[2026-08-18 16:02:11,639][AutoNode][DEBUG] - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +[2026-08-18 16:02:11,639][AutoNode][DEBUG] - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +[2026-08-18 16:02:11,639][AutoNode][DEBUG] - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +[2026-08-18 16:02:11,640][AutoNode][DEBUG] - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +[2026-08-18 16:02:11,640][AutoNode][DEBUG] - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +[2026-08-18 16:02:11,640][AutoNode][DEBUG] - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +[2026-08-18 16:02:11,640][AutoNode][DEBUG] - Defining data type 'token' as 'Token' and array 'TokenArray +[2026-08-18 16:02:11,640][AutoNode][DEBUG] - Defining data type 'uchar' as 'UChar' and array 'UCharArray +[2026-08-18 16:02:11,640][AutoNode][DEBUG] - Defining data type 'uint' as 'UInt' and array 'UIntArray +[2026-08-18 16:02:11,640][AutoNode][DEBUG] - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +[2026-08-18 16:02:11,640][AutoNode][DEBUG] - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +[2026-08-18 16:02:11,641][AutoNode][DEBUG] - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +[2026-08-18 16:02:11,641][AutoNode][DEBUG] - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +[2026-08-18 16:02:17,323][h5py._conv][DEBUG] - Creating converter from 7 to 5 +[2026-08-18 16:02:17,323][h5py._conv][DEBUG] - Creating converter from 5 to 7 +[2026-08-18 16:02:17,324][h5py._conv][DEBUG] - Creating converter from 7 to 5 +[2026-08-18 16:02:17,324][h5py._conv][DEBUG] - Creating converter from 5 to 7 +[2026-08-18 16:02:17,593][matplotlib][DEBUG] - matplotlib data path: /mnt/data/miniconda3/envs/sonic/lib/python3.11/site-packages/matplotlib/mpl-data +[2026-08-18 16:02:17,602][matplotlib][DEBUG] - CONFIGDIR=/root/.config/matplotlib +[2026-08-18 16:02:17,603][matplotlib][DEBUG] - interactive is False +[2026-08-18 16:02:17,604][matplotlib][DEBUG] - platform is linux +[2026-08-18 16:03:46,951][filelock][DEBUG] - Attempting to release lock 140094738918096 on /tmp/isaaclab_app_launcher.lock +[2026-08-18 16:03:46,952][filelock][DEBUG] - Lock 140094738918096 released on /tmp/isaaclab_app_launcher.lock diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_160703-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_160703-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4b068e5a895db8b4dc10300ce8f1a90b807ed02f --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_160703-TEST/.hydra/config.yaml @@ -0,0 +1,43 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + render_envs: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RenderEnvsRecorderCfg + video_save_path: ${manager_env.config.save_rendering_dir} + video_quality: 5 + observations: + policy: + enable_corruption: false + tokenizer: + enable_corruption: false + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered + smpl_motion_file: /mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered + config: + save_rendering_dir: /mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818 + render_results: true +checkpoint: /mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +headless: true +num_envs: 1 +max_render_steps: 300 diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_160703-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_160703-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..08ef0f422bd5403fcffb4eb848d81d84ab886626 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_160703-TEST/.hydra/hydra.yaml @@ -0,0 +1,166 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - +checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt + - +headless=True + - ++num_envs=1 + - ++manager_env.observations.policy.enable_corruption=False + - ++manager_env.observations.tokenizer.enable_corruption=False + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered + - ++manager_env.config.save_rendering_dir=/mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818 + - ++manager_env.config.render_results=True + - manager_env/recorders=render + - +max_render_steps=300 + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered,++manager_env.config.render_results=True,++manager_env.config.save_rendering_dir=/mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818,++manager_env.observations.policy.enable_corruption=False,++manager_env.observations.tokenizer.enable_corruption=False,++num_envs=1,+checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt,+headless=True,+max_render_steps=300,manager_env/recorders=render + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260818_160703-TEST + choices: + manager_env/recorders: render + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_160703-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_160703-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..5986e5c39f8e46eac057f46d049f895526a1484e --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_160703-TEST/.hydra/overrides.yaml @@ -0,0 +1,11 @@ +- +checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt +- +headless=True +- ++num_envs=1 +- ++manager_env.observations.policy.enable_corruption=False +- ++manager_env.observations.tokenizer.enable_corruption=False +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered +- ++manager_env.config.save_rendering_dir=/mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818 +- ++manager_env.config.render_results=True +- manager_env/recorders=render +- +max_render_steps=300 diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_160703-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260818_160703-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..8d3bf3b562473fd2e17dfcdd218f9ba73f894012 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_160703-TEST/eval.log @@ -0,0 +1,71 @@ +2026-08-18 16:07:03.617 | INFO | __main__:main:90 - Loading training config file from /mnt/data/model/nvidia/GEAR-SONIC/low_latency/config.yaml +2026-08-18 16:07:05.031 | DEBUG | logging:callHandlers:1706 - Using selector: EpollSelector +2026-08-18 16:07:08.872 | DEBUG | logging:callHandlers:1706 - Defining data type 'any' as 'Any' +2026-08-18 16:07:08.872 | DEBUG | logging:callHandlers:1706 - Defining data type 'bool' as 'Bool' and array 'BoolArray +2026-08-18 16:07:08.872 | DEBUG | logging:callHandlers:1706 - Defining data type 'bundle' as 'Bundle' +2026-08-18 16:07:08.872 | DEBUG | logging:callHandlers:1706 - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +2026-08-18 16:07:08.873 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +2026-08-18 16:07:08.873 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +2026-08-18 16:07:08.873 | DEBUG | logging:callHandlers:1706 - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +2026-08-18 16:07:08.873 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +2026-08-18 16:07:08.873 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +2026-08-18 16:07:08.873 | DEBUG | logging:callHandlers:1706 - Defining data type 'double' as 'Double' and array 'DoubleArray +2026-08-18 16:07:08.873 | DEBUG | logging:callHandlers:1706 - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +2026-08-18 16:07:08.873 | DEBUG | logging:callHandlers:1706 - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +2026-08-18 16:07:08.873 | DEBUG | logging:callHandlers:1706 - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +2026-08-18 16:07:08.874 | DEBUG | logging:callHandlers:1706 - Defining data type 'execution' as 'Execution' +2026-08-18 16:07:08.874 | DEBUG | logging:callHandlers:1706 - Defining data type 'float' as 'Float' and array 'FloatArray +2026-08-18 16:07:08.874 | DEBUG | logging:callHandlers:1706 - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +2026-08-18 16:07:08.874 | DEBUG | logging:callHandlers:1706 - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +2026-08-18 16:07:08.874 | DEBUG | logging:callHandlers:1706 - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +2026-08-18 16:07:08.874 | DEBUG | logging:callHandlers:1706 - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +2026-08-18 16:07:08.874 | DEBUG | logging:callHandlers:1706 - Defining data type 'half' as 'Half' and array 'HalfArray +2026-08-18 16:07:08.874 | DEBUG | logging:callHandlers:1706 - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +2026-08-18 16:07:08.874 | DEBUG | logging:callHandlers:1706 - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +2026-08-18 16:07:08.875 | DEBUG | logging:callHandlers:1706 - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +2026-08-18 16:07:08.875 | DEBUG | logging:callHandlers:1706 - Defining data type 'int' as 'Int' and array 'IntArray +2026-08-18 16:07:08.875 | DEBUG | logging:callHandlers:1706 - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +2026-08-18 16:07:08.875 | DEBUG | logging:callHandlers:1706 - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +2026-08-18 16:07:08.875 | DEBUG | logging:callHandlers:1706 - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +2026-08-18 16:07:08.875 | DEBUG | logging:callHandlers:1706 - Defining data type 'int64' as 'Int64' and array 'Int64Array +2026-08-18 16:07:08.875 | DEBUG | logging:callHandlers:1706 - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +2026-08-18 16:07:08.875 | DEBUG | logging:callHandlers:1706 - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +2026-08-18 16:07:08.875 | DEBUG | logging:callHandlers:1706 - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +2026-08-18 16:07:08.875 | DEBUG | logging:callHandlers:1706 - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +2026-08-18 16:07:08.876 | DEBUG | logging:callHandlers:1706 - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +2026-08-18 16:07:08.876 | DEBUG | logging:callHandlers:1706 - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +2026-08-18 16:07:08.876 | DEBUG | logging:callHandlers:1706 - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +2026-08-18 16:07:08.876 | DEBUG | logging:callHandlers:1706 - Defining data type 'path' as 'Path' +2026-08-18 16:07:08.876 | DEBUG | logging:callHandlers:1706 - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +2026-08-18 16:07:08.876 | DEBUG | logging:callHandlers:1706 - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +2026-08-18 16:07:08.876 | DEBUG | logging:callHandlers:1706 - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +2026-08-18 16:07:08.876 | DEBUG | logging:callHandlers:1706 - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +2026-08-18 16:07:08.876 | DEBUG | logging:callHandlers:1706 - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +2026-08-18 16:07:08.877 | DEBUG | logging:callHandlers:1706 - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +2026-08-18 16:07:08.877 | DEBUG | logging:callHandlers:1706 - Defining data type 'string' as 'String' +2026-08-18 16:07:08.877 | DEBUG | logging:callHandlers:1706 - Defining data type 'target' as 'Target' +2026-08-18 16:07:08.877 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +2026-08-18 16:07:08.877 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +2026-08-18 16:07:08.877 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +2026-08-18 16:07:08.877 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +2026-08-18 16:07:08.877 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +2026-08-18 16:07:08.877 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +2026-08-18 16:07:08.878 | DEBUG | logging:callHandlers:1706 - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +2026-08-18 16:07:08.878 | DEBUG | logging:callHandlers:1706 - Defining data type 'token' as 'Token' and array 'TokenArray +2026-08-18 16:07:08.878 | DEBUG | logging:callHandlers:1706 - Defining data type 'uchar' as 'UChar' and array 'UCharArray +2026-08-18 16:07:08.878 | DEBUG | logging:callHandlers:1706 - Defining data type 'uint' as 'UInt' and array 'UIntArray +2026-08-18 16:07:08.878 | DEBUG | logging:callHandlers:1706 - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +2026-08-18 16:07:08.878 | DEBUG | logging:callHandlers:1706 - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +2026-08-18 16:07:08.878 | DEBUG | logging:callHandlers:1706 - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +2026-08-18 16:07:08.878 | DEBUG | logging:callHandlers:1706 - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +2026-08-18 16:07:11.188 | DEBUG | logging:callHandlers:1706 - Creating converter from 7 to 5 +2026-08-18 16:07:11.188 | DEBUG | logging:callHandlers:1706 - Creating converter from 5 to 7 +2026-08-18 16:07:11.188 | DEBUG | logging:callHandlers:1706 - Creating converter from 7 to 5 +2026-08-18 16:07:11.188 | DEBUG | logging:callHandlers:1706 - Creating converter from 5 to 7 +2026-08-18 16:07:11.262 | DEBUG | logging:callHandlers:1706 - matplotlib data path: /mnt/data/miniconda3/envs/sonic/lib/python3.11/site-packages/matplotlib/mpl-data +2026-08-18 16:07:11.268 | DEBUG | logging:callHandlers:1706 - CONFIGDIR=/root/.config/matplotlib +2026-08-18 16:07:11.269 | DEBUG | logging:callHandlers:1706 - interactive is False +2026-08-18 16:07:11.269 | DEBUG | logging:callHandlers:1706 - platform is linux +2026-08-18 16:07:14.810 | DEBUG | logging:callHandlers:1706 - Attempting to release lock 139797355385680 on /tmp/isaaclab_app_launcher.lock +2026-08-18 16:07:14.810 | DEBUG | logging:callHandlers:1706 - Lock 139797355385680 released on /tmp/isaaclab_app_launcher.lock +2026-08-18 16:07:19.340 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_160703-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260818_160703-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..11a86c24b870bf62cfff41c37972bfb65372b995 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_160703-TEST/eval_agent_trl.log @@ -0,0 +1,69 @@ +[2026-08-18 16:07:05,030][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-18 16:07:08,871][AutoNode][DEBUG] - Defining data type 'any' as 'Any' +[2026-08-18 16:07:08,872][AutoNode][DEBUG] - Defining data type 'bool' as 'Bool' and array 'BoolArray +[2026-08-18 16:07:08,872][AutoNode][DEBUG] - Defining data type 'bundle' as 'Bundle' +[2026-08-18 16:07:08,872][AutoNode][DEBUG] - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +[2026-08-18 16:07:08,872][AutoNode][DEBUG] - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +[2026-08-18 16:07:08,873][AutoNode][DEBUG] - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +[2026-08-18 16:07:08,873][AutoNode][DEBUG] - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +[2026-08-18 16:07:08,873][AutoNode][DEBUG] - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +[2026-08-18 16:07:08,873][AutoNode][DEBUG] - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +[2026-08-18 16:07:08,873][AutoNode][DEBUG] - Defining data type 'double' as 'Double' and array 'DoubleArray +[2026-08-18 16:07:08,873][AutoNode][DEBUG] - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +[2026-08-18 16:07:08,873][AutoNode][DEBUG] - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +[2026-08-18 16:07:08,873][AutoNode][DEBUG] - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +[2026-08-18 16:07:08,874][AutoNode][DEBUG] - Defining data type 'execution' as 'Execution' +[2026-08-18 16:07:08,874][AutoNode][DEBUG] - Defining data type 'float' as 'Float' and array 'FloatArray +[2026-08-18 16:07:08,874][AutoNode][DEBUG] - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +[2026-08-18 16:07:08,874][AutoNode][DEBUG] - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +[2026-08-18 16:07:08,874][AutoNode][DEBUG] - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +[2026-08-18 16:07:08,874][AutoNode][DEBUG] - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +[2026-08-18 16:07:08,874][AutoNode][DEBUG] - Defining data type 'half' as 'Half' and array 'HalfArray +[2026-08-18 16:07:08,874][AutoNode][DEBUG] - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +[2026-08-18 16:07:08,874][AutoNode][DEBUG] - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +[2026-08-18 16:07:08,874][AutoNode][DEBUG] - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +[2026-08-18 16:07:08,875][AutoNode][DEBUG] - Defining data type 'int' as 'Int' and array 'IntArray +[2026-08-18 16:07:08,875][AutoNode][DEBUG] - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +[2026-08-18 16:07:08,875][AutoNode][DEBUG] - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +[2026-08-18 16:07:08,875][AutoNode][DEBUG] - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +[2026-08-18 16:07:08,875][AutoNode][DEBUG] - Defining data type 'int64' as 'Int64' and array 'Int64Array +[2026-08-18 16:07:08,875][AutoNode][DEBUG] - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +[2026-08-18 16:07:08,875][AutoNode][DEBUG] - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +[2026-08-18 16:07:08,875][AutoNode][DEBUG] - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +[2026-08-18 16:07:08,875][AutoNode][DEBUG] - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +[2026-08-18 16:07:08,876][AutoNode][DEBUG] - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +[2026-08-18 16:07:08,876][AutoNode][DEBUG] - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +[2026-08-18 16:07:08,876][AutoNode][DEBUG] - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +[2026-08-18 16:07:08,876][AutoNode][DEBUG] - Defining data type 'path' as 'Path' +[2026-08-18 16:07:08,876][AutoNode][DEBUG] - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +[2026-08-18 16:07:08,876][AutoNode][DEBUG] - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +[2026-08-18 16:07:08,876][AutoNode][DEBUG] - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +[2026-08-18 16:07:08,876][AutoNode][DEBUG] - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +[2026-08-18 16:07:08,876][AutoNode][DEBUG] - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +[2026-08-18 16:07:08,876][AutoNode][DEBUG] - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +[2026-08-18 16:07:08,877][AutoNode][DEBUG] - Defining data type 'string' as 'String' +[2026-08-18 16:07:08,877][AutoNode][DEBUG] - Defining data type 'target' as 'Target' +[2026-08-18 16:07:08,877][AutoNode][DEBUG] - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +[2026-08-18 16:07:08,877][AutoNode][DEBUG] - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +[2026-08-18 16:07:08,877][AutoNode][DEBUG] - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +[2026-08-18 16:07:08,877][AutoNode][DEBUG] - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +[2026-08-18 16:07:08,877][AutoNode][DEBUG] - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +[2026-08-18 16:07:08,877][AutoNode][DEBUG] - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +[2026-08-18 16:07:08,877][AutoNode][DEBUG] - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +[2026-08-18 16:07:08,878][AutoNode][DEBUG] - Defining data type 'token' as 'Token' and array 'TokenArray +[2026-08-18 16:07:08,878][AutoNode][DEBUG] - Defining data type 'uchar' as 'UChar' and array 'UCharArray +[2026-08-18 16:07:08,878][AutoNode][DEBUG] - Defining data type 'uint' as 'UInt' and array 'UIntArray +[2026-08-18 16:07:08,878][AutoNode][DEBUG] - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +[2026-08-18 16:07:08,878][AutoNode][DEBUG] - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +[2026-08-18 16:07:08,878][AutoNode][DEBUG] - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +[2026-08-18 16:07:08,878][AutoNode][DEBUG] - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +[2026-08-18 16:07:11,187][h5py._conv][DEBUG] - Creating converter from 7 to 5 +[2026-08-18 16:07:11,188][h5py._conv][DEBUG] - Creating converter from 5 to 7 +[2026-08-18 16:07:11,188][h5py._conv][DEBUG] - Creating converter from 7 to 5 +[2026-08-18 16:07:11,188][h5py._conv][DEBUG] - Creating converter from 5 to 7 +[2026-08-18 16:07:11,262][matplotlib][DEBUG] - matplotlib data path: /mnt/data/miniconda3/envs/sonic/lib/python3.11/site-packages/matplotlib/mpl-data +[2026-08-18 16:07:11,268][matplotlib][DEBUG] - CONFIGDIR=/root/.config/matplotlib +[2026-08-18 16:07:11,269][matplotlib][DEBUG] - interactive is False +[2026-08-18 16:07:11,269][matplotlib][DEBUG] - platform is linux +[2026-08-18 16:07:14,810][filelock][DEBUG] - Attempting to release lock 139797355385680 on /tmp/isaaclab_app_launcher.lock +[2026-08-18 16:07:14,810][filelock][DEBUG] - Lock 139797355385680 released on /tmp/isaaclab_app_launcher.lock diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_161344-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_161344-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4b068e5a895db8b4dc10300ce8f1a90b807ed02f --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_161344-TEST/.hydra/config.yaml @@ -0,0 +1,43 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + render_envs: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RenderEnvsRecorderCfg + video_save_path: ${manager_env.config.save_rendering_dir} + video_quality: 5 + observations: + policy: + enable_corruption: false + tokenizer: + enable_corruption: false + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered + smpl_motion_file: /mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered + config: + save_rendering_dir: /mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818 + render_results: true +checkpoint: /mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +headless: true +num_envs: 1 +max_render_steps: 300 diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_161344-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_161344-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..56f81587fcd780c181abe67345fd550606dd0b17 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_161344-TEST/.hydra/hydra.yaml @@ -0,0 +1,166 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - +checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt + - +headless=True + - ++num_envs=1 + - ++manager_env.observations.policy.enable_corruption=False + - ++manager_env.observations.tokenizer.enable_corruption=False + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered + - ++manager_env.config.save_rendering_dir=/mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818 + - ++manager_env.config.render_results=True + - manager_env/recorders=render + - +max_render_steps=300 + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered,++manager_env.config.render_results=True,++manager_env.config.save_rendering_dir=/mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818,++manager_env.observations.policy.enable_corruption=False,++manager_env.observations.tokenizer.enable_corruption=False,++num_envs=1,+checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt,+headless=True,+max_render_steps=300,manager_env/recorders=render + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260818_161344-TEST + choices: + manager_env/recorders: render + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_161344-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_161344-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..5986e5c39f8e46eac057f46d049f895526a1484e --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_161344-TEST/.hydra/overrides.yaml @@ -0,0 +1,11 @@ +- +checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt +- +headless=True +- ++num_envs=1 +- ++manager_env.observations.policy.enable_corruption=False +- ++manager_env.observations.tokenizer.enable_corruption=False +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered +- ++manager_env.config.save_rendering_dir=/mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818 +- ++manager_env.config.render_results=True +- manager_env/recorders=render +- +max_render_steps=300 diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_161344-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260818_161344-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..b46c8ab7db92f8b938770dbca1f82fe62ad47c36 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_161344-TEST/eval.log @@ -0,0 +1,71 @@ +2026-08-18 16:13:44.080 | INFO | __main__:main:90 - Loading training config file from /mnt/data/model/nvidia/GEAR-SONIC/low_latency/config.yaml +2026-08-18 16:13:45.431 | DEBUG | logging:callHandlers:1706 - Using selector: EpollSelector +2026-08-18 16:13:49.947 | DEBUG | logging:callHandlers:1706 - Defining data type 'any' as 'Any' +2026-08-18 16:13:49.947 | DEBUG | logging:callHandlers:1706 - Defining data type 'bool' as 'Bool' and array 'BoolArray +2026-08-18 16:13:49.947 | DEBUG | logging:callHandlers:1706 - Defining data type 'bundle' as 'Bundle' +2026-08-18 16:13:49.947 | DEBUG | logging:callHandlers:1706 - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +2026-08-18 16:13:49.947 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +2026-08-18 16:13:49.947 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +2026-08-18 16:13:49.947 | DEBUG | logging:callHandlers:1706 - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +2026-08-18 16:13:49.948 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +2026-08-18 16:13:49.948 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +2026-08-18 16:13:49.948 | DEBUG | logging:callHandlers:1706 - Defining data type 'double' as 'Double' and array 'DoubleArray +2026-08-18 16:13:49.948 | DEBUG | logging:callHandlers:1706 - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +2026-08-18 16:13:49.948 | DEBUG | logging:callHandlers:1706 - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +2026-08-18 16:13:49.948 | DEBUG | logging:callHandlers:1706 - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +2026-08-18 16:13:49.948 | DEBUG | logging:callHandlers:1706 - Defining data type 'execution' as 'Execution' +2026-08-18 16:13:49.948 | DEBUG | logging:callHandlers:1706 - Defining data type 'float' as 'Float' and array 'FloatArray +2026-08-18 16:13:49.948 | DEBUG | logging:callHandlers:1706 - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +2026-08-18 16:13:49.948 | DEBUG | logging:callHandlers:1706 - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +2026-08-18 16:13:49.949 | DEBUG | logging:callHandlers:1706 - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +2026-08-18 16:13:49.949 | DEBUG | logging:callHandlers:1706 - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +2026-08-18 16:13:49.949 | DEBUG | logging:callHandlers:1706 - Defining data type 'half' as 'Half' and array 'HalfArray +2026-08-18 16:13:49.949 | DEBUG | logging:callHandlers:1706 - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +2026-08-18 16:13:49.949 | DEBUG | logging:callHandlers:1706 - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +2026-08-18 16:13:49.949 | DEBUG | logging:callHandlers:1706 - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +2026-08-18 16:13:49.949 | DEBUG | logging:callHandlers:1706 - Defining data type 'int' as 'Int' and array 'IntArray +2026-08-18 16:13:49.949 | DEBUG | logging:callHandlers:1706 - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +2026-08-18 16:13:49.949 | DEBUG | logging:callHandlers:1706 - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +2026-08-18 16:13:49.949 | DEBUG | logging:callHandlers:1706 - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +2026-08-18 16:13:49.950 | DEBUG | logging:callHandlers:1706 - Defining data type 'int64' as 'Int64' and array 'Int64Array +2026-08-18 16:13:49.950 | DEBUG | logging:callHandlers:1706 - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +2026-08-18 16:13:49.950 | DEBUG | logging:callHandlers:1706 - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +2026-08-18 16:13:49.950 | DEBUG | logging:callHandlers:1706 - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +2026-08-18 16:13:49.950 | DEBUG | logging:callHandlers:1706 - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +2026-08-18 16:13:49.950 | DEBUG | logging:callHandlers:1706 - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +2026-08-18 16:13:49.950 | DEBUG | logging:callHandlers:1706 - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +2026-08-18 16:13:49.950 | DEBUG | logging:callHandlers:1706 - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +2026-08-18 16:13:49.950 | DEBUG | logging:callHandlers:1706 - Defining data type 'path' as 'Path' +2026-08-18 16:13:49.950 | DEBUG | logging:callHandlers:1706 - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +2026-08-18 16:13:49.951 | DEBUG | logging:callHandlers:1706 - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +2026-08-18 16:13:49.951 | DEBUG | logging:callHandlers:1706 - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +2026-08-18 16:13:49.951 | DEBUG | logging:callHandlers:1706 - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +2026-08-18 16:13:49.951 | DEBUG | logging:callHandlers:1706 - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +2026-08-18 16:13:49.951 | DEBUG | logging:callHandlers:1706 - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +2026-08-18 16:13:49.951 | DEBUG | logging:callHandlers:1706 - Defining data type 'string' as 'String' +2026-08-18 16:13:49.951 | DEBUG | logging:callHandlers:1706 - Defining data type 'target' as 'Target' +2026-08-18 16:13:49.951 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +2026-08-18 16:13:49.951 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +2026-08-18 16:13:49.951 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +2026-08-18 16:13:49.952 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +2026-08-18 16:13:49.952 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +2026-08-18 16:13:49.952 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +2026-08-18 16:13:49.952 | DEBUG | logging:callHandlers:1706 - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +2026-08-18 16:13:49.952 | DEBUG | logging:callHandlers:1706 - Defining data type 'token' as 'Token' and array 'TokenArray +2026-08-18 16:13:49.952 | DEBUG | logging:callHandlers:1706 - Defining data type 'uchar' as 'UChar' and array 'UCharArray +2026-08-18 16:13:49.952 | DEBUG | logging:callHandlers:1706 - Defining data type 'uint' as 'UInt' and array 'UIntArray +2026-08-18 16:13:49.952 | DEBUG | logging:callHandlers:1706 - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +2026-08-18 16:13:49.952 | DEBUG | logging:callHandlers:1706 - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +2026-08-18 16:13:49.952 | DEBUG | logging:callHandlers:1706 - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +2026-08-18 16:13:49.953 | DEBUG | logging:callHandlers:1706 - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +2026-08-18 16:13:52.409 | DEBUG | logging:callHandlers:1706 - Creating converter from 7 to 5 +2026-08-18 16:13:52.409 | DEBUG | logging:callHandlers:1706 - Creating converter from 5 to 7 +2026-08-18 16:13:52.409 | DEBUG | logging:callHandlers:1706 - Creating converter from 7 to 5 +2026-08-18 16:13:52.409 | DEBUG | logging:callHandlers:1706 - Creating converter from 5 to 7 +2026-08-18 16:13:52.489 | DEBUG | logging:callHandlers:1706 - matplotlib data path: /mnt/data/miniconda3/envs/sonic/lib/python3.11/site-packages/matplotlib/mpl-data +2026-08-18 16:13:52.495 | DEBUG | logging:callHandlers:1706 - CONFIGDIR=/root/.config/matplotlib +2026-08-18 16:13:52.497 | DEBUG | logging:callHandlers:1706 - interactive is False +2026-08-18 16:13:52.497 | DEBUG | logging:callHandlers:1706 - platform is linux +2026-08-18 16:14:35.946 | DEBUG | logging:callHandlers:1706 - Attempting to release lock 140236536714640 on /tmp/isaaclab_app_launcher.lock +2026-08-18 16:14:35.946 | DEBUG | logging:callHandlers:1706 - Lock 140236536714640 released on /tmp/isaaclab_app_launcher.lock +2026-08-18 16:14:39.116 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_161344-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260818_161344-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..fdb95038fba246113f3504018294cbe29e646fcd --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_161344-TEST/eval_agent_trl.log @@ -0,0 +1,69 @@ +[2026-08-18 16:13:45,431][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-18 16:13:49,946][AutoNode][DEBUG] - Defining data type 'any' as 'Any' +[2026-08-18 16:13:49,947][AutoNode][DEBUG] - Defining data type 'bool' as 'Bool' and array 'BoolArray +[2026-08-18 16:13:49,947][AutoNode][DEBUG] - Defining data type 'bundle' as 'Bundle' +[2026-08-18 16:13:49,947][AutoNode][DEBUG] - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +[2026-08-18 16:13:49,947][AutoNode][DEBUG] - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +[2026-08-18 16:13:49,947][AutoNode][DEBUG] - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +[2026-08-18 16:13:49,947][AutoNode][DEBUG] - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +[2026-08-18 16:13:49,948][AutoNode][DEBUG] - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +[2026-08-18 16:13:49,948][AutoNode][DEBUG] - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +[2026-08-18 16:13:49,948][AutoNode][DEBUG] - Defining data type 'double' as 'Double' and array 'DoubleArray +[2026-08-18 16:13:49,948][AutoNode][DEBUG] - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +[2026-08-18 16:13:49,948][AutoNode][DEBUG] - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +[2026-08-18 16:13:49,948][AutoNode][DEBUG] - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +[2026-08-18 16:13:49,948][AutoNode][DEBUG] - Defining data type 'execution' as 'Execution' +[2026-08-18 16:13:49,948][AutoNode][DEBUG] - Defining data type 'float' as 'Float' and array 'FloatArray +[2026-08-18 16:13:49,948][AutoNode][DEBUG] - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +[2026-08-18 16:13:49,948][AutoNode][DEBUG] - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +[2026-08-18 16:13:49,949][AutoNode][DEBUG] - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +[2026-08-18 16:13:49,949][AutoNode][DEBUG] - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +[2026-08-18 16:13:49,949][AutoNode][DEBUG] - Defining data type 'half' as 'Half' and array 'HalfArray +[2026-08-18 16:13:49,949][AutoNode][DEBUG] - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +[2026-08-18 16:13:49,949][AutoNode][DEBUG] - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +[2026-08-18 16:13:49,949][AutoNode][DEBUG] - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +[2026-08-18 16:13:49,949][AutoNode][DEBUG] - Defining data type 'int' as 'Int' and array 'IntArray +[2026-08-18 16:13:49,949][AutoNode][DEBUG] - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +[2026-08-18 16:13:49,949][AutoNode][DEBUG] - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +[2026-08-18 16:13:49,949][AutoNode][DEBUG] - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +[2026-08-18 16:13:49,950][AutoNode][DEBUG] - Defining data type 'int64' as 'Int64' and array 'Int64Array +[2026-08-18 16:13:49,950][AutoNode][DEBUG] - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +[2026-08-18 16:13:49,950][AutoNode][DEBUG] - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +[2026-08-18 16:13:49,950][AutoNode][DEBUG] - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +[2026-08-18 16:13:49,950][AutoNode][DEBUG] - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +[2026-08-18 16:13:49,950][AutoNode][DEBUG] - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +[2026-08-18 16:13:49,950][AutoNode][DEBUG] - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +[2026-08-18 16:13:49,950][AutoNode][DEBUG] - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +[2026-08-18 16:13:49,950][AutoNode][DEBUG] - Defining data type 'path' as 'Path' +[2026-08-18 16:13:49,950][AutoNode][DEBUG] - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +[2026-08-18 16:13:49,951][AutoNode][DEBUG] - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +[2026-08-18 16:13:49,951][AutoNode][DEBUG] - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +[2026-08-18 16:13:49,951][AutoNode][DEBUG] - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +[2026-08-18 16:13:49,951][AutoNode][DEBUG] - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +[2026-08-18 16:13:49,951][AutoNode][DEBUG] - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +[2026-08-18 16:13:49,951][AutoNode][DEBUG] - Defining data type 'string' as 'String' +[2026-08-18 16:13:49,951][AutoNode][DEBUG] - Defining data type 'target' as 'Target' +[2026-08-18 16:13:49,951][AutoNode][DEBUG] - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +[2026-08-18 16:13:49,951][AutoNode][DEBUG] - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +[2026-08-18 16:13:49,951][AutoNode][DEBUG] - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +[2026-08-18 16:13:49,952][AutoNode][DEBUG] - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +[2026-08-18 16:13:49,952][AutoNode][DEBUG] - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +[2026-08-18 16:13:49,952][AutoNode][DEBUG] - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +[2026-08-18 16:13:49,952][AutoNode][DEBUG] - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +[2026-08-18 16:13:49,952][AutoNode][DEBUG] - Defining data type 'token' as 'Token' and array 'TokenArray +[2026-08-18 16:13:49,952][AutoNode][DEBUG] - Defining data type 'uchar' as 'UChar' and array 'UCharArray +[2026-08-18 16:13:49,952][AutoNode][DEBUG] - Defining data type 'uint' as 'UInt' and array 'UIntArray +[2026-08-18 16:13:49,952][AutoNode][DEBUG] - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +[2026-08-18 16:13:49,952][AutoNode][DEBUG] - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +[2026-08-18 16:13:49,952][AutoNode][DEBUG] - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +[2026-08-18 16:13:49,953][AutoNode][DEBUG] - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +[2026-08-18 16:13:52,408][h5py._conv][DEBUG] - Creating converter from 7 to 5 +[2026-08-18 16:13:52,409][h5py._conv][DEBUG] - Creating converter from 5 to 7 +[2026-08-18 16:13:52,409][h5py._conv][DEBUG] - Creating converter from 7 to 5 +[2026-08-18 16:13:52,409][h5py._conv][DEBUG] - Creating converter from 5 to 7 +[2026-08-18 16:13:52,489][matplotlib][DEBUG] - matplotlib data path: /mnt/data/miniconda3/envs/sonic/lib/python3.11/site-packages/matplotlib/mpl-data +[2026-08-18 16:13:52,495][matplotlib][DEBUG] - CONFIGDIR=/root/.config/matplotlib +[2026-08-18 16:13:52,497][matplotlib][DEBUG] - interactive is False +[2026-08-18 16:13:52,497][matplotlib][DEBUG] - platform is linux +[2026-08-18 16:14:35,946][filelock][DEBUG] - Attempting to release lock 140236536714640 on /tmp/isaaclab_app_launcher.lock +[2026-08-18 16:14:35,946][filelock][DEBUG] - Lock 140236536714640 released on /tmp/isaaclab_app_launcher.lock diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_161517-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_161517-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4b068e5a895db8b4dc10300ce8f1a90b807ed02f --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_161517-TEST/.hydra/config.yaml @@ -0,0 +1,43 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + render_envs: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RenderEnvsRecorderCfg + video_save_path: ${manager_env.config.save_rendering_dir} + video_quality: 5 + observations: + policy: + enable_corruption: false + tokenizer: + enable_corruption: false + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered + smpl_motion_file: /mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered + config: + save_rendering_dir: /mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818 + render_results: true +checkpoint: /mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +headless: true +num_envs: 1 +max_render_steps: 300 diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_161517-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_161517-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f0d53a0a92df20c24fa1670343128be6496461e9 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_161517-TEST/.hydra/hydra.yaml @@ -0,0 +1,166 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - +checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt + - +headless=True + - ++num_envs=1 + - ++manager_env.observations.policy.enable_corruption=False + - ++manager_env.observations.tokenizer.enable_corruption=False + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered + - ++manager_env.config.save_rendering_dir=/mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818 + - ++manager_env.config.render_results=True + - manager_env/recorders=render + - +max_render_steps=300 + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered,++manager_env.config.render_results=True,++manager_env.config.save_rendering_dir=/mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818,++manager_env.observations.policy.enable_corruption=False,++manager_env.observations.tokenizer.enable_corruption=False,++num_envs=1,+checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt,+headless=True,+max_render_steps=300,manager_env/recorders=render + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260818_161517-TEST + choices: + manager_env/recorders: render + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_161517-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_161517-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..5986e5c39f8e46eac057f46d049f895526a1484e --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_161517-TEST/.hydra/overrides.yaml @@ -0,0 +1,11 @@ +- +checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt +- +headless=True +- ++num_envs=1 +- ++manager_env.observations.policy.enable_corruption=False +- ++manager_env.observations.tokenizer.enable_corruption=False +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered +- ++manager_env.config.save_rendering_dir=/mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818 +- ++manager_env.config.render_results=True +- manager_env/recorders=render +- +max_render_steps=300 diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_161517-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260818_161517-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..67888fdd1258c9b6cb6a00d46d5557361456e04f --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_161517-TEST/eval.log @@ -0,0 +1,4 @@ +2026-08-18 16:15:17.744 | INFO | __main__:main:90 - Loading training config file from /mnt/data/model/nvidia/GEAR-SONIC/low_latency/config.yaml +2026-08-18 16:15:19.367 | DEBUG | logging:callHandlers:1706 - Using selector: EpollSelector +2026-08-18 16:15:19.399 | DEBUG | logging:callHandlers:1706 - Attempting to release lock 139767110006352 on /tmp/isaaclab_app_launcher.lock +2026-08-18 16:15:19.400 | DEBUG | logging:callHandlers:1706 - Lock 139767110006352 released on /tmp/isaaclab_app_launcher.lock diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_161517-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260818_161517-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..76301311a442cde2b9c4fc8c121ef58ea31cb88d --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_161517-TEST/eval_agent_trl.log @@ -0,0 +1,3 @@ +[2026-08-18 16:15:19,366][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-18 16:15:19,399][filelock][DEBUG] - Attempting to release lock 139767110006352 on /tmp/isaaclab_app_launcher.lock +[2026-08-18 16:15:19,399][filelock][DEBUG] - Lock 139767110006352 released on /tmp/isaaclab_app_launcher.lock diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_161605-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_161605-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4b068e5a895db8b4dc10300ce8f1a90b807ed02f --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_161605-TEST/.hydra/config.yaml @@ -0,0 +1,43 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + render_envs: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RenderEnvsRecorderCfg + video_save_path: ${manager_env.config.save_rendering_dir} + video_quality: 5 + observations: + policy: + enable_corruption: false + tokenizer: + enable_corruption: false + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered + smpl_motion_file: /mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered + config: + save_rendering_dir: /mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818 + render_results: true +checkpoint: /mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +headless: true +num_envs: 1 +max_render_steps: 300 diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_161605-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_161605-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e47c48bf680bc2ef188ab462bdd569391b626e9f --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_161605-TEST/.hydra/hydra.yaml @@ -0,0 +1,166 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - +checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt + - +headless=True + - ++num_envs=1 + - ++manager_env.observations.policy.enable_corruption=False + - ++manager_env.observations.tokenizer.enable_corruption=False + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered + - ++manager_env.config.save_rendering_dir=/mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818 + - ++manager_env.config.render_results=True + - manager_env/recorders=render + - +max_render_steps=300 + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered,++manager_env.config.render_results=True,++manager_env.config.save_rendering_dir=/mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818,++manager_env.observations.policy.enable_corruption=False,++manager_env.observations.tokenizer.enable_corruption=False,++num_envs=1,+checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt,+headless=True,+max_render_steps=300,manager_env/recorders=render + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260818_161605-TEST + choices: + manager_env/recorders: render + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_161605-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_161605-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..5986e5c39f8e46eac057f46d049f895526a1484e --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_161605-TEST/.hydra/overrides.yaml @@ -0,0 +1,11 @@ +- +checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt +- +headless=True +- ++num_envs=1 +- ++manager_env.observations.policy.enable_corruption=False +- ++manager_env.observations.tokenizer.enable_corruption=False +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered +- ++manager_env.config.save_rendering_dir=/mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818 +- ++manager_env.config.render_results=True +- manager_env/recorders=render +- +max_render_steps=300 diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_161605-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260818_161605-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..f4020e0995fe040ebb6e21936e0ba298ed9f1349 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_161605-TEST/eval.log @@ -0,0 +1,71 @@ +2026-08-18 16:16:05.941 | INFO | __main__:main:90 - Loading training config file from /mnt/data/model/nvidia/GEAR-SONIC/low_latency/config.yaml +2026-08-18 16:16:07.225 | DEBUG | logging:callHandlers:1706 - Using selector: EpollSelector +2026-08-18 16:16:11.774 | DEBUG | logging:callHandlers:1706 - Defining data type 'any' as 'Any' +2026-08-18 16:16:11.774 | DEBUG | logging:callHandlers:1706 - Defining data type 'bool' as 'Bool' and array 'BoolArray +2026-08-18 16:16:11.774 | DEBUG | logging:callHandlers:1706 - Defining data type 'bundle' as 'Bundle' +2026-08-18 16:16:11.774 | DEBUG | logging:callHandlers:1706 - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +2026-08-18 16:16:11.775 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +2026-08-18 16:16:11.775 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +2026-08-18 16:16:11.775 | DEBUG | logging:callHandlers:1706 - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +2026-08-18 16:16:11.775 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +2026-08-18 16:16:11.775 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +2026-08-18 16:16:11.775 | DEBUG | logging:callHandlers:1706 - Defining data type 'double' as 'Double' and array 'DoubleArray +2026-08-18 16:16:11.775 | DEBUG | logging:callHandlers:1706 - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +2026-08-18 16:16:11.775 | DEBUG | logging:callHandlers:1706 - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +2026-08-18 16:16:11.775 | DEBUG | logging:callHandlers:1706 - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +2026-08-18 16:16:11.776 | DEBUG | logging:callHandlers:1706 - Defining data type 'execution' as 'Execution' +2026-08-18 16:16:11.776 | DEBUG | logging:callHandlers:1706 - Defining data type 'float' as 'Float' and array 'FloatArray +2026-08-18 16:16:11.776 | DEBUG | logging:callHandlers:1706 - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +2026-08-18 16:16:11.776 | DEBUG | logging:callHandlers:1706 - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +2026-08-18 16:16:11.776 | DEBUG | logging:callHandlers:1706 - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +2026-08-18 16:16:11.776 | DEBUG | logging:callHandlers:1706 - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +2026-08-18 16:16:11.776 | DEBUG | logging:callHandlers:1706 - Defining data type 'half' as 'Half' and array 'HalfArray +2026-08-18 16:16:11.776 | DEBUG | logging:callHandlers:1706 - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +2026-08-18 16:16:11.776 | DEBUG | logging:callHandlers:1706 - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +2026-08-18 16:16:11.776 | DEBUG | logging:callHandlers:1706 - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +2026-08-18 16:16:11.777 | DEBUG | logging:callHandlers:1706 - Defining data type 'int' as 'Int' and array 'IntArray +2026-08-18 16:16:11.777 | DEBUG | logging:callHandlers:1706 - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +2026-08-18 16:16:11.777 | DEBUG | logging:callHandlers:1706 - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +2026-08-18 16:16:11.777 | DEBUG | logging:callHandlers:1706 - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +2026-08-18 16:16:11.777 | DEBUG | logging:callHandlers:1706 - Defining data type 'int64' as 'Int64' and array 'Int64Array +2026-08-18 16:16:11.777 | DEBUG | logging:callHandlers:1706 - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +2026-08-18 16:16:11.777 | DEBUG | logging:callHandlers:1706 - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +2026-08-18 16:16:11.777 | DEBUG | logging:callHandlers:1706 - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +2026-08-18 16:16:11.777 | DEBUG | logging:callHandlers:1706 - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +2026-08-18 16:16:11.777 | DEBUG | logging:callHandlers:1706 - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +2026-08-18 16:16:11.778 | DEBUG | logging:callHandlers:1706 - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +2026-08-18 16:16:11.778 | DEBUG | logging:callHandlers:1706 - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +2026-08-18 16:16:11.778 | DEBUG | logging:callHandlers:1706 - Defining data type 'path' as 'Path' +2026-08-18 16:16:11.778 | DEBUG | logging:callHandlers:1706 - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +2026-08-18 16:16:11.778 | DEBUG | logging:callHandlers:1706 - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +2026-08-18 16:16:11.778 | DEBUG | logging:callHandlers:1706 - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +2026-08-18 16:16:11.778 | DEBUG | logging:callHandlers:1706 - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +2026-08-18 16:16:11.778 | DEBUG | logging:callHandlers:1706 - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +2026-08-18 16:16:11.778 | DEBUG | logging:callHandlers:1706 - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +2026-08-18 16:16:11.778 | DEBUG | logging:callHandlers:1706 - Defining data type 'string' as 'String' +2026-08-18 16:16:11.779 | DEBUG | logging:callHandlers:1706 - Defining data type 'target' as 'Target' +2026-08-18 16:16:11.779 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +2026-08-18 16:16:11.779 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +2026-08-18 16:16:11.779 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +2026-08-18 16:16:11.779 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +2026-08-18 16:16:11.779 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +2026-08-18 16:16:11.779 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +2026-08-18 16:16:11.779 | DEBUG | logging:callHandlers:1706 - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +2026-08-18 16:16:11.779 | DEBUG | logging:callHandlers:1706 - Defining data type 'token' as 'Token' and array 'TokenArray +2026-08-18 16:16:11.779 | DEBUG | logging:callHandlers:1706 - Defining data type 'uchar' as 'UChar' and array 'UCharArray +2026-08-18 16:16:11.780 | DEBUG | logging:callHandlers:1706 - Defining data type 'uint' as 'UInt' and array 'UIntArray +2026-08-18 16:16:11.780 | DEBUG | logging:callHandlers:1706 - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +2026-08-18 16:16:11.780 | DEBUG | logging:callHandlers:1706 - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +2026-08-18 16:16:11.780 | DEBUG | logging:callHandlers:1706 - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +2026-08-18 16:16:11.780 | DEBUG | logging:callHandlers:1706 - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +2026-08-18 16:16:14.321 | DEBUG | logging:callHandlers:1706 - Creating converter from 7 to 5 +2026-08-18 16:16:14.321 | DEBUG | logging:callHandlers:1706 - Creating converter from 5 to 7 +2026-08-18 16:16:14.321 | DEBUG | logging:callHandlers:1706 - Creating converter from 7 to 5 +2026-08-18 16:16:14.321 | DEBUG | logging:callHandlers:1706 - Creating converter from 5 to 7 +2026-08-18 16:16:14.405 | DEBUG | logging:callHandlers:1706 - matplotlib data path: /mnt/data/miniconda3/envs/sonic/lib/python3.11/site-packages/matplotlib/mpl-data +2026-08-18 16:16:14.412 | DEBUG | logging:callHandlers:1706 - CONFIGDIR=/root/.config/matplotlib +2026-08-18 16:16:14.413 | DEBUG | logging:callHandlers:1706 - interactive is False +2026-08-18 16:16:14.413 | DEBUG | logging:callHandlers:1706 - platform is linux +2026-08-18 16:16:17.931 | DEBUG | logging:callHandlers:1706 - Attempting to release lock 140210548171024 on /tmp/isaaclab_app_launcher.lock +2026-08-18 16:16:17.932 | DEBUG | logging:callHandlers:1706 - Lock 140210548171024 released on /tmp/isaaclab_app_launcher.lock +2026-08-18 16:16:20.167 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_161605-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260818_161605-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..0f040d3e726cae42090804a071566dd416b346c8 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_161605-TEST/eval_agent_trl.log @@ -0,0 +1,69 @@ +[2026-08-18 16:16:07,224][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-18 16:16:11,773][AutoNode][DEBUG] - Defining data type 'any' as 'Any' +[2026-08-18 16:16:11,774][AutoNode][DEBUG] - Defining data type 'bool' as 'Bool' and array 'BoolArray +[2026-08-18 16:16:11,774][AutoNode][DEBUG] - Defining data type 'bundle' as 'Bundle' +[2026-08-18 16:16:11,774][AutoNode][DEBUG] - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +[2026-08-18 16:16:11,775][AutoNode][DEBUG] - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +[2026-08-18 16:16:11,775][AutoNode][DEBUG] - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +[2026-08-18 16:16:11,775][AutoNode][DEBUG] - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +[2026-08-18 16:16:11,775][AutoNode][DEBUG] - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +[2026-08-18 16:16:11,775][AutoNode][DEBUG] - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +[2026-08-18 16:16:11,775][AutoNode][DEBUG] - Defining data type 'double' as 'Double' and array 'DoubleArray +[2026-08-18 16:16:11,775][AutoNode][DEBUG] - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +[2026-08-18 16:16:11,775][AutoNode][DEBUG] - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +[2026-08-18 16:16:11,775][AutoNode][DEBUG] - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +[2026-08-18 16:16:11,775][AutoNode][DEBUG] - Defining data type 'execution' as 'Execution' +[2026-08-18 16:16:11,776][AutoNode][DEBUG] - Defining data type 'float' as 'Float' and array 'FloatArray +[2026-08-18 16:16:11,776][AutoNode][DEBUG] - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +[2026-08-18 16:16:11,776][AutoNode][DEBUG] - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +[2026-08-18 16:16:11,776][AutoNode][DEBUG] - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +[2026-08-18 16:16:11,776][AutoNode][DEBUG] - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +[2026-08-18 16:16:11,776][AutoNode][DEBUG] - Defining data type 'half' as 'Half' and array 'HalfArray +[2026-08-18 16:16:11,776][AutoNode][DEBUG] - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +[2026-08-18 16:16:11,776][AutoNode][DEBUG] - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +[2026-08-18 16:16:11,776][AutoNode][DEBUG] - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +[2026-08-18 16:16:11,776][AutoNode][DEBUG] - Defining data type 'int' as 'Int' and array 'IntArray +[2026-08-18 16:16:11,777][AutoNode][DEBUG] - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +[2026-08-18 16:16:11,777][AutoNode][DEBUG] - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +[2026-08-18 16:16:11,777][AutoNode][DEBUG] - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +[2026-08-18 16:16:11,777][AutoNode][DEBUG] - Defining data type 'int64' as 'Int64' and array 'Int64Array +[2026-08-18 16:16:11,777][AutoNode][DEBUG] - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +[2026-08-18 16:16:11,777][AutoNode][DEBUG] - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +[2026-08-18 16:16:11,777][AutoNode][DEBUG] - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +[2026-08-18 16:16:11,777][AutoNode][DEBUG] - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +[2026-08-18 16:16:11,777][AutoNode][DEBUG] - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +[2026-08-18 16:16:11,778][AutoNode][DEBUG] - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +[2026-08-18 16:16:11,778][AutoNode][DEBUG] - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +[2026-08-18 16:16:11,778][AutoNode][DEBUG] - Defining data type 'path' as 'Path' +[2026-08-18 16:16:11,778][AutoNode][DEBUG] - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +[2026-08-18 16:16:11,778][AutoNode][DEBUG] - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +[2026-08-18 16:16:11,778][AutoNode][DEBUG] - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +[2026-08-18 16:16:11,778][AutoNode][DEBUG] - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +[2026-08-18 16:16:11,778][AutoNode][DEBUG] - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +[2026-08-18 16:16:11,778][AutoNode][DEBUG] - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +[2026-08-18 16:16:11,778][AutoNode][DEBUG] - Defining data type 'string' as 'String' +[2026-08-18 16:16:11,779][AutoNode][DEBUG] - Defining data type 'target' as 'Target' +[2026-08-18 16:16:11,779][AutoNode][DEBUG] - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +[2026-08-18 16:16:11,779][AutoNode][DEBUG] - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +[2026-08-18 16:16:11,779][AutoNode][DEBUG] - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +[2026-08-18 16:16:11,779][AutoNode][DEBUG] - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +[2026-08-18 16:16:11,779][AutoNode][DEBUG] - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +[2026-08-18 16:16:11,779][AutoNode][DEBUG] - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +[2026-08-18 16:16:11,779][AutoNode][DEBUG] - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +[2026-08-18 16:16:11,779][AutoNode][DEBUG] - Defining data type 'token' as 'Token' and array 'TokenArray +[2026-08-18 16:16:11,779][AutoNode][DEBUG] - Defining data type 'uchar' as 'UChar' and array 'UCharArray +[2026-08-18 16:16:11,780][AutoNode][DEBUG] - Defining data type 'uint' as 'UInt' and array 'UIntArray +[2026-08-18 16:16:11,780][AutoNode][DEBUG] - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +[2026-08-18 16:16:11,780][AutoNode][DEBUG] - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +[2026-08-18 16:16:11,780][AutoNode][DEBUG] - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +[2026-08-18 16:16:11,780][AutoNode][DEBUG] - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +[2026-08-18 16:16:14,321][h5py._conv][DEBUG] - Creating converter from 7 to 5 +[2026-08-18 16:16:14,321][h5py._conv][DEBUG] - Creating converter from 5 to 7 +[2026-08-18 16:16:14,321][h5py._conv][DEBUG] - Creating converter from 7 to 5 +[2026-08-18 16:16:14,321][h5py._conv][DEBUG] - Creating converter from 5 to 7 +[2026-08-18 16:16:14,405][matplotlib][DEBUG] - matplotlib data path: /mnt/data/miniconda3/envs/sonic/lib/python3.11/site-packages/matplotlib/mpl-data +[2026-08-18 16:16:14,411][matplotlib][DEBUG] - CONFIGDIR=/root/.config/matplotlib +[2026-08-18 16:16:14,413][matplotlib][DEBUG] - interactive is False +[2026-08-18 16:16:14,413][matplotlib][DEBUG] - platform is linux +[2026-08-18 16:16:17,931][filelock][DEBUG] - Attempting to release lock 140210548171024 on /tmp/isaaclab_app_launcher.lock +[2026-08-18 16:16:17,931][filelock][DEBUG] - Lock 140210548171024 released on /tmp/isaaclab_app_launcher.lock diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_161917-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_161917-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4b068e5a895db8b4dc10300ce8f1a90b807ed02f --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_161917-TEST/.hydra/config.yaml @@ -0,0 +1,43 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + render_envs: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RenderEnvsRecorderCfg + video_save_path: ${manager_env.config.save_rendering_dir} + video_quality: 5 + observations: + policy: + enable_corruption: false + tokenizer: + enable_corruption: false + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered + smpl_motion_file: /mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered + config: + save_rendering_dir: /mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818 + render_results: true +checkpoint: /mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +headless: true +num_envs: 1 +max_render_steps: 300 diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_161917-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_161917-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..cda0fc10fc062292b39c84d14e6d4126a36bc569 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_161917-TEST/.hydra/hydra.yaml @@ -0,0 +1,166 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - +checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt + - +headless=True + - ++num_envs=1 + - ++manager_env.observations.policy.enable_corruption=False + - ++manager_env.observations.tokenizer.enable_corruption=False + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered + - ++manager_env.config.save_rendering_dir=/mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818 + - ++manager_env.config.render_results=True + - manager_env/recorders=render + - +max_render_steps=300 + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered,++manager_env.config.render_results=True,++manager_env.config.save_rendering_dir=/mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818,++manager_env.observations.policy.enable_corruption=False,++manager_env.observations.tokenizer.enable_corruption=False,++num_envs=1,+checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt,+headless=True,+max_render_steps=300,manager_env/recorders=render + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260818_161917-TEST + choices: + manager_env/recorders: render + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_161917-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_161917-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..5986e5c39f8e46eac057f46d049f895526a1484e --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_161917-TEST/.hydra/overrides.yaml @@ -0,0 +1,11 @@ +- +checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt +- +headless=True +- ++num_envs=1 +- ++manager_env.observations.policy.enable_corruption=False +- ++manager_env.observations.tokenizer.enable_corruption=False +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered +- ++manager_env.config.save_rendering_dir=/mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818 +- ++manager_env.config.render_results=True +- manager_env/recorders=render +- +max_render_steps=300 diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_161917-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260818_161917-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..18e60b7cf1d8f1032882787a1eceee2e72b74a74 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_161917-TEST/eval.log @@ -0,0 +1,71 @@ +2026-08-18 16:19:17.035 | INFO | __main__:main:90 - Loading training config file from /mnt/data/model/nvidia/GEAR-SONIC/low_latency/config.yaml +2026-08-18 16:19:18.166 | DEBUG | logging:callHandlers:1706 - Using selector: EpollSelector +2026-08-18 16:19:22.141 | DEBUG | logging:callHandlers:1706 - Defining data type 'any' as 'Any' +2026-08-18 16:19:22.142 | DEBUG | logging:callHandlers:1706 - Defining data type 'bool' as 'Bool' and array 'BoolArray +2026-08-18 16:19:22.142 | DEBUG | logging:callHandlers:1706 - Defining data type 'bundle' as 'Bundle' +2026-08-18 16:19:22.142 | DEBUG | logging:callHandlers:1706 - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +2026-08-18 16:19:22.142 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +2026-08-18 16:19:22.142 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +2026-08-18 16:19:22.142 | DEBUG | logging:callHandlers:1706 - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +2026-08-18 16:19:22.142 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +2026-08-18 16:19:22.142 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +2026-08-18 16:19:22.143 | DEBUG | logging:callHandlers:1706 - Defining data type 'double' as 'Double' and array 'DoubleArray +2026-08-18 16:19:22.143 | DEBUG | logging:callHandlers:1706 - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +2026-08-18 16:19:22.143 | DEBUG | logging:callHandlers:1706 - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +2026-08-18 16:19:22.143 | DEBUG | logging:callHandlers:1706 - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +2026-08-18 16:19:22.143 | DEBUG | logging:callHandlers:1706 - Defining data type 'execution' as 'Execution' +2026-08-18 16:19:22.143 | DEBUG | logging:callHandlers:1706 - Defining data type 'float' as 'Float' and array 'FloatArray +2026-08-18 16:19:22.143 | DEBUG | logging:callHandlers:1706 - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +2026-08-18 16:19:22.143 | DEBUG | logging:callHandlers:1706 - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +2026-08-18 16:19:22.143 | DEBUG | logging:callHandlers:1706 - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +2026-08-18 16:19:22.143 | DEBUG | logging:callHandlers:1706 - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +2026-08-18 16:19:22.144 | DEBUG | logging:callHandlers:1706 - Defining data type 'half' as 'Half' and array 'HalfArray +2026-08-18 16:19:22.144 | DEBUG | logging:callHandlers:1706 - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +2026-08-18 16:19:22.144 | DEBUG | logging:callHandlers:1706 - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +2026-08-18 16:19:22.144 | DEBUG | logging:callHandlers:1706 - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +2026-08-18 16:19:22.144 | DEBUG | logging:callHandlers:1706 - Defining data type 'int' as 'Int' and array 'IntArray +2026-08-18 16:19:22.144 | DEBUG | logging:callHandlers:1706 - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +2026-08-18 16:19:22.144 | DEBUG | logging:callHandlers:1706 - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +2026-08-18 16:19:22.144 | DEBUG | logging:callHandlers:1706 - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +2026-08-18 16:19:22.144 | DEBUG | logging:callHandlers:1706 - Defining data type 'int64' as 'Int64' and array 'Int64Array +2026-08-18 16:19:22.144 | DEBUG | logging:callHandlers:1706 - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +2026-08-18 16:19:22.145 | DEBUG | logging:callHandlers:1706 - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +2026-08-18 16:19:22.145 | DEBUG | logging:callHandlers:1706 - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +2026-08-18 16:19:22.145 | DEBUG | logging:callHandlers:1706 - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +2026-08-18 16:19:22.145 | DEBUG | logging:callHandlers:1706 - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +2026-08-18 16:19:22.145 | DEBUG | logging:callHandlers:1706 - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +2026-08-18 16:19:22.145 | DEBUG | logging:callHandlers:1706 - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +2026-08-18 16:19:22.145 | DEBUG | logging:callHandlers:1706 - Defining data type 'path' as 'Path' +2026-08-18 16:19:22.145 | DEBUG | logging:callHandlers:1706 - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +2026-08-18 16:19:22.145 | DEBUG | logging:callHandlers:1706 - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +2026-08-18 16:19:22.145 | DEBUG | logging:callHandlers:1706 - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +2026-08-18 16:19:22.146 | DEBUG | logging:callHandlers:1706 - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +2026-08-18 16:19:22.146 | DEBUG | logging:callHandlers:1706 - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +2026-08-18 16:19:22.146 | DEBUG | logging:callHandlers:1706 - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +2026-08-18 16:19:22.146 | DEBUG | logging:callHandlers:1706 - Defining data type 'string' as 'String' +2026-08-18 16:19:22.146 | DEBUG | logging:callHandlers:1706 - Defining data type 'target' as 'Target' +2026-08-18 16:19:22.146 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +2026-08-18 16:19:22.146 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +2026-08-18 16:19:22.146 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +2026-08-18 16:19:22.146 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +2026-08-18 16:19:22.146 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +2026-08-18 16:19:22.147 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +2026-08-18 16:19:22.147 | DEBUG | logging:callHandlers:1706 - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +2026-08-18 16:19:22.147 | DEBUG | logging:callHandlers:1706 - Defining data type 'token' as 'Token' and array 'TokenArray +2026-08-18 16:19:22.147 | DEBUG | logging:callHandlers:1706 - Defining data type 'uchar' as 'UChar' and array 'UCharArray +2026-08-18 16:19:22.147 | DEBUG | logging:callHandlers:1706 - Defining data type 'uint' as 'UInt' and array 'UIntArray +2026-08-18 16:19:22.147 | DEBUG | logging:callHandlers:1706 - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +2026-08-18 16:19:22.147 | DEBUG | logging:callHandlers:1706 - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +2026-08-18 16:19:22.147 | DEBUG | logging:callHandlers:1706 - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +2026-08-18 16:19:22.147 | DEBUG | logging:callHandlers:1706 - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +2026-08-18 16:19:24.703 | DEBUG | logging:callHandlers:1706 - Creating converter from 7 to 5 +2026-08-18 16:19:24.703 | DEBUG | logging:callHandlers:1706 - Creating converter from 5 to 7 +2026-08-18 16:19:24.704 | DEBUG | logging:callHandlers:1706 - Creating converter from 7 to 5 +2026-08-18 16:19:24.704 | DEBUG | logging:callHandlers:1706 - Creating converter from 5 to 7 +2026-08-18 16:19:24.867 | DEBUG | logging:callHandlers:1706 - matplotlib data path: /mnt/data/miniconda3/envs/sonic/lib/python3.11/site-packages/matplotlib/mpl-data +2026-08-18 16:19:24.875 | DEBUG | logging:callHandlers:1706 - CONFIGDIR=/root/.config/matplotlib +2026-08-18 16:19:24.877 | DEBUG | logging:callHandlers:1706 - interactive is False +2026-08-18 16:19:24.878 | DEBUG | logging:callHandlers:1706 - platform is linux +2026-08-18 16:19:28.580 | DEBUG | logging:callHandlers:1706 - Attempting to release lock 140640091335120 on /tmp/isaaclab_app_launcher.lock +2026-08-18 16:19:28.580 | DEBUG | logging:callHandlers:1706 - Lock 140640091335120 released on /tmp/isaaclab_app_launcher.lock +2026-08-18 16:19:32.298 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_161917-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260818_161917-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..b8557d9219152cac861f1bc0fc44b17aa9f11b64 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_161917-TEST/eval_agent_trl.log @@ -0,0 +1,69 @@ +[2026-08-18 16:19:18,165][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-18 16:19:22,141][AutoNode][DEBUG] - Defining data type 'any' as 'Any' +[2026-08-18 16:19:22,142][AutoNode][DEBUG] - Defining data type 'bool' as 'Bool' and array 'BoolArray +[2026-08-18 16:19:22,142][AutoNode][DEBUG] - Defining data type 'bundle' as 'Bundle' +[2026-08-18 16:19:22,142][AutoNode][DEBUG] - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +[2026-08-18 16:19:22,142][AutoNode][DEBUG] - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +[2026-08-18 16:19:22,142][AutoNode][DEBUG] - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +[2026-08-18 16:19:22,142][AutoNode][DEBUG] - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +[2026-08-18 16:19:22,142][AutoNode][DEBUG] - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +[2026-08-18 16:19:22,142][AutoNode][DEBUG] - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +[2026-08-18 16:19:22,143][AutoNode][DEBUG] - Defining data type 'double' as 'Double' and array 'DoubleArray +[2026-08-18 16:19:22,143][AutoNode][DEBUG] - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +[2026-08-18 16:19:22,143][AutoNode][DEBUG] - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +[2026-08-18 16:19:22,143][AutoNode][DEBUG] - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +[2026-08-18 16:19:22,143][AutoNode][DEBUG] - Defining data type 'execution' as 'Execution' +[2026-08-18 16:19:22,143][AutoNode][DEBUG] - Defining data type 'float' as 'Float' and array 'FloatArray +[2026-08-18 16:19:22,143][AutoNode][DEBUG] - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +[2026-08-18 16:19:22,143][AutoNode][DEBUG] - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +[2026-08-18 16:19:22,143][AutoNode][DEBUG] - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +[2026-08-18 16:19:22,143][AutoNode][DEBUG] - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +[2026-08-18 16:19:22,144][AutoNode][DEBUG] - Defining data type 'half' as 'Half' and array 'HalfArray +[2026-08-18 16:19:22,144][AutoNode][DEBUG] - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +[2026-08-18 16:19:22,144][AutoNode][DEBUG] - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +[2026-08-18 16:19:22,144][AutoNode][DEBUG] - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +[2026-08-18 16:19:22,144][AutoNode][DEBUG] - Defining data type 'int' as 'Int' and array 'IntArray +[2026-08-18 16:19:22,144][AutoNode][DEBUG] - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +[2026-08-18 16:19:22,144][AutoNode][DEBUG] - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +[2026-08-18 16:19:22,144][AutoNode][DEBUG] - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +[2026-08-18 16:19:22,144][AutoNode][DEBUG] - Defining data type 'int64' as 'Int64' and array 'Int64Array +[2026-08-18 16:19:22,144][AutoNode][DEBUG] - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +[2026-08-18 16:19:22,144][AutoNode][DEBUG] - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +[2026-08-18 16:19:22,145][AutoNode][DEBUG] - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +[2026-08-18 16:19:22,145][AutoNode][DEBUG] - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +[2026-08-18 16:19:22,145][AutoNode][DEBUG] - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +[2026-08-18 16:19:22,145][AutoNode][DEBUG] - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +[2026-08-18 16:19:22,145][AutoNode][DEBUG] - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +[2026-08-18 16:19:22,145][AutoNode][DEBUG] - Defining data type 'path' as 'Path' +[2026-08-18 16:19:22,145][AutoNode][DEBUG] - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +[2026-08-18 16:19:22,145][AutoNode][DEBUG] - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +[2026-08-18 16:19:22,145][AutoNode][DEBUG] - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +[2026-08-18 16:19:22,145][AutoNode][DEBUG] - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +[2026-08-18 16:19:22,146][AutoNode][DEBUG] - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +[2026-08-18 16:19:22,146][AutoNode][DEBUG] - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +[2026-08-18 16:19:22,146][AutoNode][DEBUG] - Defining data type 'string' as 'String' +[2026-08-18 16:19:22,146][AutoNode][DEBUG] - Defining data type 'target' as 'Target' +[2026-08-18 16:19:22,146][AutoNode][DEBUG] - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +[2026-08-18 16:19:22,146][AutoNode][DEBUG] - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +[2026-08-18 16:19:22,146][AutoNode][DEBUG] - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +[2026-08-18 16:19:22,146][AutoNode][DEBUG] - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +[2026-08-18 16:19:22,146][AutoNode][DEBUG] - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +[2026-08-18 16:19:22,146][AutoNode][DEBUG] - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +[2026-08-18 16:19:22,147][AutoNode][DEBUG] - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +[2026-08-18 16:19:22,147][AutoNode][DEBUG] - Defining data type 'token' as 'Token' and array 'TokenArray +[2026-08-18 16:19:22,147][AutoNode][DEBUG] - Defining data type 'uchar' as 'UChar' and array 'UCharArray +[2026-08-18 16:19:22,147][AutoNode][DEBUG] - Defining data type 'uint' as 'UInt' and array 'UIntArray +[2026-08-18 16:19:22,147][AutoNode][DEBUG] - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +[2026-08-18 16:19:22,147][AutoNode][DEBUG] - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +[2026-08-18 16:19:22,147][AutoNode][DEBUG] - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +[2026-08-18 16:19:22,147][AutoNode][DEBUG] - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +[2026-08-18 16:19:24,703][h5py._conv][DEBUG] - Creating converter from 7 to 5 +[2026-08-18 16:19:24,703][h5py._conv][DEBUG] - Creating converter from 5 to 7 +[2026-08-18 16:19:24,703][h5py._conv][DEBUG] - Creating converter from 7 to 5 +[2026-08-18 16:19:24,704][h5py._conv][DEBUG] - Creating converter from 5 to 7 +[2026-08-18 16:19:24,867][matplotlib][DEBUG] - matplotlib data path: /mnt/data/miniconda3/envs/sonic/lib/python3.11/site-packages/matplotlib/mpl-data +[2026-08-18 16:19:24,875][matplotlib][DEBUG] - CONFIGDIR=/root/.config/matplotlib +[2026-08-18 16:19:24,877][matplotlib][DEBUG] - interactive is False +[2026-08-18 16:19:24,878][matplotlib][DEBUG] - platform is linux +[2026-08-18 16:19:28,579][filelock][DEBUG] - Attempting to release lock 140640091335120 on /tmp/isaaclab_app_launcher.lock +[2026-08-18 16:19:28,580][filelock][DEBUG] - Lock 140640091335120 released on /tmp/isaaclab_app_launcher.lock diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_163325-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_163325-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4b068e5a895db8b4dc10300ce8f1a90b807ed02f --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_163325-TEST/.hydra/config.yaml @@ -0,0 +1,43 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + render_envs: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RenderEnvsRecorderCfg + video_save_path: ${manager_env.config.save_rendering_dir} + video_quality: 5 + observations: + policy: + enable_corruption: false + tokenizer: + enable_corruption: false + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered + smpl_motion_file: /mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered + config: + save_rendering_dir: /mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818 + render_results: true +checkpoint: /mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +headless: true +num_envs: 1 +max_render_steps: 300 diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_163325-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_163325-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..cd7bda2288513fe8b2e90cdcd6c87c0e54da6a8d --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_163325-TEST/.hydra/hydra.yaml @@ -0,0 +1,166 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - +checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt + - +headless=True + - ++num_envs=1 + - ++manager_env.observations.policy.enable_corruption=False + - ++manager_env.observations.tokenizer.enable_corruption=False + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered + - ++manager_env.config.save_rendering_dir=/mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818 + - ++manager_env.config.render_results=True + - manager_env/recorders=render + - +max_render_steps=300 + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered,++manager_env.config.render_results=True,++manager_env.config.save_rendering_dir=/mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818,++manager_env.observations.policy.enable_corruption=False,++manager_env.observations.tokenizer.enable_corruption=False,++num_envs=1,+checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt,+headless=True,+max_render_steps=300,manager_env/recorders=render + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260818_163325-TEST + choices: + manager_env/recorders: render + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_163325-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_163325-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..5986e5c39f8e46eac057f46d049f895526a1484e --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_163325-TEST/.hydra/overrides.yaml @@ -0,0 +1,11 @@ +- +checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt +- +headless=True +- ++num_envs=1 +- ++manager_env.observations.policy.enable_corruption=False +- ++manager_env.observations.tokenizer.enable_corruption=False +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered +- ++manager_env.config.save_rendering_dir=/mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818 +- ++manager_env.config.render_results=True +- manager_env/recorders=render +- +max_render_steps=300 diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_163325-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260818_163325-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..b3dd242606068265a75253840b7359de150c6c18 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_163325-TEST/eval.log @@ -0,0 +1,71 @@ +2026-08-18 16:33:25.357 | INFO | __main__:main:90 - Loading training config file from /mnt/data/model/nvidia/GEAR-SONIC/low_latency/config.yaml +2026-08-18 16:33:26.869 | DEBUG | logging:callHandlers:1706 - Using selector: EpollSelector +2026-08-18 16:33:31.065 | DEBUG | logging:callHandlers:1706 - Defining data type 'any' as 'Any' +2026-08-18 16:33:31.066 | DEBUG | logging:callHandlers:1706 - Defining data type 'bool' as 'Bool' and array 'BoolArray +2026-08-18 16:33:31.066 | DEBUG | logging:callHandlers:1706 - Defining data type 'bundle' as 'Bundle' +2026-08-18 16:33:31.066 | DEBUG | logging:callHandlers:1706 - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +2026-08-18 16:33:31.066 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +2026-08-18 16:33:31.066 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +2026-08-18 16:33:31.066 | DEBUG | logging:callHandlers:1706 - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +2026-08-18 16:33:31.066 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +2026-08-18 16:33:31.067 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +2026-08-18 16:33:31.067 | DEBUG | logging:callHandlers:1706 - Defining data type 'double' as 'Double' and array 'DoubleArray +2026-08-18 16:33:31.067 | DEBUG | logging:callHandlers:1706 - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +2026-08-18 16:33:31.067 | DEBUG | logging:callHandlers:1706 - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +2026-08-18 16:33:31.067 | DEBUG | logging:callHandlers:1706 - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +2026-08-18 16:33:31.067 | DEBUG | logging:callHandlers:1706 - Defining data type 'execution' as 'Execution' +2026-08-18 16:33:31.067 | DEBUG | logging:callHandlers:1706 - Defining data type 'float' as 'Float' and array 'FloatArray +2026-08-18 16:33:31.067 | DEBUG | logging:callHandlers:1706 - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +2026-08-18 16:33:31.067 | DEBUG | logging:callHandlers:1706 - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +2026-08-18 16:33:31.067 | DEBUG | logging:callHandlers:1706 - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +2026-08-18 16:33:31.068 | DEBUG | logging:callHandlers:1706 - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +2026-08-18 16:33:31.068 | DEBUG | logging:callHandlers:1706 - Defining data type 'half' as 'Half' and array 'HalfArray +2026-08-18 16:33:31.068 | DEBUG | logging:callHandlers:1706 - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +2026-08-18 16:33:31.068 | DEBUG | logging:callHandlers:1706 - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +2026-08-18 16:33:31.068 | DEBUG | logging:callHandlers:1706 - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +2026-08-18 16:33:31.068 | DEBUG | logging:callHandlers:1706 - Defining data type 'int' as 'Int' and array 'IntArray +2026-08-18 16:33:31.068 | DEBUG | logging:callHandlers:1706 - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +2026-08-18 16:33:31.068 | DEBUG | logging:callHandlers:1706 - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +2026-08-18 16:33:31.068 | DEBUG | logging:callHandlers:1706 - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +2026-08-18 16:33:31.068 | DEBUG | logging:callHandlers:1706 - Defining data type 'int64' as 'Int64' and array 'Int64Array +2026-08-18 16:33:31.069 | DEBUG | logging:callHandlers:1706 - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +2026-08-18 16:33:31.069 | DEBUG | logging:callHandlers:1706 - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +2026-08-18 16:33:31.069 | DEBUG | logging:callHandlers:1706 - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +2026-08-18 16:33:31.069 | DEBUG | logging:callHandlers:1706 - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +2026-08-18 16:33:31.069 | DEBUG | logging:callHandlers:1706 - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +2026-08-18 16:33:31.069 | DEBUG | logging:callHandlers:1706 - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +2026-08-18 16:33:31.069 | DEBUG | logging:callHandlers:1706 - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +2026-08-18 16:33:31.069 | DEBUG | logging:callHandlers:1706 - Defining data type 'path' as 'Path' +2026-08-18 16:33:31.069 | DEBUG | logging:callHandlers:1706 - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +2026-08-18 16:33:31.070 | DEBUG | logging:callHandlers:1706 - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +2026-08-18 16:33:31.070 | DEBUG | logging:callHandlers:1706 - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +2026-08-18 16:33:31.070 | DEBUG | logging:callHandlers:1706 - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +2026-08-18 16:33:31.070 | DEBUG | logging:callHandlers:1706 - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +2026-08-18 16:33:31.070 | DEBUG | logging:callHandlers:1706 - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +2026-08-18 16:33:31.070 | DEBUG | logging:callHandlers:1706 - Defining data type 'string' as 'String' +2026-08-18 16:33:31.070 | DEBUG | logging:callHandlers:1706 - Defining data type 'target' as 'Target' +2026-08-18 16:33:31.070 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +2026-08-18 16:33:31.070 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +2026-08-18 16:33:31.070 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +2026-08-18 16:33:31.071 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +2026-08-18 16:33:31.071 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +2026-08-18 16:33:31.071 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +2026-08-18 16:33:31.071 | DEBUG | logging:callHandlers:1706 - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +2026-08-18 16:33:31.071 | DEBUG | logging:callHandlers:1706 - Defining data type 'token' as 'Token' and array 'TokenArray +2026-08-18 16:33:31.071 | DEBUG | logging:callHandlers:1706 - Defining data type 'uchar' as 'UChar' and array 'UCharArray +2026-08-18 16:33:31.071 | DEBUG | logging:callHandlers:1706 - Defining data type 'uint' as 'UInt' and array 'UIntArray +2026-08-18 16:33:31.071 | DEBUG | logging:callHandlers:1706 - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +2026-08-18 16:33:31.071 | DEBUG | logging:callHandlers:1706 - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +2026-08-18 16:33:31.071 | DEBUG | logging:callHandlers:1706 - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +2026-08-18 16:33:31.072 | DEBUG | logging:callHandlers:1706 - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +2026-08-18 16:33:33.790 | DEBUG | logging:callHandlers:1706 - Creating converter from 7 to 5 +2026-08-18 16:33:33.790 | DEBUG | logging:callHandlers:1706 - Creating converter from 5 to 7 +2026-08-18 16:33:33.791 | DEBUG | logging:callHandlers:1706 - Creating converter from 7 to 5 +2026-08-18 16:33:33.791 | DEBUG | logging:callHandlers:1706 - Creating converter from 5 to 7 +2026-08-18 16:33:33.878 | DEBUG | logging:callHandlers:1706 - matplotlib data path: /mnt/data/miniconda3/envs/sonic/lib/python3.11/site-packages/matplotlib/mpl-data +2026-08-18 16:33:33.885 | DEBUG | logging:callHandlers:1706 - CONFIGDIR=/root/.config/matplotlib +2026-08-18 16:33:33.886 | DEBUG | logging:callHandlers:1706 - interactive is False +2026-08-18 16:33:33.887 | DEBUG | logging:callHandlers:1706 - platform is linux +2026-08-18 16:33:37.668 | DEBUG | logging:callHandlers:1706 - Attempting to release lock 139902598257168 on /tmp/isaaclab_app_launcher.lock +2026-08-18 16:33:37.668 | DEBUG | logging:callHandlers:1706 - Lock 139902598257168 released on /tmp/isaaclab_app_launcher.lock +2026-08-18 16:33:40.158 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_163325-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260818_163325-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..67d940ca636115dfec657a8eefb16291d9b52776 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_163325-TEST/eval_agent_trl.log @@ -0,0 +1,69 @@ +[2026-08-18 16:33:26,868][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-18 16:33:31,065][AutoNode][DEBUG] - Defining data type 'any' as 'Any' +[2026-08-18 16:33:31,066][AutoNode][DEBUG] - Defining data type 'bool' as 'Bool' and array 'BoolArray +[2026-08-18 16:33:31,066][AutoNode][DEBUG] - Defining data type 'bundle' as 'Bundle' +[2026-08-18 16:33:31,066][AutoNode][DEBUG] - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +[2026-08-18 16:33:31,066][AutoNode][DEBUG] - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +[2026-08-18 16:33:31,066][AutoNode][DEBUG] - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +[2026-08-18 16:33:31,066][AutoNode][DEBUG] - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +[2026-08-18 16:33:31,066][AutoNode][DEBUG] - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +[2026-08-18 16:33:31,066][AutoNode][DEBUG] - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +[2026-08-18 16:33:31,067][AutoNode][DEBUG] - Defining data type 'double' as 'Double' and array 'DoubleArray +[2026-08-18 16:33:31,067][AutoNode][DEBUG] - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +[2026-08-18 16:33:31,067][AutoNode][DEBUG] - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +[2026-08-18 16:33:31,067][AutoNode][DEBUG] - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +[2026-08-18 16:33:31,067][AutoNode][DEBUG] - Defining data type 'execution' as 'Execution' +[2026-08-18 16:33:31,067][AutoNode][DEBUG] - Defining data type 'float' as 'Float' and array 'FloatArray +[2026-08-18 16:33:31,067][AutoNode][DEBUG] - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +[2026-08-18 16:33:31,067][AutoNode][DEBUG] - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +[2026-08-18 16:33:31,067][AutoNode][DEBUG] - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +[2026-08-18 16:33:31,067][AutoNode][DEBUG] - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +[2026-08-18 16:33:31,068][AutoNode][DEBUG] - Defining data type 'half' as 'Half' and array 'HalfArray +[2026-08-18 16:33:31,068][AutoNode][DEBUG] - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +[2026-08-18 16:33:31,068][AutoNode][DEBUG] - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +[2026-08-18 16:33:31,068][AutoNode][DEBUG] - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +[2026-08-18 16:33:31,068][AutoNode][DEBUG] - Defining data type 'int' as 'Int' and array 'IntArray +[2026-08-18 16:33:31,068][AutoNode][DEBUG] - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +[2026-08-18 16:33:31,068][AutoNode][DEBUG] - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +[2026-08-18 16:33:31,068][AutoNode][DEBUG] - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +[2026-08-18 16:33:31,068][AutoNode][DEBUG] - Defining data type 'int64' as 'Int64' and array 'Int64Array +[2026-08-18 16:33:31,069][AutoNode][DEBUG] - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +[2026-08-18 16:33:31,069][AutoNode][DEBUG] - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +[2026-08-18 16:33:31,069][AutoNode][DEBUG] - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +[2026-08-18 16:33:31,069][AutoNode][DEBUG] - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +[2026-08-18 16:33:31,069][AutoNode][DEBUG] - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +[2026-08-18 16:33:31,069][AutoNode][DEBUG] - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +[2026-08-18 16:33:31,069][AutoNode][DEBUG] - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +[2026-08-18 16:33:31,069][AutoNode][DEBUG] - Defining data type 'path' as 'Path' +[2026-08-18 16:33:31,069][AutoNode][DEBUG] - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +[2026-08-18 16:33:31,069][AutoNode][DEBUG] - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +[2026-08-18 16:33:31,070][AutoNode][DEBUG] - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +[2026-08-18 16:33:31,070][AutoNode][DEBUG] - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +[2026-08-18 16:33:31,070][AutoNode][DEBUG] - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +[2026-08-18 16:33:31,070][AutoNode][DEBUG] - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +[2026-08-18 16:33:31,070][AutoNode][DEBUG] - Defining data type 'string' as 'String' +[2026-08-18 16:33:31,070][AutoNode][DEBUG] - Defining data type 'target' as 'Target' +[2026-08-18 16:33:31,070][AutoNode][DEBUG] - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +[2026-08-18 16:33:31,070][AutoNode][DEBUG] - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +[2026-08-18 16:33:31,070][AutoNode][DEBUG] - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +[2026-08-18 16:33:31,071][AutoNode][DEBUG] - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +[2026-08-18 16:33:31,071][AutoNode][DEBUG] - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +[2026-08-18 16:33:31,071][AutoNode][DEBUG] - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +[2026-08-18 16:33:31,071][AutoNode][DEBUG] - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +[2026-08-18 16:33:31,071][AutoNode][DEBUG] - Defining data type 'token' as 'Token' and array 'TokenArray +[2026-08-18 16:33:31,071][AutoNode][DEBUG] - Defining data type 'uchar' as 'UChar' and array 'UCharArray +[2026-08-18 16:33:31,071][AutoNode][DEBUG] - Defining data type 'uint' as 'UInt' and array 'UIntArray +[2026-08-18 16:33:31,071][AutoNode][DEBUG] - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +[2026-08-18 16:33:31,071][AutoNode][DEBUG] - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +[2026-08-18 16:33:31,071][AutoNode][DEBUG] - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +[2026-08-18 16:33:31,072][AutoNode][DEBUG] - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +[2026-08-18 16:33:33,790][h5py._conv][DEBUG] - Creating converter from 7 to 5 +[2026-08-18 16:33:33,790][h5py._conv][DEBUG] - Creating converter from 5 to 7 +[2026-08-18 16:33:33,791][h5py._conv][DEBUG] - Creating converter from 7 to 5 +[2026-08-18 16:33:33,791][h5py._conv][DEBUG] - Creating converter from 5 to 7 +[2026-08-18 16:33:33,877][matplotlib][DEBUG] - matplotlib data path: /mnt/data/miniconda3/envs/sonic/lib/python3.11/site-packages/matplotlib/mpl-data +[2026-08-18 16:33:33,885][matplotlib][DEBUG] - CONFIGDIR=/root/.config/matplotlib +[2026-08-18 16:33:33,886][matplotlib][DEBUG] - interactive is False +[2026-08-18 16:33:33,886][matplotlib][DEBUG] - platform is linux +[2026-08-18 16:33:37,667][filelock][DEBUG] - Attempting to release lock 139902598257168 on /tmp/isaaclab_app_launcher.lock +[2026-08-18 16:33:37,668][filelock][DEBUG] - Lock 139902598257168 released on /tmp/isaaclab_app_launcher.lock diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_163438-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_163438-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4b068e5a895db8b4dc10300ce8f1a90b807ed02f --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_163438-TEST/.hydra/config.yaml @@ -0,0 +1,43 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + render_envs: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RenderEnvsRecorderCfg + video_save_path: ${manager_env.config.save_rendering_dir} + video_quality: 5 + observations: + policy: + enable_corruption: false + tokenizer: + enable_corruption: false + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered + smpl_motion_file: /mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered + config: + save_rendering_dir: /mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818 + render_results: true +checkpoint: /mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +headless: true +num_envs: 1 +max_render_steps: 300 diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_163438-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_163438-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..47aefef1389f422ec6b5d894990f3b167f7d64e4 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_163438-TEST/.hydra/hydra.yaml @@ -0,0 +1,166 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - +checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt + - +headless=True + - ++num_envs=1 + - ++manager_env.observations.policy.enable_corruption=False + - ++manager_env.observations.tokenizer.enable_corruption=False + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered + - ++manager_env.config.save_rendering_dir=/mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818 + - ++manager_env.config.render_results=True + - manager_env/recorders=render + - +max_render_steps=300 + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered,++manager_env.config.render_results=True,++manager_env.config.save_rendering_dir=/mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818,++manager_env.observations.policy.enable_corruption=False,++manager_env.observations.tokenizer.enable_corruption=False,++num_envs=1,+checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt,+headless=True,+max_render_steps=300,manager_env/recorders=render + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260818_163438-TEST + choices: + manager_env/recorders: render + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_163438-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_163438-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..5986e5c39f8e46eac057f46d049f895526a1484e --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_163438-TEST/.hydra/overrides.yaml @@ -0,0 +1,11 @@ +- +checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt +- +headless=True +- ++num_envs=1 +- ++manager_env.observations.policy.enable_corruption=False +- ++manager_env.observations.tokenizer.enable_corruption=False +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered +- ++manager_env.config.save_rendering_dir=/mnt/data/code/github/GRAIL/results/sonic_low_latency_walk_20260818 +- ++manager_env.config.render_results=True +- manager_env/recorders=render +- +max_render_steps=300 diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_163438-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260818_163438-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..9af997161054273512bcd37335cf4bfe38b4f6c7 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_163438-TEST/eval.log @@ -0,0 +1,71 @@ +2026-08-18 16:34:38.597 | INFO | __main__:main:90 - Loading training config file from /mnt/data/model/nvidia/GEAR-SONIC/low_latency/config.yaml +2026-08-18 16:34:39.843 | DEBUG | logging:callHandlers:1706 - Using selector: EpollSelector +2026-08-18 16:34:43.497 | DEBUG | logging:callHandlers:1706 - Defining data type 'any' as 'Any' +2026-08-18 16:34:43.497 | DEBUG | logging:callHandlers:1706 - Defining data type 'bool' as 'Bool' and array 'BoolArray +2026-08-18 16:34:43.497 | DEBUG | logging:callHandlers:1706 - Defining data type 'bundle' as 'Bundle' +2026-08-18 16:34:43.497 | DEBUG | logging:callHandlers:1706 - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +2026-08-18 16:34:43.497 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +2026-08-18 16:34:43.497 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +2026-08-18 16:34:43.498 | DEBUG | logging:callHandlers:1706 - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +2026-08-18 16:34:43.498 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +2026-08-18 16:34:43.498 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +2026-08-18 16:34:43.498 | DEBUG | logging:callHandlers:1706 - Defining data type 'double' as 'Double' and array 'DoubleArray +2026-08-18 16:34:43.498 | DEBUG | logging:callHandlers:1706 - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +2026-08-18 16:34:43.498 | DEBUG | logging:callHandlers:1706 - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +2026-08-18 16:34:43.498 | DEBUG | logging:callHandlers:1706 - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +2026-08-18 16:34:43.498 | DEBUG | logging:callHandlers:1706 - Defining data type 'execution' as 'Execution' +2026-08-18 16:34:43.498 | DEBUG | logging:callHandlers:1706 - Defining data type 'float' as 'Float' and array 'FloatArray +2026-08-18 16:34:43.499 | DEBUG | logging:callHandlers:1706 - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +2026-08-18 16:34:43.499 | DEBUG | logging:callHandlers:1706 - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +2026-08-18 16:34:43.499 | DEBUG | logging:callHandlers:1706 - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +2026-08-18 16:34:43.499 | DEBUG | logging:callHandlers:1706 - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +2026-08-18 16:34:43.499 | DEBUG | logging:callHandlers:1706 - Defining data type 'half' as 'Half' and array 'HalfArray +2026-08-18 16:34:43.499 | DEBUG | logging:callHandlers:1706 - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +2026-08-18 16:34:43.499 | DEBUG | logging:callHandlers:1706 - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +2026-08-18 16:34:43.499 | DEBUG | logging:callHandlers:1706 - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +2026-08-18 16:34:43.499 | DEBUG | logging:callHandlers:1706 - Defining data type 'int' as 'Int' and array 'IntArray +2026-08-18 16:34:43.499 | DEBUG | logging:callHandlers:1706 - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +2026-08-18 16:34:43.500 | DEBUG | logging:callHandlers:1706 - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +2026-08-18 16:34:43.500 | DEBUG | logging:callHandlers:1706 - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +2026-08-18 16:34:43.500 | DEBUG | logging:callHandlers:1706 - Defining data type 'int64' as 'Int64' and array 'Int64Array +2026-08-18 16:34:43.500 | DEBUG | logging:callHandlers:1706 - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +2026-08-18 16:34:43.500 | DEBUG | logging:callHandlers:1706 - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +2026-08-18 16:34:43.500 | DEBUG | logging:callHandlers:1706 - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +2026-08-18 16:34:43.500 | DEBUG | logging:callHandlers:1706 - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +2026-08-18 16:34:43.500 | DEBUG | logging:callHandlers:1706 - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +2026-08-18 16:34:43.500 | DEBUG | logging:callHandlers:1706 - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +2026-08-18 16:34:43.500 | DEBUG | logging:callHandlers:1706 - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +2026-08-18 16:34:43.501 | DEBUG | logging:callHandlers:1706 - Defining data type 'path' as 'Path' +2026-08-18 16:34:43.501 | DEBUG | logging:callHandlers:1706 - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +2026-08-18 16:34:43.501 | DEBUG | logging:callHandlers:1706 - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +2026-08-18 16:34:43.501 | DEBUG | logging:callHandlers:1706 - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +2026-08-18 16:34:43.501 | DEBUG | logging:callHandlers:1706 - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +2026-08-18 16:34:43.501 | DEBUG | logging:callHandlers:1706 - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +2026-08-18 16:34:43.501 | DEBUG | logging:callHandlers:1706 - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +2026-08-18 16:34:43.501 | DEBUG | logging:callHandlers:1706 - Defining data type 'string' as 'String' +2026-08-18 16:34:43.501 | DEBUG | logging:callHandlers:1706 - Defining data type 'target' as 'Target' +2026-08-18 16:34:43.502 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +2026-08-18 16:34:43.502 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +2026-08-18 16:34:43.502 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +2026-08-18 16:34:43.502 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +2026-08-18 16:34:43.502 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +2026-08-18 16:34:43.502 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +2026-08-18 16:34:43.502 | DEBUG | logging:callHandlers:1706 - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +2026-08-18 16:34:43.502 | DEBUG | logging:callHandlers:1706 - Defining data type 'token' as 'Token' and array 'TokenArray +2026-08-18 16:34:43.502 | DEBUG | logging:callHandlers:1706 - Defining data type 'uchar' as 'UChar' and array 'UCharArray +2026-08-18 16:34:43.502 | DEBUG | logging:callHandlers:1706 - Defining data type 'uint' as 'UInt' and array 'UIntArray +2026-08-18 16:34:43.503 | DEBUG | logging:callHandlers:1706 - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +2026-08-18 16:34:43.503 | DEBUG | logging:callHandlers:1706 - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +2026-08-18 16:34:43.503 | DEBUG | logging:callHandlers:1706 - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +2026-08-18 16:34:43.503 | DEBUG | logging:callHandlers:1706 - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +2026-08-18 16:34:45.975 | DEBUG | logging:callHandlers:1706 - Creating converter from 7 to 5 +2026-08-18 16:34:45.975 | DEBUG | logging:callHandlers:1706 - Creating converter from 5 to 7 +2026-08-18 16:34:45.975 | DEBUG | logging:callHandlers:1706 - Creating converter from 7 to 5 +2026-08-18 16:34:45.975 | DEBUG | logging:callHandlers:1706 - Creating converter from 5 to 7 +2026-08-18 16:34:46.055 | DEBUG | logging:callHandlers:1706 - matplotlib data path: /mnt/data/miniconda3/envs/sonic/lib/python3.11/site-packages/matplotlib/mpl-data +2026-08-18 16:34:46.061 | DEBUG | logging:callHandlers:1706 - CONFIGDIR=/root/.config/matplotlib +2026-08-18 16:34:46.063 | DEBUG | logging:callHandlers:1706 - interactive is False +2026-08-18 16:34:46.063 | DEBUG | logging:callHandlers:1706 - platform is linux +2026-08-18 16:34:49.551 | DEBUG | logging:callHandlers:1706 - Attempting to release lock 139759678659664 on /tmp/isaaclab_app_launcher.lock +2026-08-18 16:34:49.552 | DEBUG | logging:callHandlers:1706 - Lock 139759678659664 released on /tmp/isaaclab_app_launcher.lock +2026-08-18 16:34:51.923 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_163438-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260818_163438-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..c71dfbb18399bf658d29c6791ace7b59683a8585 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_163438-TEST/eval_agent_trl.log @@ -0,0 +1,69 @@ +[2026-08-18 16:34:39,843][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-18 16:34:43,496][AutoNode][DEBUG] - Defining data type 'any' as 'Any' +[2026-08-18 16:34:43,497][AutoNode][DEBUG] - Defining data type 'bool' as 'Bool' and array 'BoolArray +[2026-08-18 16:34:43,497][AutoNode][DEBUG] - Defining data type 'bundle' as 'Bundle' +[2026-08-18 16:34:43,497][AutoNode][DEBUG] - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +[2026-08-18 16:34:43,497][AutoNode][DEBUG] - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +[2026-08-18 16:34:43,497][AutoNode][DEBUG] - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +[2026-08-18 16:34:43,497][AutoNode][DEBUG] - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +[2026-08-18 16:34:43,498][AutoNode][DEBUG] - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +[2026-08-18 16:34:43,498][AutoNode][DEBUG] - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +[2026-08-18 16:34:43,498][AutoNode][DEBUG] - Defining data type 'double' as 'Double' and array 'DoubleArray +[2026-08-18 16:34:43,498][AutoNode][DEBUG] - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +[2026-08-18 16:34:43,498][AutoNode][DEBUG] - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +[2026-08-18 16:34:43,498][AutoNode][DEBUG] - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +[2026-08-18 16:34:43,498][AutoNode][DEBUG] - Defining data type 'execution' as 'Execution' +[2026-08-18 16:34:43,498][AutoNode][DEBUG] - Defining data type 'float' as 'Float' and array 'FloatArray +[2026-08-18 16:34:43,498][AutoNode][DEBUG] - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +[2026-08-18 16:34:43,499][AutoNode][DEBUG] - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +[2026-08-18 16:34:43,499][AutoNode][DEBUG] - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +[2026-08-18 16:34:43,499][AutoNode][DEBUG] - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +[2026-08-18 16:34:43,499][AutoNode][DEBUG] - Defining data type 'half' as 'Half' and array 'HalfArray +[2026-08-18 16:34:43,499][AutoNode][DEBUG] - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +[2026-08-18 16:34:43,499][AutoNode][DEBUG] - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +[2026-08-18 16:34:43,499][AutoNode][DEBUG] - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +[2026-08-18 16:34:43,499][AutoNode][DEBUG] - Defining data type 'int' as 'Int' and array 'IntArray +[2026-08-18 16:34:43,499][AutoNode][DEBUG] - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +[2026-08-18 16:34:43,499][AutoNode][DEBUG] - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +[2026-08-18 16:34:43,500][AutoNode][DEBUG] - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +[2026-08-18 16:34:43,500][AutoNode][DEBUG] - Defining data type 'int64' as 'Int64' and array 'Int64Array +[2026-08-18 16:34:43,500][AutoNode][DEBUG] - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +[2026-08-18 16:34:43,500][AutoNode][DEBUG] - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +[2026-08-18 16:34:43,500][AutoNode][DEBUG] - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +[2026-08-18 16:34:43,500][AutoNode][DEBUG] - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +[2026-08-18 16:34:43,500][AutoNode][DEBUG] - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +[2026-08-18 16:34:43,500][AutoNode][DEBUG] - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +[2026-08-18 16:34:43,500][AutoNode][DEBUG] - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +[2026-08-18 16:34:43,500][AutoNode][DEBUG] - Defining data type 'path' as 'Path' +[2026-08-18 16:34:43,501][AutoNode][DEBUG] - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +[2026-08-18 16:34:43,501][AutoNode][DEBUG] - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +[2026-08-18 16:34:43,501][AutoNode][DEBUG] - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +[2026-08-18 16:34:43,501][AutoNode][DEBUG] - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +[2026-08-18 16:34:43,501][AutoNode][DEBUG] - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +[2026-08-18 16:34:43,501][AutoNode][DEBUG] - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +[2026-08-18 16:34:43,501][AutoNode][DEBUG] - Defining data type 'string' as 'String' +[2026-08-18 16:34:43,501][AutoNode][DEBUG] - Defining data type 'target' as 'Target' +[2026-08-18 16:34:43,501][AutoNode][DEBUG] - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +[2026-08-18 16:34:43,502][AutoNode][DEBUG] - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +[2026-08-18 16:34:43,502][AutoNode][DEBUG] - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +[2026-08-18 16:34:43,502][AutoNode][DEBUG] - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +[2026-08-18 16:34:43,502][AutoNode][DEBUG] - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +[2026-08-18 16:34:43,502][AutoNode][DEBUG] - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +[2026-08-18 16:34:43,502][AutoNode][DEBUG] - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +[2026-08-18 16:34:43,502][AutoNode][DEBUG] - Defining data type 'token' as 'Token' and array 'TokenArray +[2026-08-18 16:34:43,502][AutoNode][DEBUG] - Defining data type 'uchar' as 'UChar' and array 'UCharArray +[2026-08-18 16:34:43,502][AutoNode][DEBUG] - Defining data type 'uint' as 'UInt' and array 'UIntArray +[2026-08-18 16:34:43,503][AutoNode][DEBUG] - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +[2026-08-18 16:34:43,503][AutoNode][DEBUG] - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +[2026-08-18 16:34:43,503][AutoNode][DEBUG] - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +[2026-08-18 16:34:43,503][AutoNode][DEBUG] - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +[2026-08-18 16:34:45,975][h5py._conv][DEBUG] - Creating converter from 7 to 5 +[2026-08-18 16:34:45,975][h5py._conv][DEBUG] - Creating converter from 5 to 7 +[2026-08-18 16:34:45,975][h5py._conv][DEBUG] - Creating converter from 7 to 5 +[2026-08-18 16:34:45,975][h5py._conv][DEBUG] - Creating converter from 5 to 7 +[2026-08-18 16:34:46,055][matplotlib][DEBUG] - matplotlib data path: /mnt/data/miniconda3/envs/sonic/lib/python3.11/site-packages/matplotlib/mpl-data +[2026-08-18 16:34:46,061][matplotlib][DEBUG] - CONFIGDIR=/root/.config/matplotlib +[2026-08-18 16:34:46,063][matplotlib][DEBUG] - interactive is False +[2026-08-18 16:34:46,063][matplotlib][DEBUG] - platform is linux +[2026-08-18 16:34:49,551][filelock][DEBUG] - Attempting to release lock 139759678659664 on /tmp/isaaclab_app_launcher.lock +[2026-08-18 16:34:49,551][filelock][DEBUG] - Lock 139759678659664 released on /tmp/isaaclab_app_launcher.lock diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_164457-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_164457-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..101b5da8f90428c173d58fef2d0d2ef1087f32c7 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_164457-TEST/.hydra/config.yaml @@ -0,0 +1,43 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + render_envs: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RenderEnvsRecorderCfg + video_save_path: ${manager_env.config.save_rendering_dir} + video_quality: 5 + observations: + policy: + enable_corruption: false + tokenizer: + enable_corruption: false + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered + smpl_motion_file: /mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered + config: + save_rendering_dir: /mnt/data/code/github/GRAIL/results/sonic_low_latency_debug_20260818 + render_results: true +checkpoint: /mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +headless: true +num_envs: 1 +max_render_steps: 60 diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_164457-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_164457-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..cc867470318440a1c79c4d34eda5c42601bbad7b --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_164457-TEST/.hydra/hydra.yaml @@ -0,0 +1,166 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - +checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt + - +headless=True + - ++num_envs=1 + - ++manager_env.observations.policy.enable_corruption=False + - ++manager_env.observations.tokenizer.enable_corruption=False + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered + - ++manager_env.config.save_rendering_dir=/mnt/data/code/github/GRAIL/results/sonic_low_latency_debug_20260818 + - ++manager_env.config.render_results=True + - manager_env/recorders=render + - +max_render_steps=60 + job: + name: eval_agent_trl_debug + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered,++manager_env.config.render_results=True,++manager_env.config.save_rendering_dir=/mnt/data/code/github/GRAIL/results/sonic_low_latency_debug_20260818,++manager_env.observations.policy.enable_corruption=False,++manager_env.observations.tokenizer.enable_corruption=False,++num_envs=1,+checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt,+headless=True,+max_render_steps=60,manager_env/recorders=render + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260818_164457-TEST + choices: + manager_env/recorders: render + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_164457-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_164457-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2e5ac9abc882f548fcdada2c020adb218f55a045 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_164457-TEST/.hydra/overrides.yaml @@ -0,0 +1,11 @@ +- +checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt +- +headless=True +- ++num_envs=1 +- ++manager_env.observations.policy.enable_corruption=False +- ++manager_env.observations.tokenizer.enable_corruption=False +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered +- ++manager_env.config.save_rendering_dir=/mnt/data/code/github/GRAIL/results/sonic_low_latency_debug_20260818 +- ++manager_env.config.render_results=True +- manager_env/recorders=render +- +max_render_steps=60 diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_164457-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260818_164457-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..71907b567c5fabd42203a0c33d80207567924cf5 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_164457-TEST/eval.log @@ -0,0 +1,71 @@ +2026-08-18 16:44:57.573 | INFO | __main__:main:96 - Loading training config file from /mnt/data/model/nvidia/GEAR-SONIC/low_latency/config.yaml +2026-08-18 16:45:00.090 | DEBUG | logging:callHandlers:1706 - Using selector: EpollSelector +2026-08-18 16:45:04.333 | DEBUG | logging:callHandlers:1706 - Defining data type 'any' as 'Any' +2026-08-18 16:45:04.334 | DEBUG | logging:callHandlers:1706 - Defining data type 'bool' as 'Bool' and array 'BoolArray +2026-08-18 16:45:04.334 | DEBUG | logging:callHandlers:1706 - Defining data type 'bundle' as 'Bundle' +2026-08-18 16:45:04.334 | DEBUG | logging:callHandlers:1706 - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +2026-08-18 16:45:04.334 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +2026-08-18 16:45:04.334 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +2026-08-18 16:45:04.334 | DEBUG | logging:callHandlers:1706 - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +2026-08-18 16:45:04.334 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +2026-08-18 16:45:04.334 | DEBUG | logging:callHandlers:1706 - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +2026-08-18 16:45:04.335 | DEBUG | logging:callHandlers:1706 - Defining data type 'double' as 'Double' and array 'DoubleArray +2026-08-18 16:45:04.335 | DEBUG | logging:callHandlers:1706 - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +2026-08-18 16:45:04.335 | DEBUG | logging:callHandlers:1706 - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +2026-08-18 16:45:04.335 | DEBUG | logging:callHandlers:1706 - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +2026-08-18 16:45:04.335 | DEBUG | logging:callHandlers:1706 - Defining data type 'execution' as 'Execution' +2026-08-18 16:45:04.335 | DEBUG | logging:callHandlers:1706 - Defining data type 'float' as 'Float' and array 'FloatArray +2026-08-18 16:45:04.335 | DEBUG | logging:callHandlers:1706 - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +2026-08-18 16:45:04.335 | DEBUG | logging:callHandlers:1706 - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +2026-08-18 16:45:04.335 | DEBUG | logging:callHandlers:1706 - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +2026-08-18 16:45:04.336 | DEBUG | logging:callHandlers:1706 - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +2026-08-18 16:45:04.336 | DEBUG | logging:callHandlers:1706 - Defining data type 'half' as 'Half' and array 'HalfArray +2026-08-18 16:45:04.336 | DEBUG | logging:callHandlers:1706 - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +2026-08-18 16:45:04.336 | DEBUG | logging:callHandlers:1706 - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +2026-08-18 16:45:04.336 | DEBUG | logging:callHandlers:1706 - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +2026-08-18 16:45:04.336 | DEBUG | logging:callHandlers:1706 - Defining data type 'int' as 'Int' and array 'IntArray +2026-08-18 16:45:04.336 | DEBUG | logging:callHandlers:1706 - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +2026-08-18 16:45:04.336 | DEBUG | logging:callHandlers:1706 - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +2026-08-18 16:45:04.336 | DEBUG | logging:callHandlers:1706 - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +2026-08-18 16:45:04.336 | DEBUG | logging:callHandlers:1706 - Defining data type 'int64' as 'Int64' and array 'Int64Array +2026-08-18 16:45:04.337 | DEBUG | logging:callHandlers:1706 - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +2026-08-18 16:45:04.337 | DEBUG | logging:callHandlers:1706 - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +2026-08-18 16:45:04.337 | DEBUG | logging:callHandlers:1706 - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +2026-08-18 16:45:04.337 | DEBUG | logging:callHandlers:1706 - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +2026-08-18 16:45:04.337 | DEBUG | logging:callHandlers:1706 - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +2026-08-18 16:45:04.337 | DEBUG | logging:callHandlers:1706 - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +2026-08-18 16:45:04.337 | DEBUG | logging:callHandlers:1706 - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +2026-08-18 16:45:04.337 | DEBUG | logging:callHandlers:1706 - Defining data type 'path' as 'Path' +2026-08-18 16:45:04.337 | DEBUG | logging:callHandlers:1706 - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +2026-08-18 16:45:04.337 | DEBUG | logging:callHandlers:1706 - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +2026-08-18 16:45:04.338 | DEBUG | logging:callHandlers:1706 - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +2026-08-18 16:45:04.338 | DEBUG | logging:callHandlers:1706 - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +2026-08-18 16:45:04.338 | DEBUG | logging:callHandlers:1706 - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +2026-08-18 16:45:04.338 | DEBUG | logging:callHandlers:1706 - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +2026-08-18 16:45:04.338 | DEBUG | logging:callHandlers:1706 - Defining data type 'string' as 'String' +2026-08-18 16:45:04.338 | DEBUG | logging:callHandlers:1706 - Defining data type 'target' as 'Target' +2026-08-18 16:45:04.338 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +2026-08-18 16:45:04.338 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +2026-08-18 16:45:04.338 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +2026-08-18 16:45:04.338 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +2026-08-18 16:45:04.339 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +2026-08-18 16:45:04.339 | DEBUG | logging:callHandlers:1706 - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +2026-08-18 16:45:04.339 | DEBUG | logging:callHandlers:1706 - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +2026-08-18 16:45:04.339 | DEBUG | logging:callHandlers:1706 - Defining data type 'token' as 'Token' and array 'TokenArray +2026-08-18 16:45:04.339 | DEBUG | logging:callHandlers:1706 - Defining data type 'uchar' as 'UChar' and array 'UCharArray +2026-08-18 16:45:04.340 | DEBUG | logging:callHandlers:1706 - Defining data type 'uint' as 'UInt' and array 'UIntArray +2026-08-18 16:45:04.340 | DEBUG | logging:callHandlers:1706 - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +2026-08-18 16:45:04.340 | DEBUG | logging:callHandlers:1706 - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +2026-08-18 16:45:04.340 | DEBUG | logging:callHandlers:1706 - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +2026-08-18 16:45:04.340 | DEBUG | logging:callHandlers:1706 - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +2026-08-18 16:45:06.915 | DEBUG | logging:callHandlers:1706 - Creating converter from 7 to 5 +2026-08-18 16:45:06.915 | DEBUG | logging:callHandlers:1706 - Creating converter from 5 to 7 +2026-08-18 16:45:06.915 | DEBUG | logging:callHandlers:1706 - Creating converter from 7 to 5 +2026-08-18 16:45:06.915 | DEBUG | logging:callHandlers:1706 - Creating converter from 5 to 7 +2026-08-18 16:45:07.010 | DEBUG | logging:callHandlers:1706 - matplotlib data path: /mnt/data/miniconda3/envs/sonic/lib/python3.11/site-packages/matplotlib/mpl-data +2026-08-18 16:45:07.017 | DEBUG | logging:callHandlers:1706 - CONFIGDIR=/root/.config/matplotlib +2026-08-18 16:45:07.019 | DEBUG | logging:callHandlers:1706 - interactive is False +2026-08-18 16:45:07.019 | DEBUG | logging:callHandlers:1706 - platform is linux +2026-08-18 16:45:10.832 | DEBUG | logging:callHandlers:1706 - Attempting to release lock 140624806309456 on /tmp/isaaclab_app_launcher.lock +2026-08-18 16:45:10.833 | DEBUG | logging:callHandlers:1706 - Lock 140624806309456 released on /tmp/isaaclab_app_launcher.lock +2026-08-18 16:45:15.071 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_164457-TEST/eval_agent_trl_debug.log b/GR00T-WholeBodyControl/logs_eval/20260818_164457-TEST/eval_agent_trl_debug.log new file mode 100644 index 0000000000000000000000000000000000000000..cbceb3f4d75f61b35c5729edf7590de2bdd97563 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_164457-TEST/eval_agent_trl_debug.log @@ -0,0 +1,69 @@ +[2026-08-18 16:45:00,089][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-18 16:45:04,333][AutoNode][DEBUG] - Defining data type 'any' as 'Any' +[2026-08-18 16:45:04,334][AutoNode][DEBUG] - Defining data type 'bool' as 'Bool' and array 'BoolArray +[2026-08-18 16:45:04,334][AutoNode][DEBUG] - Defining data type 'bundle' as 'Bundle' +[2026-08-18 16:45:04,334][AutoNode][DEBUG] - Defining data type 'colord[3]' as 'Color3d' and array 'Color3dArray +[2026-08-18 16:45:04,334][AutoNode][DEBUG] - Defining data type 'colorf[3]' as 'Color3f' and array 'Color3fArray +[2026-08-18 16:45:04,334][AutoNode][DEBUG] - Defining data type 'colorh[3]' as 'Color3h' and array 'Color3hArray +[2026-08-18 16:45:04,334][AutoNode][DEBUG] - Defining data type 'colord[4]' as 'Color4d' and array 'Color4dArray +[2026-08-18 16:45:04,334][AutoNode][DEBUG] - Defining data type 'colorf[4]' as 'Color4f' and array 'Color4fArray +[2026-08-18 16:45:04,334][AutoNode][DEBUG] - Defining data type 'colorh[4]' as 'Color4h' and array 'Color4hArray +[2026-08-18 16:45:04,335][AutoNode][DEBUG] - Defining data type 'double' as 'Double' and array 'DoubleArray +[2026-08-18 16:45:04,335][AutoNode][DEBUG] - Defining data type 'double[2]' as 'Double2' and array 'Double2Array +[2026-08-18 16:45:04,335][AutoNode][DEBUG] - Defining data type 'double[3]' as 'Double3' and array 'Double3Array +[2026-08-18 16:45:04,335][AutoNode][DEBUG] - Defining data type 'double[4]' as 'Double4' and array 'Double4Array +[2026-08-18 16:45:04,335][AutoNode][DEBUG] - Defining data type 'execution' as 'Execution' +[2026-08-18 16:45:04,335][AutoNode][DEBUG] - Defining data type 'float' as 'Float' and array 'FloatArray +[2026-08-18 16:45:04,335][AutoNode][DEBUG] - Defining data type 'float[2]' as 'Float2' and array 'Float2Array +[2026-08-18 16:45:04,335][AutoNode][DEBUG] - Defining data type 'float[3]' as 'Float3' and array 'Float3Array +[2026-08-18 16:45:04,335][AutoNode][DEBUG] - Defining data type 'float[4]' as 'Float4' and array 'Float4Array +[2026-08-18 16:45:04,335][AutoNode][DEBUG] - Defining data type 'frame[4]' as 'Frame' and array 'FrameArray +[2026-08-18 16:45:04,336][AutoNode][DEBUG] - Defining data type 'half' as 'Half' and array 'HalfArray +[2026-08-18 16:45:04,336][AutoNode][DEBUG] - Defining data type 'half[2]' as 'Half2' and array 'Half2Array +[2026-08-18 16:45:04,336][AutoNode][DEBUG] - Defining data type 'half[3]' as 'Half3' and array 'Half3Array +[2026-08-18 16:45:04,336][AutoNode][DEBUG] - Defining data type 'half[4]' as 'Half4' and array 'Half4Array +[2026-08-18 16:45:04,336][AutoNode][DEBUG] - Defining data type 'int' as 'Int' and array 'IntArray +[2026-08-18 16:45:04,336][AutoNode][DEBUG] - Defining data type 'int[2]' as 'Int2' and array 'Int2Array +[2026-08-18 16:45:04,336][AutoNode][DEBUG] - Defining data type 'int[3]' as 'Int3' and array 'Int3Array +[2026-08-18 16:45:04,336][AutoNode][DEBUG] - Defining data type 'int[4]' as 'Int4' and array 'Int4Array +[2026-08-18 16:45:04,336][AutoNode][DEBUG] - Defining data type 'int64' as 'Int64' and array 'Int64Array +[2026-08-18 16:45:04,336][AutoNode][DEBUG] - Defining data type 'matrixd[2]' as 'Matrix2d' and array 'Matrix2dArray +[2026-08-18 16:45:04,337][AutoNode][DEBUG] - Defining data type 'matrixd[3]' as 'Matrix3d' and array 'Matrix3dArray +[2026-08-18 16:45:04,337][AutoNode][DEBUG] - Defining data type 'matrixd[4]' as 'Matrix4d' and array 'Matrix4dArray +[2026-08-18 16:45:04,337][AutoNode][DEBUG] - Defining data type 'normald[3]' as 'Normal3d' and array 'Normal3dArray +[2026-08-18 16:45:04,337][AutoNode][DEBUG] - Defining data type 'normalf[3]' as 'Normal3f' and array 'Normal3fArray +[2026-08-18 16:45:04,337][AutoNode][DEBUG] - Defining data type 'normalh[3]' as 'Normal3h' and array 'Normal3hArray +[2026-08-18 16:45:04,337][AutoNode][DEBUG] - Defining data type 'objectId' as 'ObjectId' and array 'ObjectIdArray +[2026-08-18 16:45:04,337][AutoNode][DEBUG] - Defining data type 'path' as 'Path' +[2026-08-18 16:45:04,337][AutoNode][DEBUG] - Defining data type 'pointd[3]' as 'Point3d' and array 'Point3dArray +[2026-08-18 16:45:04,337][AutoNode][DEBUG] - Defining data type 'pointf[3]' as 'Point3f' and array 'Point3fArray +[2026-08-18 16:45:04,338][AutoNode][DEBUG] - Defining data type 'pointh[3]' as 'Point3h' and array 'Point3hArray +[2026-08-18 16:45:04,338][AutoNode][DEBUG] - Defining data type 'quatd[4]' as 'Quatd' and array 'QuatdArray +[2026-08-18 16:45:04,338][AutoNode][DEBUG] - Defining data type 'quatf[4]' as 'Quatf' and array 'QuatfArray +[2026-08-18 16:45:04,338][AutoNode][DEBUG] - Defining data type 'quath[4]' as 'Quath' and array 'QuathArray +[2026-08-18 16:45:04,338][AutoNode][DEBUG] - Defining data type 'string' as 'String' +[2026-08-18 16:45:04,338][AutoNode][DEBUG] - Defining data type 'target' as 'Target' +[2026-08-18 16:45:04,338][AutoNode][DEBUG] - Defining data type 'texcoordd[2]' as 'TexCoord2d' and array 'TexCoord2dArray +[2026-08-18 16:45:04,338][AutoNode][DEBUG] - Defining data type 'texcoordf[2]' as 'TexCoord2f' and array 'TexCoord2fArray +[2026-08-18 16:45:04,338][AutoNode][DEBUG] - Defining data type 'texcoordh[2]' as 'TexCoord2h' and array 'TexCoord2hArray +[2026-08-18 16:45:04,338][AutoNode][DEBUG] - Defining data type 'texcoordd[3]' as 'TexCoord3d' and array 'TexCoord3dArray +[2026-08-18 16:45:04,339][AutoNode][DEBUG] - Defining data type 'texcoordf[3]' as 'TexCoord3f' and array 'TexCoord3fArray +[2026-08-18 16:45:04,339][AutoNode][DEBUG] - Defining data type 'texcoordh[3]' as 'TexCoord3h' and array 'TexCoord3hArray +[2026-08-18 16:45:04,339][AutoNode][DEBUG] - Defining data type 'timecode' as 'Timecode' and array 'TimecodeArray +[2026-08-18 16:45:04,339][AutoNode][DEBUG] - Defining data type 'token' as 'Token' and array 'TokenArray +[2026-08-18 16:45:04,339][AutoNode][DEBUG] - Defining data type 'uchar' as 'UChar' and array 'UCharArray +[2026-08-18 16:45:04,339][AutoNode][DEBUG] - Defining data type 'uint' as 'UInt' and array 'UIntArray +[2026-08-18 16:45:04,340][AutoNode][DEBUG] - Defining data type 'uint64' as 'UInt64' and array 'UInt64Array +[2026-08-18 16:45:04,340][AutoNode][DEBUG] - Defining data type 'vectord[3]' as 'Vector3d' and array 'Vector3dArray +[2026-08-18 16:45:04,340][AutoNode][DEBUG] - Defining data type 'vectorf[3]' as 'Vector3f' and array 'Vector3fArray +[2026-08-18 16:45:04,340][AutoNode][DEBUG] - Defining data type 'vectorh[3]' as 'Vector3h' and array 'Vector3hArray +[2026-08-18 16:45:06,915][h5py._conv][DEBUG] - Creating converter from 7 to 5 +[2026-08-18 16:45:06,915][h5py._conv][DEBUG] - Creating converter from 5 to 7 +[2026-08-18 16:45:06,915][h5py._conv][DEBUG] - Creating converter from 7 to 5 +[2026-08-18 16:45:06,915][h5py._conv][DEBUG] - Creating converter from 5 to 7 +[2026-08-18 16:45:07,010][matplotlib][DEBUG] - matplotlib data path: /mnt/data/miniconda3/envs/sonic/lib/python3.11/site-packages/matplotlib/mpl-data +[2026-08-18 16:45:07,017][matplotlib][DEBUG] - CONFIGDIR=/root/.config/matplotlib +[2026-08-18 16:45:07,019][matplotlib][DEBUG] - interactive is False +[2026-08-18 16:45:07,019][matplotlib][DEBUG] - platform is linux +[2026-08-18 16:45:10,832][filelock][DEBUG] - Attempting to release lock 140624806309456 on /tmp/isaaclab_app_launcher.lock +[2026-08-18 16:45:10,833][filelock][DEBUG] - Lock 140624806309456 released on /tmp/isaaclab_app_launcher.lock diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_164753-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_164753-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..72d9b8d611e8dc2b55748d61704d2f7e383e7d94 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_164753-TEST/.hydra/config.yaml @@ -0,0 +1,38 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + observations: + policy: + enable_corruption: false + tokenizer: + enable_corruption: false + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered + smpl_motion_file: /mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered + config: + render_results: false +checkpoint: /mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +headless: true +num_envs: 1 +max_render_steps: 20 diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_164753-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_164753-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bae2e1ed952455a5c41334aff58021f1757b9d0e --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_164753-TEST/.hydra/hydra.yaml @@ -0,0 +1,164 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - +checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt + - +headless=True + - ++num_envs=1 + - ++manager_env.observations.policy.enable_corruption=False + - ++manager_env.observations.tokenizer.enable_corruption=False + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered + - ++manager_env.config.render_results=False + - +max_render_steps=20 + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered,++manager_env.config.render_results=False,++manager_env.observations.policy.enable_corruption=False,++manager_env.observations.tokenizer.enable_corruption=False,++num_envs=1,+checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt,+headless=True,+max_render_steps=20 + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260818_164753-TEST + choices: + manager_env/recorders: empty + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_164753-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_164753-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a18ab4e42f99e724cbb05ef2e670bce16fc63ab2 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_164753-TEST/.hydra/overrides.yaml @@ -0,0 +1,9 @@ +- +checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt +- +headless=True +- ++num_envs=1 +- ++manager_env.observations.policy.enable_corruption=False +- ++manager_env.observations.tokenizer.enable_corruption=False +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered +- ++manager_env.config.render_results=False +- +max_render_steps=20 diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_164753-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260818_164753-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..316f408bb01430e1fb16ce2c5e70f7a0cb353f19 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_164753-TEST/eval.log @@ -0,0 +1,39 @@ +2026-08-18 16:47:53.277 | INFO | __main__:main:90 - Loading training config file from /mnt/data/model/nvidia/GEAR-SONIC/low_latency/config.yaml +2026-08-18 16:47:54.669 | DEBUG | logging:callHandlers:1706 - Using selector: EpollSelector +2026-08-18 16:47:56.795 | DEBUG | logging:callHandlers:1706 - Creating converter from 7 to 5 +2026-08-18 16:47:56.795 | DEBUG | logging:callHandlers:1706 - Creating converter from 5 to 7 +2026-08-18 16:47:56.795 | DEBUG | logging:callHandlers:1706 - Creating converter from 7 to 5 +2026-08-18 16:47:56.795 | DEBUG | logging:callHandlers:1706 - Creating converter from 5 to 7 +2026-08-18 16:47:56.876 | DEBUG | logging:callHandlers:1706 - matplotlib data path: /mnt/data/miniconda3/envs/sonic/lib/python3.11/site-packages/matplotlib/mpl-data +2026-08-18 16:47:56.883 | DEBUG | logging:callHandlers:1706 - CONFIGDIR=/root/.config/matplotlib +2026-08-18 16:47:56.884 | DEBUG | logging:callHandlers:1706 - interactive is False +2026-08-18 16:47:56.884 | DEBUG | logging:callHandlers:1706 - platform is linux +2026-08-18 16:48:00.880 | DEBUG | logging:callHandlers:1706 - Attempting to release lock 140349824320400 on /tmp/isaaclab_app_launcher.lock +2026-08-18 16:48:00.881 | DEBUG | logging:callHandlers:1706 - Lock 140349824320400 released on /tmp/isaaclab_app_launcher.lock +2026-08-18 16:48:03.140 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch +2026-08-18 16:48:15.332 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:235 - Loaded skeleton from gear_sonic/data/assets/robot_description/mjcf/g1_29dof_rev_1_0.xml +2026-08-18 16:48:15.332 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:236 - Loading motion data from /mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered... +2026-08-18 16:48:15.333 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_data:472 - Loaded 2 motions +2026-08-18 16:48:16.135 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1091 - Loading 1 motions... +2026-08-18 16:48:16.136 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1092 - Sampling motion: tensor([1], device='cuda:0'), .... +2026-08-18 16:48:16.136 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1093 - Current motion keys: ['walk_forward_amateur_001__A001'], .... +2026-08-18 16:48:16.136 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1120 - Increased file descriptor limits from 2450/1048576 to 1048576/1048576 +2026-08-18 16:48:16.223 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1140 - Loading motions with 1 jobs... +2026-08-18 16:48:16.513 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1577 - Loaded 1 motions with a total length of 40.020s and 2002 frames. +2026-08-18 16:48:23.770 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:250 - Motion Encoder and Quantizer initialized with embedding dim: 64 (num_tokens=2, token_dim=32) +2026-08-18 16:48:24.378 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:319 - Initialized g1 encoder with input features: ['command_multi_future_nonflat', 'motion_anchor_ori_b_mf_nonflat'] +2026-08-18 16:48:24.402 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:319 - Initialized teleop encoder with input features: ['command_multi_future_lower_body', 'vr_3point_local_target', 'vr_3point_local_orn_target', 'motion_anchor_ori_b'] +2026-08-18 16:48:24.429 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:319 - Initialized smpl encoder with input features: ['smpl_joints_multi_future_local_nonflat', 'smpl_root_ori_b_multi_future', 'joint_pos_multi_future_wrist_for_smpl'] +2026-08-18 16:48:24.667 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:409 - Initialized g1_dyn decoder with input features: ['token_flattened', 'proprioception'] and output features: ['action'] +2026-08-18 16:48:24.691 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:409 - Initialized g1_kin decoder with input features: ['token'] and output features: ['command_multi_future_nonflat', 'motion_anchor_ori_b_mf_nonflat'] +2026-08-18 16:48:31.209 | INFO | __main__:main:439 - Loading checkpoint from /mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt +2026-08-18 16:48:32.540 | INFO | __main__:main:455 - Model parameterization: std +2026-08-18 16:48:32.540 | INFO | __main__:main:456 - Checkpoint parameterization: std +2026-08-18 16:48:32.542 | INFO | __main__:main:468 - Successfully loaded policy state dict +2026-08-18 16:48:33.182 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:begin_seq_motion_samples:1016 - Loading motions for evaluation +2026-08-18 16:48:33.184 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1091 - Loading 1 motions... +2026-08-18 16:48:33.186 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1092 - Sampling motion: tensor([0], device='cuda:0'), .... +2026-08-18 16:48:33.186 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1093 - Current motion keys: ['walk_forward_amateur_001__A001_M'], .... +2026-08-18 16:48:33.304 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1140 - Loading motions with 1 jobs... +2026-08-18 16:48:33.587 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1577 - Loaded 1 motions with a total length of 40.020s and 2002 frames. +2026-08-18 16:48:38.575 | INFO | __main__:main:629 - Reached max_render_steps=20. Exiting. diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_164753-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260818_164753-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..1d53b8ac188c7fe6cfe24413c93a9852cdf09c24 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_164753-TEST/eval_agent_trl.log @@ -0,0 +1,11 @@ +[2026-08-18 16:47:54,668][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-18 16:47:56,794][h5py._conv][DEBUG] - Creating converter from 7 to 5 +[2026-08-18 16:47:56,795][h5py._conv][DEBUG] - Creating converter from 5 to 7 +[2026-08-18 16:47:56,795][h5py._conv][DEBUG] - Creating converter from 7 to 5 +[2026-08-18 16:47:56,795][h5py._conv][DEBUG] - Creating converter from 5 to 7 +[2026-08-18 16:47:56,876][matplotlib][DEBUG] - matplotlib data path: /mnt/data/miniconda3/envs/sonic/lib/python3.11/site-packages/matplotlib/mpl-data +[2026-08-18 16:47:56,883][matplotlib][DEBUG] - CONFIGDIR=/root/.config/matplotlib +[2026-08-18 16:47:56,884][matplotlib][DEBUG] - interactive is False +[2026-08-18 16:47:56,884][matplotlib][DEBUG] - platform is linux +[2026-08-18 16:48:00,880][filelock][DEBUG] - Attempting to release lock 140349824320400 on /tmp/isaaclab_app_launcher.lock +[2026-08-18 16:48:00,881][filelock][DEBUG] - Lock 140349824320400 released on /tmp/isaaclab_app_launcher.lock diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_165026-TEST/.hydra/config.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_165026-TEST/.hydra/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..62272f269716ea500dcb7f0b28b9303eb246dafb --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_165026-TEST/.hydra/config.yaml @@ -0,0 +1,41 @@ +callbacks: + im_eval: + _target_: gear_sonic.trl.callbacks.im_eval_callback.ImEvalCallback + eval_frequency: 1 + eval_only: true + output_dir: ${experiment_dir}/eval_metrics +manager_env: + recorders: + _target_: gear_sonic.envs.manager_env.mdp.recorders.RecordersCfg + trajectory: + _target_: gear_sonic.envs.manager_env.mdp.recorders.TrajectoryRecorderCfg + save_path: /mnt/data/code/github/GRAIL/results/sonic_low_latency_trajectory_20260818 + observations: + policy: + enable_corruption: false + tokenizer: + enable_corruption: false + commands: + motion: + motion_lib_cfg: + motion_file: /mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered + smpl_motion_file: /mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered + config: + render_results: false +checkpoint: /mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt +algo: + config: + eval: + num_eval_episodes: 150 + save_videos: false + video_save_prob: 1.0 + save_goal_reached_only: true + save_trajectories: false + num_save_episodes: 200 +eval_timestamp: ${now:%Y%m%d_%H%M%S} +eval_name: TEST +eval_base_dir: logs_eval +eval_log_dir: ${eval_base_dir}/${eval_timestamp}-${eval_name} +headless: true +num_envs: 1 +max_render_steps: 300 diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_165026-TEST/.hydra/hydra.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_165026-TEST/.hydra/hydra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d2074f5647802a99fae35582bcd6a55376c027eb --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_165026-TEST/.hydra/hydra.yaml @@ -0,0 +1,166 @@ +hydra: + run: + dir: ${eval_log_dir} + sweep: + dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} + subdir: ${hydra.job.num} + launcher: + _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher + sweeper: + _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper + max_batch_size: null + params: null + help: + app_name: ${hydra.job.name} + header: '${hydra.help.app_name} is powered by Hydra. + + ' + footer: 'Powered by Hydra (https://hydra.cc) + + Use --hydra-help to view Hydra specific help + + ' + template: '${hydra.help.header} + + == Configuration groups == + + Compose your configuration from those groups (group=option) + + + $APP_CONFIG_GROUPS + + + == Config == + + Override anything in the config (foo.bar=value) + + + $CONFIG + + + ${hydra.help.footer} + + ' + hydra_help: + template: 'Hydra (${hydra.runtime.version}) + + See https://hydra.cc for more info. + + + == Flags == + + $FLAGS_HELP + + + == Configuration groups == + + Compose your configuration from those groups (For example, append hydra/job_logging=disabled + to command line) + + + $HYDRA_CONFIG_GROUPS + + + Use ''--cfg hydra'' to Show the Hydra config. + + ' + hydra_help: ??? + hydra_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][HYDRA] %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + root: + level: INFO + handlers: + - console + loggers: + logging_example: + level: DEBUG + disable_existing_loggers: false + job_logging: + version: 1 + formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: simple + stream: ext://sys.stdout + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log + root: + level: INFO + handlers: + - console + - file + disable_existing_loggers: false + env: {} + mode: RUN + searchpath: [] + callbacks: {} + output_subdir: .hydra + overrides: + hydra: + - hydra.mode=RUN + task: + - +checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt + - +headless=True + - ++num_envs=1 + - ++manager_env.observations.policy.enable_corruption=False + - ++manager_env.observations.tokenizer.enable_corruption=False + - ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered + - ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered + - ++manager_env.config.render_results=False + - ++manager_env.recorders.trajectory._target_=gear_sonic.envs.manager_env.mdp.recorders.TrajectoryRecorderCfg + - ++manager_env.recorders.trajectory.save_path=/mnt/data/code/github/GRAIL/results/sonic_low_latency_trajectory_20260818 + - +max_render_steps=300 + job: + name: eval_agent_trl + chdir: null + override_dirname: ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered,++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered,++manager_env.config.render_results=False,++manager_env.observations.policy.enable_corruption=False,++manager_env.observations.tokenizer.enable_corruption=False,++manager_env.recorders.trajectory._target_=gear_sonic.envs.manager_env.mdp.recorders.TrajectoryRecorderCfg,++manager_env.recorders.trajectory.save_path=/mnt/data/code/github/GRAIL/results/sonic_low_latency_trajectory_20260818,++num_envs=1,+checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt,+headless=True,+max_render_steps=300 + id: ??? + num: ??? + config_name: base_eval + env_set: {} + env_copy: [] + config: + override_dirname: + kv_sep: '=' + item_sep: ',' + exclude_keys: [] + runtime: + version: 1.3.2 + version_base: '1.1' + cwd: /mnt/data/code/GR00T-WholeBodyControl + config_sources: + - path: hydra.conf + schema: pkg + provider: hydra + - path: /mnt/data/code/GR00T-WholeBodyControl/gear_sonic/config + schema: file + provider: main + - path: '' + schema: structured + provider: schema + output_dir: /mnt/data/code/GR00T-WholeBodyControl/logs_eval/20260818_165026-TEST + choices: + manager_env/recorders: empty + hydra/env: default + hydra/callbacks: null + hydra/job_logging: default + hydra/hydra_logging: default + hydra/hydra_help: default + hydra/help: default + hydra/sweeper: basic + hydra/launcher: basic + hydra/output: default + verbose: false diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_165026-TEST/.hydra/overrides.yaml b/GR00T-WholeBodyControl/logs_eval/20260818_165026-TEST/.hydra/overrides.yaml new file mode 100644 index 0000000000000000000000000000000000000000..86833f3c6b996be430bcab6c8212d52d6604de17 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_165026-TEST/.hydra/overrides.yaml @@ -0,0 +1,11 @@ +- +checkpoint=/mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt +- +headless=True +- ++num_envs=1 +- ++manager_env.observations.policy.enable_corruption=False +- ++manager_env.observations.tokenizer.enable_corruption=False +- ++manager_env.commands.motion.motion_lib_cfg.motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered +- ++manager_env.commands.motion.motion_lib_cfg.smpl_motion_file=/mnt/data/model/nvidia/GEAR-SONIC/sample_data/smpl_filtered +- ++manager_env.config.render_results=False +- ++manager_env.recorders.trajectory._target_=gear_sonic.envs.manager_env.mdp.recorders.TrajectoryRecorderCfg +- ++manager_env.recorders.trajectory.save_path=/mnt/data/code/github/GRAIL/results/sonic_low_latency_trajectory_20260818 +- +max_render_steps=300 diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_165026-TEST/eval.log b/GR00T-WholeBodyControl/logs_eval/20260818_165026-TEST/eval.log new file mode 100644 index 0000000000000000000000000000000000000000..a7a0a581a383796ade3a23bd47e1293c54a33860 --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_165026-TEST/eval.log @@ -0,0 +1,43 @@ +2026-08-18 16:50:26.383 | INFO | __main__:main:90 - Loading training config file from /mnt/data/model/nvidia/GEAR-SONIC/low_latency/config.yaml +2026-08-18 16:50:27.839 | DEBUG | logging:callHandlers:1706 - Using selector: EpollSelector +2026-08-18 16:50:30.007 | DEBUG | logging:callHandlers:1706 - Creating converter from 7 to 5 +2026-08-18 16:50:30.007 | DEBUG | logging:callHandlers:1706 - Creating converter from 5 to 7 +2026-08-18 16:50:30.007 | DEBUG | logging:callHandlers:1706 - Creating converter from 7 to 5 +2026-08-18 16:50:30.007 | DEBUG | logging:callHandlers:1706 - Creating converter from 5 to 7 +2026-08-18 16:50:30.086 | DEBUG | logging:callHandlers:1706 - matplotlib data path: /mnt/data/miniconda3/envs/sonic/lib/python3.11/site-packages/matplotlib/mpl-data +2026-08-18 16:50:30.092 | DEBUG | logging:callHandlers:1706 - CONFIGDIR=/root/.config/matplotlib +2026-08-18 16:50:30.094 | DEBUG | logging:callHandlers:1706 - interactive is False +2026-08-18 16:50:30.094 | DEBUG | logging:callHandlers:1706 - platform is linux +2026-08-18 16:50:32.624 | DEBUG | logging:callHandlers:1706 - Attempting to release lock 140426513027600 on /tmp/isaaclab_app_launcher.lock +2026-08-18 16:50:32.624 | DEBUG | logging:callHandlers:1706 - Lock 140426513027600 released on /tmp/isaaclab_app_launcher.lock +2026-08-18 16:50:35.360 | INFO | gear_sonic.utils.motion_lib.torch_humanoid_batch::40 - Using Humanoid Batch +2026-08-18 16:50:47.853 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:235 - Loaded skeleton from gear_sonic/data/assets/robot_description/mjcf/g1_29dof_rev_1_0.xml +2026-08-18 16:50:47.853 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:__init__:236 - Loading motion data from /mnt/data/model/nvidia/GEAR-SONIC/sample_data/robot_filtered... +2026-08-18 16:50:47.854 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_data:472 - Loaded 2 motions +2026-08-18 16:50:48.584 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1091 - Loading 1 motions... +2026-08-18 16:50:48.588 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1092 - Sampling motion: tensor([1], device='cuda:0'), .... +2026-08-18 16:50:48.588 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1093 - Current motion keys: ['walk_forward_amateur_001__A001'], .... +2026-08-18 16:50:48.588 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1120 - Increased file descriptor limits from 2450/1048576 to 1048576/1048576 +2026-08-18 16:50:48.663 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1140 - Loading motions with 1 jobs... +2026-08-18 16:50:48.938 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1577 - Loaded 1 motions with a total length of 40.020s and 2002 frames. +2026-08-18 16:50:49.641 | INFO | gear_sonic.envs.manager_env.mdp.recorders:__init__:209 - === TrajectoryRecorder: saving to /mnt/data/code/github/GRAIL/results/sonic_low_latency_trajectory_20260818 === +2026-08-18 16:50:53.592 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:250 - Motion Encoder and Quantizer initialized with embedding dim: 64 (num_tokens=2, token_dim=32) +2026-08-18 16:50:53.742 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:319 - Initialized g1 encoder with input features: ['command_multi_future_nonflat', 'motion_anchor_ori_b_mf_nonflat'] +2026-08-18 16:50:53.762 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:319 - Initialized teleop encoder with input features: ['command_multi_future_lower_body', 'vr_3point_local_target', 'vr_3point_local_orn_target', 'motion_anchor_ori_b'] +2026-08-18 16:50:53.787 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:319 - Initialized smpl encoder with input features: ['smpl_joints_multi_future_local_nonflat', 'smpl_root_ori_b_multi_future', 'joint_pos_multi_future_wrist_for_smpl'] +2026-08-18 16:50:53.983 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:409 - Initialized g1_dyn decoder with input features: ['token_flattened', 'proprioception'] and output features: ['action'] +2026-08-18 16:50:54.007 | INFO | gear_sonic.trl.modules.universal_token_modules:__init__:409 - Initialized g1_kin decoder with input features: ['token'] and output features: ['command_multi_future_nonflat', 'motion_anchor_ori_b_mf_nonflat'] +2026-08-18 16:50:56.202 | INFO | __main__:main:439 - Loading checkpoint from /mnt/data/model/nvidia/GEAR-SONIC/low_latency/last.pt +2026-08-18 16:50:57.201 | INFO | __main__:main:455 - Model parameterization: std +2026-08-18 16:50:57.201 | INFO | __main__:main:456 - Checkpoint parameterization: std +2026-08-18 16:50:57.203 | INFO | __main__:main:468 - Successfully loaded policy state dict +2026-08-18 16:50:57.204 | INFO | gear_sonic.envs.wrapper.manager_env_wrapper:begin_seq_motion_samples:1016 - Loading motions for evaluation +2026-08-18 16:50:57.205 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1091 - Loading 1 motions... +2026-08-18 16:50:57.206 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1092 - Sampling motion: tensor([0], device='cuda:0'), .... +2026-08-18 16:50:57.206 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1093 - Current motion keys: ['walk_forward_amateur_001__A001_M'], .... +2026-08-18 16:50:57.280 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1140 - Loading motions with 1 jobs... +2026-08-18 16:50:57.550 | INFO | gear_sonic.utils.motion_lib.motion_lib_base:load_motions:1577 - Loaded 1 motions with a total length of 40.020s and 2002 frames. +2026-08-18 16:51:50.806 | INFO | __main__:main:629 - Reached max_render_steps=300. Exiting. +2026-08-18 16:51:50.808 | INFO | gear_sonic.envs.manager_env.mdp.recorders:close_writers:356 - Saved trajectory: /mnt/data/code/github/GRAIL/results/sonic_low_latency_trajectory_20260818/000000.trajectory.pkl (150 frames) +2026-08-18 16:51:50.809 | INFO | gear_sonic.envs.manager_env.mdp.recorders:close_writers:381 - Saved scene metadata: /mnt/data/code/github/GRAIL/results/sonic_low_latency_trajectory_20260818/scene_metadata.json +2026-08-18 16:51:50.809 | INFO | gear_sonic.envs.manager_env.mdp.recorders:close_writers:382 - === TrajectoryRecorder: all data saved === diff --git a/GR00T-WholeBodyControl/logs_eval/20260818_165026-TEST/eval_agent_trl.log b/GR00T-WholeBodyControl/logs_eval/20260818_165026-TEST/eval_agent_trl.log new file mode 100644 index 0000000000000000000000000000000000000000..d56cdc4fef41ee2f83cb80d5cf6b16fff18b221b --- /dev/null +++ b/GR00T-WholeBodyControl/logs_eval/20260818_165026-TEST/eval_agent_trl.log @@ -0,0 +1,11 @@ +[2026-08-18 16:50:27,838][asyncio][DEBUG] - Using selector: EpollSelector +[2026-08-18 16:50:30,006][h5py._conv][DEBUG] - Creating converter from 7 to 5 +[2026-08-18 16:50:30,007][h5py._conv][DEBUG] - Creating converter from 5 to 7 +[2026-08-18 16:50:30,007][h5py._conv][DEBUG] - Creating converter from 7 to 5 +[2026-08-18 16:50:30,007][h5py._conv][DEBUG] - Creating converter from 5 to 7 +[2026-08-18 16:50:30,086][matplotlib][DEBUG] - matplotlib data path: /mnt/data/miniconda3/envs/sonic/lib/python3.11/site-packages/matplotlib/mpl-data +[2026-08-18 16:50:30,092][matplotlib][DEBUG] - CONFIGDIR=/root/.config/matplotlib +[2026-08-18 16:50:30,094][matplotlib][DEBUG] - interactive is False +[2026-08-18 16:50:30,094][matplotlib][DEBUG] - platform is linux +[2026-08-18 16:50:32,623][filelock][DEBUG] - Attempting to release lock 140426513027600 on /tmp/isaaclab_app_launcher.lock +[2026-08-18 16:50:32,624][filelock][DEBUG] - Lock 140426513027600 released on /tmp/isaaclab_app_launcher.lock diff --git a/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/g1.xml b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/g1.xml new file mode 100644 index 0000000000000000000000000000000000000000..36231a5b97ab1784ad2e2c889b974b086639c120 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/g1.xml @@ -0,0 +1,413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/g1_23dof.xml b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/g1_23dof.xml new file mode 100644 index 0000000000000000000000000000000000000000..1c9526e7765f74c0e74515335757ef99b19069d3 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/g1_23dof.xml @@ -0,0 +1,477 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/g1_29dof.xml b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/g1_29dof.xml new file mode 100644 index 0000000000000000000000000000000000000000..0707bb3eed19ac01c848c70e2b158dd780a716d0 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/g1_29dof.xml @@ -0,0 +1,521 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/g1_29dof_with_hand.xml b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/g1_29dof_with_hand.xml new file mode 100644 index 0000000000000000000000000000000000000000..1d76bbf0d9a51b7c0a32bbce6983b2f12f22448c --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/g1_29dof_with_hand.xml @@ -0,0 +1,743 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/left_ankle_pitch_link.STL b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/left_ankle_pitch_link.STL new file mode 100644 index 0000000000000000000000000000000000000000..69de8490184afc698f633e34bb74e65351bd4689 Binary files /dev/null and b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/left_ankle_pitch_link.STL differ diff --git a/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/left_elbow_link.STL b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/left_elbow_link.STL new file mode 100644 index 0000000000000000000000000000000000000000..1a96d99ba469960173129084ab6dd3bf8a732a71 Binary files /dev/null and b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/left_elbow_link.STL differ diff --git a/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/left_hand_thumb_0_link.STL b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/left_hand_thumb_0_link.STL new file mode 100644 index 0000000000000000000000000000000000000000..4e033538d208989cb825e6d3ea06bed3eefcc512 Binary files /dev/null and b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/left_hand_thumb_0_link.STL differ diff --git a/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/left_wrist_pitch_link.STL b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/left_wrist_pitch_link.STL new file mode 100644 index 0000000000000000000000000000000000000000..82cc224a8e41251d879502f9809e31d0988ec7f9 Binary files /dev/null and b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/left_wrist_pitch_link.STL differ diff --git a/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/right_ankle_pitch_link.STL b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/right_ankle_pitch_link.STL new file mode 100644 index 0000000000000000000000000000000000000000..e77d8a2fe1e5d56fac049833d254d6ffa4f6b350 Binary files /dev/null and b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/right_ankle_pitch_link.STL differ diff --git a/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/right_elbow_link.STL b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/right_elbow_link.STL new file mode 100644 index 0000000000000000000000000000000000000000..f259e3812efb9985d6463c04d3e8a4b53793a699 Binary files /dev/null and b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/right_elbow_link.STL differ diff --git a/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/right_hand_thumb_0_link.STL b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/right_hand_thumb_0_link.STL new file mode 100644 index 0000000000000000000000000000000000000000..07c3be06d466b71a7f88a89b4740ed674bb0885c Binary files /dev/null and b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/right_hand_thumb_0_link.STL differ diff --git a/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/right_wrist_pitch_link.STL b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/right_wrist_pitch_link.STL new file mode 100644 index 0000000000000000000000000000000000000000..da194543c40df9d492abb0553c06cc614a78caae Binary files /dev/null and b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/right_wrist_pitch_link.STL differ diff --git a/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/torso_constraint_L_rod_link.STL b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/torso_constraint_L_rod_link.STL new file mode 100644 index 0000000000000000000000000000000000000000..6747f3f9341bd72b3803385c135c3ce750322e9d Binary files /dev/null and b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/torso_constraint_L_rod_link.STL differ diff --git a/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/torso_constraint_R_rod_link.STL b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/torso_constraint_R_rod_link.STL new file mode 100644 index 0000000000000000000000000000000000000000..95cf415f72f1679a5867ca21a4af774f0b217cad Binary files /dev/null and b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/torso_constraint_R_rod_link.STL differ diff --git a/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/waist_roll_link.STL b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/waist_roll_link.STL new file mode 100644 index 0000000000000000000000000000000000000000..65831abd2a64bc8c36e31016964413a3d2116725 Binary files /dev/null and b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/meshes/waist_roll_link.STL differ diff --git a/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/scene_23dof.xml b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/scene_23dof.xml new file mode 100644 index 0000000000000000000000000000000000000000..b697dc54b2c1cecc1a6fefa1daef5655a6bc7a4f --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/scene_23dof.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/scene_29dof.xml b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/scene_29dof.xml new file mode 100644 index 0000000000000000000000000000000000000000..838de41a834e96db823937449fb55ea0374e62aa --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/scene_29dof.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/scene_29dof_with_hand.xml b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/scene_29dof_with_hand.xml new file mode 100644 index 0000000000000000000000000000000000000000..d1b1683a904c93a1bd24ecc4b345ebdd4f1a715c --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/assets/skeletons/g1/scene_29dof_with_hand.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/GR00T-WholeBodyControl/motionbricks/docs/adding_your_own_dataset.md b/GR00T-WholeBodyControl/motionbricks/docs/adding_your_own_dataset.md new file mode 100644 index 0000000000000000000000000000000000000000..fe47cf67533821a16472ddce1116f00ed5e77f97 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/docs/adding_your_own_dataset.md @@ -0,0 +1,36 @@ +# Adding Your Own Dataset + +Our open-sourced datasets are available at . The full training code, within the GR00T whole-body control framework, will be open-sourced soon at . This guide covers bringing your own motion data into MotionBricks training. + +## Two paths + +You have two choices when bringing your own data: + +1. **Bring your own training pipeline without the dependency on motionbricks' motion-representation handler and data loader (highly recommended).** There's no restriction on the motion representation used in our tokenizer, root, and pose module training. It is highly recommended to build your own training pipeline by referencing the current synthetic training path. + +2. **Reuse the MotionBricks motion data representation.** In this path, you assume the same G1 Skeleton34 representation and only work with a different dataset processed in the same way. Full spec of the representation is in [`motion_representation.md`](./motion_representation.md). + +--- + +## Reusing the MotionBricks Representation + +Write a PyTorch `Dataset` whose `__getitem__` returns `{"keyid": int, "motion": Tensor[T, feature_dim]}`, where `motion` is the **already computed and normalized** global motion feature tensor for a single clip. See [`motion_representation.md`](./motion_representation.md) for the feature layout and how to produce it from raw joint rotations + global positions. + +You can reuse the provided normalization stats, but you are also encouraged to compute your own. + +See `motionbricks/data/synthetic_dataset.py` for the minimal dataset interface. + +## Rolling Your Own + +For most non-G1 datasets, we **highly recommend** writing your own dataset loader and motion-representation handler rather than forcing the existing ones to fit. + +### Pointers in the code + +| What you're writing | Start from | +|---------------------|------------| +| A new motion-rep class | `motionbricks/motionlib/core/motion_reps/motion_reps_base/motion_rep_base.py` (`MotionRepBase`) — minimal base that only wires normalization | +| A representation with a separate root / body split | `motionbricks/motionlib/core/motion_reps/motion_reps_base/seperate_root_local_body.py` | +| A full dual-root example | `motionbricks/motionlib/core/motion_reps/dual_root_global_joints.py` (builds `GlobalRootGlobalJoints`, `LocalRootGlobalJoints`, `DualRootGlobalJoints`) | +| The actual feature math (FK, velocity, heading) | `motionbricks/motionlib/core/motion_reps/tools/motion_features.py` — in particular `compute_motion_features` and the per-feature helpers it dispatches to | +| A minimal dataset loader | `motionbricks/data/synthetic_dataset.py` (`SyntheticMotionDataset`, `collate_batch`) | +| Stats handling | `motionbricks/motionlib/core/utils/stats.py` (`Stats`) | diff --git a/GR00T-WholeBodyControl/motionbricks/docs/motion_representation.md b/GR00T-WholeBodyControl/motionbricks/docs/motion_representation.md new file mode 100644 index 0000000000000000000000000000000000000000..a6301a2ed870983a857ae15cbe45540b5a99adc9 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/docs/motion_representation.md @@ -0,0 +1,154 @@ +# Motion Representation + +## Overview + +MotionBricks represents motion as a normalized feature vector per frame. The representation separates **root motion** (global position and heading of the robot's pelvis) from **body motion** (joint rotations, positions, velocities, and foot contacts). This separation lets the root model and the pose/tokenizer module operate on different subsets of the same representation. + +Throughout the paper and codebase, two interchangeable subsets are used: + +- **Global** (`GlobalRootGlobalJoints`, 414 dims) — **root model** mostly operates with this representation for precise global root control. This is also what the data loader returns directly. +- **Local** (`LocalRootGlobalJoints`, 413 dims) — used by the **pose/tokenizer module**. + +The two subsets share the same 409-dim body features and differ only in how the root is parameterized (5 global vs 4 local dims). They convert losslessly to each other via `dual_rep.global_to_local` / `dual_rep.local_to_global`. In the training loop, batches come out of the loader in the global representation and are converted to local on the fly before being passed to the pose/tokenizer module. Concretely, the `"motion"` tensor in every batch dict is always the **global** motion — per-sample conversion to local happens inside the training step. + +The current configuration uses the **DualRootGlobalJoints** representation on the **G1Skeleton34** skeleton (Unitree G1 with 34 joints). The full feature vector is 418-dimensional per frame, composed of the 414-dim global subset and the 413-dim local subset that share the 409-dim body features. + +See the MotionBricks paper for the full derivation of the representation. + +## Feature Breakdown + +All body features are defined in the **global (world) frame**. The `local_` prefix on `local_vel` is a naming holdover — in `DualRootGlobalJoints` (`removing_heading=False`), the velocity is NOT heading-rotated, and its normalization statistics are computed from the same world-frame values. + +### Body Features (409 dimensions) + +Shared by both global and local root representations. + +| Feature | Dimensions | Description | +|---------|-----------|-------------| +| `ric_data` | 99 | Global joint positions with the **projected (XZ) root position** subtracted per frame, for 33 non-root joints. Not heading-canonicalized. | +| `global_rot_data` | 204 | **Global (world-frame)** 6D continuous rotations for all 34 joints.| +| `local_vel` | 102 | **Global-frame** per-joint velocity, computed as finite differences of world positions. | +| `foot_contacts` | 4 | Binary contact states for left ankle, left toe, right ankle, right toe. | + +### Global Root Features (5 dimensions) + +Used by the global representation subset (consumed by the root model). + +| Feature | Dimensions | Description | +|---------|-----------|-------------| +| `global_root_pos` | 3 | XYZ position in world frame (during training and inference, first frame's root XZ is placed at origin). | +| `global_root_heading` | 2 | Root heading as (cos, sin) of the Y-axis rotation angle. | + +### Local Root Features (4 dimensions) + +Used by the local representation subset (consumed by the pose/tokenizer module). Derived from the global root during the `global_to_local` conversion. + +| Feature | Dimensions | Description | +|---------|-----------|-------------| +| `local_root_rot_vel` | 1 | Angular velocity around the Y-axis. | +| `local_root_vel` | 2 | Root translational velocity in the XZ plane, expressed in the root's heading-aligned frame. | +| `global_root_y` | 1 | Root height (Y-axis position in world frame). | + +### Combined Dimensions + +| Representation | Formula | Total | +|---------------|---------|-------| +| Global subset (`GlobalRootGlobalJoints`) | 5 (global root) + 409 (body) | **414** | +| Local subset (`LocalRootGlobalJoints`) | 4 (local root) + 409 (body) | **413** | +| Full dual (`DualRootGlobalJoints`) | 5 + 4 + 409 | **418** | + +The root model uses the **global subset** (414 dims). The pose/tokenizer module uses the **local subset** (413 dims). + +## Skeleton: G1Skeleton34 + +The skeleton defines the kinematic tree. G1Skeleton34 has 34 joints: 32 active joints from the Unitree G1 robot plus 2 dummy toe joints for foot contact detection. + +``` +pelvis (root) + |-- left_hip_pitch -- left_hip_roll -- left_hip_yaw -- left_knee + | \-- left_ankle_pitch -- left_ankle_roll -- left_toe_base* + |-- right_hip_pitch -- right_hip_roll -- right_hip_yaw -- right_knee + | \-- right_ankle_pitch -- right_ankle_roll -- right_toe_base* + |-- waist_yaw -- waist_roll -- waist_pitch + |-- left_shoulder_pitch -- left_shoulder_roll -- left_shoulder_yaw -- left_elbow + | \-- left_wrist_roll -- left_wrist_pitch -- left_wrist_yaw -- left_hand_roll + |-- right_shoulder_pitch -- right_shoulder_roll -- right_shoulder_yaw -- right_elbow + \-- right_wrist_roll -- right_wrist_pitch -- right_wrist_yaw -- right_hand_roll +``` + +*Dummy toe joints (not actuated on the real robot). + +### MuJoCo Joint Mapping + +The MuJoCo model has 29 hinge joints (excluding the free-floating root and toe joints). The output qpos vector is 36-dimensional: + +| Indices | Content | +|---------|---------| +| 0-2 | Root translation (x, y, z) | +| 3-6 | Root quaternion (w, x, y, z) | +| 7-35 | 29 joint angles (1 DOF per hinge joint) | + +The `mujoco_qpos_converter` class handles the mapping between the 34-joint motion representation and the 29-DOF MuJoCo model, including coordinate system transformation (motion space: Y-up, Z-forward; MuJoCo space: Z-up, X-forward). + +## Coordinate Systems + +| Space | Up | Forward | Handedness | +|-------|-----|---------|------------| +| Motion | Y | Z | Right-handed | +| MuJoCo | Z | X | Right-handed | + +The coordinate transformation between the two: +- Motion X = MuJoCo Y +- Motion Y = MuJoCo Z +- Motion Z = MuJoCo X + +## Normalization + +All features are z-score normalized before being fed to models: + +``` +normalized = (feature - mean) / sqrt(std^2 + eps) +``` + +where `eps = 1e-5` for numerical stability. The `mean.npy` and `std.npy` files are computed per-dimension over the training dataset and stored alongside each model checkpoint in the `stats/motion/` directory. + +## Feature Computation Pipeline + +MotionBricks does **not** apply a fixed heading canonicalization to its features. Instead, each motion segment is placed at the origin with a heading that is *randomly rotated* at training time and *explicitly chosen by the caller* at inference time. This way the model sees motion in all orientations, so there is nothing to gain from pre-canonicalizing to a fixed frame. + +The pipeline, mirroring the order in `compute_motion_features` in `motionlib/core/motion_reps/tools/motion_features.py`, is: + +``` +Raw motion (local / global joint rotations + root translation) + │ + ▼ +Compute ROOT features (compute_heading_info + compute_heading_features): + • Global root: (root XYZ, heading cos/sin) + • Local root : (XZ linear velocity, Y angular velocity, root height) + │ + ▼ +Compute BODY features in the WORLD frame (compute_position_features): + • ric_data (world joint positions − per-frame root XZ) + • local_vel (world-frame finite-difference velocity) + • foot_contacts (from position/velocity thresholds) + • global_rot_data (world-frame 6D rotations) + │ + ▼ +Concatenate per frame → [T, 418]; obtain normalization stats (z-score) + │ + ▼ +The data loader returns the NORMALIZED GLOBAL rep [T, 414]. + │ + ▼ +At training / inference time, for each motion segment: + 1. Call `change_first_heading(..., first_heading_angle)` + - TRAINING: first_heading_angle ~ Uniform(0, 2π) → random heading + - INFERENCE: first_heading_angle = 0 → deterministic + Effect: rotates every frame so that the first frame faces the target + heading, AND places the first frame's root XZ at the origin + (Y / root height is preserved). + 2. If feeding the pose / tokenizer module: convert to LOCAL via + `dual_rep.global_to_local(...)` (lossless; invertible via `local_to_global`). +``` + +The inverse pipeline (used at inference time) converts features back to joint positions and rotations, which are then mapped to MuJoCo qpos via the `mujoco_qpos_converter`. diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/__init__.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/data/__init__.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/data/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/data/synthetic_dataset.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/data/synthetic_dataset.py new file mode 100644 index 0000000000000000000000000000000000000000..45c6cdac0516e8c2ca6e273d1eb54173b0ee3b14 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/data/synthetic_dataset.py @@ -0,0 +1,78 @@ +import random +from typing import List, Dict, Optional, Tuple + +import torch +from torch import Tensor +from torch.utils.data import Dataset + + +class SyntheticMotionDataset(Dataset): + """Synthetic motion dataset for training without the full motion dataset. + + Each sample is a random tensor of shape [T, feat_dim] where T is drawn + uniformly from [min_frames, max_frames] and feat_dim matches the motion + representation dimensionality (e.g. 418 for G1Skeleton34). + """ + + def __init__( + self, + feat_dim: int, + num_samples: int = 1000, + min_frames: int = 80, + max_frames: int = 300, + ): + self.feat_dim = feat_dim + self.num_samples = num_samples + self.lengths = [ + random.randint(min_frames, max_frames) for _ in range(num_samples) + ] + + def __len__(self): + return self.num_samples + + def __getitem__(self, idx): + T = self.lengths[idx] + motion = torch.randn(T, self.feat_dim) + return {"keyid": idx, "motion": motion} + + +def collate_tensors( + tensor_batch: List[Tensor], + size: Optional[int] = None, +) -> Tuple[Tensor, Tensor, Tensor]: + """Pad variable-length tensors to a common length. + + Returns: + - padded motions [B, T, D] + - lengths [B] + - pad_mask [B, T] (True where valid) + """ + rep_dim = tensor_batch[0].shape[1] + max_size = max(mo.shape[0] for mo in tensor_batch) + if size is not None: + assert size >= max_size + max_size = size + + motion_batch = torch.zeros(len(tensor_batch), max_size, rep_dim) + pad_mask = torch.zeros(len(tensor_batch), max_size, dtype=torch.bool) + lengths = [] + for bi, mo in enumerate(tensor_batch): + cur_len = mo.shape[0] + lengths.append(cur_len) + motion_batch[bi, :cur_len] = mo + pad_mask[bi, :cur_len] = True + + len_batch = torch.tensor(lengths) + return motion_batch, len_batch, pad_mask + + +def collate_batch(batch: List[Dict]) -> Dict: + """Collate a batch of motion dicts into padded tensors.""" + motion = [bdict["motion"] for bdict in batch] + motion, motion_len, motion_pad_mask = collate_tensors(motion) + return { + "motion": motion, + "motion_len": motion_len, + "motion_pad_mask": motion_pad_mask, + "batch_size": len(motion), + } diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/exp_setup/__init__.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/exp_setup/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/exp_setup/experiment.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/exp_setup/experiment.py new file mode 100644 index 0000000000000000000000000000000000000000..2ff42642efe98cfd545b61261ee9e3aaf4e0f175 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/exp_setup/experiment.py @@ -0,0 +1,160 @@ +import os +import argparse +from omegaconf import OmegaConf, open_dict +from motionbricks.helper.pl_util import load_motion_rep +from hydra.utils import instantiate +import copy + +DEFAULT_RESULT_DIR = "./out" +LOCAL_RESULT_DIR = ['./out', 'out/'] +COPY_DATASET_TO_LOCAL = False +EXP = [ + "default", +][-1] + +def get_path_dir(exp): + if exp == "default": + vqvae_path = 'motionbricks_vqvae' + vqvae_ckpt = 'model-step=2000000.ckpt' + + pose_model_path = 'motionbricks_pose' + pose_model_ckpt = 'model-step=2000000.ckpt' + + root_model_path = 'motionbricks_root' + root_model_ckpt = 'model-step=2000000.ckpt' + + else: + raise NotImplementedError(f"exp {exp} not implemented.") + + return {'pose_model_path': pose_model_path, 'pose_model_ckpt': pose_model_ckpt, + 'root_model_path': root_model_path, 'root_model_ckpt': root_model_ckpt, + 'vqvae_path': vqvae_path, 'vqvae_ckpt': vqvae_ckpt} + +def test(args: argparse.Namespace = None): + if args is None: + parser = argparse.ArgumentParser(description='model_test') + parser.add_argument("--result_dir", type=str, default=DEFAULT_RESULT_DIR) + parser.add_argument("--data_root", type=str, default="./datasets") + parser.add_argument("--explicit_dataset_folder", type=str, default=None) + parser.add_argument("--EXP", type=str, default=None) + args = parser.parse_args() + + if getattr(args, 'EXP', None) is not None: + exp = args.EXP + else: + exp = EXP + ckpt_info = get_path_dir(exp) + + models, confs = {}, {} + for model_name in ['pose', 'root']: + # hard code the config path for now + model_key = model_name + '_model' + ckpt_dir = f"{args.result_dir}/{ckpt_info[model_key + '_path']}/version_1" + ckpt_path = f"{ckpt_dir}/checkpoints/{ckpt_info[model_key + '_ckpt']}" + config_path = f"{ckpt_dir}/hparams.yaml" + + conf = OmegaConf.load(config_path) + conf.ckpt_path = ckpt_path + + if type(conf.model.args.vqvae_model_ckpt_path) == str: + for prefix in LOCAL_RESULT_DIR: + + if conf.model.args.vqvae_model_ckpt_path.startswith(prefix): + conf.model.args.vqvae_model_ckpt_path = \ + conf.model.args.vqvae_model_ckpt_path.replace(prefix, f"{args.result_dir}/") + conf.model.args.vqvae_model_ckpt_path = os.path.abspath(conf.model.args.vqvae_model_ckpt_path) + + if args.data_root is not None: + conf.data_root = args.data_root + + if getattr(args, 'explicit_dataset_folder', None) is not None: + # save the results in a different folder: "+data.explicit_dataset_folder=YOUR_DEBUG_FOLDER" + conf.data.folder = args.explicit_dataset_folder + + from motionbricks.motionlib.train.utils import get_rank, setup_train_logging + motion_rep = load_motion_rep(conf) + if conf.model.pose_vqvae_network is None and model_name == 'pose': + pose_vqvae_config_path = \ + os.path.abspath(os.path.join(conf.model.args.vqvae_model_ckpt_path, "..", "..", "config.yaml")) + pose_vqvae_config = OmegaConf.load(pose_vqvae_config_path) + pose_network_config = pose_vqvae_config.model.pose_network if 'pose_network' in pose_vqvae_config.model \ + else pose_vqvae_config.model.pose_vqvae_network + conf.model.pose_vqvae_network = copy.deepcopy(pose_network_config) + + if conf.model.pose_vqvae_network is not None: + pose_vqvae_motion_rep = getattr(conf.model, 'pose_vqvae_motion_rep', 'local') + pose_vqvae_motion_rep = motion_rep.dual_rep.local_motion_rep if \ + pose_vqvae_motion_rep == 'local' else motion_rep.dual_rep.global_motion_rep + pose_vqvae_network = instantiate(conf.model.pose_vqvae_network, motion_rep=pose_vqvae_motion_rep) + + # make sure it's the same model expected in config + sanitized_vqvae_model_ckpt_path = conf.model.args.vqvae_model_ckpt_path.replace("\\", '/') # for windows + assert sanitized_vqvae_model_ckpt_path.split("/")[-4] == ckpt_info['vqvae_path'] and \ + sanitized_vqvae_model_ckpt_path.split("/")[-1] == ckpt_info['vqvae_ckpt'], \ + f"vqvae model path {conf.model.args.vqvae_model_ckpt_path} not match with {ckpt_info}" + else: + pose_vqvae_network = None + + # find rank + global_rank = get_rank() + import tempfile + run_dir = tempfile.mkdtemp(prefix="motionbricks_") + conf.out_dir = run_dir + + log = setup_train_logging(run_dir, global_rank) + + assert not conf.resume, "resuming training only valid for training mode. Provide the ckpt path in `def test`." + + import pytorch_lightning as pl + import torch + + pl.seed_everything(conf.seed + max(0, global_rank), workers=True) + + if conf.trainer.accelerator == "gpu": # for tinycudann default memory + torch.cuda.set_device(int(os.environ.get("LOCAL_RANK", "0"))) + + if "matmul_precision" in conf: + torch.set_float32_matmul_precision(conf.matmul_precision) + + # Load the model + log.info("Loading the model") + + # Strip training-only config keys that Hydra would try to instantiate + for key in ['optimizer', 'scheduler']: + if key in conf.model: + with open_dict(conf): + del conf.model[key] + + backbone_network = instantiate(conf.model.backbone_network, motion_rep=motion_rep) + models[model_name] = instantiate(conf.model, pose_vqvae_network=pose_vqvae_network, + backbone_network=backbone_network, motion_rep=motion_rep) + # models[model_name]= instantiate(conf.model) + confs[model_name] = conf + assert models[model_name].vqvae_model_loaded, \ + f"vqvae model not loaded for {model_name} model. Please check the config file." + + log.info("Loading the datasets") + assert global_rank == 0, "This script is only for testing, so only rank 0 is supported." + + # compatibility; probably not needed after the new ckpts + conf.data.augment_text = False + conf.data.use_overview_desc = False + + if hasattr(args, 'return_model_configs') and args.return_model_configs: + if hasattr(args, 'return_dataloader') and args.return_dataloader: + dataset_motion_rep = load_motion_rep(conf) + train_dataset = instantiate(conf.data, split="train", motion_rep=dataset_motion_rep) + train_dataloader = instantiate(conf.dataloader, train_dataset, shuffle=True) + # train_dataset, train_dataloader = None, None + val_dataset = instantiate(conf.data, split="test", motion_rep=dataset_motion_rep) + val_dataloader = instantiate(conf.dataloader, val_dataset, shuffle=False) + return models, confs, train_dataloader, val_dataloader + else: + return models, confs + else: + dataset_motion_rep = load_motion_rep(conf) + train_dataset = instantiate(conf.data, split="train", motion_rep=dataset_motion_rep) + train_dataloader = instantiate(conf.dataloader, train_dataset, shuffle=True) + # train_dataset, train_dataloader = None, None + val_dataset = instantiate(conf.data, split="test", motion_rep=dataset_motion_rep) + val_dataloader = instantiate(conf.dataloader, val_dataset, shuffle=False) diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/geometry/__init__.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/geometry/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/geometry/quaternions.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/geometry/quaternions.py new file mode 100644 index 0000000000000000000000000000000000000000..5be4e41619cb752ff0050e3bdb3916ffa0f6e89c --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/geometry/quaternions.py @@ -0,0 +1,50 @@ +import torch +import torch.nn.functional as F + + +def _sqrt_positive_part(x: torch.Tensor) -> torch.Tensor: + """Returns torch.sqrt(torch.max(0, x)) subgradient is zero where x is 0.""" + return torch.sqrt(x * (x > 0).to(x.dtype)) + +def matrix_to_quaternion(matrix: torch.Tensor) -> torch.Tensor: + """Convert rotations given as rotation matrices to quaternions. + + Args: + matrix: Rotation matrices as tensor of shape (..., 3, 3). + Returns: + quaternions with real part first, as tensor of shape (..., 4). + """ + if matrix.size(-1) != 3 or matrix.size(-2) != 3: + raise ValueError(f"Invalid rotation matrix shape {matrix.shape}.") + + batch_dim = matrix.shape[:-2] + m00, m01, m02, m10, m11, m12, m20, m21, m22 = torch.unbind( + matrix.reshape(batch_dim + (9,)), dim=-1 + ) + + q_abs = _sqrt_positive_part( + torch.stack( + [ + 1.0 + m00 + m11 + m22, + 1.0 + m00 - m11 - m22, + 1.0 - m00 + m11 - m22, + 1.0 - m00 - m11 + m22, + ], + dim=-1, + ) + ) + + quat_by_rijk = torch.stack( + [ + torch.stack([q_abs[..., 0] ** 2, m21 - m12, m02 - m20, m10 - m01], dim=-1), + torch.stack([m21 - m12, q_abs[..., 1] ** 2, m10 + m01, m02 + m20], dim=-1), + torch.stack([m02 - m20, m10 + m01, q_abs[..., 2] ** 2, m12 + m21], dim=-1), + torch.stack([m10 - m01, m20 + m02, m21 + m12, q_abs[..., 3] ** 2], dim=-1), + ], + dim=-2, + ) + + flr = torch.tensor(0.1).to(dtype=q_abs.dtype, device=q_abs.device) + quat_candidates = quat_by_rijk / (2.0 * q_abs[..., None].max(flr)) + + return (F.one_hot(q_abs.argmax(dim=-1), num_classes=4)[..., None] * quat_candidates).sum(dim=-2).reshape(batch_dim + (4,)) diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/helper/__init__.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/helper/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/helper/data_training_util.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/helper/data_training_util.py new file mode 100644 index 0000000000000000000000000000000000000000..74bfc7c0c6eda993a35ba42153088a7e420bf9ca --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/helper/data_training_util.py @@ -0,0 +1,186 @@ +import torch +import torch as t +import numpy as np +from motionbricks.motionlib.core.motion_reps import MotionRepBase + + +def sample_motion_segments_from_motion_clips(motions: t.Tensor, motion_lengths: t.Tensor, + num_desired_frames: int, batchsize_mul_factor_for_segments: int, + info: dict = {}, + motion_rep: MotionRepBase = None): + """ @brief: the dataloader provides motion clips, which are variable length sequences of motion frames. + In training of vqvae and the backbone model, we require fixed length motion segments. + + @param motions: normalized global motion rep, shape [batch_size, max_motion_length, motion_dim] + + @param motion_lengths: length of each motion clip. shape [batch_size], + + @param num_desired_frames: the number of frames in each motion segment. + NOTE: the output motion segment will have (num_desired_frames + 1) frames so that user could decide whether to + use just global motion rep or need to convert global to local later. The convertion loses 1 frame. + + @param batchsize_mul_factor_for_segments: + the number of output motion segments = batch_size * batchsize_mul_factor_for_segments + """ + batch_size = motions.shape[0] + augmented_batch_size = int(batch_size * batchsize_mul_factor_for_segments) + device = motions.device + + valid_samples_id = (motion_lengths >= num_desired_frames + 1) # 1 additional frame for global-local convertion + num_invalid_samples = batch_size - valid_samples_id.sum() + assert num_invalid_samples < batch_size, "all samples are invalid." + num_new_motions = (batchsize_mul_factor_for_segments - 1) * batch_size + num_invalid_samples + p_sample = \ + (motion_lengths - num_desired_frames).clip(min=.0) * valid_samples_id.float() # invalid samples has 0.0 prob + p_sample = p_sample.cpu().numpy().astype("float64") # this is needed otherwise sum!= 1.0 precision error + new_motions_ids = np.random.choice(batch_size, replace=True, + size=num_new_motions.item(), p=(p_sample / p_sample.sum())) + + motions = t.concat([motions[valid_samples_id], motions[new_motions_ids]], dim=0) + info['chosen_ids'] = t.concat([t.where(valid_samples_id)[0], t.from_numpy(new_motions_ids).to(device)], dim=0) + motion_lengths = t.concat([motion_lengths[valid_samples_id], motion_lengths[new_motions_ids]], dim=0) + + m_start_idx = t.randint(low=0, high=31415926, size=[motions.shape[0]]).to(device) # just use a big high value + m_start_idx = m_start_idx % (motion_lengths - (num_desired_frames + 1) + 1) # at least (numFrame+1) frames left + + m_chunk_idx = torch.arange(num_desired_frames + 1).tile([augmented_batch_size, 1]).to(device) + m_start_idx[:, None] + motions = motions.gather(1, m_chunk_idx[:, :, None].tile([1, 1, motions.shape[-1]])) + + return motions + + +def sample_keyframes(motions: t.Tensor, max_num_keyframes: int, prob_num_keyframes: list, bound_keyframes: bool = False): + batch_size, num_frames = motions.shape[0], motions.shape[1] + if bound_keyframes: # only use the first and last frame as the keyframe + chosen_keyframes = t.zeros([batch_size, num_frames], dtype=t.bool).to(motions.device) + chosen_keyframes[:, [0, -1]] = True + masked_motions = motions * chosen_keyframes[:, :, None].float() + else: + assert max_num_keyframes == len(prob_num_keyframes) - 1, "for compatibility we still have max_num_keyframes" + assert num_frames >= max_num_keyframes + + num_keyframes = np.random.choice(np.arange(max_num_keyframes + 1), + p=prob_num_keyframes, size=batch_size, replace=True) + num_keyframes = t.tensor(num_keyframes).to(motions.device).clip(max=num_frames) + + candidates = t.rand_like(motions[:, :, 0]) + chosen_keyframes = candidates.sort()[1] < num_keyframes[:, None] + + masked_motions = motions * chosen_keyframes[:, :, None].float() + + return chosen_keyframes, masked_motions + +def convert_sparse_cond_to_dense_cond_if_needed(cond: t.Tensor, has_cond: t.Tensor, num_max_cond: int): + """ @brief: we could either provide + In the dense case: + cond: [batch_size, numFrames (num_max_cond), feat_dim] + has_cond: [batch_size, numFrames (num_max_cond)] (bool) + In the sparse case (could be potentially more efficient for onnx trt models): + cond: [batch_size, numCondionedFrames, feat_dim] + has_cond: [batch_size, numConditionedFrames] (int) + """ + assert cond.shape[1] == has_cond.shape[1] + batch_size, feat_dim = cond.shape[0], cond.shape[2] + + if has_cond.dtype == t.bool: # the dense case + assert cond.shape[1] == num_max_cond + return cond, has_cond + else: # the sparse case; this is very handy for onnx trt models for minimum data transfer + assert cond.shape[1] <= num_max_cond + + # construct the dense results + has_cond_map = t.nn.functional.one_hot(has_cond, num_classes=num_max_cond) # [batch, numCondF, numF] + dense_has_cond = has_cond_map.sum(dim=1).reshape([batch_size, num_max_cond, 1]).tile([1, 1, feat_dim]).bool() + dense_cond = t.zeros([batch_size, num_max_cond, feat_dim]).to(cond.device, cond.dtype) + dense_cond[dense_has_cond] = cond.view(-1) # they are all in flatten view + return dense_cond, dense_has_cond + +def extract_feature_from_motion_rep(x: t.Tensor | None, + motion_rep: MotionRepBase, feature: str, fetch_feat_idx: bool = False): + """ @brief: extract the corresponding features from the original motion representation + """ + + if feature in ['root_with_mask', 'root_without_heading_with_mask', + 'root_without_hip_height_with_mask', 'root_without_hip_height_without_heading_with_mask']: + # in the end there's a mask bit attached to the feature vector returned + # 1 indicates a reliable feature and 0 indicates a unrealiable feature + if fetch_feat_idx: + raise NotImplementedError("fetch_feat_idx is not supported for with_mask features") + else: + raw_feature = extract_feature_from_motion_rep(x, motion_rep, feature.split("_with_mask")[0]) + mask = t.zeros([x.shape[0], x.shape[1], 1]).to(x.device) + return t.concat([raw_feature, mask], dim=-1) + + elif feature == 'root': + if fetch_feat_idx: + return motion_rep.indices['root'] + else: + return x if x.shape[-1] == len(motion_rep.indices['root']) else x[:, :, motion_rep.indices['root']] + + elif feature == 'root_without_heading': + if motion_rep.root_mode == 'global': + feat_idx = np.concatenate([motion_rep.indices['global_root_pos_2d'], + np.array([i for i in motion_rep.indices['global_root_pos'] + if i not in motion_rep.indices['global_root_pos_2d']])]) + else: + feat_idx = np.concatenate([motion_rep.indices['local_root_vel'], + motion_rep.indices['global_root_y']]) + if fetch_feat_idx: + return feat_idx + else: + return x if x.shape[-1] == len(feat_idx) else x[:, :, feat_idx] + + elif feature == 'root_without_hip_height': + if motion_rep.root_mode == 'global': + feat_idx = np.concatenate([motion_rep.indices['global_root_pos_2d'], + motion_rep.indices['global_root_heading']]) + else: + feat_idx = np.concatenate([motion_rep.indices['local_root_rot_vel'], + motion_rep.indices['local_root_vel']]) + if fetch_feat_idx: + return feat_idx + else: + return x if x.shape[-1] == len(feat_idx) else x[:, :, feat_idx] + + elif feature == 'root_without_hip_height_without_heading': + if motion_rep.root_mode == 'global': + feat_idx = motion_rep.indices['global_root_pos_2d'] + else: + feat_idx = motion_rep.indices['local_root_vel'] + if fetch_feat_idx: + return feat_idx + else: + return x if x.shape[-1] == len(feat_idx) else x[:, :, feat_idx] + + elif feature == 'pose': + if fetch_feat_idx: + return motion_rep.indices['all'] + else: + assert x.shape[-1] == len(motion_rep.indices['all']) + return x + + elif feature == 'joint_positions_and_rotations': + feat_idx = np.concatenate([motion_rep.indices['ric_data'], + motion_rep.indices['global_rot_data']]) + if fetch_feat_idx: + return feat_idx + else: + return x if x.shape[-1] == len(feat_idx) else x[:, :, feat_idx] + + elif feature == 'joint_positions_and_rotations_and_hip_height': + if motion_rep.root_mode == 'global': + feat_idx = np.concatenate([np.array([i for i in motion_rep.indices['global_root_pos'] + if i not in motion_rep.indices['global_root_pos_2d']]), + motion_rep.indices['ric_data'], + motion_rep.indices['global_rot_data']]) + else: + feat_idx = np.concatenate([motion_rep.indices['global_root_y'], + motion_rep.indices['ric_data'], + motion_rep.indices['global_rot_data']]) + if fetch_feat_idx: + return feat_idx + else: + return x if x.shape[-1] == len(feat_idx) else x[:, :, feat_idx] + + else: + raise NotImplementedError diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/helper/mujoco_helper.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/helper/mujoco_helper.py new file mode 100644 index 0000000000000000000000000000000000000000..f3ff6e3d4419aba8cfcc43c149f6174b23db46b9 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/helper/mujoco_helper.py @@ -0,0 +1,456 @@ +import numpy as np +import torch as t +import torch +import torch.nn as nn +import xml.etree.ElementTree as ET +import os +import torch.nn.functional as F +from typing import List +from motionbricks.motionlib.core.motion_reps import MotionRepBase +from motionbricks.motionlib.core.motion_reps.tools.changing_t_pose import get_global_offset +from motionbricks.motionlib.core.utils.rotations import cont6d_to_matrix, quaternion_to_matrix +from motionbricks.motionlib.core.utils.torch_utils import compute_idx_levels +from motionbricks.motionlib.core.skeletons import SkeletonBase + + +# using this matrix_to_quaternion instead of the one in motionbricks.motionlib.core.utils.rotations +# to avoid some tensorrt issues +from motionbricks.geometry.quaternions import matrix_to_quaternion + +# redefining this function in motionbricks.motionlib.core.motion_rep.tools.changing_t_pose as +# tensorrt complains about capital letters in t.einsum() +def global_mats_to_local_mats(global_rot_mats: t.Tensor, skeleton: SkeletonBase): + # obtain back the local rotations from the global rotations + parent_rot_mats = global_rot_mats[..., skeleton.joint_parents, :, :] + parent_rot_mats[..., skeleton.root_idx, :, :] = t.eye(3) # the root joint + local_rot_mats = t.einsum( + "... x n m, ... x n o -> ... x m o", + parent_rot_mats, # taken as the inverse/transpose in einsum + global_rot_mats, + ) + return local_rot_mats + +# this is the same as motionbricks.motionlib.core.utils.torch_utils.transform_mat, but without the __jit_traced__ decorator +# which is not supported by onnx / tensorrt export +def transform_mat(R: t.Tensor, t: t.Tensor): + """Creates a batch of transformation matrices. + + Args: + - R: Bx3x3 array of a batch of rotation matrices + - t: Bx3x1 array of a batch of translation vectors + Returns: + - T: Bx4x4 Transformation matrix + """ + # No padding left or right, only add an extra row + return torch.cat([F.pad(R, [0, 0, 0, 1]), F.pad(t, [0, 0, 0, 1], value=1.0)], dim=2) + +# this is the same as motionbricks.motionlib.core.utils.torch_utils.forward_kinematics, but without the __jit_traced__ decorator +# which is not supported by onnx / tensorrt export +def forward_kinematics( + rot_mats, + joints, + parents: t.Tensor, + idx_levs: List[t.Tensor], + root_idx: int, +): + """Perform forward kinematics to compute posed joints and global rotation matrices. + + Args: + rot_mats: Local rotation matrices for each joint: (B, J, 3, 3) + joints: Initial joint positions: (B, J, 3) + parents: Tensor indicating the parent of each joint: (J,) + idx_levs: List of tensors containing indices for each level in the kinematic tree + root_idx (int): index of the root + Returns: + Posed joints: (B, J, 3) + Global rotation matrices: (B, J, 3, 3) + """ + + # Add an extra dimension to joints + joints = torch.unsqueeze(joints, dim=-1) + + # Compute relative joint positions + rel_joints = joints.clone() + + mask_no_root = torch.ones(joints.shape[1], dtype=torch.bool) + mask_no_root[root_idx] = False + mask_no_root_inds = mask_no_root.nonzero().squeeze().tolist() + rel_joints[:, mask_no_root_inds] -= joints[:, parents[mask_no_root_inds]].clone() + + # Compute initial transformation matrices + # (B, J + 1, 4, 4) + transforms_mat = transform_mat( + rot_mats.reshape(-1, 3, 3), rel_joints.reshape(-1, 3, 1) + ).reshape(-1, joints.shape[1], 4, 4) + + # Initialize the root transformation matrices + transforms = torch.zeros_like(transforms_mat) + transforms[:, root_idx] = transforms_mat[:, root_idx] + + # Compute global transformations level by level + for indices in idx_levs: + curr_res = torch.matmul( + transforms[:, parents[indices]], transforms_mat[:, indices] + ) + transforms[:, indices] = curr_res + + # Extract posed joint positions from the transformation matrices + posed_joints = transforms[:, :, :3, 3] + + # Extract global rotation matrices from the transformation matrices + global_rot_mat = transforms[:, :, :3, :3] + + return posed_joints, global_rot_mat + + +_global_converter = None + +def get_mujoco_converter(motion_rep: MotionRepBase, xml_path: str = "assets/skeletons/g1/g1.xml"): + """Get a cached mujoco converter instance for efficient reuse.""" + global _global_converter + if _global_converter is None: + _global_converter = mujoco_qpos_converter(motion_rep, xml_path) + return _global_converter + + +def motion_feature_to_mujoco_qpos(motion_features: t.Tensor, motion_rep: MotionRepBase, + is_normalized: bool = False, use_fast_converter: bool = True): + """Convert motion features to mujoco qpos format. + + Args: + motion_features: Motion features + motion_rep: MotionRepBase object + is_normalized: Whether input features are normalized + use_fast_converter: Whether to use the optimized converter (recommended) + """ + assert use_fast_converter, "only fast converter is supported for now" + converter = get_mujoco_converter(motion_rep) + qpos = converter.convert_motion_features_to_mujoco_qpos(motion_features, motion_rep, + is_normalized, root_quat_w_first=True) + return qpos +class mujoco_qpos_converter(nn.Module): + """Fast batch converter from motion features to mujoco qpos with precomputed transforms. + + In mujoco, the coordination is z up and x forward, right handed + + features (30 joints): + root (pelvis, 7 = translation + rotation) + 29 dof joints (29) + + The motion feature coordinate system is y up and z forward, right handed + features (34 joints): + root (pelvis) + (34 - 1) joints; among these joints, 4 are end-effector joints. + """ + + def __init__(self, motion_rep: MotionRepBase, xml_path: str = "assets/skeletons/g1/g1.xml", + dead_joint_rotation_scheme: str = "dummy"): + """Initialize converter with precomputed transforms. + + Args: + xml_path: Path to the mujoco XML file containing joint definitions + dead_joint_rotation_scheme: Scheme for handling dead joints (end-effectors joints); + if "dummy", the dead joints's global rotations are set to identity matrix; + if "parent", the dead joints's global rotations are set to the parent's rotation. + """ + super(mujoco_qpos_converter, self).__init__() + self.xml_path = xml_path + self.motion_rep = motion_rep + self._prepare_transforms() + self._subtree_joints = {} + self._dead_joint_rotation_scheme = dead_joint_rotation_scheme + + def _prepare_transforms(self): + """Precompute all necessary transforms for efficient batch processing.""" + # Define coordinate transformations between mujoco and motion space + # 1) R_zup_to_yup: rotation around x-axis by -90 degrees + # 2) x_forward_to_y_forward: rotation around z-axis by -90 degrees + # Combined transformation matrix: mujoco_to_motion = R_zup_to_yup * x_forward_to_y_forward + self.mujoco_to_motion_matrix = t.tensor([[0., 1., 0.], [0., 0., 1.], [1., 0., 0.]], dtype=t.float32) + self.motion_to_mujoco_matrix = self.mujoco_to_motion_matrix.T # Inverse transformation: motion_to_mujoco + + # Parse XML once and extract joint information + tree = ET.parse(self.xml_path) + root = tree.getroot() + + xml_classes = [x for x in tree.findall('.//default') if "class" in x.attrib] + joint_axes = dict() + for xml_class in xml_classes: + j = xml_class.findall("joint") + if j: + joint_axes[xml_class.get("class")] = j[0].get("axis") + + mujoco_hinge_joints = root.find("worldbody").findall(".//joint") # skip the base joint + self._mujoco_joint_axis_values_motion_space = \ + t.zeros((len(mujoco_hinge_joints), 3), dtype=t.float32) # mujoco order but motion space + self._mujoco_joint_axis_values_mujoco_space = \ + t.zeros((len(mujoco_hinge_joints), 3), dtype=t.float32) # mujoco order but mujoco space + + # for the below indices, mujoco_indices_to_motion_indices does not include mujoco root (30 - 1 = 29 elements), + # while motion_indices_to_mujoco_indices includes the motion root (32 elements). + self._mujoco_indices_to_motion_indices = t.zeros((len(mujoco_hinge_joints),), dtype=t.int32) + self._motion_indices_to_mujoco_indices = \ + t.ones((self.motion_rep.skeleton.nbjoints,), dtype=t.int32) * -1 # -1 means not in the mujoco skeleton + + self._nb_joints_mujoco = len(mujoco_hinge_joints) + 1 + self._nb_joints_motion = self.motion_rep.skeleton.nbjoints + self._mujoco_joint_including_root_parent_list = t.full((len(mujoco_hinge_joints) + 1,), -1, dtype=t.int32) + self._mujoco_joint_including_root_list = ['pelvis_skel'] + + for joint_id_in_csv, joint in enumerate(mujoco_hinge_joints): + joint_name_in_skeleton = joint.get("name").replace("_joint", "_skel") + joint_parent_name_in_skeleton = self.motion_rep.skeleton.bone_parents[joint_name_in_skeleton] + + self._mujoco_joint_including_root_list.append(joint_name_in_skeleton) + self._mujoco_joint_including_root_parent_list[joint_id_in_csv + 1] = \ + self._mujoco_joint_including_root_list.index(joint_parent_name_in_skeleton) + + joint_idx_in_skeleton = self.motion_rep.skeleton.bone_order_names.index(joint_name_in_skeleton) + axis_values = [ + float(x) for x in + ( + joint.get("axis") or + joint_axes[joint.get("class")] + ).split(" ") + ] + + # the mapped axis in motion skeleton space is calculated as motion_axis = mujoco_to_motion.apply(axis_values) + # [1, 0, 0] -> [0, 0, 1]; [0, 1, 0] -> [1, 0, 0]; [0, 0, 1] -> [0, 1, 0] + mujoco_joint_axis_mapping_motion_space = \ + [t.tensor([0, 0, 1]), t.tensor([1, 0, 0]), t.tensor([0, 1, 0])][np.argmax(axis_values)] + + self._mujoco_joint_axis_values_motion_space[joint_id_in_csv] = mujoco_joint_axis_mapping_motion_space + self._mujoco_joint_axis_values_mujoco_space[joint_id_in_csv] = t.tensor(axis_values) + + self._mujoco_indices_to_motion_indices[joint_id_in_csv] = joint_idx_in_skeleton + self._motion_indices_to_mujoco_indices[joint_idx_in_skeleton] = joint_id_in_csv + 1 # +1 for the root + self._motion_indices_to_mujoco_indices[0] = 0 # the root joint mapping + + # load the offset matrices from the xml + from scipy.spatial.transform import Rotation + + R_zup_to_yup = Rotation.from_euler("x", -90, degrees=True) + x_forward_to_y_forward = Rotation.from_euler("z", -90, degrees=True) + mujoco_to_motion = R_zup_to_yup * x_forward_to_y_forward + + + self._rot_offsets_q2t = t.zeros(len(self._motion_indices_to_mujoco_indices), 3, 3, dtype=t.float32) + self._rot_offsets_q2t[...] = t.eye(3)[None] + + self._rot_offsets_f2q = t.zeros(len(self._motion_indices_to_mujoco_indices), 3, 3, dtype=t.float32) + self._rot_offsets_f2q[...] = t.eye(3)[None] + parent_map = {child: parent for parent in root.iter() for child in parent} + for i, joint in enumerate(mujoco_hinge_joints): + body = parent_map[joint] + if "quat" in body.attrib: + rot = Rotation.from_quat( + [float(x) for x in body.get("quat").strip().split(" ")], + scalar_first=True + ) + idx = self._mujoco_indices_to_motion_indices[i] + self._rot_offsets_q2t[idx] = torch.from_numpy(rot.as_matrix()) + rot = mujoco_to_motion * rot * mujoco_to_motion.inv() + self._rot_offsets_f2q[idx] = torch.from_numpy(rot.as_matrix().T) + + self._capture_neutral_joints_mujoco = t.zeros(len(self._mujoco_indices_to_motion_indices) + 1, 3, dtype=t.float32) + for i, joint in enumerate(mujoco_hinge_joints): + body = parent_map[joint] + pos = body.get("pos") + if pos is not None: + self._capture_neutral_joints_mujoco[i+1] = t.tensor([float(x) for x in pos.strip().split(" ")]) + + self._mujoco_joint_idx_levs = compute_idx_levels(self._mujoco_joint_including_root_parent_list) + for indices in self._mujoco_joint_idx_levs: + self._capture_neutral_joints_mujoco[indices] += self._capture_neutral_joints_mujoco[self._mujoco_joint_including_root_parent_list[indices]] + + + def convert_motion_features_to_mujoco_qpos(self, motion_features: t.Tensor, motion_rep: MotionRepBase, + is_normalized: bool = True, root_quat_w_first: bool = False) -> t.Tensor: + """Fast batch conversion from motion features to mujoco qpos format. + + Args: + motion_features: [batch, numFrames, motion_dim] Motion features + motion_rep: MotionRepBase object for the motion representation + is_normalized: Whether the input features are normalized + + Returns: + torch.Tensor of shape [batch, numFrames, 36] containing mujoco qpos data: + - root_trans (3) + root_quat (4) + joint_dofs (29) = 36 columns + """ + # Get joint output from motion representation + batch_size, num_frames, nb_joints = motion_features.shape[0], motion_features.shape[1], motion_rep.skeleton.nbjoints + motion_rep = motion_rep.to(motion_features.device) + if is_normalized: + motion_features = motion_rep.unnormalize(motion_features) + root_translation, root_rot_quat = motion_rep.compute_root_pos_and_rot(motion_features) + + global_joints_ric_rot = motion_rep.slice(motion_features, "global_rot_data") + global_rot = cont6d_to_matrix(global_joints_ric_rot.view([batch_size, num_frames, nb_joints, 6])) + + local_joint_rot = global_mats_to_local_mats(global_rot, motion_rep.skeleton) + local_joint_rot = t.matmul(self._rot_offsets_f2q.to(motion_features.device), local_joint_rot) + + batch_size, num_frames = root_translation.shape[0], root_translation.shape[1] + device, dtype = root_translation.device, root_translation.dtype + + # Move precomputed matrices to the same device/dtype + motion_to_mujoco_matrix = self.motion_to_mujoco_matrix.to(device=device, dtype=dtype) + + # Initialize output tensor: [batch, numFrames, 36] + qpos = t.zeros((batch_size, num_frames, 36), dtype=dtype, device=device) + + # Convert root translation: apply coordinate transformation + root_translation_mujoco = t.matmul(motion_to_mujoco_matrix[None, None, ...], + root_translation[..., None]) + qpos[:, :, :3] = root_translation_mujoco.view(batch_size, num_frames, 3) + + # Convert root rotation: apply coordinate transformation to rotation matrix + root_rot = local_joint_rot[:, :, 0, :] # [batch, numFrames, 3, 3] + + # Apply coordinate transformation: R_mujoco = motion_to_mujoco * R_motion * motion_to_mujoco^T + mujoco_to_motion_matrix = motion_to_mujoco_matrix.T + root_rot_mujoco = t.matmul(t.matmul(motion_to_mujoco_matrix[None, None, ...], root_rot), + mujoco_to_motion_matrix[None, None, ...]) + root_rot_quat = matrix_to_quaternion(root_rot_mujoco) # [w, x, y, z] + if root_quat_w_first: + qpos[:, :, 3: 7] = root_rot_quat[:, :, [0, 1, 2, 3]] # [w, x, y, z] + else: + qpos[:, :, 3: 7] = root_rot_quat[:, :, [1, 2, 3, 0]] # [w, x, y, z] -> [x, y, z, w] + + # Convert joint DOFs using precomputed mappings + joint_rot_mujoco = \ + local_joint_rot[:, :, self._mujoco_indices_to_motion_indices, :] # mujoco joint order but motion feature space + x_joint_dof = t.atan2(joint_rot_mujoco[..., 2, 1], joint_rot_mujoco[..., 2, 2]) + y_joint_dof = t.atan2(joint_rot_mujoco[..., 0, 2], joint_rot_mujoco[..., 0, 0]) + z_joint_dof = t.atan2(joint_rot_mujoco[..., 1, 0], joint_rot_mujoco[..., 1, 1]) + xyz_joint_dofs = t.stack([x_joint_dof, y_joint_dof, z_joint_dof], dim=-1) + joint_dofs = \ + (xyz_joint_dofs * self._mujoco_joint_axis_values_motion_space[None, None, :, :].to(device)).sum(dim=-1) + qpos[:, :, 7:] = joint_dofs + + return qpos + + def convert_mujoco_qpos_to_mujoco_transforms(self, mujoco_qpos: t.Tensor) -> t.Tensor: + """ @brief: the inverse process of convert_motion_features_to_mujoco_qpos """ + raise NotImplementedError("Not implemented yet") + + def convert_mujoco_qpos_to_motion_transforms(self, mujoco_qpos: t.Tensor) -> t.Tensor: + """ @brief: the inverse process of convert_motion_features_to_mujoco_qpos """ + batch_size, num_frames = mujoco_qpos.shape[:2] + device, dtype = mujoco_qpos.device, mujoco_qpos.dtype + + # the obtain the root (pelvis) information + root_translation_mujoco = mujoco_qpos[:, :, :3] + root_quat_mujoco = mujoco_qpos[:, :, 3: 7] # [w, x, y, z] + root_rotation_mujoco = quaternion_to_matrix(root_quat_mujoco) + + # the joint rotations from dof and rotation axis + dof = mujoco_qpos[:, :, 7:] # batch_size, num_frames=4, joints=30 - 1 (pelvis) = 29 + quaternion_if_x_axis = t.stack([t.cos(dof / 2), t.sin(dof / 2), t.zeros_like(dof), t.zeros_like(dof)], dim=-1) + quaternion_if_y_axis = t.stack([t.cos(dof / 2), t.zeros_like(dof), t.sin(dof / 2), t.zeros_like(dof)], dim=-1) + quaternion_if_z_axis = t.stack([t.cos(dof / 2), t.zeros_like(dof), t.zeros_like(dof), t.sin(dof / 2)], dim=-1) + quaternion_from_xyz_axis = t.stack([quaternion_if_x_axis, quaternion_if_y_axis, quaternion_if_z_axis], + dim=-1) # [batch_size, num_frames, joints, 4 quat, 3 axis] + joint_quaternion = ( + quaternion_from_xyz_axis * + self._mujoco_joint_axis_values_mujoco_space[None, None, :, None, :].to(device) + ).sum(dim=-1) + joint_rotation_matrix = quaternion_to_matrix(joint_quaternion) # [batch_size, num_frames, joints, 3, 3] + joint_rotation_matrix = t.matmul(self._rot_offsets_q2t.to(device)[self._mujoco_indices_to_motion_indices], + joint_rotation_matrix) + + # run FK to compute joint positions + rot_matrices = t.concat([root_rotation_mujoco[:, :, None, :, :], joint_rotation_matrix], dim=2) + rot_matrices = rot_matrices.view(batch_size * num_frames, self._nb_joints_mujoco, 3, 3) + global_joint_positions, global_joint_rotations = forward_kinematics( + rot_matrices, + self._capture_neutral_joints_mujoco.to(device).repeat(batch_size * num_frames, 1, 1), + self._mujoco_joint_including_root_parent_list, self._mujoco_joint_idx_levs, 0 # root index = 0 + ) + global_joint_positions = global_joint_positions.view(batch_size, num_frames, self._nb_joints_mujoco, 3) + global_joint_rotations = global_joint_rotations.view(batch_size, num_frames, self._nb_joints_mujoco, 3, 3) + + global_joint_positions = global_joint_positions + root_translation_mujoco[:, :, None, :] + + # convert to the motion joint transforms + return self.convert_mujoco_transforms_to_motion_transforms(global_joint_positions, global_joint_rotations) + + def convert_mujoco_transforms_to_motion_transforms(self, global_joint_positions_mujoco: t.Tensor, + global_joint_rotations_mujoco: t.Tensor): + """ @brief: + convert the mujoco transforms to motion transforms: + 1. coordinate system conversion, 2. t-pose conversion, 3. populate dead end-effector joints + """ + batch_size, num_frames = global_joint_rotations_mujoco.shape[:2] + device, dtype = global_joint_rotations_mujoco.device, global_joint_rotations_mujoco.dtype + mujoco_to_motion_matrix = self.mujoco_to_motion_matrix.to(device=device, dtype=dtype) + motion_to_mujoco_matrix = self.motion_to_mujoco_matrix.to(device=device, dtype=dtype) + + # coordinate system conversion + global_joint_positions_mujoco = t.matmul(mujoco_to_motion_matrix[None, None, None, ...], + global_joint_positions_mujoco[..., None])[..., 0] # [B, F, J, 3] + global_joint_rotations_mujoco = t.matmul(t.matmul(mujoco_to_motion_matrix[None, None, None, ...], + global_joint_rotations_mujoco), + motion_to_mujoco_matrix[None, None, None, ...]) # [B, F, J, 3, 3] + + # swap the order of the joints + global_joint_rotations_motion = global_joint_rotations_mujoco[:, :, self._motion_indices_to_mujoco_indices, ...] + global_joint_positions_motion = global_joint_positions_mujoco[:, :, self._motion_indices_to_mujoco_indices, ...] + + # populate the dead joints' rotations (`right_hand_roll_skel` and `left_hand_roll_skel` not in the mujoco dof) + # this is assuming the dead joints has 0 relative rotation, which is true for `capture` tpose + is_dead_joints = self._motion_indices_to_mujoco_indices == -1 + is_dead_joints_inds = is_dead_joints.nonzero().squeeze().tolist() + + dead_joints_parent_joints = self.motion_rep.skeleton.joint_parents[t.where(is_dead_joints)[0]] + dead_joints_parent_joints_inds = dead_joints_parent_joints.squeeze().tolist() + + if self._dead_joint_rotation_scheme == "dummy": + # Explicitly expand identity matrix to match target shape for ONNX compatibility + batch_size, num_frames = global_joint_rotations_motion.shape[:2] + num_dead_joints = len(is_dead_joints_inds) + identity_expanded = t.eye(3, device=device, dtype=dtype).expand(batch_size, num_frames, num_dead_joints, 3, 3) + global_joint_rotations_motion[:, :, is_dead_joints_inds, ...] = identity_expanded + elif self._dead_joint_rotation_scheme == "parent": + global_joint_rotations_motion[:, :, is_dead_joints_inds, ...] = \ + global_joint_rotations_motion[:, :, dead_joints_parent_joints_inds, ...] + else: + raise ValueError(f"Invalid dead joint rotation scheme: {self._dead_joint_rotation_scheme}") + + # populate the dead joints's global positions + dead_joint_neutral_positions = \ + self.motion_rep.skeleton.neutral_joints[is_dead_joints_inds][None, None, :, :, None].to(device, dtype) - \ + self.motion_rep.skeleton.neutral_joints[dead_joints_parent_joints_inds][None, None, :, :, None].to(device, dtype) + global_joint_positions_motion[:, :, is_dead_joints_inds, ...] = \ + global_joint_positions_motion[:, :, dead_joints_parent_joints_inds, ...] + \ + t.matmul(global_joint_rotations_motion[:, :, dead_joints_parent_joints_inds, ...], + dead_joint_neutral_positions)[..., 0] + + return global_joint_positions_motion, global_joint_rotations_motion + + @property + def t_pose_translations(self): + return {'standard': self._global_offset_standard, 'capture': self._global_offset_capture} + + @property + def joint_indice_mapping(self): + return {'motion_to_mujoco': self._motion_indices_to_mujoco_indices, 'mujoco_to_motion': self._mujoco_indices_to_motion_indices} + + def get_subtree_joints(self, sub_tree_start_joint: str): + """ @brief: get the indices of the joints starting from the @sub_tree_start_joint """ + + if sub_tree_start_joint in self._subtree_joints: + return self._subtree_joints[sub_tree_start_joint] + + assert sub_tree_start_joint in self.motion_rep.skeleton.bone_order_names, \ + f"sub_tree_start_joint {sub_tree_start_joint} not in the skeleton" + tree_idx = self.motion_rep.skeleton.bone_order_names.index(sub_tree_start_joint) + parents, all_children = self.motion_rep.skeleton.joint_parents, [tree_idx] + while True: + new_children = [i for i, p in enumerate(parents) if p in all_children and i not in all_children] + all_children.extend(new_children) + if not new_children: + break + all_children_mujoco = \ + np.array([i for i in self.joint_indice_mapping['motion_to_mujoco'][all_children] if i != -1]) + self._subtree_joints[sub_tree_start_joint] = all_children_mujoco + + return all_children_mujoco diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/helper/pl_util.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/helper/pl_util.py new file mode 100644 index 0000000000000000000000000000000000000000..9fe817e011a5c319e07da0bad51dfd4737340978 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/helper/pl_util.py @@ -0,0 +1,8 @@ +from omegaconf import DictConfig +from hydra.utils import instantiate + + +def load_motion_rep(conf: DictConfig): + skeleton = instantiate(conf.skeleton) + motion_rep = instantiate(conf.motion_rep, fps=conf.fps, skeleton=skeleton) + return motion_rep diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/__init__.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/demo/__init__.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/demo/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/demo/clips.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/demo/clips.py new file mode 100644 index 0000000000000000000000000000000000000000..d7d6e0c9f2012b54e884f80d3be47f20e10d1509 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/demo/clips.py @@ -0,0 +1,263 @@ +import torch as t +import numpy as np +import mujoco +from scipy.spatial.transform import Rotation as R +from torch.utils.data import DataLoader +import os +from motionbricks.motionlib.core.utils.rotations import angle_to_Y_rotation_matrix, matrix_to_cont6d +from motionbricks.motion_backbone.inference.motion_inference import motion_inference +from motionbricks.helper.mujoco_helper import motion_feature_to_mujoco_qpos +from copy import deepcopy +from motionbricks.helper.data_training_util import extract_feature_from_motion_rep +import time +from motionbricks.helper.mujoco_helper import mujoco_qpos_converter +from typing import Union + +NUM_FRAMES_PER_TOKEN = 4 +time_stamp = time.strftime("%Y%m%d_%H%M%S") + +def get_clip_data(clip_id: Union[str, int], train_dataloader: DataLoader): + """ @brief: get the clip data from the dataloader """ + if type(clip_id) == int: + clip_data = train_dataloader.dataset[clip_id]['motion'] + else: + # get the actual data index from the clip_id + meta_original_path = train_dataloader.dataset.meta['original_path'] + clip_key_id = np.where(meta_original_path.str.endswith("/" + clip_id))[0].item() + clip_data = train_dataloader.dataset.__getitem__(keyid=clip_key_id)['motion'] + + return clip_data + +class clip_holder(t.nn.Module): + """ @brief: hold the clips to use for interactive demo, such as walking clip, running clip, etc. + """ + + def __init__(self, train_dataloader: DataLoader = None, visualize_clips: bool = False, ckpt_path: str = None, + converter: mujoco_qpos_converter = None, reprocess_clips: bool = False, + val_dataloader: DataLoader = None): + super(clip_holder, self).__init__() + self._converter = converter + if ckpt_path is not None and os.path.exists(ckpt_path) and not reprocess_clips: + self._preprocess_clips_from_ckpt(ckpt_path) + elif train_dataloader is not None: + self._preprocess_clips_from_dataloader(train_dataloader, val_dataloader, visualize_clips, ckpt_path) + else: + raise ValueError("Either train_dataloader or ckpt_path must be provided") + self._apply_root_headings_correction() + + def _preprocess_clips_from_ckpt(self, ckpt_path: str): + """ @brief: create and load the tensors according to the keys /shapes in the ckpt. """ + state_dict = t.load(ckpt_path) + # Remap legacy key names + key_remap = {'mfm_feature': 'motion_feature'} + for key, value in state_dict.items(): + key = key_remap.get(key, key) + self.register_buffer(key, value) + + def _preprocess_clips_from_dataloader(self, train_dataloader: DataLoader, val_dataloader: DataLoader, + visualize_clips: bool = False, ckpt_path: str = None): + """ @brief: preprocess the clips from the dataloader: + + 1. figure out which clips are for walking, running, idle + 2. Process them into global motion representation + 3. store into np files and avoid loading them again + """ + train_dataloader.dataset.motion_sampler.max_seconds = 50.0 # no limit for samples + train_dataloader.dataset.motion_sampler = None # disable the sampler now + train_dataloader.dataset.motion_loader.motion_sampler = None # disable the sampler here too + motion_rep = train_dataloader.dataset.motion_rep + num_joints = motion_rep.skeleton.nbjoints + + max_num_frames, DEFAULT_MAX_NUM_FRAMES = 20, 20 + for clip_name, clip_info in self.CLIPS.items(): + clip_id, start_frame, end_frame = clip_info['clip_id'], clip_info['start_frame'], clip_info['end_frame'] + # clip_data = train_dataloader.dataset[clip_id]['motion'][None, start_frame: end_frame] + clip_data = get_clip_data(clip_id, train_dataloader)[None, start_frame: end_frame] + clip_data = motion_rep.change_first_heading(clip_data, 0.0, is_normalized=True, to_normalize=False) + self.CLIPS[clip_name]['motion_feature'] = clip_data.clone()[0] # remove batch dim + + # get the mujoco qpos + device = self.CLIPS[clip_name]['motion_feature'].device + self.CLIPS[clip_name]['mujoco_qpos'] = \ + self._converter.convert_motion_features_to_mujoco_qpos(self.CLIPS[clip_name]['motion_feature'][None], + motion_rep.to(device), False)[0] + root_rot = self.CLIPS[clip_name]['mujoco_qpos'][:, 3: 7].clone() + self.CLIPS[clip_name]['mujoco_qpos'][:, 3: 7] = root_rot[:, [3, 0, 1, 2]] + max_num_frames = max(max_num_frames, self.CLIPS[clip_name]['mujoco_qpos'].shape[0]) + + # for it to be used, only 1) global root information (num_frames, 3), + # 2) global joint positions wrt to root translation (num_frames, num_joints, 3), + # 3) global joint orientation (num_frames, num_joints, 3, 3) + global_joint_positions, global_joint_rotations = \ + self._converter.convert_mujoco_qpos_to_motion_transforms(self.CLIPS[clip_name]['mujoco_qpos'][None]) + self.CLIPS[clip_name]['global_root_positions'] = \ + global_joint_positions[0, :, 0] * t.tensor([[1.0, 0.0, 1.0]]) + self.CLIPS[clip_name]['global_joint_positions'] = \ + global_joint_positions[0] - self.CLIPS[clip_name]['global_root_positions'][:, None, :] + self.CLIPS[clip_name]['global_joint_rotations'] = global_joint_rotations[0] + + # also cache the heading direction + root_direction = t.matmul(self.CLIPS[clip_name]['global_joint_rotations'][:, 0, :, :], + t.tensor([0.0, 0.0, 1.0]).view([1, -1, 1])) # y up and z forward + root_direction = root_direction.view([-1, 3]) * t.tensor([1.0, 0.0, 1.0]).view([1, -1]) + assert (root_direction.norm(dim=1, keepdim=True) > 1e-5).all().item(), \ + f"Clip with ill defined heading found at clip_id {clip_id}" + root_direction = root_direction / t.norm(root_direction, dim=1, keepdim=True) + self.CLIPS[clip_name]['global_headings'] = t.atan2(root_direction[:, 0], root_direction[:, 2]) + + # register the clips as parameters so that it will be later used in onnx / trt model + motion_feature_shape = self.CLIPS[list(self.CLIPS.keys())[0]]['motion_feature'].shape[-1] + for data_buffer_name, feat_shape in zip(['global_root_positions', 'global_joint_positions', + 'global_joint_rotations', 'global_headings', + 'motion_feature', 'mujoco_qpos'], + [[3], [num_joints, 3], [num_joints, 3, 3], [], + [motion_feature_shape], [36]]): + data_buffer = t.zeros([len(self.CLIPS), max_num_frames, *feat_shape]) + num_frames_per_clip = t.zeros([len(self.CLIPS)], dtype=t.int32) + for clip_idx, clip_name in enumerate(self.CLIPS): + clip_length = self.CLIPS[clip_name][data_buffer_name].shape[0] + num_frames_per_clip[clip_idx] = clip_length + data_buffer[clip_idx, :clip_length] = self.CLIPS[clip_name][data_buffer_name] + self.register_buffer(data_buffer_name, data_buffer) + self.register_buffer('num_frames_per_clip', num_frames_per_clip) + t.save(self.state_dict(), ckpt_path) + + def _apply_root_headings_correction(self): + """ @brief: apply the root headings correction to the clips; since cetain root project is ill defined.""" + pass + +class clip_holder_G1(clip_holder): + LOAD_FROM_CLIP_NAME = True + CLIPS = { + "idle": { + "clip_id": 'neutral_idle_loop_001__A076', + "start_frame": 0, "end_frame": 30, 'avg_root_vel': 0.0, + 'allowed_pred_num_tokens': [1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0] + }, + "slow_walk": { + "clip_id": 'neutral_idle_loop_001__A076', + "start_frame": 0, "end_frame": 30, 'avg_root_vel': 0.3 * 2, + 'allowed_pred_num_tokens': [1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0] + }, + "walk": { + "clip_id": 'neutral_idle_loop_001__A076', + "start_frame": 0, "end_frame": 30, 'avg_root_vel': 1.0 * 2, + 'allowed_pred_num_tokens': [1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0] + }, + "hand_crawling": { + "clip_id": "mohak_backward_stop_001__A031", + "start_frame": 0, "end_frame": 30, 'avg_root_vel': 0.5 * 2.0, + 'allowed_pred_num_tokens': [1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0] + }, # crawling + "walk_boxing": { + "clip_id": "shadow_boxing_R_003__A360_M", + "start_frame": 25, "end_frame": 35, 'avg_root_vel': 1.0 * 2.0, + 'allowed_pred_num_tokens': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] + }, + "elbow_crawling": { + "clip_id": "crawl_ff_loop_270_001__A130_M", + "start_frame": 13, "end_frame": 18, 'avg_root_vel': 0.8 * 2.0, + 'allowed_pred_num_tokens': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] + }, # crawling + "stealth_walk": { + "clip_id": "stealth_ff_start_360_001__A125", + "start_frame": 50, "end_frame": 70, 'avg_root_vel': 1.0 * 2, + 'allowed_pred_num_tokens': [1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0]}, + "injured_walk": { + "clip_id": "dancecards1_AB_injured_L_leg_001__A005", + "start_frame": 211, "end_frame": 219, 'avg_root_vel': 0.5 * 2, + 'allowed_pred_num_tokens': [1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0] + }, + "walk_stealth": { + "clip_id": "crouch_ff_loop_180_R_001__A196", + "start_frame": 50, "end_frame": 70, 'avg_root_vel': 0.7 * 2, + 'allowed_pred_num_tokens': [1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0] + }, + "walk_happy_dance": { + "clip_id": "dance_vouge_vogue_sequence_180_R_002__A316", + "start_frame": 30, "end_frame": 50, 'avg_root_vel': 1.0 * 2, + 'allowed_pred_num_tokens': [1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0] + }, + "walk_zombie": { + "clip_id": "zombie_walk_180_R_003__A330", + "start_frame": 10, "end_frame": 100, 'avg_root_vel': 0.6 * 2, + 'allowed_pred_num_tokens': [1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0] + }, + "walk_gun": { + "clip_id": "angry_gun_walk_ff_loop_090_R_001__A393_M", + "start_frame": 10, "end_frame": 100, 'avg_root_vel': 0.6 * 2, + 'allowed_pred_num_tokens': [1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0] + }, + "walk_scared": { + "clip_id": "scared_walk_ff_start_225_R_002__A423", + "start_frame": 10, "end_frame": 100, 'avg_root_vel': 0.6 * 2, + 'allowed_pred_num_tokens': [1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0] + }, + + "walk_left": { + "clip_id": 'dance_sakuras_victory_sway_001__A464', + "start_frame": 35, "end_frame": 40, 'avg_root_vel': 0.2 * 2, + 'allowed_pred_num_tokens': [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0] + }, # for robot deployment safety; can be turned off + "walk_right": { + "clip_id": 'dance_sakuras_victory_sway_001__A464_M', + "start_frame": 35, "end_frame": 40, 'avg_root_vel': 0.2 * 2, + 'allowed_pred_num_tokens': [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0] + }, # for robot deployment safety; can be turned off + } # the actual velocity is 0.5 of the `avg_root_vel` because of the spring model + + DEFAULT_KEYS = { + "idle": "", + "slow_walk": "v", + "walk": "", + "hand_crawling": "z", + "walk_boxing": "x", + "elbow_crawling": "b", + "stealth_walk": "r", + "injured_walk": "t", + "walk_stealth": "c", + "walk_happy_dance": "e", + "walk_zombie": "f", + "walk_gun": "g", + "walk_scared": "q", + "walk_left": "", + "walk_right": "", + } + + def _apply_root_headings_correction(self): + """ @brief: apply the root headings correction to the clips; since certain root projection is ill defined.""" + hand_crawling_id = list(self.CLIPS.keys()).index('hand_crawling') + elbow_crawling_id = list(self.CLIPS.keys()).index('elbow_crawling') + self.global_headings[hand_crawling_id, 0] = 0.0 # the crawling pose's root heading is ill defined + self.global_headings[elbow_crawling_id, :] -= 0.95 # the elbow crawling pose's root heading is ill defined + + def blendspace_modes_remap_from_velocity(self, mode: t.Tensor, + target_movement_direction: t.Tensor, target_heading: t.Tensor): + """ @brief: This is the getto version of 2D blend space + if no velocity, don't swap + if velocity angle > heading angle, positive, swap to the right + if velocity angle < heading angle, negative, swap to the left + + This is helpful for the robot deployment safety, but can be removed as well. + """ + # note target_movement_direction is in mujoco space, but facing_direction was in the motion space; + # thus the atan2 is not the same as the target_heading is calculated + movement_heading = t.atan2(target_movement_direction[:, 0], target_movement_direction[:, 1]) + indices_of_slow_walk = list(self.CLIPS.keys()).index('slow_walk') + indices_of_walk = list(self.CLIPS.keys()).index('walk') + + indices_of_walk_left = list(self.CLIPS.keys()).index('walk_left') + indices_of_walk_right = list(self.CLIPS.keys()).index('walk_right') + + heading_diff = (movement_heading - target_heading + t.pi) % (2 * t.pi) - t.pi # > 0 left, < 0 right + if heading_diff.item() < -1.0 and mode.item() == indices_of_slow_walk: + pass + + going_right = t.logical_and(heading_diff < -t.pi / 4.0, heading_diff > -3 * t.pi / 4.0) + going_left = t.logical_and(heading_diff > t.pi / 4.0, heading_diff < 3 * t.pi / 4.0) + is_slow_walk_or_walk = t.logical_or(mode == indices_of_slow_walk, mode == indices_of_walk) + + mode = mode * t.logical_or(t.logical_and(~going_right, ~going_left), ~is_slow_walk_or_walk) + \ + t.full_like(mode, indices_of_walk_right) * t.logical_and(is_slow_walk_or_walk, going_right) + \ + t.full_like(mode, indices_of_walk_left) * t.logical_and(is_slow_walk_or_walk, going_left) + return mode diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/demo/controllers.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/demo/controllers.py new file mode 100644 index 0000000000000000000000000000000000000000..f8301156aa8684f544a443540ff26a244fed82d6 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/demo/controllers.py @@ -0,0 +1,290 @@ +import torch as t +from motionbricks.motion_backbone.demo.clips import clip_holder_G1 +import mujoco +import numpy as np +from scipy.spatial.transform import Rotation as R +import copy +import platform +if platform.system() == 'Linux' or platform.system() == 'Darwin': + from pynput import keyboard +else: + import keyboard + +class KeyboardHandler: + def __init__(self): + self.listener = keyboard.Listener( + on_press=self.on_press, + on_release=self.on_release) + self.listener.start() + self._pressed_keys = set() + + def on_press(self, key, injected): + """ @brief: track wasd, up left right down, enter, shift, ctrl + """ + if hasattr(key, 'char'): # characters + key_char = key.char + self._pressed_keys.add(key_char) + elif hasattr(key, 'name'): # special keys + key_char = key.name + self._pressed_keys.add(key_char) + + def on_release(self, key, injected): + """ @brief: track wasd, up left right down, enter, shift, ctrl + """ + if hasattr(key, 'char'): # characters + key_char = key.char + if key_char in self._pressed_keys: + self._pressed_keys.remove(key_char) + elif hasattr(key, 'name'): # special keys + key_char = key.name + if key_char in self._pressed_keys: + self._pressed_keys.remove(key_char) + + def get_pressed_keys(self): + return self._pressed_keys.copy() + +class base_controller(object): + """ @brief: this is the base controller class which handles the control. + """ + def __init__(self, clips: str = "G1", min_token: int = 6, max_token: int = 16): + self._prev_qpos: np.ndarray = None + self._FPS = 30 + self._CONTROLLER_DT = 8 / self._FPS # regenerate the results every 8 frames + self._clip_holder_class = clip_holder_G1 + self._min_token = min_token + self._max_token = max_token + + def generate_control_signals(self): + raise NotImplementedError("Subclass must implement this method") + + def get_prev_qpos(self): + return self._prev_qpos.copy() + + def get_controller_dt(self): + return self._CONTROLLER_DT + + def reset(self): + self._prev_qpos = None + + @property + def is_activated(self): + return True # by default, the controller is activated and listening to the keyboard cmds + + @property + def snapshot_keyboard_control(self): + if platform.system() == 'Linux' or platform.system() == 'Darwin': + if not hasattr(self, 'keyboard_handler'): + self.keyboard_handler = KeyboardHandler() + key_pressed = self.keyboard_handler.get_pressed_keys() + candidates = ['w', 'a', 's', 'd', 'left', 'right', 'up', 'down', 'shift', 'ctrl', 'enter', + 'x', 'z', 'c', 'v', 'b', 'r', 't', 'f', 'g', 'q', 'e'] + key_pressed = {key: True if key in key_pressed else False for key in candidates} + else: + # windows / macos + key_pressed = { + # movement direction + "w": keyboard.is_pressed('w'), "a": keyboard.is_pressed('a'), + "s": keyboard.is_pressed('s'), "d": keyboard.is_pressed('d'), + + # heading direction + "left": keyboard.is_pressed('left'), "right": keyboard.is_pressed('right'), + "up": keyboard.is_pressed('up'), "down": keyboard.is_pressed('down'), + + # mode control; zxcvb are the placeholder for different styles of motions + "z": keyboard.is_pressed('z'), + "x": keyboard.is_pressed('x'), + "c": keyboard.is_pressed('c'), + "v": keyboard.is_pressed('v'), + "b": keyboard.is_pressed('b'), + + "r": keyboard.is_pressed('r'), + "t": keyboard.is_pressed('t'), + "f": keyboard.is_pressed('f'), + "g": keyboard.is_pressed('g'), + "q": keyboard.is_pressed('q'), + "e": keyboard.is_pressed('e'), + + # old mode control + "shift": keyboard.is_pressed('shift'), "ctrl": keyboard.is_pressed('ctrl'), + "enter": keyboard.is_pressed('enter'), + } + return key_pressed + + def get_default_allowed_pred_num_tokens(self, mode: str | int): + if type(mode) == int: + assert mode >= 0 and mode < len(list(self._clip_holder_class.CLIPS.keys())), "Invalid mode id" + mode = list(self._clip_holder_class.CLIPS.keys())[mode] + assert mode in list(self._clip_holder_class.CLIPS.keys()), "Invalid mode" + + if self._clip_holder_class.CLIPS[mode].get('allowed_pred_num_tokens', None) is not None: + return t.tensor(self._clip_holder_class.CLIPS[mode]['allowed_pred_num_tokens']).view([1, -1]) + else: + return t.ones(self._max_token - self._min_token + 1, dtype=t.int).view([1, -1]) # default + +class WASD_controller(base_controller): + """ @brief: this is the controller class which handles the WASD control. + + Input: WASD key pressed + Output: target_position, target_heading, which mode the character is in + """ + def __init__(self, lookat_movement_direction: bool = False, clips: str = "G1", **kwargs): + super(WASD_controller, self).__init__(clips, **kwargs) + # if true, the character will look at the keyboard direction; otherwise, it will look at the camera direction + self._LOOKAT_MOVEMENT_DIRECTION = lookat_movement_direction + self._NUM_HISTORY_STEPS = 5 # for the average velocity calculation + self._prev_qpos = None + + def generate_control_signals(self, viewer, mj_model: mujoco.MjModel, mj_data: mujoco.MjData, + visualize: bool = True, control_info: dict = {}): + + if self._prev_qpos is None: + self._prev_qpos = np.zeros((self._NUM_HISTORY_STEPS, mj_model.nq)) + self._prev_qpos[:] = mj_data.qpos.copy().reshape(1, -1) + + key_pressed = self.snapshot_keyboard_control if \ + 'key_pressed' not in control_info or control_info['key_pressed'] is None else control_info['key_pressed'] + + # the control mode + mode = 'walk' if (key_pressed["w"] or key_pressed["a"] or key_pressed["s"] or key_pressed["d"]) else 'idle' + for candidate_mode in [i for i in list(self._clip_holder_class.CLIPS.keys()) if i != 'idle' and i != 'walk']: + mode = candidate_mode \ + if key_pressed.get(self._clip_holder_class.DEFAULT_KEYS[candidate_mode], False) else mode + + # generate the target position & direction here + movement_direction, facing_direction = \ + self._generate_target_position_and_heading(viewer, mj_model, mj_data, key_pressed, mode) + + mode = t.tensor([list(self._clip_holder_class.CLIPS.keys()).index(mode)]) + + # post update the previous qpos + self._prev_qpos = np.concatenate((self._prev_qpos[1:], mj_data.qpos.copy().reshape(1, -1)), axis=0) + control_signals = { + "movement_direction": t.from_numpy(movement_direction).view([1, -1]), + "facing_direction": t.from_numpy(facing_direction).view([1, -1]), + "mode": mode.view([1, -1]) + } + control_signals['allowed_pred_num_tokens'] = self.get_default_allowed_pred_num_tokens(mode.item()) + return control_signals + + def _generate_target_position_and_heading(self, viewer, mj_model: mujoco.MjModel, + mj_data: mujoco.MjData, key_pressed: dict, mode: str): + # get the current camera's lookat position and camera position; use the two position to decide where to go + lookat_position = viewer.cam.lookat + + cam_distance = viewer.cam.distance + cam_azimuth = -np.radians(viewer.cam.azimuth) - np.pi / 2.0 + cam_elevation = -1 * np.radians(viewer.cam.elevation) # negative elevation means looking down + + # Compute actual camera position + cam_pos = lookat_position + cam_distance * np.array([ + np.cos(cam_elevation) * np.sin(cam_azimuth), + np.cos(cam_elevation) * np.cos(cam_azimuth), + np.sin(cam_elevation) + ]) + + # the camera direction + camera_direction = (lookat_position - cam_pos) * np.array([1.0, 1.0, 0.0]) + camera_direction = camera_direction / np.linalg.norm(camera_direction) + + if mode != 'idle': + # get the control's relative direction + controller_relative_direction = \ + np.array([1.0, 0.0, 0.0]) * key_pressed["w"] + np.array([-1.0, 0.0, 0.0]) * key_pressed["s"] + \ + np.array([0.0, -1.0, 0.0]) * key_pressed["d"] + np.array([0.0, 1.0, 0.0]) * key_pressed["a"] + controller_relative_direction = \ + controller_relative_direction / (np.linalg.norm(controller_relative_direction) + 1e-5) + + z_axis_camera_angle = np.arctan2(camera_direction[1], camera_direction[0]) + controller_relative_direction_angle = \ + np.arctan2(controller_relative_direction[1], controller_relative_direction[0]) + + abs_heading_angle = z_axis_camera_angle + controller_relative_direction_angle + movement_direction = np.array([np.cos(abs_heading_angle), np.sin(abs_heading_angle), 0.0]) + + if self._LOOKAT_MOVEMENT_DIRECTION: + facing_direction = movement_direction + else: + facing_direction = camera_direction + + else: # idle states + # if idle, continue the current velocity and heading + qvel = (self._prev_qpos[1:, :3] - self._prev_qpos[:-1, :3]).mean(axis=0) * \ + np.array([1.0, 1.0, 0.0]) / mj_model.opt.timestep + movement_direction = qvel / (np.linalg.norm(qvel) + 1e-5) # if qvel small; no movements + facing_direction = \ + R.from_quat(self._prev_qpos[-1, 3: 7], scalar_first=True).apply(np.array([1.0, 0.0, 0.0])) * \ + np.array([1.0, 1.0, 0.0]) + facing_direction = facing_direction / (np.linalg.norm(facing_direction) + 1e-5) + + return movement_direction, facing_direction + +class random_controller(base_controller): + """ @brief: randomly generate the control signals. + """ + def __init__(self, disable_running: bool = True, lookat_movement_direction: bool = False, + new_control_dt: float = 2.0, + max_angle_change_between_controls: float = 0.5 * np.pi, + clips: str = "G1", **kwargs): + super(random_controller, self).__init__(clips, **kwargs) + self._prev_qpos = None + self._NUM_HISTORY_STEPS = 5 # for the average velocity calculation + self._NEW_CONTROL_DT = new_control_dt # swap the control every `new_control_dt` seconds (2.0s by default) + self._time_since_prev_control = 0.0 + self._control = None + self._disable_running = disable_running # disable running + self._max_angle_change_between_controls = max_angle_change_between_controls + self._LOOKAT_MOVEMENT_DIRECTION = lookat_movement_direction + + def generate_control_signals(self, viewer, mj_model: mujoco.MjModel, mj_data: mujoco.MjData, + visualize: bool = True, control_info: dict = None): + + if self._prev_qpos is None: + self._prev_qpos = np.zeros((self._NUM_HISTORY_STEPS, mj_model.nq)) + self._prev_qpos[:] = mj_data.qpos.copy().reshape(1, -1) + + self._time_since_prev_control += mj_model.opt.timestep + + if self._time_since_prev_control < self._NEW_CONTROL_DT and self._control is not None: + self._prev_qpos = np.concatenate((self._prev_qpos[1:], mj_data.qpos.copy().reshape(1, -1)), axis=0) + return copy.deepcopy(self._control) + else: + self._time_since_prev_control = 0.0 # generate new control + + # the control mode + candidates = [i for i in list(self._clip_holder_class.CLIPS.keys()) if + not ((i == 'run' or i == 'sprint') and self._disable_running)] + if self._control is not None and self._control["mode"].item() == \ + list(self._clip_holder_class.CLIPS.keys()).index('idle'): + candidates.remove("idle") # no idles after idles + else: + candidates.remove("idle") # no runs after runs + if control_info is not None and control_info["force_idle"]: + candidates = ["idle"] + if control_info is not None and control_info["allowed_mode"] is not None: + candidates = [i for i in list(self._clip_holder_class.CLIPS.keys()) if i in control_info["allowed_mode"]] + mode = np.random.choice(candidates, size=1, replace=False) + mode = t.tensor([list(self._clip_holder_class.CLIPS.keys()).index(mode[0])]) + + # generate the target position & direction here + movement_angle, facing_angle = t.rand(1) * 2 * t.pi, t.rand(1) * 2 * t.pi + if self._control is not None: + angle_diff = (t.rand(1) * 2 - 1) * self._max_angle_change_between_controls + facing_angle = self._control["facing_angle"] + angle_diff + facing_angle = facing_angle % (2 * t.pi) + else: + facing_angle = facing_angle * 0.0 # the first run provides the initial global facing angle + movement_direction = t.tensor([t.cos(movement_angle), t.sin(movement_angle), 0.0]) + facing_direction = t.tensor([t.cos(facing_angle), t.sin(facing_angle), 0.0]) + + if self._LOOKAT_MOVEMENT_DIRECTION: + # facing_direction = movement_direction + movement_direction = facing_direction + + # post update the previous qpos + self._prev_qpos = np.concatenate((self._prev_qpos[1:], mj_data.qpos.copy().reshape(1, -1)), axis=0) + self._control = {"movement_direction": movement_direction.view([1, -1]), + "facing_direction": facing_direction.view([1, -1]), "mode": mode.view([1, -1]), + "movement_angle": movement_angle, "facing_angle": facing_angle} + self._control['allowed_pred_num_tokens'] = self.get_default_allowed_pred_num_tokens(mode.item()) + return copy.deepcopy(self._control) + diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/demo/full_agent.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/demo/full_agent.py new file mode 100644 index 0000000000000000000000000000000000000000..3e3b074ab9f413b32ea3b5f410b168d233621385 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/demo/full_agent.py @@ -0,0 +1,596 @@ +from motionbricks.motion_backbone.inference.motion_inference import motion_inference +from copy import deepcopy +import torch as t +from torch.utils.data import DataLoader +from motionbricks.motion_backbone.demo.clips import clip_holder_G1 +from motionbricks.helper.mujoco_helper import get_mujoco_converter +import time +from scipy.spatial.transform import Rotation as R +from motionbricks.motionlib.core.utils.rotations import angle_to_Y_rotation_matrix, matrix_to_cont6d, quat_apply, quat_mul +from motionbricks.motionlib.core.utils.rotations import quaternion_to_matrix + +# using this matrix_to_quaternion instead of the one in motionbricks.motionlib.core.utils.rotations +# to avoid some tensorrt issues +from motionbricks.geometry.quaternions import matrix_to_quaternion + +import os + +def angle_to_Z_rotation_matrix(angle): + """Create rotation matrix around Z-axis for Z-up coordinate system""" + cos, sin = t.cos(angle), t.sin(angle) + one, zero = t.ones_like(angle), t.zeros_like(angle) + # Z-axis rotation matrix: + # [cos(θ) -sin(θ) 0] + # [sin(θ) cos(θ) 0] + # [ 0 0 1] + mat = t.stack((cos, -sin, zero, sin, cos, zero, zero, zero, one), -1) + mat = mat.reshape(angle.shape + (3, 3)) + return mat + +class full_navigation_agent(t.nn.Module): + """ @brief: this is the agent class which handles everything. + """ + DEFAULT_PLANING_HORIZON = 1.0 # 1 second + NUM_FRAMES_PER_TOKEN = 4 + DEFAULT_PRED_OFFSETS = 4 + + def __init__(self, inferencer: motion_inference, train_dataloader: DataLoader, device: str = 'cuda', + speed_scale: list[float] = [1.0, 1.0], target_root_realignment: bool = True, + source_root_realignment: bool = True, + pred_offsets: int = DEFAULT_PRED_OFFSETS, + skeleton_xml: str = "assets/skeletons/g1/g1.xml", + filter_qpos: bool = True, + force_canonicalization: bool = True, clips: str = "G1", + bypass_spring_model: bool = False, + skip_ending_target_cond: bool = True, + ckpt_path: str = None, + reprocess_clips: bool = False, + val_dataloader: DataLoader = None, + use_spring_root_instead: bool = False): + super(full_navigation_agent, self).__init__() + self._inferencer = inferencer.eval().to(device) + self._motion_rep = deepcopy(inferencer.motion_rep).to(device) # make a copy to avoid gpu cpu transfer + self._converter = get_mujoco_converter(self._motion_rep, skeleton_xml).to(device) + self._clip_holder = clip_holder_G1(train_dataloader=train_dataloader, ckpt_path=ckpt_path, + converter=self._converter, reprocess_clips=reprocess_clips, + val_dataloader=val_dataloader) + self._train_dataloader = train_dataloader + self._device = device + self._fps = self._motion_rep.fps + self._target_root_realignment = target_root_realignment + self._source_root_realignment = source_root_realignment + + self.PRED_OFFSETS = pred_offsets + self.FILTER_QPOS = filter_qpos + self.FORCE_CANONICALIZATION = force_canonicalization + self.BYPASS_SPRING_MODEL = bypass_spring_model + self.SKIP_ENDING_TARGET_COND = skip_ending_target_cond + + self.frames = { + # model features are the output from the model inference. The actual inference runs here + "model_features": None, # [batch_size, num_frames, feature_dim (390)] + + # qpos feature is the feature understood by the mujoco simulator + "mujoco_qpos": None, # [batch_size, num_frames, 32] + "mode": None, + } + self._speed_scale_min, self._speed_scale_max = speed_scale # in case you want to perturb the speed + self._initialize_frames() + self._has_prebaked_inference_engine = False + + def set_prebaked_inference_engine(self): + raise NotImplementedError("Prebaked inference engine is not implemented yet") + + def reset(self): + self._current_frame_idx = 0 + self._initialize_frames() + + def _initialize_frames(self): + + # the initial frames + self._current_frame_idx = 0 + # self.frames['model_features'] = self._clip_holder.CLIPS['idle']['motion_feature'] # unnormalized, [batch, F, D=390] + # fetch the motion features for the idle clip + self.frames['model_features'] = self._clip_holder.motion_feature[0, :self._clip_holder.num_frames_per_clip[0]][None] + + self.frames['mujoco_qpos'] = self._converter.convert_motion_features_to_mujoco_qpos( + self.frames['model_features'], self._motion_rep.to(self.frames['model_features'].device), False + ) + root_rot = self.frames['mujoco_qpos'][:, :, 3: 7].clone() + self.frames['mujoco_qpos'][:, :, 3: 7] = root_rot[:, :, [3, 0, 1, 2]] + NUM_MIN_FRAMES_IN_BUFFER = 64 + if self.frames['mujoco_qpos'].shape[1] < NUM_MIN_FRAMES_IN_BUFFER: + self.frames['mujoco_qpos'] = t.cat( + [self.frames['mujoco_qpos'], + self.frames['mujoco_qpos'][:, -1:].repeat(1, NUM_MIN_FRAMES_IN_BUFFER - + self.frames['mujoco_qpos'].shape[1], 1)], dim=1 + ) + + def generate_new_frames(self, input: dict, controller_dt: float = 0.25, force_generation: bool = False): + """ @brief: call the model inference to generate the new frames. + + input: + context_global_joint_positions: [batch_size, num_frames = 4, num_joints (including root), 3] + context_global_joint_rotations: [batch_size, num_frames = 4, num_joints (including root), 3, 3] + + mode: [batch] int which corresponds to ['walk', 'run', 'idle', 'slow_walk'] + + movement_direction: [batch_size, 3] in mujoco coordinate system (global) + facing_direction: [batch_size, 3] in mujoco coordinate system (global) + + """ + if not force_generation: + if self._current_frame_idx < controller_dt * self._fps and \ + self._current_frame_idx < self.frames['mujoco_qpos'].shape[1] - 1: # replan frequency + return self.frames['model_features'], self.frames['mujoco_qpos'] + + if not self._should_regenerate(input): + return self.frames['model_features'], self.frames['mujoco_qpos'] + + self._prev_input = input.copy() + if 'specific_target_positions' in input and 'has_specific_target' not in input: + input['has_specific_target'] = t.tensor([[True]]).int() # compatibility if not provided + input = {i: input[i].to(self._device) for i in input if i} + + if self._has_prebaked_inference_engine: + raise NotImplementedError("Prebaked inference engine is not implemented yet") + else: + + input['context_global_joint_positions'], input['context_global_joint_rotations'] = \ + self._process_input_to_joint_transforms(input) + + # use the spring model to generate the realistic target global root position and heading + input['target_root_position'], input['target_root_positions'], \ + input['target_root_headings'], input['target_root_heading'], \ + input['start_root_positions'], input['start_root_headings'] = \ + self._generate_spring_model_position_and_heading(input) + + if 'has_specific_target' in input and self.BYPASS_SPRING_MODEL: + self._override_target_transforms(input) + + # construct the target joint transforms for the model inference + input['target_global_joint_positions'], input['target_global_joint_rotations'], \ + input['target_global_root_positions'] = self._generate_target_joint_transforms(input) + + # the inference + model_features, mujoco_qpos, num_pred_frames = self._generate_inbetween_frames(input) + + self.frames['mode'] = input['mode'] + + self.frames['mujoco_qpos_notrunc'] = mujoco_qpos + + # truncate the frames; if using onnx model in C++, you should also manually truncate the frames + self.frames['model_features'] = model_features[:, :num_pred_frames.item(), :] + self.frames['mujoco_qpos'] = mujoco_qpos[:, :num_pred_frames.item(), :] + + return self.frames['mujoco_qpos'], num_pred_frames + + def _process_input_to_joint_transforms(self, input: dict): + """ @brief: process the input to joint transforms + """ + if 'context_mujoco_qpos' in input: # should always use this if possible + if self.FORCE_CANONICALIZATION: + self._canonicalize_mujoco_qpos(input) + else: + input['raw_context_mujoco_qpos'] = input['context_mujoco_qpos'].clone() + + context_global_joint_positions, context_global_joint_rotations = \ + self._converter.convert_mujoco_qpos_to_motion_transforms(input['context_mujoco_qpos']) + elif 'context_global_joint_positions' in input and 'context_global_joint_rotations' in input: + # this is the expected input for onnx / trt model + assert not self.FORCE_CANONICALIZATION, "not implemented yet." + context_global_joint_positions = input['context_global_joint_positions'] + context_global_joint_rotations = input['context_global_joint_rotations'] + elif 'context_motion_features' in input: + assert not self.FORCE_CANONICALIZATION, "not implemented yet." + output_results = self._motion_rep.inverse(input['context_motion_features'], + is_normalized=False, return_quat=False, return_all=False) + context_global_joint_positions, context_global_joint_rotations = \ + output_results['posed_joints'], output_results['global_joint_rots'] # [batch, numF, numJ, ...] + else: + raise ValueError("Invalid input: context_global_joint_positions or motion_features not found") + + return context_global_joint_positions, context_global_joint_rotations + + def _generate_spring_model_position_and_heading(self, input: dict): + """ @brief: do the critical damping spring model for the position and heading + """ + batch_size, device = input['context_global_joint_positions'].shape[0], input['mode'].device + + # default parameters and helper functions for the spring model + ln2, eps = 0.69314718056, 1e-5 + def fast_neg_exp_func(x): + return 1.0 / (1.0 + x + 0.48 * x * x + 0.235 * x * x *x) + + # generate position from the spring model + root_joint_idx = 0 + curr_root_pos = input['context_global_joint_positions'][:, 0, root_joint_idx, [0, 2]] + curr_root_vel = (input['context_global_joint_positions'][:, 1, root_joint_idx, [0, 2]] - + input['context_global_joint_positions'][:, 0, root_joint_idx, [0, 2]]) * self._fps + + input['mode'] = t.min(input['mode'], + t.tensor([len(self._clip_holder.CLIPS) - 1]).to(device).int()) # safety check + + translation_movement_in_1s = (input['mode'] == 0) * curr_root_vel.norm(dim=-1, keepdim=False) / 2.0 + for i in range(1, len(self._clip_holder.CLIPS)): + translation_movement_in_1s += (input['mode'] == i) * \ + self._clip_holder.CLIPS[list(self._clip_holder.CLIPS.keys())[i]]['avg_root_vel'] + + # add perturbation to the speed + random_seed = input.get('random_seed', t.randint(0, 10000, (1,))).to(self._device) # map this to float + random_ratio = (random_seed.float() % 100) / 100.0 # [0, 1] + translation_movement_in_1s *= \ + (random_ratio * (self._speed_scale_max - self._speed_scale_min) + self._speed_scale_min) + translation_movement_in_1s = (translation_movement_in_1s > 0.1).float() * translation_movement_in_1s + + # enforce the target velocity + target_vel = (input['mode'] != 0) * \ + input.get('target_vel', -1.0) * 2.0 # 2.0 since the actual speed is usually 0.5 of the target speed + if type(target_vel) == t.Tensor: + target_vel = target_vel.view([batch_size, 1]) # a float tensor + translation_movement_in_1s = (target_vel <= 0.0) * translation_movement_in_1s + \ + (target_vel > 0.0) * target_vel + target_movement_direction = input['movement_direction'][:, [1, 0]] + + # movement for inplace turning + target_movement_direction = (target_movement_direction.norm(dim=-1, keepdim=False) > 1e-5) * \ + target_movement_direction + (target_movement_direction.norm(dim=-1, keepdim=False) <= 1e-5) * \ + input['facing_direction'][:, [1, 0]] * 0.1 + target_root_pos = curr_root_pos + translation_movement_in_1s * target_movement_direction + + if 'specific_target_positions' in input: + has_specific_target = input['has_specific_target'] + target_root_pos = target_root_pos * (1.0 - has_specific_target.float()) + \ + input['specific_target_positions'][:, -1, [1, 0]] * has_specific_target.float() + + y = (4.0 * ln2) / (0.8 + eps) / 2.0 # a typical halflife = 0.4 for the positions; 0.6 for slower changes + dts = t.cat([(t.arange(self.NUM_FRAMES_PER_TOKEN).float() * 1.0 / self._fps).to(self._device), + (1.0 + t.arange(self.NUM_FRAMES_PER_TOKEN).float() * 1.0 / self._fps).to(self._device)], dim=-1) + # dts = t.arange(self.NUM_FRAMES_PER_TOKEN + self._fps).float() * 1.0 / self._fps + dts = dts[None, None, :] # [b, F, DTs] + eydt = fast_neg_exp_func(y * dts) + j0 = curr_root_pos - target_root_pos + j1 = curr_root_vel + j0 * y + root_positions = (j0[:, :, None] + j1[:, :, None] * dts) * eydt + target_root_pos[:, :, None] + start_root_positions = root_positions[:, :, :self.NUM_FRAMES_PER_TOKEN] + target_root_positions = root_positions[:, :, -self.NUM_FRAMES_PER_TOKEN:] + + target_root_positions = (input['mode'][..., None] == 0) * target_root_positions[:, :, :1] + \ + (input['mode'][..., None] != 0) * target_root_positions + target_root_position = target_root_positions[:, :, 0] + + # generate heading from the spring model + curr_heading = t.atan2(input['context_global_joint_rotations'][:, 0, root_joint_idx, 0, 2], + input['context_global_joint_rotations'][:, 0, root_joint_idx, 2, 2]) # y-axis rotation + next_heading = t.atan2(input['context_global_joint_rotations'][:, 1, root_joint_idx, 0, 2], + input['context_global_joint_rotations'][:, 1, root_joint_idx, 2, 2]) + curr_heading_vel = ((next_heading - curr_heading + t.pi) % (2 * t.pi) - t.pi) * self._fps + target_heading = t.atan2(input['facing_direction'][:, 1], input['facing_direction'][:, 0]) # mujoco coordinate + if 'specific_target_headings' in input: + # make it in the range of [-pi, pi] + specific_target_heading = (input['specific_target_headings'][:, -1] + t.pi) % (2 * t.pi) - t.pi + target_heading = specific_target_heading * input['has_specific_target'].view([batch_size]).float() + \ + target_heading * (1.0 - input['has_specific_target'].view([batch_size]).float()) + + target_heading[target_heading.isnan()] = 0.0 + target_heading = target_heading + 2 * t.pi * (curr_heading - target_heading > t.pi) \ + -2 * t.pi * (curr_heading - target_heading < -t.pi) + + # use halflife = 0.17 for the heading + y = (4.0 * ln2) / (0.17 + eps) / 2.0 + # dts = 1.0 + eydt = fast_neg_exp_func(y * dts) + j0 = curr_heading - target_heading + j1 = curr_heading_vel + j0 * y + headings = (j0 + j1 * dts) * eydt + target_heading # [batch, 1, 4] + start_headings = headings[:, :, :self.NUM_FRAMES_PER_TOKEN].view([batch_size, -1]) + target_headings = headings[:, :, -self.NUM_FRAMES_PER_TOKEN:].view([batch_size, -1]) + target_heading = target_headings[:, 0] + + if self.FORCE_CANONICALIZATION: + input['mode'] = self._clip_holder.blendspace_modes_remap_from_velocity( + input['mode'], target_movement_direction, target_heading + ) + + return target_root_position, target_root_positions, target_headings, target_heading, \ + start_root_positions, start_headings + + def _override_target_transforms(self, input: dict): + """ @brief: override the target transforms + """ + if 'specific_target_positions' not in input or 'specific_target_headings' not in input: + return + + # root positions + specific_target_root_positions = input['target_root_positions'].clone() + specific_target_root_positions[:, 0, :] = input['specific_target_positions'][:, :, 1] + specific_target_root_positions[:, 1, :] = input['specific_target_positions'][:, :, 0] + input['target_root_positions'] = \ + specific_target_root_positions * input['has_specific_target'][:, None, :].float() + \ + input['target_root_positions'] * (1.0 - input['has_specific_target'][:, None, :].float()) + input['target_root_position'] = input['target_root_positions'][:, :, 0] + + # root headings + input['target_root_headings'] = \ + input['specific_target_headings'].reshape(input['target_root_headings'].shape) * \ + input['has_specific_target'].float() + \ + input['target_root_headings'] * (1.0 - input['has_specific_target'].float()) + input['target_root_heading'] = input['target_root_headings'][:, 0] + return input + + def _generate_target_joint_transforms(self, input: dict): + """ @brief: generate the target joint transforms + """ + # based on the mode and random seeds, fetch the target poses + NUM_FRAMES_PER_TOKEN, batch_size = self.NUM_FRAMES_PER_TOKEN, input['mode'].shape[0] + random_seed = input.get('random_seed', t.randint(0, 10000, (1,))).to(self._device) + + onehot_mode = t.nn.functional.one_hot(input['mode'].view(-1), len(self._clip_holder.CLIPS)) + num_frames_per_clip = (self._clip_holder.num_frames_per_clip[None] * onehot_mode).sum(dim=1) + frame_idx = random_seed % (num_frames_per_clip - NUM_FRAMES_PER_TOKEN) + + chunks = t.arange(NUM_FRAMES_PER_TOKEN).to(self._device) + frame_idx + + global_root_positions = self._clip_holder.global_root_positions[None,:, chunks] + global_joint_positions = self._clip_holder.global_joint_positions[None,:, chunks] + global_joint_rotations = self._clip_holder.global_joint_rotations[None,:, chunks] + global_headings = self._clip_holder.global_headings[None,:, chunks] + qpos = self._clip_holder.mujoco_qpos[None,:, chunks] + + global_root_positions = (global_root_positions * onehot_mode[:, :, None, None]).sum(dim=1) + global_joint_positions = (global_joint_positions * onehot_mode[:, :, None, None, None]).sum(dim=1) + global_joint_rotations = (global_joint_rotations * onehot_mode[:, :, None, None, None, None]).sum(dim=1) + global_headings = (global_headings * onehot_mode[:, :, None]).sum(dim=1) + qpos = (qpos * onehot_mode[:, :, None, None]).sum(dim=1) + + # rotate the orientation to the target heading + if self._target_root_realignment: + # set the target rotations based on the target headings + + diff_heading = (input['target_root_headings'] - + global_headings + t.pi) % (2 * t.pi) - t.pi # [-pi, pi] + corrective_mat = angle_to_Y_rotation_matrix(diff_heading).float() # [batch, numF, 3, 3] + global_headings = global_headings + diff_heading + global_joint_rotations = t.matmul(corrective_mat[:, :, None], global_joint_rotations) + global_joint_positions = \ + t.matmul(corrective_mat[:, :, None], global_joint_positions[:, :, :, :, None])[..., 0] + + # move the target positions based on the momentum of the spring model + global_root_positions[:, :, [0, 2]] = input['target_root_positions'].transpose(1, 2).float() + else: + + diff_heading = (input['target_root_heading'] - + global_headings[:, 0] + t.pi) % (2 * t.pi) - t.pi # [-pi, pi] + corrective_mat = angle_to_Y_rotation_matrix(diff_heading).float() + global_headings = global_headings + diff_heading + global_joint_rotations = t.matmul(corrective_mat[:, None, None, :, :], global_joint_rotations) + global_joint_positions = \ + t.matmul(corrective_mat[:, None, None, :, :], global_joint_positions[:, :, :, :, None])[..., 0] + + # recenter the target positions and rotate the rest of the root positions + global_root_positions = \ + t.matmul(corrective_mat[: ,None, :, :], global_root_positions[:, :, :, None])[..., 0] + global_root_positions = global_root_positions - global_root_positions[:, :1, :] + global_root_positions[:, :, 0] += input['target_root_position'][:, 0] + global_root_positions[:, :, 2] += input['target_root_position'][:, 1] + + if self._source_root_realignment: + context_headings = t.atan2(input['context_global_joint_rotations'][:, :, 0, 0, 2], + input['context_global_joint_rotations'][:, :, 0, 2, 2]) # y-axis rotation + corrective_mat = angle_to_Y_rotation_matrix(input['start_root_headings'] - context_headings).float() + input['context_global_joint_rotations'] = \ + t.matmul(corrective_mat[:, :, None, :, :], input['context_global_joint_rotations']) + input['context_global_joint_positions'] = \ + t.matmul(corrective_mat[:, :, None, :, :], + input['context_global_joint_positions'][:, :, :, :, None])[..., 0] + input['context_global_joint_positions'][:, :, :, [0, 2]] = \ + input['context_global_joint_positions'][:, :, :, [0, 2]] - \ + input['context_global_joint_positions'][:, :, :1, [0, 2]] + \ + input['start_root_positions'].transpose(1, 2)[:, :, None, :].float() + + return global_joint_positions, global_joint_rotations, global_root_positions + + def _generate_inbetween_frames(self, input: dict): + start_time = time.time() + batch_size, MASKED_NUM_TOKENS = 1, self._inferencer._root_model.backbone_net.MASKED_NUM_TOKENS + fps = self._inferencer.local_motion_rep.fps + root_joint_idx = 0 + + # prepare the values for the context frames + context_global_root_pos = input['context_global_joint_positions'][:, :, root_joint_idx, :] + context_rotation_angle = t.atan2(input['context_global_joint_rotations'][:, :, root_joint_idx, 0, 2], + input['context_global_joint_rotations'][:, :, root_joint_idx, 2, 2]) + context_global_root_values = t.cat([context_global_root_pos, t.cos(context_rotation_angle)[..., None], + t.sin(context_rotation_angle)[..., None]], dim=-1) # [B, numF, 5] + context_local_root_values = \ + t.zeros([batch_size, self.NUM_FRAMES_PER_TOKEN, 4]).to(self._device) # [B, numF, 4] + context_local_root_values[:, :self.NUM_FRAMES_PER_TOKEN - 1, 0] = \ + (((context_rotation_angle[:, 1:] - context_rotation_angle[:, :-1] + t.pi) % (2 * t.pi)) - t.pi) * fps + context_local_root_values[:, :self.NUM_FRAMES_PER_TOKEN - 1, 1: 3] = \ + (context_global_root_pos[:, 1:, [0, 2]] - context_global_root_pos[:, :-1, [0, 2]]) * fps + context_local_root_values[:, :self.NUM_FRAMES_PER_TOKEN - 1, 3] = \ + context_global_root_values[:, :self.NUM_FRAMES_PER_TOKEN - 1, 1] + + context_global_joint_positions = input['context_global_joint_positions'].clone() + joint_positions = context_global_joint_positions[:, :, 1:, :] + joint_positions[..., 0] = \ + context_global_joint_positions[:, :, 1:, 0] - context_global_joint_positions[:, :, :1, 0] + joint_positions[..., 2] = \ + context_global_joint_positions[:, :, 1:, 2] - context_global_joint_positions[:, :, :1, 2] + + joint_rotation_ortho6d = matrix_to_cont6d(input['context_global_joint_rotations']) + context_local_poses = t.cat([joint_positions.view([batch_size, self.NUM_FRAMES_PER_TOKEN, -1]), + joint_rotation_ortho6d.view([batch_size, self.NUM_FRAMES_PER_TOKEN, -1])], dim=-1) + + # prepare the values for the target frames + target_global_root_pos = input['target_global_root_positions'] + \ + input['target_global_joint_positions'][:, :, root_joint_idx, :] + target_rotation_angle = t.atan2(input['target_global_joint_rotations'][:, :, root_joint_idx, 0, 2], + input['target_global_joint_rotations'][:, :, root_joint_idx, 2, 2]) + if 'target_root_headings' in input: + target_rotation_angle = input['target_root_headings'] # avoid double counting AND avoid ill defined angles + target_rotation_angle = target_rotation_angle.float() + + target_global_root_values = t.cat([target_global_root_pos, t.cos(target_rotation_angle)[..., None], + t.sin(target_rotation_angle)[..., None]], dim=-1) # [B, num_frames, 5] + target_local_root_values = t.zeros_like(context_local_root_values).to(self._device) # [b=1, num_frames, 4] + target_local_root_values[:, :self.NUM_FRAMES_PER_TOKEN - 1, 0] = \ + (((target_rotation_angle[:, 1:] - target_rotation_angle[:, :-1] + t.pi) % (2 * t.pi)) - t.pi) * fps + target_local_root_values[:, :self.NUM_FRAMES_PER_TOKEN - 1, 1: 3] = \ + (target_global_root_pos[:, 1:, [0, 2]] - target_global_root_pos[:, :-1, [0, 2]]) * fps + target_local_root_values[:, -1, 0: 3] = target_local_root_values[:, -2, 0: 3] # add the last velocity + target_local_root_values[:, :, 3] = target_global_root_values[:, :, 1] + + joint_positions = input['target_global_joint_positions'][:, :, 1:, :] + joint_rotation_ortho6d = matrix_to_cont6d(input['target_global_joint_rotations']) + target_local_poses = t.cat([joint_positions.view([batch_size, self.NUM_FRAMES_PER_TOKEN, -1]), + joint_rotation_ortho6d.view([batch_size, self.NUM_FRAMES_PER_TOKEN, -1])], dim=-1) + + # merge the constraints + local_root_values = t.cat([context_local_root_values, target_local_root_values], dim=1) + global_root_values = t.cat([context_global_root_values, target_global_root_values], dim=1) + local_poses = t.cat([context_local_poses, target_local_poses], dim=1) + + has_global_root_values = t.ones_like(global_root_values[:, :, 0], dtype=t.bool) + has_local_root_values = t.ones_like(local_root_values[:, :, 0], dtype=t.bool) + has_local_poses = t.ones_like(local_poses[:, :, 0], dtype=t.bool) + has_local_root_values[:, self.NUM_FRAMES_PER_TOKEN - 1] = False # the last velocity is incorrect + + if not self._target_root_realignment: + # if root is not realigned, disable the following info since they might be misleading + has_local_root_values[:, -self.NUM_FRAMES_PER_TOKEN:] = False + has_global_root_values[:, -self.NUM_FRAMES_PER_TOKEN + 1:] = False + has_local_poses[:, -self.NUM_FRAMES_PER_TOKEN + 1:] = False + + num_tokens = t.full([batch_size], MASKED_NUM_TOKENS).int().to(self._device) + + # pred the motions + config = {'num_inference_step': 1, 'smooth_root_traj': False, 'allow_pred_out_of_reach_num_tokens': False, + 'pose_token_sampling_use_argmax': True, 'skip_ending_target_cond': self.SKIP_ENDING_TARGET_COND} + info = {} + pred_global_motions, num_pred_tokens = self._inferencer.predict( + global_root_values, has_global_root_values, local_root_values, has_local_root_values, + local_poses, has_local_poses, num_tokens, config=config, info=info, + allowed_pred_num_tokens=input.get('allowed_pred_num_tokens', None) + ) + + self.frames['model_features'] = pred_global_motions + self.frames['num_pred_frames'] = self.NUM_FRAMES_PER_TOKEN * num_pred_tokens + + self.frames['mujoco_qpos'] = \ + self._converter.convert_motion_features_to_mujoco_qpos(self.frames['model_features'], self._motion_rep, False) + root_rot = self.frames['mujoco_qpos'][:, :, 3: 7].clone() + self.frames['mujoco_qpos'][:, :, 3: 7] = root_rot[:, :, [3, 0, 1, 2]] + if self.FORCE_CANONICALIZATION: + input['mujoco_qpos'] = self.frames['mujoco_qpos'] + self.frames['mujoco_qpos'] = self._uncanonicalize_mujoco_qpos(input) + self._current_frame_idx = self.NUM_FRAMES_PER_TOKEN - self.PRED_OFFSETS + + if self.FILTER_QPOS: + # blend the generated first frames with the context frames for smooth transitions + # can remove since it does not cause visual difference in the motion + self.frames['raw_mujoco_qpos'] = self.frames['mujoco_qpos'].clone() + ctx = input['raw_context_mujoco_qpos'] + num_ctx = ctx.shape[1] + blend = t.linspace(0.3, 0.7, num_ctx)[None, :, None].to(ctx.device) + self.frames['mujoco_qpos'][:, :num_ctx, :3] = \ + ctx[:, :, :3] * (1 - blend) + self.frames['mujoco_qpos'][:, :num_ctx, :3] * blend + self.frames['mujoco_qpos'][:, :num_ctx, 7:] = \ + ctx[:, :, 7:] * (1 - blend) + self.frames['mujoco_qpos'][:, :num_ctx, 7:] * blend + + return self.frames['model_features'], self.frames['mujoco_qpos'], self.frames['num_pred_frames'] + + def get_next_frame(self): + current_frame_idx = self._current_frame_idx + self._current_frame_idx = max(0, min(current_frame_idx + 1, self.frames['mujoco_qpos'].shape[1] - 1)) + next_qpos = self.frames['mujoco_qpos'][0, current_frame_idx] + if type(next_qpos) == t.Tensor: + next_qpos = next_qpos.detach().cpu().numpy() + return next_qpos + + def get_context_motion_features(self): + indices = [max(0, min(self._current_frame_idx - self.NUM_FRAMES_PER_TOKEN + i + self.PRED_OFFSETS, + self.frames['model_features'].shape[1] - 1)) + for i in range(self.NUM_FRAMES_PER_TOKEN)] + return self.frames['model_features'][:, indices, :].to(self._device) + + def get_context_mujoco_qpos(self): + indices = [max(0, min(self._current_frame_idx - self.NUM_FRAMES_PER_TOKEN + i + self.PRED_OFFSETS, + self.frames['mujoco_qpos'].shape[1] - 1)) + for i in range(self.NUM_FRAMES_PER_TOKEN)] + return self.frames['mujoco_qpos'][:, indices, :].to(self._device) + + def _canonicalize_mujoco_qpos(self, input: dict): + mujoco_qpos = input['context_mujoco_qpos'] + input['raw_context_mujoco_qpos'] = input['context_mujoco_qpos'].clone() + + # first frame information + first_frame_position = mujoco_qpos[:, 0, :3].clone() * t.tensor([[1.0, 1.0, 0.0]]).to(mujoco_qpos.device) + first_frame_rot = quaternion_to_matrix(mujoco_qpos[:, 0, 3: 7].clone()) # the rotation of first frame + first_frame_heading_angle = t.atan2(first_frame_rot[:, 1, 0], first_frame_rot[:, 0, 0]) + first_frame_heading_angle[first_frame_heading_angle.isnan()] = 0.0 + first_frame_rot_heading = angle_to_Z_rotation_matrix(first_frame_heading_angle) + inverse_first_frame_rot_heading = first_frame_rot_heading.transpose(-2, -1) + + # get the canonicalized root info + canonicalized_root_position = \ + t.matmul(inverse_first_frame_rot_heading[:, None, :, :], + (mujoco_qpos[:, :, :3].clone() - first_frame_position)[..., None])[..., 0] + + canonicalized_rot_matrix = t.matmul(inverse_first_frame_rot_heading[:, None, :, :], + quaternion_to_matrix(mujoco_qpos[:, :, 3: 7])) + + mujoco_qpos[:, :, 3: 7] = matrix_to_quaternion(canonicalized_rot_matrix) + mujoco_qpos[:, :, :3] = canonicalized_root_position + + # canonicalize the movement & facing direction + input['movement_direction'] = t.matmul(inverse_first_frame_rot_heading, + input['movement_direction'][..., None].float())[..., 0] + input['facing_direction'] = t.matmul(inverse_first_frame_rot_heading, + input['facing_direction'][:, :, None].float())[..., 0] + input['first_frame_heading_angle'] = first_frame_heading_angle + input['first_frame_position'] = first_frame_position + input['context_mujoco_qpos'] = mujoco_qpos + + # also if specific target headings are provided, canonicalize them + if 'specific_target_headings' in input: + input['specific_target_headings'] = \ + input['specific_target_headings'] - first_frame_heading_angle.view([-1, 1]) + input['specific_target_positions'] = \ + t.matmul(inverse_first_frame_rot_heading[:, None, :, :], + (input['specific_target_positions'] - first_frame_position[:, None, :])[..., None])[..., 0] + + def _uncanonicalize_mujoco_qpos(self, input: dict): + mujoco_qpos = input['mujoco_qpos'] + first_frame_heading_angle = input['first_frame_heading_angle'] + first_frame_position = input['first_frame_position'] + + # the first frame + first_frame_rot_heading = angle_to_Z_rotation_matrix(first_frame_heading_angle) + + # get the uncanonicalized root information + current_first_frame_rotation = quaternion_to_matrix(mujoco_qpos[:, :1, 3: 7]) + current_first_frame_heading_angle = t.atan2(current_first_frame_rotation[:, :, 1, 0], + current_first_frame_rotation[:, :, 0, 0]) + current_first_frame_rot_heading = angle_to_Z_rotation_matrix(current_first_frame_heading_angle) + rot_matrix = quaternion_to_matrix(mujoco_qpos[:, :, 3: 7]) + rot_matrix = t.matmul(first_frame_rot_heading[:, None, :, :], + t.matmul(current_first_frame_rot_heading.transpose(-2, -1), rot_matrix)) + root_positions = t.matmul(first_frame_rot_heading[:, None, :, :], + t.matmul(current_first_frame_rot_heading.transpose(-2, -1), + mujoco_qpos[:, :, :3, None]))[..., 0] + root_positions = root_positions - \ + root_positions[:, :1, :] * t.tensor([[[1.0, 1.0, 0.0]]]).to(mujoco_qpos.device) + first_frame_position + + mujoco_qpos[:, :, 3: 7] = matrix_to_quaternion(rot_matrix) + mujoco_qpos[:, :, :3] = root_positions + return mujoco_qpos + + def _should_regenerate(self, input: dict): + + idle_mode_id = list(self._clip_holder.CLIPS.keys()).index('idle') + if self.frames['mode'] is not None and self.frames['mode'].item() == idle_mode_id and \ + input['mode'].item() == idle_mode_id: + return False + + return True diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/demo/utils.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/demo/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..8159351cb075b31a07a20bab7ea1c0ce943cca7b --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/demo/utils.py @@ -0,0 +1,135 @@ +import os +import numpy as np +import mujoco +from types import SimpleNamespace +import torch as t +from motionbricks.motion_backbone.inference.motion_inference import motion_inference +from motionbricks.motion_backbone.demo.controllers import WASD_controller, random_controller +from motionbricks.exp_setup.experiment import test + +class navigation_demo(object): + def __init__(self, args): + self.args = args + self.full_agent = None + self.controller = None + self.mj_model = None + self.mj_data = None + self._parse_args() + self._initialize_inference_modles() + self._initialize_controller() + self._initialize_mj_simulator() + + def _parse_args(self): + self.args.return_model_configs = True + self.args.return_dataloader = True + + # parse the default path if not given (very likely used by an external project) + # Navigate from motionbricks/motion_backbone/demo/utils.py up to the project root + project_base_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) + if not hasattr(self.args, 'humanoid_scene_xml'): + self.args.humanoid_scene_xml = \ + os.path.abspath(os.path.join(project_base_path, "assets", "skeletons", "g1", "scene_29dof.xml")) + + if not hasattr(self.args, 'skeleton_xml'): + self.args.skeleton_xml = \ + os.path.abspath(os.path.join(project_base_path, "assets", "skeletons", "g1", "g1.xml")) + + if not hasattr(self.args, 'result_dir'): + self.args.result_dir = os.path.abspath(os.path.join(project_base_path, "out")) + + if not hasattr(self.args, 'data_root'): + self.args.data_root = os.path.abspath(os.path.join(project_base_path, "datasets")) + + if not hasattr(self.args, 'clips_ckpt'): + result_dir = getattr(self.args, 'result_dir', os.path.join(project_base_path, "out")) + self.args.clips_ckpt = os.path.abspath(os.path.join(result_dir, "G1-clip.ckpt")) + + if not hasattr(self.args, 'explicit_dataset_folder'): + self.args.explicit_dataset_folder = \ + os.path.abspath(os.path.join(project_base_path, "datasets", "motionbricks-G1")) + + def _initialize_inference_modles(self): + reprocess_clips = getattr(self.args, 'reprocess_clips', False) # useful for debugging & development + if self.args.clips_ckpt is None or (not os.path.exists(self.args.clips_ckpt)) or reprocess_clips: + models, confs, train_dataloader, val_dataloader = test(self.args) + self.args.train_dataloader = train_dataloader + self.args.val_dataloader = val_dataloader + else: + self.args.return_dataloader = False + models, confs = test(self.args) + self.args.train_dataloader = None + self.args.val_dataloader = None + + for model_name in ['pose', 'root']: + state_dict = t.load(confs[model_name].ckpt_path)['state_dict'] + models[model_name].load_state_dict(state_dict) + self.inferencer = motion_inference(models, models['pose'].args) + + from motionbricks.motion_backbone.demo.full_agent import full_navigation_agent + target_root_realignment = getattr(self.args, 'target_root_realignment', True) + source_root_realignment = getattr(self.args, 'source_root_realignment', True) + force_canonicalization = getattr(self.args, 'force_canonicalization', True) + skip_ending_target_cond = getattr(self.args, 'skip_ending_target_cond', False) + speed_scale = getattr(self.args, 'speed_scale', [0.8, 1.2]) if \ + getattr(self.args, 'random_speed_scale', False) else [1.0, 1.0] + self.full_agent = full_navigation_agent(self.inferencer, self.args.train_dataloader, device='cuda', + speed_scale=speed_scale, + target_root_realignment=target_root_realignment, + source_root_realignment=source_root_realignment, + force_canonicalization=force_canonicalization, + skeleton_xml=self.args.skeleton_xml, + skip_ending_target_cond=skip_ending_target_cond, + filter_qpos=getattr(self.args, 'pre_filter_qpos', True), + clips=self.args.clips, + ckpt_path=self.args.clips_ckpt, + reprocess_clips=reprocess_clips, + val_dataloader=self.args.val_dataloader).to('cuda') + + def _initialize_controller(self): + lookat_movement_direction = getattr(self.args, 'lookat_movement_direction', False) + min_tokens = self.inferencer._args['min_tokens'] + max_tokens = self.inferencer._args['max_tokens'] + + if self.args.controller == "wasd": + self.controller = WASD_controller(lookat_movement_direction=lookat_movement_direction, + clips=self.args.clips, min_token=min_tokens, max_token=max_tokens) + + elif self.args.controller == "random": + max_angle_change_between_controls = getattr(self.args, 'max_angle_change_between_controls', 0.5 * np.pi) + self.controller = random_controller(disable_running=getattr(self.args, 'disable_running', True), + lookat_movement_direction=lookat_movement_direction, + new_control_dt=getattr(self.args, 'new_control_dt', 2.0), + max_angle_change_between_controls=max_angle_change_between_controls, + clips=self.args.clips, min_token=min_tokens, max_token=max_tokens) + + else: + raise ValueError(f"Controller {self.args.controller} is not supported") + + def _initialize_mj_simulator(self): + self.mj_model, self.mj_data = build_mj_simulator(self.args.humanoid_scene_xml, self.inferencer.motion_rep.fps) + + +def build_mj_simulator(humanoid_xml: str, fps: int = 30, build_dummy_mj_simulator: bool = False): + if build_dummy_mj_simulator: + # mj_model provide a value called qpos + mj_model = SimpleNamespace(opt=SimpleNamespace(timestep=1 / fps)) + mj_data = SimpleNamespace(qpos=np.zeros(36)) # 36 is the number of qpos for humanoid of G1 + else: + mj_model = mujoco.MjModel.from_xml_path(humanoid_xml) + mj_data = mujoco.MjData(mj_model) + # Disable advanced visual effects for better performance + mj_model.vis.global_.offwidth = 1920 + mj_model.vis.global_.offheight = 1080 + mj_model.vis.quality.shadowsize = 0 # Disable shadows + + mj_model.vis.rgba.fog = [0, 0, 0, 0] # Disable fog + + # Disable advanced lighting effects + mj_model.vis.headlight.ambient = [0.8, 0.8, 0.8] # Increase ambient light + mj_model.vis.headlight.diffuse = [0.8, 0.8, 0.8] # Increase diffuse light + mj_model.vis.headlight.specular = [0.1, 0.1, 0.1] # Reduce specular highlights + + mj_model.opt.timestep = 1 / fps + return mj_model, mj_data + + diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/inference/__init__.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/inference/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/inference/motion_inference.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/inference/motion_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..64b2dde617873e17d1b51d220fc3fbb5ea2773f4 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/inference/motion_inference.py @@ -0,0 +1,393 @@ +from typing import Dict +import torch as t +import numpy as np +from motionbricks.motion_backbone.models.sampling import gumbel_sample +from motionbricks.motion_backbone.models.pose_model import MotionModel as pose_model_cls +from motionbricks.motion_backbone.models.root_model import MotionModel as root_model_cls +from motionbricks.vqvae.neural_modules.vqvae import VQVAE as vqvae + +from motionbricks.helper.data_training_util import extract_feature_from_motion_rep + +import copy + +class motion_inference(t.nn.Module): + """ @brief: For simplicity, we are mostly likely ONLY CONSIDER batch_size=1 cases + """ + BATCH_SIZE = 1 # batch size > 1 supported as well + + # the feature type of `local_pose` provided to the `predict` function (externally provided) + EXTERNAL_POSE_FEATURE_MODE = "joint_positions_and_rotations" + # the feature type of `global_root` and `local_root` provided to the `predict` function (externally provided) + EXTERNAL_ROOT_FEATURE_MODE = "root" + # this is the feature of `local_pose` used by all three modes: vqvae, pose, root + INTERNAL_POSE_FEATURE_MODE = "joint_positions_and_rotations_and_hip_height" + EPS = 1e-5 + + def __init__(self, models: list, args: Dict, device: str = 'cuda'): + super(motion_inference, self).__init__() + self._pose_model: pose_model_cls = models['pose'].eval().to(device) + self._root_model: root_model_cls = models['root'].eval().to(device) + self._vqvae_pose_model: vqvae = self._pose_model.supporting_nets['pose_net'].eval().to(device) + + self.global_motion_rep = self._pose_model.global_motion_rep + self.local_motion_rep = self._pose_model.local_motion_rep + self.motion_rep = self._pose_model.motion_rep # the dual representation + + self._args = args + self._device = device + self._IS_ROOT_MODEL_TOKENIZED = self._root_model.backbone_net.IS_MODEL_TOKENIZED + + assert self._pose_model.backbone_net.initted and self._pose_model.vqvae_model_loaded \ + and self._root_model.vqvae_model_loaded, "The model should be initialized before inference." + assert not self._IS_ROOT_MODEL_TOKENIZED, "The root model is not tokenized." + + def predict(self, + global_root_values: t.Tensor, has_global_root_values: t.Tensor, + local_root_values: t.Tensor, has_local_root_values: t.Tensor, + local_poses: t.Tensor, has_local_poses: t.Tensor, + num_tokens: t.Tensor, + text_embeddings: t.Tensor = None, has_text_embeddings: t.Tensor = None, + allowed_pred_num_tokens: t.Tensor = None, + config: dict = {}, info: dict= {}): + + """ @param input_data: a dictionary containing the following keys: + All these values are in unnormalized form. Note the root/pose information of the first 4 frames are always + assumed to be given + + @input global_root_values: [batch, numConstrainFrames=8, 5] # required + @input has_global_root_values: [batch, numConstrainFrames=8] # required + + @input local_root_values: [batch, numConstrainFrames=8, 4] # required + @input has_local_root_values: [batch, numConstrainFrames=8] # required + + @input local_poses: [batch, numConstrainFrames=8, featdim] # required + @input has_local_pose: [batch, numConstrainFrames=8] # required + + @input num_tokens: [batch, 1] # optional + + """ + batch_size, device, dtype = has_global_root_values.shape[0], has_global_root_values.device, local_poses.dtype + num_frames_per_token = self._pose_model.backbone_net.get_num_frames_per_token() + if not (t.all(has_global_root_values[:, :num_frames_per_token]) and + t.all(has_local_root_values[:, :num_frames_per_token]) and + t.all(has_local_poses[:, :num_frames_per_token])): + if not getattr(self, 'WARNING_PRINTED', False): + print("WARNING: you are advised to provide all first 4 frames.") + self.WARNING_PRINTED = True # print warning only once + if type(num_tokens) == int: + num_tokens = t.full([batch_size, 1], num_tokens, dtype=t.int).to(device) + elif num_tokens is None: # indicate the length of the motion is not provided; needs to be predicted + num_tokens = \ + self._root_model.backbone_net.MASKED_NUM_TOKENS * t.ones([batch_size, 1], dtype=t.int).to(device) + + # step 1: recenter the global root values so that the motions always start from (0.0f, 0.0f) + batch = {} + + batch['reference_start_root_global_offsets'], batch['reference_start_root_global_heading'], \ + recentered_global_root_values = self._extract_initial_root_info(global_root_values) + + batch['global_root_values'] = self.global_motion_rep.normalize(recentered_global_root_values) + batch['local_root_values'] = self.local_motion_rep.normalize(local_root_values) + + local_pose_feat_idx = extract_feature_from_motion_rep( + t.zeros([1, 1, len(self.local_motion_rep.indices['all'])]), + self.local_motion_rep, self.INTERNAL_POSE_FEATURE_MODE, fetch_feat_idx=True + ) + global_height_values = \ + recentered_global_root_values[:, :, self.global_motion_rep.indices['global_root_pos'][[1]]] + mean = self.local_motion_rep.stats.mean[None, None, local_pose_feat_idx].to(device=device, dtype=dtype) + std = self.local_motion_rep.stats.std[None, None, local_pose_feat_idx].to(device=device, dtype=dtype) + batch['local_poses'] = \ + (t.concat([global_height_values, local_poses], dim=-1) - mean) / t.sqrt(std ** 2 + self.EPS) + + batch['has_global_root_values'] = has_global_root_values + batch['has_local_root_values'] = has_local_root_values + batch['has_local_poses'] = has_local_poses + batch['text_embeddings'] = text_embeddings + batch['has_text_embeddings'] = has_text_embeddings + batch['num_tokens'] = num_tokens + batch['allowed_pred_num_tokens'] = allowed_pred_num_tokens + + # step 2: run the root model to predict the number of tokens and the root tokens + batch['pred_num_tokens'], batch['pred_global_root_values'], batch['pred_local_root_values'] = \ + self._predict_root_trajectories(batch, config) + + # step 3: pred the pose tokens (1 iteration for now but also support multiple iterations) + batch['pred_pose_tokens'], batch['pred_pose_cond'], batch['pred_has_pose_cond'] = \ + self._predict_pose_tokens(batch, config, info) + + # step 4: decode the pose tokens and root prediction to reconstruct the poses + batch['pred_local_poses'], batch['pred_global_poses'] = \ + self._decode_motions_from_predicted_root_and_pose_tokens(batch, config, info) + + # step 5: apply the global root transforms to restore into the original world coordinates + batch['pred_global_poses'] = self._reapply_initial_root_info(batch) + + return batch['pred_global_poses'], batch['pred_num_tokens'] + + def _sample_tokens_with_highest_prob(self, pose_tokens: t.Tensor, pose_tokens_prob: t.Tensor, + pred_num_tokens: t.Tensor, step: int, num_pose_inference_steps: int): + + batch_size, device = pose_tokens.shape[0], pose_tokens.device + rand_mask_prob = np.cos(float(step) / num_pose_inference_steps * np.pi * 0.5) + num_pose_heads = self._pose_model.backbone_net.get_num_heads()[0] + num_tokens = self._args['max_tokens'] * self._pose_model.backbone_net.get_num_heads()[0] + + num_pose_token_masked = t.clip((rand_mask_prob * pred_num_tokens * + self._pose_model.backbone_net.get_num_heads()[0]).int(), min=1) + + # the padded tokens is not part of the masking process; give them +inf prob so that they are never masked + pose_tokens_prob = t.where(t.arange(self._args['max_tokens']).to(device).view([batch_size, -1, 1]) < + pred_num_tokens.view([batch_size, 1, 1]).repeat([1, 1, num_pose_heads]), + pose_tokens_prob, t.full_like(pose_tokens_prob, t.inf)) + + # remove pose tokens with the least prob from pose_tokens_prob (sort) + indices = pose_tokens_prob.view([batch_size, -1]).sort(descending=False)[1] + tokens_to_be_masked = t.arange(num_tokens).tile([self.BATCH_SIZE, 1]).to(self._device) < num_pose_token_masked + indices = indices * tokens_to_be_masked + indices[:, :1] * (~tokens_to_be_masked) + + pose_tokens = pose_tokens.view([batch_size, -1]).clone() + pose_tokens.scatter_(dim=-1, index=indices, value=self._pose_model.backbone_net.POSE_MASK_ID) + return pose_tokens.view([batch_size, self._args['max_tokens'], -1]) + + @property + def device(self): + return self._device + + def _extract_initial_root_info(self, global_root_values: t.Tensor): + """ @brief: save the initial global root offsets and global heading information here so that we could + cannonicalize the input to the network and de-canonicalize the output. + NOTE: Since we are using a model where features are not relative to the root rotation transform, + for the input, we don't rotate the root heading to 0.0f; we only move the root position to (0.0f, 0.0f). + + But for the output, since the `local_to_global` function does not have the initial heading, we log the initial + heading and add back the heading to the output, despite headings are not used to reconstruct the character's + joint transforms. + """ + reference_start_root_global_offsets = \ + global_root_values[:, :1, self.global_motion_rep.indices['global_root_pos_2d']].clone() + _, reference_start_root_global_heading = \ + self.global_motion_rep.compute_root_pos_and_rot(global_root_values[:, :1, :], + return_angle=True, return_quat=False) + + recentered_global_root_values = global_root_values.clone() + recentered_global_root_values[:, :, self.global_motion_rep.indices['global_root_pos_2d']] -= \ + reference_start_root_global_offsets + + return reference_start_root_global_offsets, reference_start_root_global_heading, recentered_global_root_values + + def _reapply_initial_root_info(self, batch: dict): + """ @brief: The follow-up function of `_extract_initial_root_info` to recover the global information. + """ + _, root_rot_angle = self.global_motion_rep.compute_root_pos_and_rot(batch['pred_global_poses'], + return_angle=True, return_quat=False) + + corrective_angle = batch['reference_start_root_global_heading'].reshape(root_rot_angle[..., 0].shape) + new_angles = root_rot_angle + corrective_angle[..., None] # [Batch, T] + + new_heading = t.stack([t.cos(new_angles), t.sin(new_angles)], dim=-1) + + batch['pred_global_poses'][:, :, self.global_motion_rep.indices['global_root_pos_2d']] += \ + batch['reference_start_root_global_offsets'] + batch['pred_global_poses'][:, :, self.global_motion_rep.indices['global_root_heading']] = new_heading + return batch['pred_global_poses'] + + def _predict_root_trajectories(self, batch: dict = {}, config: dict = {}): + """ @brief: run the root module here to pred how many frames are between the keyframes and predict the local + and global root trajectories. + """ + # NOTE: the root module's output is the global root values; it has to be "root" in feature mode + assert self._root_model.args['local_root_feature'] == self.EXTERNAL_ROOT_FEATURE_MODE, \ + self._root_model.args['global_root_feature'] == self.EXTERNAL_ROOT_FEATURE_MODE + assert self._root_model.args['local_pose_feature'] == self.INTERNAL_POSE_FEATURE_MODE, \ + f"All submodules should only use {self.INTERNAL_POSE_FEATURE_MODE} as the local pose feature." + assert self.EXTERNAL_ROOT_FEATURE_MODE == 'root', "Only support full root features for root model." + + num_frames_per_token = self._pose_model.backbone_net.get_num_frames_per_token() + assert num_frames_per_token == self._root_model.backbone_net.get_num_frames_per_token() + + root_model_outputs = self._root_model.backbone_net( + batch['global_root_values'], batch['has_global_root_values'], + batch['local_root_values'], batch['has_local_root_values'], + batch['local_poses'], batch['has_local_poses'], batch['num_tokens'], + text_embeddings=batch['text_embeddings'], has_text_embeddings=batch['has_text_embeddings'], + allowed_pred_num_tokens=batch['allowed_pred_num_tokens'], + config=config + ) + + pred_num_tokens = root_model_outputs['pred_num_tokens'] + pred_global_root_values = root_model_outputs['pred_global_root_values'] + if config.get('debug_ground_truth_root_trajectories', None) is not None: + pred_num_tokens[:] = config['debug_ground_truth_root_trajectories'].shape[1] // num_frames_per_token + pred_global_root_values[:, :config['debug_ground_truth_root_trajectories'].shape[1]] = \ + config['debug_ground_truth_root_trajectories'] # both normalized + pred_local_root_values = \ + self.motion_rep.dual_rep.global_to_local(pred_global_root_values, is_normalized=True, to_normalize=True, + lengths=pred_num_tokens * num_frames_per_token) + + # now be very careful with the final root motion; since the raw calculation could be very incorrect + estimated_final_local_root_motion = \ + t.gather(pred_local_root_values, 1, + pred_num_tokens.long().repeat([1, 4])[:, None, :] * num_frames_per_token - 1) # why was this -2? + local_root_feat_dim = len(self.local_motion_rep.indices['root']) + final_local_root_motion = \ + batch['has_local_root_values'][:, -1:, None].expand([-1, -1, local_root_feat_dim]).float() * \ + batch['local_root_values'][:, -1:] + \ + (1 - batch['has_local_root_values'][:, -1:, None].expand([-1, -1, local_root_feat_dim]).float()) * \ + estimated_final_local_root_motion + pred_local_root_values = pred_local_root_values.scatter( + 1, pred_num_tokens.long().repeat([1, 4])[:, None, :] * num_frames_per_token - 1, final_local_root_motion + ) # replace the last velocity with the second last velocity + + return pred_num_tokens, pred_global_root_values, pred_local_root_values + + def _predict_pose_tokens(self, batch: dict = {}, config: dict = {}, info: dict = {}): + """ @brief: run the pose module here to pred the pose tokens.""" + # NOTE: the root module's output is the global root values; it has to be "root" in feature mode + assert self._pose_model.args['local_pose_feature'] == self.INTERNAL_POSE_FEATURE_MODE + assert self.INTERNAL_POSE_FEATURE_MODE == "joint_positions_and_rotations_and_hip_height" + assert (self._pose_model.args['cond_root_feature_is_from_motion_rep'] == 'local' and + self._pose_model.args['cond_root_feature'] == 'root_without_hip_height_without_heading') or \ + (self._pose_model.args['cond_root_feature_is_from_motion_rep'] == 'global' and + self._pose_model.args['cond_root_feature'] == 'root_without_hip_height'), \ + "These are the only two root cond feature combination supported." + + # collect the configs and construct initial input data + num_pose_heads, num_frames_per_token = \ + self._pose_model.backbone_net.get_num_heads()[0], self._pose_model.backbone_net.get_num_frames_per_token() + batch_size, device = batch['local_poses'].shape[0], batch['local_poses'].device + num_pose_inference_steps = config.get('num_inference_step', 1) + + pose_tokens = t.full([batch_size, self._args['max_tokens'], num_pose_heads], + self._pose_model.backbone_net.POSE_MASK_ID).to(device) + chosen_pose_tokens_prob = \ + t.full([batch_size, self._args['max_tokens'], num_pose_heads], 1.0 / num_pose_heads).to(device) + + pose_cond = t.concat([batch['local_poses'][:, :num_frames_per_token], + t.zeros([batch_size, (self._args['max_tokens'] - 1) * num_frames_per_token, + batch['local_poses'].shape[-1]]).to(device)], dim=1) + has_pose_cond = \ + t.concat([batch['has_local_poses'][:, :num_frames_per_token], + t.zeros([batch_size, (self._args['max_tokens'] - 1) * num_frames_per_token], + dtype=bool).to(device)], dim=1) + + for i in range(num_frames_per_token): # assign the target pose information dynamically + onehot_idx = t.nn.functional.one_hot( + batch['pred_num_tokens'].view([-1]).long() * num_frames_per_token - num_frames_per_token + i, + num_classes=self._args['max_tokens'] * num_frames_per_token + ) + pose_cond = pose_cond + \ + onehot_idx.float().view([batch_size, -1, 1]) * \ + batch['local_poses'][:, -num_frames_per_token + i].view([batch_size, 1, -1]) + has_pose_cond = t.logical_or( + has_pose_cond, (onehot_idx.float().view([batch_size, -1]) * + batch['has_local_poses'][:, -num_frames_per_token + i].view([batch_size, 1])).bool() + ) + + for step in range(num_pose_inference_steps): + pose_tokens = self._sample_tokens_with_highest_prob(pose_tokens, chosen_pose_tokens_prob, + batch['pred_num_tokens'], + step, num_pose_inference_steps) + assert self._args['cond_root_feature_is_from_motion_rep'] in ['local', 'global'] + if self._args['cond_root_feature_is_from_motion_rep'] == 'local': + pose_root_cond = \ + extract_feature_from_motion_rep(batch['pred_local_root_values'], self.local_motion_rep, + self._pose_model.args['cond_root_feature']) + else: + assert self._args['cond_root_feature_is_from_motion_rep'] == 'global' + pose_root_cond = \ + extract_feature_from_motion_rep(batch['pred_global_root_values'], self.global_motion_rep, + self._pose_model.args['cond_root_feature']) + + pose_model_output = self._pose_model.backbone_net( + pose_tokens, pose_root_cond, pose_cond, has_pose_cond, + batch['pred_num_tokens'], batch['text_embeddings'], batch['has_text_embeddings'] + ) + if config.get('pose_token_sampling_use_argmax', False): + pose_tokens = pose_model_output['pose_logits'].argmax(dim=-1) + else: + pose_tokens = gumbel_sample(pose_model_output['pose_logits'], temperature=1.0) + pose_tokens_prob = pose_model_output['pose_logits'].softmax(dim=-1) + chosen_pose_tokens_prob = pose_tokens_prob.gather(dim=-1, index=pose_tokens.unsqueeze(-1)).squeeze(-1) + + if config.get('debug_ground_truth_pose_tokens', None) is not None: + pose_tokens[:, :config['debug_ground_truth_pose_tokens'].shape[1]] = \ + config['debug_ground_truth_pose_tokens'][:, :] + + return pose_tokens, pose_cond, has_pose_cond # pose cond and has_pose cond are re-used in the decoder + + def _decode_motions_from_predicted_root_and_pose_tokens(self, batch: dict = {}, config: dict = {}, info: dict = {}): + """ @brief: decode the pose tokens and root prediction to reconstruct the poses""" + if getattr(self._pose_model.args, 'pose_vqvae_motion_rep', 'local'): + assert self._vqvae_pose_model.motion_rep.name == 'local' + assert self._vqvae_pose_model.decoder_external_cond_feature_mode == \ + "root_without_hip_height_without_heading" + else: + assert self._vqvae_pose_model.motion_rep.name == 'global' + assert self._vqvae_pose_model.decoder_external_cond_feature_mode == \ + "root_without_hip_height_without_heading_with_mask" + + assert self._vqvae_pose_model.decoder_target_cond_feature_mode == self.INTERNAL_POSE_FEATURE_MODE + + pose_external_root_cond = extract_feature_from_motion_rep( + batch['pred_local_root_values'] if self._vqvae_pose_model.motion_rep.name == 'local' \ + else batch['pred_global_root_values'], + self._vqvae_pose_model.motion_rep, self._vqvae_pose_model.decoder_external_cond_feature_mode + ) + if self._vqvae_pose_model.motion_rep.name == 'global': + raise NotImplementedError("The global root feature is not supported yet.") + + batch_size, device = batch['local_poses'].shape[0], batch['local_poses'].device + pose_token_mask = t.arange(self._args['max_tokens']).to(device)[None, :].repeat([batch_size, 1]) < \ + batch['pred_num_tokens'].view([batch_size, 1]) + + if type(config.get("use_target_cond_in_decoder", True)) == t.Tensor: + # if a False tensor is provided, mask out all target condition here + global_target_cond = config["use_target_cond_in_decoder"].bool().expand_as(batch['pred_has_pose_cond']) + has_target_cond = t.logical_and(batch['pred_has_pose_cond'], global_target_cond) + else: + assert type(config.get("use_target_cond_in_decoder", True)) == bool + has_target_cond = batch['pred_has_pose_cond'] \ + if config.get("use_target_cond_in_decoder", True) else t.zeros_like(batch['pred_has_pose_cond']).bool() + if not config.get('use_constraints_at_decoder', True): + has_target_cond = t.zeros_like(has_target_cond).bool() # disable the target cond + if config.get('skip_ending_target_cond', False): + # skip the ending target cond; useful for inprecise ending target cond; can improve the foot steps + num_frames_per_token = self._pose_model.backbone_net.get_num_frames_per_token() + has_target_cond[:, num_frames_per_token:] = False + + pred_poses = self._vqvae_pose_model.forward_decoder(batch['pred_pose_tokens'], + target_cond=batch['pred_pose_cond'], + has_target_cond=has_target_cond, + external_cond=pose_external_root_cond, + use_overall_indices=False, + token_mask=pose_token_mask)['recon_state'] + + num_pred_frames = batch['pred_num_tokens'] * self._pose_model.backbone_net.get_num_frames_per_token() + if self._vqvae_pose_model.motion_rep.name == 'local': + # NOTE: the pred_global_poses has incorrect heading since the accumlation function of `local_to_global` + # does not have initial heading information; luckily the inverse function which reconstruct the final + # results will not use the heading feature at all so it won't affect the final pose outputs + pred_global_poses = self.motion_rep.dual_rep.local_to_global(pred_poses, is_normalized=True, + to_normalize=False, lengths=num_pred_frames) + pred_local_poses = self.local_motion_rep.unnormalize(pred_poses) + else: + pred_local_poses = self.motion_rep.dual_rep.global_to_local(pred_poses, is_normalized=True, + to_normalize=False, lengths=num_pred_frames) + pred_global_poses = self.global_motion_rep.unnormalize(pred_poses) + + if config.get('final_root_pred_mode', 'from_pose_module') == 'from_pose_module': + # use the root prediction from the pose module; do nothing here + pass + elif config['final_root_pred_mode'] == 'from_root_module': + # use the direct root prediction from the root module + local_root_index, global_root_index = \ + self.local_motion_rep.indices['root'], self.global_motion_rep.indices['root'] + + pred_global_poses[:, :, global_root_index] = \ + self.global_motion_rep.unnormalize(batch['pred_global_root_values']) + pred_local_poses[:, :, local_root_index] = \ + self.local_motion_rep.unnormalize(batch['pred_local_root_values']) + else: + raise NotImplementedError(f"Not supported yet {config['final_root_pred_mode']}.") + return pred_local_poses, pred_global_poses diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/models/__init__.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/models/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/models/pose_model.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/models/pose_model.py new file mode 100644 index 0000000000000000000000000000000000000000..cad99300ef2439dcf82840609137cb661842478f --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/models/pose_model.py @@ -0,0 +1,382 @@ +from motionbricks.vqvae.neural_modules import vqvae +from motionbricks.motion_backbone.neural_modules.pose_backbone import pose_backbone_network +import torch as t +import os +import logging +from typing import Callable, Optional, Union, Dict + +import torch +from pytorch_lightning import LightningModule +from motionbricks.motionlib.core.motion_reps import MotionRepBase +import numpy as np +from motionbricks.motionlib.core.motion_reps.dual_root_global_joints import GlobalRootGlobalJoints, LocalRootGlobalJoints +from motionbricks.helper.data_training_util import sample_motion_segments_from_motion_clips +from motionbricks.helper.data_training_util import sample_keyframes, extract_feature_from_motion_rep + +log = logging.getLogger(__name__) + + +class MotionModel(LightningModule): + """ @brief: Pose model that predicts discrete pose tokens given root motion and optional pose constraints. + + @input local_root_values: [batch, numFrames, root_dim] # required + @input pose_cond: [batch, numConstrainFrames=[0, 10], featdim] # optional + @input has_pose_cond: [batch, numConstrainFrames=[0, 10]] (int) # required; where poses are provided + @input num_tokens: [batch, 1] # required + @input pose_tokens: [batch, numTokens, num_pose_heads] # required; could be all masked + @input text_embedding: [batch, numTokens, text_embedding_dim] # optional + + @output pose_logits: [batch, numTokens, num_pose_heads, num_codes] + """ + + def __init__(self, + pose_vqvae_network: vqvae.VQVAE, + root_vqvae_network: Union[None, vqvae.VQVAE], + backbone_network: pose_backbone_network, + motion_rep: MotionRepBase, + optimizer: Callable[[list], torch.optim.Optimizer] = None, + scheduler: Optional[Callable[[torch.optim.Optimizer], torch.optim.lr_scheduler.LRScheduler]] = None, + device: Optional[Union[str, torch.device]] = None, + args: Dict = None, + # the other key args here: most of them for compatibility only and won't be used at all + **kwargs): + super().__init__() + + self.optimizer = optimizer + self.scheduler = scheduler + + self._supporting_networks = {'pose_net': pose_vqvae_network, 'root_net': root_vqvae_network} + self.backbone_net = backbone_network + + self.motion_rep: GlobalRootGlobalJoints = motion_rep + self.global_motion_rep: GlobalRootGlobalJoints = motion_rep.dual_rep.global_motion_rep + self.local_motion_rep: LocalRootGlobalJoints = motion_rep.dual_rep.local_motion_rep + + self.DEFAULT_NUM_JOINTS = self.motion_rep.num_joints + self._args = args + self.one_logger_callback = kwargs.get("one_logger_callback", None) + self.callbacks = [] + + self._load_vqvae_models() + + if device is not None: + self.pose_net = self._supporting_networks['pose_net'].to(device) + self.root_net = self._supporting_networks['root_net'].to(device) \ + if root_vqvae_network is not None else None + self.backbone_net = self.backbone_net.to(device) + + self._supporting_networks['pose_net'].requires_grad_ = False + self._supporting_networks['pose_net'] = self._supporting_networks['pose_net'].eval() + if self._supporting_networks['root_net'] is not None: + self._supporting_networks['root_net'].requires_grad_ = False + self._supporting_networks['root_net'] = self._supporting_networks['root_net'].eval() + + def _load_vqvae_models(self): + """ @brief: load the vqvae models and init the backbone's input embedding. + """ + self._vqvae_model_loaded = False + vqvae_model_ckpt_path = self._args.vqvae_model_ckpt_path + if os.path.exists(vqvae_model_ckpt_path): + vqvae_model_weights = t.load(vqvae_model_ckpt_path)['state_dict'] + with t.no_grad(): + for sub_network in ['pose_net', 'root_net']: + if self._supporting_networks[sub_network] is None: + continue + for key, val in self._supporting_networks[sub_network].state_dict().items(): + src = vqvae_model_weights[sub_network + '.' + key] + if val.shape != src.shape: + src = src.reshape(val.shape) + val.copy_(src) + self._vqvae_model_loaded = True + + if not self.backbone_net.initted: # the backbone's input embeddings are not initted; init with vqvae weights + pose_codebook = self._supporting_networks['pose_net'].get_codebook() + root_codebook = self._supporting_networks['root_net'].get_codebook() \ + if self._supporting_networks['root_net'] is not None else None + self.backbone_net.init_embedding_from_codebooks(pose_codebook, root_codebook) + else: + print(f"No VQVAE model checkpoint path available; Assuming the vqvae weights are intergrated in the model") + + def configure_optimizers(self): + if self.one_logger_callback is not None: + self.one_logger_callback.on_optimizer_init_start() + optimizer = self.optimizer(self.parameters()) + if self.one_logger_callback is not None: + self.one_logger_callback.on_optimizer_init_end() + if not self.scheduler: + return optimizer + + lt_kwargs = dict(self.scheduler.keywords.pop("lt_kwargs", {})) + lt_kwargs["scheduler"] = self.scheduler(optimizer) + return {"optimizer": optimizer, "lr_scheduler": lt_kwargs} + + def set_callbacks(self, callbacks: list): + self.callbacks = callbacks + + def configure_callbacks(self): + return self.callbacks + + def inference_step(self, batch, batch_idx, requires_grad=False, meta_info: Dict = {}): + if not hasattr(self, "_printed_inference_warning"): + self._printed_inference_warning = True + print("Warning: Pose model does not have an explicit inference step. Reusing training step.") + with t.no_grad(): + return self.training_step(batch, batch_idx, use_outside_training=True, meta_info=meta_info) + + def training_step(self, batch, batch_idx, use_outside_training: bool = False, meta_info: Dict = {}): + """ @brief: the training step takes input a normalized motion representation. + batch.keys() -> dict_keys(['motion', 'motion_len', 'motion_pad_mask', 'batch_size']) + """ + assert self.training or use_outside_training, \ + "It's possible to use training_step on evaluation set. But otherwise self.training should be true." + + # step 0: data preparations for model training; generate both global and local motions that could be used later + batch_size, device = batch['batch_size'], batch['motion'].device + raw_global_motions, motion_lengths, _ = \ + batch.pop('motion'), batch.pop('motion_len'), batch.pop('motion_pad_mask') + if self.backbone_net.ACCEPT_TEXT_EMB_INPUT: + _, _, _ = batch.pop('text'), batch.pop('text_len'), batch.pop('text_pad_mask') + augmented_batch_size = int(batch_size * self._args['batchsize_mul_factor']) + + num_token_position = np.random.choice(np.arange(self._args['min_tokens'], self._args['max_tokens'] + 1)) + batch['num_tokens'] = t.full([augmented_batch_size, 1], num_token_position).to(device) + num_frames = num_token_position * self.backbone_net.get_num_frames_per_token() + + valid_samples_id = (motion_lengths >= num_frames + 1) # 1 additional frame for global-local convertion + num_invalid_samples = batch_size - valid_samples_id.sum() + if num_invalid_samples > batch_size // 2: + return None # don't have enough valid data samples, skipping this batch + + sample_info = {} + global_motions = sample_motion_segments_from_motion_clips(raw_global_motions, motion_lengths, + num_frames, + self.args['batchsize_mul_factor'], info=sample_info, + motion_rep=self.global_motion_rep) + actual_batch_size = int(batch_size * self.args['batchsize_mul_factor']) + batch['text_embeddings'] = None if (not self.backbone_net.ACCEPT_TEXT_EMB_INPUT) else \ + batch.pop('text_feat')[sample_info['chosen_ids']].view([augmented_batch_size, -1]) + + # step 3: prepares the global & local input motions to the pose and root vqvae models + first_frame_heading_angle = t.rand(actual_batch_size).to(device) * np.pi * 2.0 \ + if not self.motion_rep.compute_kwargs['removing_heading'] else 0.0 + global_motions = self.global_motion_rep.change_first_heading( + global_motions, first_frame_heading_angle, is_normalized=True, to_normalize=True + ) # note this `change_first_heading` also moves the first frame to the origin + local_motions = self.motion_rep.dual_rep.global_to_local( + global_motions, is_normalized=True, to_normalize=True, + lengths=t.full([actual_batch_size], global_motions.shape[1]).to(device) + ) + local_motions, global_motions = \ + local_motions[:, :num_frames, :], global_motions[:, :num_frames, :] # drop last velocity padding frame + batch['local_motions'], batch['global_motions'] = local_motions, global_motions + + # step 1: generate the pose_tokens; note we also mask / perturb the code indices in training + # the shape of @input_tokens is [batch, numTokens, num_pose_heads] + if 'groundtruth_pose_tokens' not in batch: + self.move_supporting_nets_to_device(device) + with t.no_grad(): + assert self._supporting_networks['pose_net'].motion_rep.name in ['local', 'global'] + pose_net_input = batch['local_motions'] \ + if self._supporting_networks['pose_net'].motion_rep.name == 'local' else batch['global_motions'] + pose_tokens = \ + self._supporting_networks['pose_net'].encode_into_idx(pose_net_input, fetch_overall_indices=False) + batch['groundtruth_pose_tokens'] = pose_tokens + + num_pose_heads, _ = self.backbone_net.get_num_heads() + batch['groundtruth_pose_tokens'] = \ + batch['groundtruth_pose_tokens'].view([augmented_batch_size, num_token_position, num_pose_heads]) + batch['focused_token_mask'], batch['masked_token_mask'], batch['incorrect_token_mask'], \ + batch['correct_token_mask'], batch['mask_percentage'], batch['incorrect_percentage'] = \ + self._get_token_masks(batch) + batch['input_tokens'] = self._generate_tokens_for_training(batch) + + # step 2: the local_root_values at each frame location, has the shape [batch, numFrames, 5] + if self._args['cond_root_feature_is_from_motion_rep'] == 'local': + batch['local_root_values'] = extract_feature_from_motion_rep(batch['local_motions'], self.local_motion_rep, + self._args['cond_root_feature']) + else: + assert self._args['cond_root_feature_is_from_motion_rep'] == 'global' + batch['local_root_values'] = extract_feature_from_motion_rep(batch['global_motions'], self.global_motion_rep, + self._args['cond_root_feature']) + + # step 3: the pose cond and whether a pose condition is provided. NOTE: we are using the dense cond during + # training since it's easier to construct. In inference you could also provide the sparse condition which be + # automatically processed in the @net.forward. + # The dense pose_cond shape: [batch, numframes, featdim], and has_poses_cond shape: [batch, numframes] (bool) + batch['pose_cond'], batch['has_pose_cond'], batch['text_embeddings'], batch['has_text_embeddings'] = \ + self._sample_the_local_pose_conditions(batch['local_motions'], num_frames, batch['text_embeddings']) + + # step 4: core network forward and loss calculation + model_outputs = self.backbone_net(batch['input_tokens'], batch['local_root_values'], + batch['pose_cond'], batch['has_pose_cond'], batch['num_tokens'], + batch['text_embeddings'], batch['has_text_embeddings']) + + losses = self.loss(batch, model_outputs) + + if use_outside_training: # use in an evaluation process + meta_info['losses'] = losses + return None + + for key, val in losses.items(): + self.log(f"loss/train_{key}", val, on_step=True, + on_epoch=True, sync_dist=True, batch_size=batch["batch_size"]) + return losses['loss'] + + def loss(self, batch: Dict, model_output_batch: Dict): + """ @brief: calculate the cross-entropy loss between the predicted pose tokens and the groundtruth. + """ + batch_size, num_positions = \ + batch['groundtruth_pose_tokens'].shape[0], model_output_batch['pose_logits'].shape[1] + pose_logits = model_output_batch['pose_logits'] + groundtruth_tokens = batch['groundtruth_pose_tokens'] + + # only consider the tokens that is focused and not masked + IGNORE_TOKEN_IDS = -100 + target_tokens = t.where(batch['focused_token_mask'].view([batch_size, num_positions, -1]), + groundtruth_tokens, IGNORE_TOKEN_IDS) + + losses = {} + pose_loss = t.nn.functional.cross_entropy(pose_logits.reshape([-1, pose_logits.shape[-1]]), + target_tokens.reshape([-1]).long(), ignore_index=IGNORE_TOKEN_IDS) + + losses['pose_loss'] = pose_loss + losses['loss'] = pose_loss + + return losses + + @property + def args(self): + return self._args + + def _get_token_masks(self, batch: dict): + """ @brief: this is the function which generate the token masks during training. It considers both the + perturbation masks where the tokens are randomly flipped to a different token, as well the mask for the + tokens that are replaced with [MASK] token for the network to predict. + + `focused_token_mask`: indicates all the tokens that is either perturbed, masked, or actually are the correct + ones. This is generated with cosine scheduling. + """ + pose_tokens = batch['groundtruth_pose_tokens'] + batch_size, device = pose_tokens.shape[0], pose_tokens.device + num_pose_heads, _ = self.backbone_net.get_num_heads() + num_token_positions = pose_tokens.shape[1] + + # step 1: calculate the number of tokens for each focused/mask/incorrect/correct types. + # focus = masked + correct + incorrect; The non-focused tokens are always assumed to be known correct tokens. + # The % of focused tokens are generated with the cosine schedule here so that more tokens are sampled. + focus_mask_probs = t.cos(t.pi * 0.5 * (t.zeros([batch_size, 1], device=device).float().uniform_(0, 1))) + incorrect_probs = t.zeros([batch_size, 1], device=device).uniform_(self._args['incorrect_token_ratio_min'], + self._args['incorrect_token_ratio_max']) + num_all_tokens_per_sample = num_pose_heads * num_token_positions + num_focus_tokens = (num_all_tokens_per_sample * focus_mask_probs).int() # [batch, 1] + num_masked_tokens = t.floor(num_focus_tokens * self._args['masked_token_ratio']).int() + num_incorrect_tokens = t.floor((num_focus_tokens - num_masked_tokens) * incorrect_probs).int() + # num_correct_tokens = num_focus_tokens - num_masked_tokens - num_incorrect_tokens + + # step 2: sampling and generate the token masks + random_order = t.rand((batch_size, num_all_tokens_per_sample), device=device).argsort(dim=-1) + focused_token_mask = random_order < num_focus_tokens + masked_token_mask = random_order < num_masked_tokens + incorrect_token_mask = t.logical_and(random_order >= num_masked_tokens, + random_order < num_masked_tokens + num_incorrect_tokens) + correct_token_mask = t.logical_and(random_order >= num_masked_tokens + num_incorrect_tokens, + random_order < num_focus_tokens) + + # step 4: the mask / incorrect level + mask_percentage = masked_token_mask.sum(dim=-1, keepdims=True) / num_all_tokens_per_sample + incorrect_percentage = incorrect_token_mask.sum(dim=-1, keepdims=True) / num_all_tokens_per_sample + + return focused_token_mask, masked_token_mask, incorrect_token_mask, \ + correct_token_mask, mask_percentage, incorrect_percentage + + def _generate_tokens_for_training(self, batch: Dict): + """ @brief: based on the mask and the number of steps, change the tokens accordingly. + """ + batch_size, num_positions_in_a_sample = \ + batch['local_motions'].shape[0], batch['groundtruth_pose_tokens'].shape[1] + + # incorrect tokens + input_tokens = batch['groundtruth_pose_tokens'].clone() + num_codes_pose_vqvae, _ = self.backbone_net.get_num_codes(include_aug_tokens=False) + random_pose_tokens = t.randint_like(input_tokens, high=num_codes_pose_vqvae, low=0) + input_tokens = t.where(batch['incorrect_token_mask'].view([batch_size, num_positions_in_a_sample, -1]), + random_pose_tokens, input_tokens) + + # masked tokens + mask_tokens = t.ones_like(input_tokens) * self.backbone_net.POSE_MASK_ID # the mask ids for the pose + input_tokens = t.where(batch['masked_token_mask'].view([batch_size, num_positions_in_a_sample, -1]), + mask_tokens, input_tokens) + + return input_tokens + + @property + def supporting_nets(self): + return self._supporting_networks + + def move_supporting_nets_to_device(self, device): + assert self._supporting_networks['root_net'] is None, "The root net is not supported in this version." + if next(self._supporting_networks['pose_net'].named_parameters())[1].device != device: + self._supporting_networks['pose_net'] = self._supporting_networks['pose_net'].to(device) + if self._supporting_networks['pose_net'].training: # just make sure they are in eval mode + self._supporting_networks['pose_net'] = self._supporting_networks['pose_net'].eval() + + def _construct_keyframe_prob(self, max_num_keyframes: int = None, no_keyframe_prob: float = 0.0): + """ @brief: generate the prob to sample each keyframe during training. + """ + scheduled_max_num_keyframes = max_num_keyframes * \ + (self.trainer.global_step / self.args['keyframe_num_warmup_steps']) + scheduled_max_num_keyframes = int(max(1, min(scheduled_max_num_keyframes, max_num_keyframes))) + + # construct the probability now; p_keyframe is the same for all keyframes=[1, max_num_keyframes] + # and p_keyframe=0 is the no-keyframe probability + prob_num_keyframes = [1.0 if i > 0 and i <= scheduled_max_num_keyframes else 0.0 + for i in range(max_num_keyframes + 1)] + prob_no_keyframe = no_keyframe_prob + prob_num_keyframes[0] = sum(prob_num_keyframes) / (1 - prob_no_keyframe) * prob_no_keyframe + prob_num_keyframes = np.array(prob_num_keyframes) + prob_num_keyframes /= prob_num_keyframes.sum() + return prob_num_keyframes + + def _sample_the_local_pose_conditions(self, local_motions, num_frames: int, text_embedding: t.Tensor = None): + """ @brief: generate the local pose cond during training. Note the sampling for starting frames, ending frames + and middle frames are done separately. + """ + NUM_START_FRAMES = NUM_END_FRAMES = self.backbone_net.get_num_frames_per_token() + NUM_MIDDLE_FRAMES = num_frames - NUM_START_FRAMES - NUM_END_FRAMES + assert NUM_MIDDLE_FRAMES > 0, "The number of frames should be larger than the number of start and end frames." + + local_pose = \ + extract_feature_from_motion_rep(local_motions, self.local_motion_rep, self._args['local_pose_feature']) + local_pose_component = {'start': local_pose[:, :NUM_START_FRAMES], + 'end': local_pose[:, -NUM_END_FRAMES:], + 'middle': local_pose[:, NUM_START_FRAMES:-NUM_END_FRAMES]} + + component_has_pose_cond, component_pose_cond = {}, {} + for component in ['start', 'end', 'middle']: + prob_num_keyframes = self._construct_keyframe_prob( + self._args[f'max_num_{component}_keyframes'], + no_keyframe_prob=self._args[f'no_{component}_keyframe_prob'] + ) + component_has_pose_cond[component], component_pose_cond[component] = \ + sample_keyframes(local_pose_component[component], + self._args[f'max_num_{component}_keyframes'], prob_num_keyframes) + has_pose_cond = t.cat([component_has_pose_cond['start'], + component_has_pose_cond['middle'], component_has_pose_cond['end']], dim=1) + pose_cond = t.cat([component_pose_cond['start'], + component_pose_cond['middle'], component_pose_cond['end']], dim=1) + + if text_embedding is not None: + assert self.backbone_net.ACCEPT_TEXT_EMB_INPUT, "The model does not accept text embedding as input." + has_text_emb = t.rand([text_embedding.shape[0], 1], device=text_embedding.device) < \ + self._args.get('prob_provide_text_emb', 0.2) + # provide text emb if end keyframes are not there + # has_text_emb = t.logical_or(has_text_emb, component_has_pose_cond['end'].sum(dim=1, keepdims=True) < 1) + text_embedding = t.where(has_text_emb, text_embedding, t.zeros_like(text_embedding)) + else: + text_embedding = has_text_emb = None + + return pose_cond, has_pose_cond, text_embedding, has_text_emb # dense condition and the has_target + + @property + def vqvae_model_loaded(self): + return self._vqvae_model_loaded diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/models/root_model.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/models/root_model.py new file mode 100644 index 0000000000000000000000000000000000000000..c522029350867ebaf32b2dc4060fbb8381632b49 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/models/root_model.py @@ -0,0 +1,308 @@ +from motionbricks.vqvae.neural_modules import vqvae +from motionbricks.motion_backbone.neural_modules.pose_backbone import pose_backbone_network +from motionbricks.motion_backbone.neural_modules.root_backbone import root_backbone_network +import torch as t +import os +import logging +from typing import Callable, Optional, Union, Dict + +import torch +from pytorch_lightning import LightningModule +from motionbricks.motionlib.core.motion_reps import MotionRepBase +import numpy as np +from motionbricks.helper.data_training_util import sample_motion_segments_from_motion_clips +from motionbricks.helper.data_training_util import sample_keyframes, extract_feature_from_motion_rep +from motionbricks.motionlib.core.motion_reps.dual_root_global_joints import GlobalRootGlobalJoints, LocalRootGlobalJoints + +log = logging.getLogger(__name__) + + +class MotionModel(LightningModule): + """ @brief: Root model that predicts continuous global root motion given sparse constraints. + + @input global_root_values: [batch, numConstrainFrames, 5] # optional + @input has_global_root_values: [batch, numFrames] (bool) # required + @input local_root_values: [batch, numConstrainFrames, 4] # optional + @input has_local_root_values: [batch, numFrames] (bool) # required + @input local_poses: [batch, numConstrainFrames, featdim] # optional + @input has_local_poses: [batch, numFrames] (bool) # required + @input num_tokens: [batch, 1] # optional + @input text_embeddings: [batch, text_dim] # optional + + @output pred_global_root_values: [batch, numFrames, 5] + @output num_token_logits: [batch, num_token_classes] + """ + + def __init__(self, + pose_vqvae_network: Optional[vqvae.VQVAE], + root_vqvae_network: Optional[vqvae.VQVAE], + backbone_network: Union[pose_backbone_network, root_backbone_network], + motion_rep: MotionRepBase, + optimizer: Callable[[list], torch.optim.Optimizer] = None, + scheduler: Optional[Callable[[torch.optim.Optimizer], torch.optim.lr_scheduler.LRScheduler]] = None, + device: Optional[Union[str, torch.device]] = None, + args: Dict = None, + # the other key args here: most of them for compatibility only and won't be used at all + **kwargs): + super().__init__() + + self.optimizer = optimizer + self.scheduler = scheduler + + self._supporting_networks = {'pose_net': pose_vqvae_network, 'root_net': root_vqvae_network} + self.backbone_net = backbone_network + + self.motion_rep: GlobalRootGlobalJoints = motion_rep + self.global_motion_rep: GlobalRootGlobalJoints = motion_rep.dual_rep.global_motion_rep + self.local_motion_rep: LocalRootGlobalJoints = motion_rep.dual_rep.local_motion_rep + + self.DEFAULT_NUM_JOINTS = self.motion_rep.num_joints + self._args = args + self.one_logger_callback = kwargs.get("one_logger_callback", None) + self.callbacks = [] + + self._load_vqvae_models() + + assert self._supporting_networks['pose_net'] is None and self._supporting_networks['root_net'] is None, \ + "The pose and root networks should be None for the root model." + self.pose_net, self.root_net = None, None + if device is not None: + self.backbone_net = self.backbone_net.to(device) + + def _load_vqvae_models(self): + self._vqvae_model_loaded = True # root model does not use a VQVAE + + def configure_optimizers(self): + if self.one_logger_callback is not None: + self.one_logger_callback.on_optimizer_init_start() + optimizer = self.optimizer(self.parameters()) + if self.one_logger_callback is not None: + self.one_logger_callback.on_optimizer_init_end() + if not self.scheduler: + return optimizer + + lt_kwargs = dict(self.scheduler.keywords.pop("lt_kwargs", {})) + lt_kwargs["scheduler"] = self.scheduler(optimizer) + return {"optimizer": optimizer, "lr_scheduler": lt_kwargs} + + def set_callbacks(self, callbacks: list): + self.callbacks = callbacks + + def configure_callbacks(self): + return self.callbacks + + def inference_step(self, batch, batch_idx, requires_grad=False, meta_info: Dict = {}): + if not hasattr(self, "_printed_inference_warning"): + self._printed_inference_warning = True + print("Warning: Root model does not have an explicit inference step. Reusing training step.") + with t.no_grad(): + return self.training_step(batch, batch_idx, use_outside_training=True, meta_info=meta_info) + + def training_step(self, batch, batch_idx, use_outside_training: bool = False, meta_info: Dict = {}): + """ @brief: the training step takes input a normalized motion representation. + batch.keys() -> dict_keys(['motion', 'motion_len', 'motion_pad_mask', 'batch_size']) + """ + assert self.training or use_outside_training, \ + "It's possible to use training_step on evaluation set. But otherwise self.training should be true." + + # step 0: data preparations for model training; generate both global and local motions that could be used later + batch_size, device = batch['batch_size'], batch['motion'].device + raw_global_motions, motion_lengths, _ = \ + batch.pop('motion'), batch.pop('motion_len'), batch.pop('motion_pad_mask') + if self.backbone_net.ACCEPT_TEXT_EMB_INPUT: + _, _, _ = batch.pop('text'), batch.pop('text_len'), batch.pop('text_pad_mask') + augmented_batch_size = int(batch_size * self._args['batchsize_mul_factor']) + + num_token_position = np.random.choice(np.arange(self._args['min_tokens'], self._args['max_tokens'] + 1)) + num_token_position_off_range = np.random.choice(np.arange(self._args['min_off_target_tokens_to_sample'], + self._args['max_off_target_tokens_to_sample'] + 1)) + sample_off_range_target_token = np.random.rand() < self._args['prob_off_range_target_token'] + num_token_position = num_token_position_off_range if sample_off_range_target_token else num_token_position + + batch['num_tokens'] = t.full([augmented_batch_size, 1], num_token_position).to(device) + num_frames = num_token_position * self.backbone_net.get_num_frames_per_token() + + valid_samples_id = (motion_lengths >= num_frames + 1) # 1 additional frame for global-local convertion + num_invalid_samples = batch_size - valid_samples_id.sum() + if num_invalid_samples > batch_size // 4 * 3: + return None # don't have enough valid data samples, skipping this batch + + sample_info = {} + global_motions = sample_motion_segments_from_motion_clips(raw_global_motions, motion_lengths, + num_frames, + self.args['batchsize_mul_factor'], info=sample_info, + motion_rep=self.global_motion_rep) + actual_batch_size = int(batch_size * self.args['batchsize_mul_factor']) + batch['text_embeddings'] = None if (not self.backbone_net.ACCEPT_TEXT_EMB_INPUT) else \ + batch.pop('text_feat')[sample_info['chosen_ids']].view([augmented_batch_size, -1]) + + # step 3: prepares the global & local input motions to the pose and root vqvae models + first_frame_heading_angle = t.rand(actual_batch_size).to(device) * np.pi * 2.0 \ + if not self.motion_rep.compute_kwargs['removing_heading'] else 0.0 + global_motions = self.global_motion_rep.change_first_heading( + global_motions, first_frame_heading_angle, is_normalized=True, to_normalize=True + ) # note this `change_first_heading` also moves the first frame to the origin + local_motions = self.motion_rep.dual_rep.global_to_local( + global_motions, is_normalized=True, to_normalize=True, + lengths=t.full([actual_batch_size], global_motions.shape[1]).to(device) + ) + local_motions, global_motions = \ + local_motions[:, :num_frames, :], global_motions[:, :num_frames, :] # drop last velocity padding frame + batch['local_motions'], batch['global_motions'] = local_motions, global_motions + + # step 2: sample the constraints, and all of them are in dense format (the network does support sparse format) + batch['local_root_values'], batch['has_local_root_values'] = \ + self._sample_the_conditions(extract_feature_from_motion_rep(batch['local_motions'], self.local_motion_rep, + self._args['local_root_feature']), num_frames) + batch['global_root_values'], batch['has_global_root_values'] = \ + self._sample_the_conditions(extract_feature_from_motion_rep(batch['global_motions'], self.global_motion_rep, + self._args['global_root_feature']), num_frames) + batch['local_poses'], batch['has_local_poses'] = \ + self._sample_the_conditions(extract_feature_from_motion_rep(batch['local_motions'], self.local_motion_rep, + self._args['local_pose_feature']), num_frames) + batch['text_embeddings'], batch['has_text_embeddings'] = \ + self._sample_text_embedding(batch['text_embeddings'], batch['has_global_root_values'], + batch['has_local_root_values'], batch['has_local_poses']) + + # step 3: the num_token processing + batch['num_tokens'] = batch['num_tokens'].clip(max=self.backbone_net.OUT_OF_REACH_NUM_TOKENS) + batch['groundtruth_num_tokens'] = batch['num_tokens'].clone() + provide_num_tokens = t.rand([augmented_batch_size, 1]) < self._args['prob_provide_num_tokens'] + batch['num_tokens'] = t.where(provide_num_tokens.to(device), batch['num_tokens'], + t.full_like(batch['num_tokens'], self.backbone_net.MASKED_NUM_TOKENS)) + + # step 4: core network forward and loss calculation; groundtruth num of token only used in training + model_outputs = self.backbone_net(batch['global_root_values'], batch['has_global_root_values'], + batch['local_root_values'], batch['has_local_root_values'], + batch['local_poses'], batch['has_local_poses'], batch['num_tokens'], + text_embeddings=batch['text_embeddings'], + has_text_embeddings=batch['has_text_embeddings'], + groundtruth_num_tokens=batch['groundtruth_num_tokens']) + + losses = self.loss(batch, model_outputs) + + if use_outside_training: # use in an evaluation process + meta_info['losses'] = losses + return None + + for key, val in losses.items(): + self.log(f"loss/train_{key}", val, on_step=True, + on_epoch=True, sync_dist=True, batch_size=batch["batch_size"]) + return losses['loss'] + + def loss(self, batch: Dict, model_output_batch: Dict): + """ @brief: calculate the root prediction loss and num-token classification loss. + """ + losses = {} + batch_size, num_valid_frames, device = \ + batch['global_motions'].shape[0], batch['global_motions'].shape[1], batch['global_motions'].device + + pred_local_root_motions = self.motion_rep.dual_rep.global_to_local( + model_output_batch['pred_global_root_values'][:, :num_valid_frames, ], + is_normalized=True, to_normalize=True, lengths=t.full([batch_size], num_valid_frames).to(device) + ) + + groundtruth_global_root_values = \ + extract_feature_from_motion_rep(batch['global_motions'][:, :num_valid_frames], + self.global_motion_rep, self._args['global_root_feature']) + global_root_recons_loss = \ + t.nn.SmoothL1Loss()(model_output_batch['pred_global_root_values'][:, :num_valid_frames, :], + groundtruth_global_root_values) + + groundtruth_global_root_values = \ + extract_feature_from_motion_rep(batch['local_motions'][:, :num_valid_frames - 1], + self.local_motion_rep, self._args['local_root_feature']) # drop last frame + local_root_recons_loss = \ + t.nn.SmoothL1Loss()(pred_local_root_motions[:, :num_valid_frames - 1, :], groundtruth_global_root_values) + + num_tokens_idx = batch['groundtruth_num_tokens'].reshape([-1]) - self._args['min_tokens'] + num_token_loss = t.nn.functional.cross_entropy(model_output_batch['num_token_logits'], num_tokens_idx) + pred_rank = model_output_batch['num_token_logits'].argsort(dim=1, descending=True) + for i in [1, 3, 5]: + losses[f'top_{i}_accuracy'] = (pred_rank[:, :i] == num_tokens_idx[:, None]).any(dim=-1).float().mean() + + total_loss = \ + global_root_recons_loss * self._args['global_root_loss_coeff'] + \ + local_root_recons_loss * self._args['local_root_loss_coeff'] + \ + num_token_loss * self._args['num_token_loss_coeff'] + + losses['num_token_loss'] = num_token_loss + losses['global_root_recons_loss'] = global_root_recons_loss + losses['local_root_recons_loss'] = local_root_recons_loss + losses['loss'] = total_loss + + return losses + + @property + def args(self): + return self._args + + @property + def supporting_nets(self): + return self._supporting_networks + + def move_supporting_nets_to_device(self, device): + pass # both networks are empty + + def _construct_keyframe_prob(self, max_num_keyframes: int = None, no_keyframe_prob: float = 0.0): + """ @brief: generate the prob to sample each keyframe during training. + """ + scheduled_max_num_keyframes = max_num_keyframes * \ + (self.trainer.global_step / self.args['keyframe_num_warmup_steps']) + scheduled_max_num_keyframes = int(max(1, min(scheduled_max_num_keyframes, max_num_keyframes))) + + # construct the probability now; p_keyframe is the same for all keyframes=[1, max_num_keyframes] + # and p_keyframe=0 is the no-keyframe probability + prob_num_keyframes = [1.0 if i > 0 and i <= scheduled_max_num_keyframes else 0.0 + for i in range(max_num_keyframes + 1)] + prob_no_keyframe = no_keyframe_prob + prob_num_keyframes[0] = sum(prob_num_keyframes) / (1 - prob_no_keyframe) * prob_no_keyframe + prob_num_keyframes = np.array(prob_num_keyframes) + prob_num_keyframes /= prob_num_keyframes.sum() + return prob_num_keyframes + + def _sample_the_conditions(self, feature: t.Tensor, num_frames: int): + """ @brief: sample sparse conditions (start/end keyframes) during training. + """ + NUM_START_FRAMES = NUM_END_FRAMES = self.backbone_net.get_num_frames_per_token() + NUM_MIDDLE_FRAMES = num_frames - NUM_START_FRAMES - NUM_END_FRAMES + assert NUM_MIDDLE_FRAMES > 0, "The number of frames should be larger than the number of start and end frames." + + feature_component = {'start': feature[:, :NUM_START_FRAMES], 'end': feature[:, -NUM_END_FRAMES:]} + + has_cond, cond = {}, {} + for component in ['start', 'end']: + prob_num_keyframes = self._construct_keyframe_prob( + self._args[f'max_num_{component}_keyframes'], + no_keyframe_prob=self._args[f'no_{component}_keyframe_prob'] + ) + has_cond[component], cond[component] = \ + sample_keyframes(feature_component[component], + self._args[f'max_num_{component}_keyframes'], prob_num_keyframes) + has_cond = t.cat([has_cond['start'], has_cond['end']], dim=1) + cond = t.cat([cond['start'], cond['end']], dim=1) + + return cond, has_cond # dense condition and the has_target + + def _sample_text_embedding(self, text_embedding: t.Tensor = None, has_global_root_values: t.Tensor = None, + has_local_root_values: t.Tensor = None, has_local_poses: t.Tensor = None): + if text_embedding is not None: + assert self.backbone_net.ACCEPT_TEXT_EMB_INPUT, "The model does not accept text embedding as input." + has_text_emb = t.rand([text_embedding.shape[0], 1], device=text_embedding.device) < \ + self._args.get('prob_provide_text_emb', 0.2) + + # provide text emb if no info about end keyframes are presented + NUM_END_FRAMES = self.backbone_net.get_num_frames_per_token() + has_end_target_info = t.logical_or(t.logical_or(has_global_root_values[:, -NUM_END_FRAMES:], + has_local_root_values[:, -NUM_END_FRAMES:]), + has_local_poses[:, -NUM_END_FRAMES:]) + has_text_emb = t.logical_or(has_text_emb, has_end_target_info.sum(dim=1, keepdims=True) < 1) + text_embedding = t.where(has_text_emb, text_embedding, t.zeros_like(text_embedding)) + else: + text_embedding = has_text_emb = None + + return text_embedding, has_text_emb # dense condition and the has_target + + @property + def vqvae_model_loaded(self): + return self._vqvae_model_loaded diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/models/sampling.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/models/sampling.py new file mode 100644 index 0000000000000000000000000000000000000000..14ced86bf0aea6c3a463181194eba265afc83465 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/models/sampling.py @@ -0,0 +1,14 @@ +import torch as t + + +def log(x, eps=1e-20): + return t.log(x.clamp(min=eps)) + + +def gumbel_noise(x): + noise = t.zeros_like(x).uniform_(0, 1) + return -log(-log(noise)) + + +def gumbel_sample(x, temperature=1., dim=-1): + return ((x / max(temperature, 1e-10)) + gumbel_noise(x)).argmax(dim=dim) diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/neural_modules/__init__.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/neural_modules/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/neural_modules/mlp.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/neural_modules/mlp.py new file mode 100644 index 0000000000000000000000000000000000000000..bf78c7b191fa50cf2721cd22a706c0dd58e8d418 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/neural_modules/mlp.py @@ -0,0 +1,28 @@ +import torch as t + +class FCBlock(t.nn.Module): + """Fully connected residual block""" + + def __init__(self, num_layers: int, layer_width: int, size_in: int, size_out: int, dropout: float = 0.0): + super(FCBlock, self).__init__() + self.num_layers = num_layers + self.layer_width = layer_width + + self.fc_layers = [t.nn.Linear(size_in, layer_width)] + self.relu_layers = [t.nn.LeakyReLU(inplace=True)] + if dropout > 0.0: + self.fc_layers.append(t.nn.Dropout(p=dropout)) + self.relu_layers.append(t.nn.Identity()) + self.fc_layers += [t.nn.Linear(layer_width, layer_width) for _ in range(num_layers - 1)] + self.relu_layers += [t.nn.LeakyReLU(inplace=True) for _ in range(num_layers - 1)] + + self.forward_projection = t.nn.Linear(layer_width, size_out) + self.fc_layers = t.nn.ModuleList(self.fc_layers) + self.relu_layers = t.nn.ModuleList(self.relu_layers) + + def forward(self, x: t.Tensor): + h = x + for layer, relu in zip(self.fc_layers, self.relu_layers): + h = relu(layer(h)) + f = self.forward_projection(h) + return f diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/neural_modules/pose_backbone.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/neural_modules/pose_backbone.py new file mode 100644 index 0000000000000000000000000000000000000000..f3e2a629b3f38714bd61900c626bacff94cf67e8 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/neural_modules/pose_backbone.py @@ -0,0 +1,229 @@ +import torch as t +import torch +from torch import nn +from typing import Dict, Optional +import numpy as np +from motionbricks.motion_backbone.neural_modules.position_embedding import PositionEmbedding +from motionbricks.motionlib.core.motion_reps import MotionRepBase +from motionbricks.motion_backbone.neural_modules.mlp import FCBlock as mlp +from motionbricks.helper.data_training_util import convert_sparse_cond_to_dense_cond_if_needed +from functools import cached_property +from motionbricks.helper.data_training_util import extract_feature_from_motion_rep + +class pose_backbone_network(nn.Module): + def __init__(self, motion_rep: MotionRepBase, args: Dict = None): + """ @brief: pose backbone network for motion generation. + """ + super().__init__() + self.motion_rep = motion_rep + self.global_motion_rep = motion_rep.dual_rep.global_motion_rep + self.local_motion_rep = motion_rep.dual_rep.local_motion_rep + + self._args = args + self._build_transformer_backbone() + self._build_input_embeddings_projections() + self.register_buffer('initted', torch.Tensor([False]).to(dtype=t.bool)) # if need to initialize the codebooks + + def init_embedding_from_codebooks(self, pose_codebook: t.Tensor, root_codebook: t.Tensor): + # make sure the codebook has the expected shapes + if not self._args['pose_vqvae'].get('has_codebook', True): + self.initted[:] = True + print("No codebook for pose vqvae, skipping initialization.") + else: + assert self._args.pose_vqvae.num_heads == pose_codebook.shape[0] and \ + self.get_num_codes(include_aug_tokens=False)[0] == pose_codebook.shape[1] and \ + self._args.pose_vqvae.code_dim == pose_codebook.shape[0] * pose_codebook.shape[2], \ + 'Pose codebook shape mismatch.' + pose_token_dim = pose_codebook.shape[2] + + # init the input pose codebook + pose_codebook = t.cat([pose_codebook, pose_codebook.mean(dim=1, keepdim=True)], dim=1) # add [mask] token + pose_codebook = pose_codebook.reshape([-1, pose_token_dim]) # change dim into [numHeads * num_codes, dim] + with t.no_grad(): + self._pose_token_emb.weight[:] = pose_codebook + + self.initted[:] = True + print("Successfully initialized the embeddings from vqvae codebook embeddings.") + + def _build_transformer_backbone(self): + """ @brief: the transformer backbone. + """ + encoder_layer = nn.TransformerEncoderLayer(d_model=self._args['n_embd'], + nhead=self._args['n_head'], batch_first=True) + self._transformer_model = nn.TransformerEncoder(encoder_layer, num_layers=self._args['n_layers']) + + def _build_input_embeddings_projections(self): + """ @brief: build the embeddings for the inputs + """ + # step 1: the projection & embedding matrix for input to the transformer; the input includes + # 1) pose tokens, 2) local root values, 3) pose values, 4) num_of_tokens + num_pose_heads, _ = self.get_num_heads() + num_pose_tokens, _ = self.get_num_codes(include_aug_tokens=False) + if self._args['pose_vqvae'].get('has_codebook', True): + pose_token_dim = self._args['pose_vqvae']['code_dim'] // num_pose_heads + else: + pose_token_dim = self._args['n_embd'] // num_pose_heads + + self._pose_token_emb = t.nn.Embedding(num_pose_heads * self.NUM_WITH_AUG_POSE_TOKENS, pose_token_dim) + self._proj_pose_token_emb = mlp(num_layers=self._args['pose_token_mlp_num_layers'], + layer_width=self._args['pose_feat_width'], + size_in=num_pose_heads * pose_token_dim, + size_out=self._args['pose_feat_width']) # 1) pose tokens + + num_frames_per_token = self.get_num_frames_per_token() + if self._args['cond_root_feature_is_from_motion_rep'] == 'local': + self._args['local_root_dim'] = extract_feature_from_motion_rep(t.zeros([1, 1, 1000]), self.local_motion_rep, + self._args['cond_root_feature']).shape[2] + else: + self._args['local_root_dim'] = extract_feature_from_motion_rep(t.zeros([1, 1, 1000]), self.global_motion_rep, + self._args['cond_root_feature']).shape[2] + self._proj_local_root_values = t.nn.Linear(self._args['local_root_dim'] * num_frames_per_token, + self._args['root_feat_width']) # 2) local root values + + self._args['local_pose_dim'] = extract_feature_from_motion_rep(t.zeros([1, 1, 1000]), self.local_motion_rep, + self._args['local_pose_feature']).shape[2] + self._proj_local_pose = t.nn.Linear(self._args['local_pose_dim'], + self._args['pose_feat_width'] // num_frames_per_token) # 3) pose values + assert self._args['pose_feat_width'] % self.get_num_frames_per_token() == 0, \ + "pose_feat_width needs to be divisible by num_frames_per_token" + + self._proj_num_valid_positions = t.nn.Embedding(self._args['max_tokens'] - self._args['min_tokens'] + 1, + self._args['token_length_feat_width']) # 4) num of tokens + + # step 2: the proj to merge all input features into the input and positional emb + self._proj_input = t.nn.Sequential( + t.nn.Linear(self._args['pose_feat_width'] + self._args['root_feat_width'] + + self._args['token_length_feat_width'], self._args['n_embd']), t.nn.ReLU() + ) + self._position_emb = PositionEmbedding(seq_length=self._args['max_tokens'], + dim=self._args['n_embd']) # the std for this fixed position emb is 0.5 + + # step 3: the output logit projection matrix + self._proj_pose_output_logit = t.nn.Linear(self._args['n_embd'], num_pose_heads * num_pose_tokens) + + # step 4: (optional) + if self.ACCEPT_TEXT_EMB_INPUT: + self._proj_text_embeddings = mlp(num_layers=self._args['pose_token_mlp_num_layers'], + layer_width=self._args['n_embd'], + size_in=self._args['text_emb_dim'], size_out=self._args['n_embd']) + + def forward(self, pose_tokens: t.Tensor, local_root_values: t.Tensor, + pose_cond: t.Tensor, has_pose_cond: t.Tensor, num_tokens: t.Tensor, + text_embeddings: t.Tensor = None, has_text_embeddings: t.Tensor = None): + """ + @input pose_tokens: [batch, numTokens, num_pose_heads] # required; could be all masked + @input local_root_values: [batch, numFrames, 4] # required + @input pose_cond: [batch, numConstrainFrames=[0, 10], featdim] # optional + @input has_poses_cond: [batch, numConstrainFrames=[0, 10]] (int) # required; where poses are provided + @input num_tokens: [batch, 1] # required + @input text_embedding: [batch, numTokens, text_embedding_dim] # optional + """ + batch_size, num_positions, num_pose_heads = pose_tokens.shape + device = pose_tokens.device + num_frames_per_token = self.get_num_frames_per_token() + + # step 1: generate the input embeddings for each term + local_root_values = local_root_values.reshape([batch_size, num_positions, + num_frames_per_token * self._args['local_root_dim']]) + root_embedding = self._proj_local_root_values(local_root_values) # [batch, num_positions, feat_dim] + + # step 2: the pose embeddings, merged from both pose token embedding and the pose value embeddings + dense_pose_cond, dense_has_pose_cond = \ + convert_sparse_cond_to_dense_cond_if_needed(pose_cond, has_pose_cond, num_positions * num_frames_per_token) + pose_cond_embedding = self._proj_local_pose(dense_pose_cond) # [batch, numFrames, feat_dim] + pose_cond_embedding = pose_cond_embedding.view([batch_size, num_positions * num_frames_per_token, + self._args['pose_feat_width'] // num_frames_per_token]) + + pose_token_id_offsets = \ + torch.arange(num_pose_heads).view([1, 1, num_pose_heads]).to(device=device) * self.NUM_WITH_AUG_POSE_TOKENS + pose_tokens = pose_tokens + pose_token_id_offsets # [batch, num_positions, num_heads] + pose_token_embedding = self._pose_token_emb(pose_tokens) # [batch, num_positions, num_heads, feat_dim] + pose_token_embedding = self._proj_pose_token_emb(pose_token_embedding.view([batch_size, num_positions, -1])) + pose_token_embedding = pose_token_embedding.view([batch_size, num_positions * num_frames_per_token, + self._args['pose_feat_width'] // num_frames_per_token]) + + dense_has_pose_cond = dense_has_pose_cond[:, :, None].float() # [batch, numFrames, 1] + pose_embedding = pose_cond_embedding * dense_has_pose_cond + pose_token_embedding * (1 - dense_has_pose_cond) + pose_embedding = pose_embedding.view([batch_size, num_positions, self._args['pose_feat_width']]) + + # step 3: the number of token embeddings [batch, num_positions, embedding_dim] + num_token_embedding = self._proj_num_valid_positions( + num_tokens.reshape([batch_size, 1]) - self._args['min_tokens']).expand([-1, num_positions, -1] + ) + + # step 4: merge the embeddings and apply positional emb; final shape [batch, num_positions, n_embd] + position_ids = t.arange(num_positions).to(device=device) + position_emb = self._position_emb.embed[position_ids].view([1, num_positions, self._args['n_embd']]) + input_embeddings = \ + self._proj_input(t.cat([pose_embedding, root_embedding, num_token_embedding], dim=-1)) + position_emb + + # step 5: the text input + token_mask = t.arange(num_positions).to(device) < num_tokens.view([batch_size, -1]) + if self.ACCEPT_TEXT_EMB_INPUT and text_embeddings is not None: + text_embeddings = self._proj_text_embeddings(text_embeddings)[:, None, :] + input_embeddings = t.concat([text_embeddings, input_embeddings], dim=1) # [batch, 1+num_positions, n_embd] + mask = t.zeros([batch_size, 1 + num_positions], device=device).bool() # zeros mean allowing + mask[:, :1] = ~has_text_embeddings.bool() + mask[:, 1:] = ~token_mask.bool() + else: + mask = ~token_mask.bool() + + # The shape of the 2D attn_mask is torch.Size([256, 83]), but should be (83, 83). + output = self._transformer_model(input_embeddings, src_key_padding_mask=mask)[:, -num_positions:] + pred_logits = self._proj_pose_output_logit(output).reshape([batch_size, num_positions, num_pose_heads, -1]) + + return {'pose_logits': pred_logits} + + def get_num_codes(self, include_aug_tokens: bool): + num_codes_per_head = {} + + for vqvae in ['pose_vqvae', 'root_vqvae']: # calculate nb_code per head from overall nb_codes + nb_code = self._args[vqvae]['nb_code'] + len_nb_code = len(np.array(self._args[vqvae]['nb_code']).reshape([-1])) + if len_nb_code > 1: # likely a fsq config + assert np.all(np.array(nb_code) == nb_code[0]), \ + "fsq config should have the same number of codes for each head" + num_codes_per_head[vqvae] = nb_code[0] + else: + num_heads = self._args[vqvae]['num_heads'] + code_dim = self._args[vqvae]['code_dim'] + if self._args[vqvae].get('has_codebook', True): + assert code_dim % num_heads == 0, "code dim cannot be divided by the number of heads." + num_codes_per_head[vqvae] = int(round(2 ** (np.log2(nb_code) / num_heads))) + assert num_codes_per_head[vqvae] ** num_heads == nb_code, \ + "the specified number of code is not compatible with the number of heads." + else: + num_codes_per_head[vqvae] = nb_code + + if include_aug_tokens: # include a [MASK] token + return num_codes_per_head['pose_vqvae'] + 1, num_codes_per_head['root_vqvae'] + 1 + else: + return num_codes_per_head['pose_vqvae'], num_codes_per_head['root_vqvae'] + + def get_num_heads(self): + """ brief: num heads for the tokenizers """ + return self._args['pose_vqvae']['num_heads'], self._args['root_vqvae']['num_heads'] + + def get_num_frames_per_token(self): + return (2 ** self._args['down_t']) + + # some handy properties + @property + def NUM_WITH_AUG_POSE_TOKENS(self): + return self.get_num_codes(include_aug_tokens=True)[0] + + @property + def NUM_WITH_AUG_ROOT_TOKENS(self): + return self.get_num_codes(include_aug_tokens=True)[1] + + @property + def POSE_MASK_ID(self): + return self.get_num_codes(include_aug_tokens=True)[0] - 1 + + @property + def ROOT_MASK_ID(self): + return self.get_num_codes(include_aug_tokens=True)[1] - 1 + + @cached_property + def ACCEPT_TEXT_EMB_INPUT(self): + return True if self._args.get('text_embeddings', None) is not None else False diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/neural_modules/position_embedding.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/neural_modules/position_embedding.py new file mode 100644 index 0000000000000000000000000000000000000000..2122b6a6cb7a27770b0f9e4afdf1bf438b10a928 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/neural_modules/position_embedding.py @@ -0,0 +1,39 @@ +import torch +from torch import nn +import math + + +def PE1d_sincos(seq_length, dim): + """ + :param d_model: dimension of the model + :param length: length of positions + :return: length*d_model position matrix + """ + if dim % 2 != 0: + raise ValueError("Cannot use sin/cos positional encoding with " + "odd dim (got dim={:d})".format(dim)) + pe = torch.zeros(seq_length, dim) + position = torch.arange(0, seq_length).unsqueeze(1) + div_term = torch.exp((torch.arange(0, dim, 2, dtype=torch.float) * + -(math.log(10000.0) / dim))) + pe[:, 0::2] = torch.sin(position.float() * div_term) + pe[:, 1::2] = torch.cos(position.float() * div_term) + + return pe.unsqueeze(1) + + +class PositionEmbedding(nn.Module): + """ + Absolute pos embedding (standard), learned. + """ + def __init__(self, seq_length, dim, dropout: float = 0.0, grad=False): + super().__init__() + self.embed = nn.Parameter(data=PE1d_sincos(seq_length, dim), requires_grad=grad) + self.dropout = nn.Dropout(p=dropout) + + def forward(self, x): + # x.shape: bs, seq_len, feat_dim + l = x.shape[1] + x = x.permute(1, 0, 2) + self.embed[:l].expand(x.permute(1, 0, 2).shape) + x = self.dropout(x.permute(1, 0, 2)) + return x diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/neural_modules/root_backbone.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/neural_modules/root_backbone.py new file mode 100644 index 0000000000000000000000000000000000000000..4d21f6454690b93b7ab586cde44b823fe6a9ff1f --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motion_backbone/neural_modules/root_backbone.py @@ -0,0 +1,313 @@ +import torch as t +import torch +from torch import nn +from typing import Dict, Optional +import numpy as np +from motionbricks.motion_backbone.neural_modules.position_embedding import PositionEmbedding +from motionbricks.motionlib.core.motion_reps import MotionRepBase +from motionbricks.motion_backbone.neural_modules.mlp import FCBlock as mlp +from functools import cached_property +from motionbricks.vqvae.neural_modules.encdec_double_cond import DoubleCondDecoder +from motionbricks.helper.data_training_util import extract_feature_from_motion_rep + +class root_backbone_network(nn.Module): + def __init__(self, args: Dict, motion_rep: MotionRepBase): + """ @brief: root backbone network for motion generation. + """ + super().__init__() + self._args = args + + self.motion_rep = motion_rep + self.global_motion_rep = motion_rep.dual_rep.global_motion_rep + self.local_motion_rep = motion_rep.dual_rep.local_motion_rep + + self.IS_MODEL_TOKENIZED = False + self._build_backbone() + self._build_input_embeddings() + + def _build_backbone(self): + """ @brief: the transformer backbone for the lp. The input is the embeddings of the start and end frames and + the target root transform + """ + encoder_layer = nn.TransformerEncoderLayer(d_model=self._args['n_embd'], + nhead=self._args['n_head'], batch_first=True) + self._shared_transformer_model = nn.TransformerEncoder(encoder_layer, num_layers=self._args['n_layers_shared']) + + if self._args['n_layers_root_token'] > 0: + self._root_token_transformer_model = \ + nn.TransformerEncoder(encoder_layer, num_layers=self._args['n_layers_root_token']) + else: + self._root_token_transformer_model = None + self._args['local_root_dim'] = extract_feature_from_motion_rep(t.zeros([1, 1, 1000]), self.local_motion_rep, + self._args['local_root_feature']).shape[2] + self._args['global_root_dim'] = extract_feature_from_motion_rep(t.zeros([1, 1, 1000]), self.global_motion_rep, + self._args['global_root_feature']).shape[2] + self._args['local_pose_dim'] = extract_feature_from_motion_rep(t.zeros([1, 1, 1000]), self.local_motion_rep, + self._args['local_pose_feature']).shape[2] + + self._conv_output = DoubleCondDecoder( + self._args['global_root_dim'], self._args['n_embd'], + down_t=self._args['down_t'], width=self._args['width'], depth=self._args['depth'], + dilation_growth_rate=self._args['dilation_growth_rate'], + activation=self._args['activation'], norm=self._args['norm'], + target_cond_dim=self._args['global_root_dim'], # global root information + external_cond_dim=self._args['n_embd'] # frame emb from root & pose + ) + + def _build_input_embeddings(self): + """ @brief: + @input global_root_values: [batch, numConstrainFrames=[0, 8], 5] # optional, also used in root decoder + @input has_global_root_values: [batch, 8] # required + + @input local_root_values: [batch, numConstrainFrames=[0, 8], 4] # optional + @input has_local_root_values: [batch, 8] # required + + @input start_pose: [batch, numConstrainFrames=4, featdim] # required + @input has_start_pose: [batch, 4] (bool) # required; whether start_pose is provided + + @input target_pose: [batch, numConstrainFrames=[0, 4], featdim] # optional + @input has_target_pose: [batch, 4] (bool) # required; whether target_pose is provided + + @input num_tokens: [batch, 1] # optional + """ + num_frames_per_token = self.get_num_frames_per_token() + + # input emb projection + self._proj_local_pose = nn.Linear(self._args['local_pose_dim'], self._args['pose_feat_dim']) + self._proj_local_root_value = nn.Linear(self.args['local_root_dim'], + self._args['local_root_feat_dim']) + self._proj_global_root_value = nn.Linear(self.args['global_root_dim'], + self._args['global_root_feat_dim']) + + # emb when the constraints are not given + self._no_local_pose_emb = nn.Parameter(torch.randn([self._args['pose_feat_dim']])) + self._no_local_root_emb = nn.Parameter(torch.randn([self._args['local_root_feat_dim']])) + self._no_global_root_emb = nn.Parameter(torch.randn([self._args['global_root_feat_dim']])) + + self._conv_no_frame_emb = nn.Parameter(torch.randn([self._args['n_embd']])) + + proj_input_dim = self._args['pose_feat_dim'] + \ + self._args['local_root_feat_dim'] + self._args['global_root_feat_dim'] + self._proj_start_input = mlp(num_layers=self._args['input_feat_mlp_num_layers'], + layer_width=self._args['n_embd'], + size_in=proj_input_dim, size_out=self._args['n_embd']) + self._proj_end_input = mlp(num_layers=self._args['input_feat_mlp_num_layers'], + layer_width=self._args['n_embd'], + size_in=proj_input_dim, size_out=self._args['n_embd']) + self._input_position_emb = t.nn.Embedding(num_frames_per_token * 2, self._args['n_embd']) + + # the num_token emd + self._proj_input_num_tokens = t.nn.Embedding( + self._args['max_tokens'] - self._args['min_tokens'] + 1 + 1 + 1, self._args['n_embd'] + ) # the num_token input include [min_tokens, max_tokens] and [out of reach (max_token + 1)] and [mask] + self._position_emb = PositionEmbedding(seq_length=self._args['max_tokens'], + dim=self._args['n_embd']) # the std for this fixed position emb is 0.5 + + # output projection; the num_token input include [min_tokens, max_tokens] and [out of reach (max_token + 1)] + self._proj_num_token_output_logit = t.nn.Linear(self._args['n_embd'], + self._args['max_tokens'] - self._args['min_tokens'] + 1 + 1) + + # step 4: (optional) + if self.ACCEPT_TEXT_EMB_INPUT: + self._proj_text_embeddings = mlp(num_layers=self._args['input_feat_mlp_num_layers'], + layer_width=self._args['n_embd'], + size_in=self._args['text_emb_dim'], size_out=self._args['n_embd']) + if self.USE_HARD_NUM_TOKEN_EMB_FOR_ROOT_PREDICTION and self._root_token_transformer_model is not None: + self._middle_token_emb = t.nn.Embedding(self._args['max_tokens'] - self._args['min_tokens'] + 1 + 1, + self._args['n_embd']) + + def forward(self, global_root_values: t.Tensor, has_global_root_values: t.Tensor, + local_root_values: t.Tensor, has_local_root_values: t.Tensor, + poses: t.Tensor, has_poses: t.Tensor, num_tokens: t.Tensor, + text_embeddings: Optional[t.Tensor] = None, has_text_embeddings: Optional[t.Tensor] = None, + groundtruth_num_tokens: t.Tensor = None, + allowed_pred_num_tokens: t.Tensor = None, config: dict = {}): + """ @brief: + @input global_root_values: [batch, numConstrainFrames=[0, 8], 5] # required, also used in root decoder + @input has_global_root_values: [batch, 8] # required + + @input local_root_values: [batch, numConstrainFrames=[0, 8], 4] # required + @input has_local_root_values: [batch, 8] # required + + @input pose: [batch, numConstrainFrames=8, featdim] # required + @input has_pose: [batch, 8] (bool) # required; whether start_pose is provided + + @input num_tokens: [batch, 1] # optional + + groundtruth_num_tokens: [batch, 1] # optional; only valid in training + """ + batch_size, device = poses.shape[0], poses.device + num_frames_per_token = self.get_num_frames_per_token() + + # step 1: construct the frame embedding and initial time emb + local_pose_emb = self._proj_local_pose(poses) # [batch, numFrames, dim] + local_root_emb = self._proj_local_root_value(local_root_values) # [batch, numFrames, dim] + global_root_emb = self._proj_global_root_value(global_root_values) # [batch, numFrames, dim] + + local_pose_emb = local_pose_emb * has_poses[:, :, None].float() + \ + self._no_local_pose_emb[None, None, :] * (1 - has_poses[:, :, None].float()) + local_root_emb = local_root_emb * has_local_root_values[:, :, None].float() + \ + self._no_local_root_emb[None, None, :] * (1 - has_local_root_values[:, :, None].float()) + global_root_emb = global_root_emb * has_global_root_values[:, :, None].float() + \ + self._no_global_root_emb[None, None, :] * (1 - has_global_root_values[:, :, None].float()) + + start_frame_emb = torch.cat([local_pose_emb[:, :num_frames_per_token, :], + local_root_emb[:, :num_frames_per_token, :], + global_root_emb[:, :num_frames_per_token, :]], dim=-1) + start_frame_emb = self._proj_start_input(start_frame_emb) + end_frame_emb = torch.cat([local_pose_emb[:, -num_frames_per_token:, :], + local_root_emb[:, -num_frames_per_token:, :], + global_root_emb[:, -num_frames_per_token:, :]], dim=-1) + end_frame_emb = self._proj_end_input(end_frame_emb) + frame_emb = torch.cat([start_frame_emb, end_frame_emb], dim=1) + positioned_frame_emb = frame_emb + self._input_position_emb.weight[None, :, :] + + first_stage_time_emb = self._proj_input_num_tokens(num_tokens - self._args['min_tokens']) # [batch, dim] + first_stage_time_emb = first_stage_time_emb.view([batch_size, 1, self._args['n_embd']]) + + # step 2: first stage transformer forward for the num token prediction + first_stage_input_emb = t.concat([first_stage_time_emb, positioned_frame_emb], dim=1) + + if self.ACCEPT_TEXT_EMB_INPUT and text_embeddings is not None: + text_embeddings = self._proj_text_embeddings(text_embeddings)[:, None, :] + first_stage_input_emb = \ + t.concat([text_embeddings, first_stage_input_emb], dim=1) # [batch, 1+num_positions, n_embd] + first_stage_mask = t.zeros([batch_size, 1 + 1 + num_frames_per_token * 2], + device=device).bool() # zeros mean allowing + first_stage_mask[:, :1] = ~has_text_embeddings.bool() + else: + first_stage_mask = None + + first_stage_output_emb = self._shared_transformer_model(first_stage_input_emb, + src_key_padding_mask=first_stage_mask) + num_token_logits = \ + self._proj_num_token_output_logit(first_stage_output_emb[:, self.TRANSFORMER_TIME_LOGIT_ID, :]) + + assert self.USE_HARD_NUM_TOKEN_EMB_FOR_ROOT_PREDICTION, "Only support hard num token emb." + if groundtruth_num_tokens is not None: + chosen_token = groundtruth_num_tokens.view([batch_size]) - self._args['min_tokens'] + else: + assert not self.training, "groundtruth_num_tokens is required in training." + if not config.get('allow_pred_out_of_reach_num_tokens', True): + # erase the prob for predicting out of reach token (OOR token) + num_token_logits = num_token_logits.clone() + num_token_logits[:, self.OUT_OF_REACH_NUM_TOKENS - self._args['min_tokens']] = -t.inf + if allowed_pred_num_tokens is not None: + # only the chosen token is allowed to be predicted + num_time_tokens = self._args['max_tokens'] - self._args['min_tokens'] + 1 + modified_num_token_logits = t.where(allowed_pred_num_tokens == 1, + num_token_logits[:, :num_time_tokens], + t.full([batch_size, num_time_tokens], -t.inf).to(device)) + + num_token_logits = t.cat([modified_num_token_logits, num_token_logits[:, num_time_tokens:]], dim=-1) + + chosen_token = torch.argmax(num_token_logits, dim=-1).int() + chosen_token = t.where(num_tokens.view([batch_size]) == self.MASKED_NUM_TOKENS, + chosen_token, num_tokens.view([batch_size]) - self._args['min_tokens']) + + # step 3: the root global value transformer + position_ids = t.arange(self._args['max_tokens']).to(device=device) + position_emb = self._position_emb.embed[position_ids].view([1, self._args['max_tokens'], self._args['n_embd']]) + position_emb = position_emb.expand([batch_size, -1, -1]) + token_mask = t.arange(self._args['max_tokens']).view([1, -1]).to(device) < \ + chosen_token.view([-1, 1]) + self._args['min_tokens'] + + if self._root_token_transformer_model is None: + second_stage_output_emb = position_emb + else: + second_stage_token_emb = self._middle_token_emb(chosen_token) + second_stage_input_emb = t.concat([second_stage_token_emb[:, None, :], + positioned_frame_emb, position_emb], dim=1) + second_stage_mask = t.cat([t.zeros([batch_size, 1 + num_frames_per_token * 2], + device=device).bool(), # num of token emb, frame emb + ~token_mask], dim=1) + second_stage_output_emb = \ + self._root_token_transformer_model(second_stage_input_emb, src_key_padding_mask=second_stage_mask) + second_stage_output_emb = \ + second_stage_output_emb[:, -self._args['max_tokens']:] # remove frame and num_token emb + + # step 4: the root global value conv output + pred_num_tokens = chosen_token + self._args['min_tokens'] + batch = {} + keys = ['frame', 'global_root'] + num_total_frames = self._args['max_tokens'] * num_frames_per_token + batch['has_frame'] = t.logical_or(t.logical_or(has_poses, has_global_root_values), has_local_root_values) + batch['frame'] = t.where(batch['has_frame'][:, :, None], frame_emb, self._conv_no_frame_emb[None, None, :]) + batch['dense_frame'] = t.cat([batch['frame'][:, :num_frames_per_token], + self._conv_no_frame_emb[None, None, :].repeat([batch_size, num_total_frames - + num_frames_per_token, 1])], dim=1) + + batch['global_root'], batch['has_global_root'] = global_root_values, has_global_root_values + batch['dense_global_root'] = t.cat([batch['global_root'][:, :num_frames_per_token], + t.zeros([batch_size, num_total_frames - num_frames_per_token, + self._args['global_root_dim']], device=device)], dim=1) + + for key in keys: # construct the full batch from sparse ones + batch['dense_has_' + key] = \ + t.cat([batch['has_' + key][:, :num_frames_per_token], + t.zeros([batch_size, num_total_frames - num_frames_per_token], device=device).bool()], dim=1) + for i in range(num_frames_per_token): + offsets = (pred_num_tokens[:, None] * num_frames_per_token - num_frames_per_token + i).long() + batch['dense_' + key] = \ + batch['dense_' + key].scatter(1, offsets[:, :, None].repeat([1, 1, batch[key].shape[-1]]), + batch[key][:, -num_frames_per_token + i][:, None, :]) + batch['dense_has_' + key] = \ + batch['dense_has_' + key].scatter(1, offsets[:, :], + batch['has_' + key][:, -num_frames_per_token + i][:, None]) + + pred_global_root_values = self._conv_output( + second_stage_output_emb.transpose(1, 2), external_cond=batch['dense_frame'], + target_cond=batch['dense_global_root'], + has_target_cond=batch['dense_has_global_root'], token_mask=token_mask + ).transpose(1, 2) # NOTE: only dense_has_global_root is used for no-show cond. Frame-cond uses non-emb instead + + return {'num_token_logits': num_token_logits, 'pred_num_tokens': pred_num_tokens, + 'pred_global_root_values': pred_global_root_values} + + def get_num_frames_per_token(self): + return 2 ** self._args['down_t'] + + @property + def args(self): + return self._args + + def get_num_heads(self): + """ brief: num heads for the tokenizers """ + return self._args['pose_vqvae']['num_heads'], self._args['root_vqvae']['num_heads'] + + def get_num_codes(self, include_aug_tokens: bool): + num_codes_per_head = {} + + for vqvae in ['pose_vqvae', 'root_vqvae']: # calculate nb_code per head from overall nb_codes + nb_code = self._args[vqvae]['nb_code'] + num_heads = self._args[vqvae]['num_heads'] + code_dim = self._args[vqvae]['code_dim'] + assert code_dim % num_heads == 0, "code dim cannot be divided by the number of heads." + num_codes_per_head[vqvae] = int(round(2 ** (np.log2(nb_code) / num_heads))) + assert num_codes_per_head[vqvae] ** num_heads == nb_code, \ + "the specified number of code is not compatible with the number of heads." + + if include_aug_tokens: # include a [MASK] token + return num_codes_per_head['pose_vqvae'] + 1, num_codes_per_head['root_vqvae'] + 1 + else: + return num_codes_per_head['pose_vqvae'], num_codes_per_head['root_vqvae'] + + @property + def OUT_OF_REACH_NUM_TOKENS(self): + return self._args['max_tokens'] + 1 + + @property + def MASKED_NUM_TOKENS(self): + return self._args['max_tokens'] + 2 + + @cached_property + def ACCEPT_TEXT_EMB_INPUT(self): + return True if self._args.get('text_embeddings', None) is not None else False + + @property + def TRANSFORMER_TIME_LOGIT_ID(self): + return 1 if self.ACCEPT_TEXT_EMB_INPUT else 0 + + @cached_property + def USE_HARD_NUM_TOKEN_EMB_FOR_ROOT_PREDICTION(self): + return self._args.get('use_hard_num_token_emb_for_root_prediction', False) diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/__init__.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/__init__.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/__init__.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..315e87cbb98980489a06853aca46490043b90a53 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/__init__.py @@ -0,0 +1 @@ +from .motion_reps_base.motion_rep_base import MotionRepBase # noqa diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/dual_root_global_joints.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/dual_root_global_joints.py new file mode 100644 index 0000000000000000000000000000000000000000..617c3caf76e1eeea710d4fe5cf31cd8ca6ddbb99 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/dual_root_global_joints.py @@ -0,0 +1,66 @@ +from .motion_reps_base.dual_root_local_body import DualRootLocalBody +from .motion_reps_base.global_root_local_body import GlobalRootLocalBody +from .motion_reps_base.local_root_local_body import LocalRootLocalBody + +COMPUTE_KWARGS = { + "local_vel_without_root": False, + "local_root_vel_with_y": False, + "compute_heading_method": "hips_pos", # to compute the root heading + "removing_heading": False, +} + +DEFAULT_JOINT_POSITIONS_FROM = "global_rot_data" + + +class DualRootGlobalJoints(DualRootLocalBody): + """Motion representation with global rotation but without removing the heading.""" + + _name_ = "dual_root_global_joints" + compute_kwargs = COMPUTE_KWARGS + default_joint_positions_from = DEFAULT_JOINT_POSITIONS_FROM + + def __init__(self, *args, **kwargs): + super().__init__( + *args, + global_class=GlobalRootGlobalJoints, + local_class=LocalRootGlobalJoints, + **kwargs, + ) + + +def get_body_keys_dim(self, nbjoints: int): + # as removing heading is set to False, we does not remove the y rotation to any data in both root and body + return { + "ric_data": [ + (nbjoints - 1) * 3 + ], # xyz without the root: careful it is actually not rotation invariant + "global_rot_data": [ + nbjoints * 6 + ], # 6D rot with root (y rotation is not removed) + "local_vel": [nbjoints * 3], # local_vel xyz (with root) + "foot_contacts": [4], # Left: Foot + Toe / Right: Foot + Toe + } + + +class GlobalRootGlobalJoints(GlobalRootLocalBody): + """Motion representation with global root.""" + + dual_class = DualRootGlobalJoints + get_body_keys_dim = get_body_keys_dim + compute_kwargs = COMPUTE_KWARGS + default_joint_positions_from = DEFAULT_JOINT_POSITIONS_FROM + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + + +class LocalRootGlobalJoints(LocalRootLocalBody): + """Motion representation with local root.""" + + dual_class = DualRootGlobalJoints + get_body_keys_dim = get_body_keys_dim + compute_kwargs = COMPUTE_KWARGS + default_joint_positions_from = DEFAULT_JOINT_POSITIONS_FROM + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/motion_reps_base/__init__.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/motion_reps_base/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/motion_reps_base/dual_root_local_body.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/motion_reps_base/dual_root_local_body.py new file mode 100644 index 0000000000000000000000000000000000000000..82332d0460d1695d41ae988285f8572c31342f49 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/motion_reps_base/dual_root_local_body.py @@ -0,0 +1,378 @@ +import logging +from typing import Optional, Tuple, Union + +import numpy as np +import torch + +from motionbricks.motionlib.core.skeletons import SkeletonBase +from motionbricks.motionlib.core.utils.stats import Stats + +from .global_root_local_body import GlobalRootLocalBody +from .local_root_local_body import LocalRootLocalBody +from .seperate_root_local_body import SeparatedRootLocalBody + +log = logging.getLogger(__name__) + + +class DualRootLocalBody(SeparatedRootLocalBody): + """Representation with global root and local root.""" + + def __init__( + self, + fps: float, + skeleton: SkeletonBase, + name: str, + *, + # keywords only args + global_class: GlobalRootLocalBody, + local_class: LocalRootLocalBody, + stats: Optional[Stats] = None, + ): + global_motion_rep = global_class(fps=fps, skeleton=skeleton, name="global") + local_motion_rep = local_class(fps=fps, skeleton=skeleton, name="local") + + assert ( + global_motion_rep.default_joint_positions_from + == local_motion_rep.default_joint_positions_from + ) + self.default_joint_positions_from = ( + global_motion_rep.default_joint_positions_from + ) + + self.root_keys_dim = ( + global_motion_rep.root_keys_dim | local_motion_rep.root_keys_dim + ) + # double check there is no overlap between them + assert len(self.root_keys_dim) == len(global_motion_rep.root_keys_dim) + len( + local_motion_rep.root_keys_dim + ) + + # make sure they use the same body motion representation + assert global_motion_rep.body_keys_dim == local_motion_rep.body_keys_dim + self.body_keys_dim = global_motion_rep.body_keys_dim + + super().__init__(fps, skeleton, name, stats) + + # assign after module.init + self.global_motion_rep = global_motion_rep + self.local_motion_rep = local_motion_rep + + # useful indices + self.indices["global_root"] = np.arange(0, global_motion_rep.motion_root_dim) + self.indices["local_root"] = np.arange( + global_motion_rep.motion_root_dim, + self.motion_root_dim, + ) + self.indices["global_rep"] = np.concatenate( + (self.indices["global_root"], self.indices["body"]) + ) + self.indices["local_rep"] = np.concatenate( + (self.indices["local_root"], self.indices["body"]) + ) + + # make sure it uses the same args for compute local motion features + assert global_motion_rep.compute_kwargs == local_motion_rep.compute_kwargs + self.compute_kwargs = global_motion_rep.compute_kwargs + + # subset: it is global by default + self.motion_rep_subset_dim = self.global_motion_rep.motion_rep_dim + + # no dual rep as it is the rep itself + self.dual_rep = None + + # extract the stats for the subset motion rep + if stats is not None and stats.is_loaded(): + # global stats + global_mean = stats.mean[self.indices["global_rep"]] + global_std = stats.std[self.indices["global_rep"]] + + self.global_motion_rep.stats = Stats(eps=stats.eps, legacy=stats.legacy) + self.global_motion_rep.stats.register_from_tensors(global_mean, global_std) + + # local stats + local_mean = stats.mean[self.indices["local_rep"]] + local_std = stats.std[self.indices["local_rep"]] + self.local_motion_rep.stats = Stats(eps=stats.eps, legacy=stats.legacy) + self.local_motion_rep.stats.register_from_tensors(local_mean, local_std) + + def get_feature_subset( + self, motion: torch.Tensor, mode: str = "global" + ) -> torch.Tensor: + """Extract either global or local features from the motion tensor. + + Args: + motion: Motion tensor of shape [..., feature_dim] + mode: Either "global" or "local" + + Returns: + Subset of features corresponding to the specified mode + """ + assert mode in ["global", "local"] + return motion[..., self.indices[f"{mode}_rep"]] + + def get_motion_rep_subset( + self, mode: str = "global" + ) -> Union[GlobalRootLocalBody, LocalRootLocalBody]: + """Get the motion representation object for either global or local features. + + Args: + mode: Either "global" or "local" + + Returns: + The corresponding motion representation object + + Raises: + ValueError: If mode is not "global" or "local" + """ + if mode == "global": + return self.global_motion_rep + elif mode == "local": + return self.local_motion_rep + else: + raise ValueError("The mode should be global or local only.") + + def get_root_index_subset(self, mode: str = "global") -> np.ndarray: + """Get indices for either global or local root features. + + Args: + mode: Either "global" or "local" + + Returns: + Array of indices for the specified root features + + Raises: + ValueError: If mode is not "global" or "local" + """ + if mode == "global": + return self.indices["global_root"] + elif mode == "local": + return self.indices["local_root"] + else: + raise ValueError("The mode should be global or local only.") + + def get_body_index_subset(self, mode: str) -> np.ndarray: + """Get indices for body features. + + Args: + mode: Unused parameter kept for API consistency + + Returns: + Array of indices for body features + """ + return self.indices["body"] + + def _one_subset_to_the_other( + self, + features: torch.Tensor, + is_normalized: bool, + to_normalize: bool, + mode: str, + lengths: Optional[torch.Tensor] = None, + ) -> torch.Tensor: + """Convert features between global and local representations. + + Args: + features: Input features to convert + is_normalized: Whether input features are normalized + to_normalize: Whether to normalize output features + mode: Either "local_to_global" or "global_to_local" + lengths: Optional sequence lengths for batched data + + Returns: + Converted features in the target representation + """ + if mode == "local_to_global": + motion_rep_from = self.local_motion_rep + motion_rep_to = self.global_motion_rep + elif mode == "global_to_local": + motion_rep_from = self.global_motion_rep + motion_rep_to = self.local_motion_rep + else: + raise ValueError("Mode was not recognized.") + + from_rep, to_rep = mode.split("_to_") + + data_type = motion_rep_from.detect_all_body_or_root(features) + if data_type == "all": + # also take care of the body + body_motion = motion_rep_from.extract_body(features) + else: + assert data_type == "root" + + root_motion = motion_rep_from.extract_root(features) + + if is_normalized: + root_motion = self.unnormalize( + root_motion, index=self.indices[f"{from_rep}_root"] + ) + # unnormalize the body only if needed + if not to_normalize and data_type == "all": + body_motion = self.unnormalize(body_motion, index=self.indices["body"]) + + r_pos, r_rot_quat = motion_rep_from.compute_root_pos_and_rot(root_motion) + + # compute new root representation + new_root_motion = motion_rep_to.compute_root_rep_from_root_pos_and_rot( + r_pos, r_rot_quat, lengths + ) + + if to_normalize: + new_root_motion = self.normalize( + new_root_motion, index=self.indices[f"{to_rep}_root"] + ) + if not is_normalized and data_type == "all": + # normalize the body only if needed + body_motion = self.normalize(body_motion, index=self.indices["body"]) + + if data_type == "root": + assert new_root_motion.shape[-1] == motion_rep_to.motion_root_dim + return new_root_motion + + # otherwise recreate the all feature vector + new_features = motion_rep_to.concat_root_body(new_root_motion, body_motion) + assert new_features.shape[-1] == motion_rep_to.motion_rep_dim + return new_features + + def global_to_local( + self, + features: torch.Tensor, + is_normalized: bool, + to_normalize: bool, + lengths: Optional[torch.Tensor] = None, + ) -> torch.Tensor: + """Convert features from global to local representation. + + Args: + features: Input features in global representation + is_normalized: Whether input features are normalized + to_normalize: Whether to normalize output features + lengths: Optional sequence lengths for batched data + + Returns: + Features in local representation + """ + return self._one_subset_to_the_other( + features, + is_normalized=is_normalized, + to_normalize=to_normalize, + mode="global_to_local", + lengths=lengths, + ) + + def local_to_global( + self, + features: torch.Tensor, + is_normalized: bool, + to_normalize: bool, + lengths: Optional[torch.Tensor] = None, + ) -> torch.Tensor: + """Convert features from local to global representation. + + Args: + features: Input features in local representation + is_normalized: Whether input features are normalized + to_normalize: Whether to normalize output features + lengths: Optional sequence lengths for batched data + + Returns: + Features in global representation + """ + return self._one_subset_to_the_other( + features, + is_normalized=is_normalized, + to_normalize=to_normalize, + mode="local_to_global", + lengths=lengths, + ) + + def cat_global_and_local( + self, + global_motion: torch.Tensor, + local_motion: torch.Tensor, + ) -> torch.Tensor: + """Concatenate global and local motion features. + + Args: + global_motion: Motion features in global representation + local_motion: Motion features in local representation + + Returns: + Combined motion features containing both roots and body (the dual form) + """ + # extract global info + global_root = self.global_motion_rep.extract_root(global_motion) + global_body = self.global_motion_rep.extract_body(global_motion) + + # extract local info + local_root = self.local_motion_rep.extract_root(local_motion) + local_body = self.local_motion_rep.extract_body(local_motion) + + # global_body and local body should be the same + + assert (local_body == global_body).all() + motion = torch.cat([global_root, local_root, local_body], axis=-1) + return motion + + def change_first_heading( + self, + motion: torch.Tensor, + first_heading_angle: float, + is_normalized: bool, + to_normalize: bool, + return_numpy: bool = False, + ) -> Union[torch.Tensor, np.ndarray]: + """Transform motion to be relative to the first frame. + + Args: + motion: Input motion features + is_normalized: Whether input features are normalized + to_normalize: Whether to normalize output features + return_numpy: Whether to return a numpy array instead of tensor + + Returns: + Canonicalized motion features + """ + if isinstance(motion, np.ndarray): + motion = torch.from_numpy(motion) + + if is_normalized: + motion = self.unnormalize(motion) + + new_global_rep_motion = self.global_motion_rep.change_first_heading( # noqa + self.get_feature_subset(motion, mode="global"), + first_heading_angle, + is_normalized=False, + to_normalize=False, + ) + + new_local_rep_motion = self.local_motion_rep.change_first_heading( # noqa + self.get_feature_subset(motion, mode="local"), + first_heading_angle, + is_normalized=False, + to_normalize=False, + ) + new_motion = self.cat_global_and_local( + new_global_rep_motion, new_local_rep_motion + ) + + if to_normalize: + new_motion = self.normalize(new_motion) + + if return_numpy: + new_motion = new_motion.cpu().numpy() + return new_motion + + def compute_root_pos_and_rot( + self, motion: torch.Tensor + ) -> Tuple[torch.Tensor, torch.Tensor]: + """Compute root position and rotation from the representation. + + Returns: + torch.Tensor: [..., T, 3] global root position + torch.Tensor: [..., T, 4] global root rot quaternion (heading only) + """ + global_features = self.get_feature_subset(motion, mode="global") + r_pos, r_rot_quat = self.global_motion_rep.compute_root_pos_and_rot( + global_features + ) + return r_pos, r_rot_quat diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/motion_reps_base/global_root_local_body.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/motion_reps_base/global_root_local_body.py new file mode 100644 index 0000000000000000000000000000000000000000..04ebeb19159c82875dc24e9eb375073e59115790 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/motion_reps_base/global_root_local_body.py @@ -0,0 +1,206 @@ +from typing import Optional, Tuple + +import einops +import numpy as np +import torch + +from motionbricks.motionlib.core.skeletons import SkeletonBase +from motionbricks.motionlib.core.utils.rotations import ( + angle_to_Y_rotation_matrix, +) +from motionbricks.motionlib.core.utils.stats import Stats + +from .seperate_root_local_body import SeparatedRootLocalBody + + +class GlobalRootLocalBody(SeparatedRootLocalBody): + """Representation with global root.""" + + dual_class = None + + def __init__( + self, + fps: float, + skeleton: SkeletonBase, + name: str, + stats: Optional[Stats] = None, + ): + # Subclasses should define + # get_body_keys_dim + # compute_kwargs + + self.root_keys_dim = { + "global_root_pos": [3], # xyz + "global_root_heading": [2], # cos / sin + } + self.body_keys_dim = self.get_body_keys_dim(skeleton.nbjoints) + + # If we got the stats from the dual representation + if self.dual_class is not None and self.dual_class._name_ in name: + super().__init__(fps, skeleton, name, stats=None) + # full stats for dual rep + self.dual_rep = self.dual_class(fps, skeleton, name, stats=stats) + self.dual_rep_mode = "global" + # load the subset stats + self.stats = self.dual_rep.global_motion_rep.stats + else: + self.dual_rep = None + super().__init__(fps, skeleton, name, stats) + + # additional indices + self.indices["global_root_pos_2d"] = self.indices["global_root_pos"][[0, 2]] + self.root_mode = "global" + + def compute_root_pos_and_rot( + self, + motion: torch.Tensor, + return_quat: bool = True, + return_angle: bool = False, + ) -> Tuple[torch.Tensor, torch.Tensor]: + """Compute root position and rotation from the representation. + + Args: + motion (torch.Tensor): Motion tensor of shape [..., T, D] where T is number of frames, and D is feature dimension + + Returns: + Tuple[torch.Tensor, torch.Tensor]: + - Global root position tensor of shape [B, T, 3] + - Global root rotation quaternion tensor of shape [B, T, 4] (heading only) + """ + + motion, ps = einops.pack([motion], "* nbframes dim") + root_motion = self.extract_root(motion) + + r_pos, rot_cos, rot_sin = einops.unpack( + root_motion, + [[3], [], []], + "batch time *", + ) + + r_rot_ang = torch.atan2(rot_sin, rot_cos) + r_rot_quat = torch.stack( + [ + torch.cos(r_rot_ang / 2), + torch.zeros_like(rot_cos), + torch.sin(r_rot_ang / 2), + torch.zeros_like(rot_cos), + ], + dim=-1, + ) + + [r_pos] = einops.unpack(r_pos, ps, "* nbframes xyz") + [r_rot_quat] = einops.unpack(r_rot_quat, ps, "* nbframes quat") + [r_rot_ang] = einops.unpack(r_rot_ang, ps, "* nbframes") + if return_quat and not return_angle: + return r_pos, r_rot_quat + if not return_quat and return_angle: + return r_pos, r_rot_ang + if return_quat and return_angle: + return r_pos, r_rot_quat, r_rot_ang + if not return_quat and not return_angle: + return r_pos + + def compute_root_rep_from_root_pos_and_rot( + self, + r_pos: torch.Tensor, + r_rot_quat: torch.Tensor, + lengths: Optional[torch.Tensor] = None, + ) -> torch.Tensor: + """Compute root representation from root position and rotation. + + Args: + r_pos (torch.Tensor): Global root position tensor of shape [..., T, 3] + r_rot_quat (torch.Tensor): Global root rotation quaternion tensor of shape [..., T, 4] + lengths (Optional[torch.Tensor]): Sequence lengths, defaults to None (necessary for batched sequences) + + Returns: + torch.Tensor: Root motion representation tensor of shape [..., T, D] + """ + + root_rot_angles = torch.arctan2(r_rot_quat[..., 2], r_rot_quat[..., 0]) * 2 + root_motion = torch.cat( + [ + r_pos, + torch.cos(root_rot_angles)[..., None], + torch.sin(root_rot_angles)[..., None], + ], + axis=-1, + ) + return root_motion + + def change_first_heading( + self, + motion: torch.Tensor | np.ndarray, + first_heading_angle: float | torch.Tensor, + is_normalized: bool, + to_normalize: bool, + return_numpy: bool = False, + ) -> torch.Tensor | np.ndarray: + """Canonicalize motion by aligning the first frame to face +Z direction and moving to + origin. + + Args: + motion (Union[torch.Tensor, np.ndarray]): Input motion tensor of shape [..., T, D] + is_normalized (bool): Whether input motion is normalized + to_normalize (bool): Whether to normalize output motion + return_numpy (bool): Whether to return numpy array. Defaults to False. + + Returns: + Union[torch.Tensor, np.ndarray]: Canonicalized motion of same shape as input + """ + if isinstance(motion, np.ndarray): + motion = torch.from_numpy(motion) + + if is_normalized: + motion = self.unnormalize(motion) + + # make is universally: [X, T, D] + motion, ps = einops.pack([motion], "* nbframes dim") + + root_pos, root_rot_angle = self.compute_root_pos_and_rot( + motion, + return_angle=True, + return_quat=False, + ) + first_heading_angle = ( + first_heading_angle.reshape(root_rot_angle[..., 0].shape) + if isinstance(first_heading_angle, torch.Tensor) + else first_heading_angle + ) + corrective_angle = first_heading_angle - root_rot_angle[..., 0] # [Batch] + new_angles = root_rot_angle + corrective_angle[..., None] # [Batch, T] + corrective_mat = angle_to_Y_rotation_matrix(corrective_angle) + + new_heading = torch.stack( + [torch.cos(new_angles), torch.sin(new_angles)], + dim=-1, + ) + + # move to origin and rotate + first_pos = 1 * root_pos[:, [0]] + first_pos[..., 1] = 0 # don't canonicalize height + + new_root_pos = torch.einsum( + "bik,btk->bti", + corrective_mat, + root_pos - first_pos, + ) + # create the new feature vector + new_global_root, _ = einops.pack( + [new_root_pos, new_heading], "batch nbframes *" + ) + + # be carefull here, could need to rotate part of the body motion + new_body_motion = self.change_first_heading_body(motion, corrective_mat) + new_motion, _ = einops.pack( + [new_global_root, new_body_motion], + "batch nbframes *", + ) + [new_motion] = einops.unpack(new_motion, ps, "* nbframes dim") + + if to_normalize: + new_motion = self.normalize(new_motion) + + if return_numpy: + new_motion = new_motion.cpu().numpy() + return new_motion diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/motion_reps_base/local_root_local_body.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/motion_reps_base/local_root_local_body.py new file mode 100644 index 0000000000000000000000000000000000000000..5d6178c228618f6dfb58a65751e2b1fcddd41f57 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/motion_reps_base/local_root_local_body.py @@ -0,0 +1,276 @@ +from typing import Optional, Tuple + +import einops +import numpy as np +import torch + +from motionbricks.motionlib.core.motion_reps.tools.motion_features import ( + compute_vel_angle, + compute_vel_xyz, +) +from motionbricks.motionlib.core.skeletons import SkeletonBase +from motionbricks.motionlib.core.utils.rotations import ( + angle_to_Y_rotation_matrix, + quat_apply, + quat_conjugate, +) +from motionbricks.motionlib.core.utils.stats import Stats + +from .seperate_root_local_body import SeparatedRootLocalBody + + +class LocalRootLocalBody(SeparatedRootLocalBody): + """Representation with local root and local body.""" + + dual_class = None + + def __init__( + self, + fps: float, + skeleton: SkeletonBase, + name: str, + stats: Optional[Stats] = None, + ): + # Subclasses should define + # get_body_keys_dim + # compute_kwargs + + self.nfeats_vel = 3 if self.compute_kwargs["local_root_vel_with_y"] else 2 + self.root_keys_dim = { + "local_root_rot_vel": [], # vel theta + "local_root_vel": [self.nfeats_vel], # vel xyz or xz + "global_root_y": [], # gravity axis global + } + + self.body_keys_dim = self.get_body_keys_dim(skeleton.nbjoints) + + # If we got the stats from the dual representation + if self.dual_class is not None and self.dual_class._name_ in name: + super().__init__(fps, skeleton, name, stats=None) + # full stats for dual rep + self.dual_rep = self.dual_class(fps, skeleton, name, stats=stats) + self.dual_rep_mode = "local" + # load the subset stats + self.stats = self.dual_rep.local_motion_rep.stats + else: + self.dual_rep = None + super().__init__(fps, skeleton, name, stats) + + self.root_mode = "local" + + def compute_root_pos_and_rot( + self, motion: torch.Tensor + ) -> Tuple[torch.Tensor, torch.Tensor]: + """Compute root position and rotation from a local root representation. + + Args: + motion (torch.Tensor): [..., T, 4] (unnormalized) root motion where 4 is [angvel, vel_x, vel_z, height] + or full motion representation [.., T, D] + + Returns: + torch.Tensor: [..., T, 3] global root position + torch.Tensor: [..., T, 4] global root rot quaternion + """ + root_motion = self.extract_root(motion) + + device = root_motion.device + batch, nbframes = root_motion.shape[:2] + + root_rot_vel_angles, root_local_vel, root_y_pos = einops.unpack( + root_motion, + [[], [self.nfeats_vel], []], + "batch time *", + ) + + # multiply by dt (= div by fps) to recover true differences + # dv = dv/dt * dt + root_rot_vel_angles = root_rot_vel_angles / self.fps + root_local_vel = root_local_vel / self.fps + + # Get Y-axis rotation from rotation velocity + r_rot_ang = torch.zeros_like(root_rot_vel_angles, device=device) + r_rot_ang[..., 1:] = root_rot_vel_angles[..., :-1] + # don't use the dummy last one + r_rot_ang = torch.cumsum(r_rot_ang, dim=-1) + + # Create the quaternion from the angle + r_rot_quat = torch.zeros((batch, nbframes, 4), device=device) + r_rot_quat[..., 0] = torch.cos(r_rot_ang / 2) + r_rot_quat[..., 2] = torch.sin(r_rot_ang / 2) + + # Integrate position from linear velocity (for xz only) + r_pos = torch.zeros((batch, nbframes, 3), device=device) + r_pos[..., 1:, [0, 2]] = root_local_vel[..., :-1, :] + # don't use the dummy last one + + # Add Y-axis rotation to velocities + # shift one frame is needed to align root_quat with local_root_motion, + # to match convert_root_global_to_local + removed_heading = self.compute_kwargs.get("removing_heading", True) + if removed_heading: + r_pos[..., 1:, :] = quat_apply(r_rot_quat[..., :-1, :], r_pos[..., 1:, :]) + + r_pos = torch.cumsum(r_pos, dim=-2) + + # Set height + r_pos[..., 1] = root_y_pos + return r_pos, r_rot_quat + + def compute_root_rep_from_root_pos_and_rot( + self, + r_pos, + r_rot_quat, + lengths: Optional[torch.Tensor] = None, + ): + """Compute root representation from root position and rotation. + + Args: + r_pos (torch.Tensor): [..., T, 3] global root position + r_rot_quat (torch.Tensor): [..., T, 4] global root rot quaternion (heading only) + Return: + root_motion (torch.Tensor): [..., T, 4] + """ + + root_rot_angles = torch.arctan2(r_rot_quat[..., 2], r_rot_quat[..., 0]) * 2 + local_root_rot_vel = compute_vel_angle( + root_rot_angles, self.fps, lengths=lengths + ) + root_vel = compute_vel_xyz( + r_pos[..., None, :], + self.fps, + lengths=lengths, + )[..., 0, :] + + removed_heading = self.compute_kwargs.get("removing_heading", True) + if removed_heading: + # rotate back + local_root_vel = quat_apply(quat_conjugate(r_rot_quat), root_vel)[ + ..., [0, 2] + ] + else: + local_root_vel = root_vel[..., [0, 2]] + + global_root_y = r_pos[..., 1] + root_motion = torch.cat( + [ + local_root_rot_vel[..., None], + local_root_vel, + global_root_y[..., None], + ], + axis=-1, + ) + return root_motion + + def change_first_heading( + self, + motion: torch.Tensor, + first_heading_angle: float, + is_normalized: bool, + to_normalize: bool, + return_numpy: bool = False, + ) -> torch.Tensor: + if isinstance(motion, np.ndarray): + motion = torch.from_numpy(motion) + + if is_normalized: + motion = self.unnormalize(motion) + + # make is universally: [X, T, D] + motion, ps = einops.pack([motion], "* nbframes dim") + root_motion = self.extract_root(motion) + + device = root_motion.device + batch, nbframes = root_motion.shape[:2] + + root_rot_vel_angles, root_local_vel, root_y_pos = einops.unpack( + root_motion, + [[], [self.nfeats_vel], []], + "batch time *", + ) + + if not self.removed_heading: + # need to find the original heading from the body features + # only done with hips_pos at the moment + assert self.compute_kwargs["compute_heading_method"] == "hips_pos" + from motionbricks.motionlib.core.motion_reps.tools.heading import calc_heading_from_joints_pos + + root_idx = self.skeleton.root_idx + + # do the smooth root here + if self.using_smooth_root: + # extract the first position + first_position = einops.rearrange( + self.slice(motion, "ric_data")[:, 0], + "batch (nbjoints xyz) -> batch nbjoints xyz", + xyz=3, + ) + assert first_position.shape[-2] == self.skeleton.nbjoints + else: + # extract the first position + first_position = einops.rearrange( + self.slice(motion, "ric_data")[:, 0], + "batch (nbjoints_minus_one xyz) -> batch nbjoints_minus_one xyz", + xyz=3, + ) + assert first_position.shape[-2] == (self.skeleton.nbjoints - 1) + + # add back the dummy (to get good indices for finding the heading) + dummy_root = 0 * first_position[:, 0] + first_position, _ = einops.pack( + [ + first_position[:, :root_idx], + dummy_root, + first_position[:, root_idx:], + ], + "batch * dim", + ) + + # compute the first heading angle + prev_heading_angle = calc_heading_from_joints_pos( + first_position[:, None], + skeleton=self.skeleton, + return_quat=False, + inverse=False, + )[:, 0] + + corrective_angle = first_heading_angle - prev_heading_angle + corrective_mat = angle_to_Y_rotation_matrix(corrective_angle) + + if root_local_vel.shape[-1] == 2: + # rotate the 2D velocities + new_root_local_vel = torch.einsum( + "bik,btk->bti", + corrective_mat[..., [0, 2]][..., [0, 2], :], + root_local_vel, + ) + else: + # rotate the 3D velocities + new_root_local_vel = torch.einsum( + "bik,btk->bti", + corrective_mat, + root_local_vel, + ) + + # create the new local root + new_local_root, _ = einops.pack( + [root_rot_vel_angles, new_root_local_vel, root_y_pos], + "batch time *", + ) + + new_body_motion = self.change_first_heading_body(motion, corrective_mat) + new_motion, _ = einops.pack( + [new_local_root, new_body_motion], + "batch nbframes *", + ) + else: + # changing first heading does not matter + new_motion = motion + + [new_motion] = einops.unpack(new_motion, ps, "* nbframes dim") + + if to_normalize: + new_motion = self.normalize(new_motion) + + if return_numpy: + new_motion = new_motion.cpu().numpy() + return new_motion diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/motion_reps_base/motion_rep_base.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/motion_reps_base/motion_rep_base.py new file mode 100644 index 0000000000000000000000000000000000000000..22e618315c9dc5061ef112732764300ccc15021a --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/motion_reps_base/motion_rep_base.py @@ -0,0 +1,50 @@ +from typing import Optional + +import torch + +from motionbricks.motionlib.core.skeletons import SkeletonBase +from motionbricks.motionlib.core.utils.stats import Stats + + +class MotionRepBase(torch.nn.Module): + """Base class for a motion representation.""" + + def __init__( + self, + fps: float, + skeleton: SkeletonBase, + name: str, + stats: Optional[Stats] = None, + ): + super().__init__() + self.stats = stats + # native resolution of the motion + self.fps = fps + # skeleton holds joint names and other info like root and feet indices + # if need to do FK, also holds parents and neutral pose + self.skeleton = skeleton + + # name of the motion rep + self.name = name + + # number of joints in the skeleton + self.num_joints = self.nbjoints = skeleton.nbjoints + + def normalize(self, motion: torch.Tensor, index=None) -> torch.Tensor: + """Normalize a feature vector or a index of it. + + Args: + motion (torch.Tensor): [..., D] the motion to normalize + index (Optional[index]) the index to crop the motion + """ + return self.stats.normalize(motion, index=index) + + def unnormalize(self, motion: torch.Tensor, index=None) -> torch.Tensor: + """Unnormalize a normalized motion. Only one of root_only, nonroot_only, and contacts_only + should be true. + + Args: + motion (torch.Tensor): [..., D] the motion to unnormalize + index (Optional[index]) the index to crop the motion + """ + return self.stats.unnormalize(motion, index=index) diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/motion_reps_base/seperate_root_local_body.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/motion_reps_base/seperate_root_local_body.py new file mode 100644 index 0000000000000000000000000000000000000000..719d0b42683ad04b88dd9696666b76233a3741a8 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/motion_reps_base/seperate_root_local_body.py @@ -0,0 +1,963 @@ +from typing import Dict, Optional + +import einops +import numpy as np +import torch + +from motionbricks.motionlib.core.motion_reps.tools.changing_t_pose import ( + change_t_pose_global_mats, + global_mats_to_local_mats, +) +from motionbricks.motionlib.core.motion_reps.tools.motion_features import ( + compute_motion_features, + reconstruct_joint_rot_mats_from_ric_global_rots, + reconstruct_joint_rot_mats_from_ric_rots, + recover_joints_from_ric_pos, + recover_joints_with_FK, +) +from motionbricks.motionlib.core.skeletons import SkeletonBase +from motionbricks.motionlib.core.utils.rotations import ( + cont6d_to_matrix, + matrix_to_cont6d, + matrix_to_quaternion, + quat_apply, + quat_mul, +) +from motionbricks.motionlib.core.utils.stats import Stats + +from .motion_rep_base import MotionRepBase + + +class SeparatedRootLocalBody(MotionRepBase): + """Motion representation that separates root and local body motion. + + The representation concatenates [root_motion, local_body_motion] features. + + Subclasses must define: + + Attributes: + body_keys_dim (Dict): Mapping of body feature keys to their dimensions + root_keys_dim (Dict): Mapping of root feature keys to their dimensions + compute_kwargs (Dict): Extra parameters for computing features + default_joint_positions_from (str): Default source for joint positions, one of: + - "ric_data": Relative joint positions + - "rot_data": Local joint rotations + - "global_rot_data": Global joint rotations + + Methods: + compute_root_pos_and_rot(): Extracts root position and rotation from features + compute_root_rep_from_root_pos_and_rot(): Converts root pos/rot to root feature representation + change_first_heading(): Rotate the motion rep to the given heading + """ + + def __init__( + self, + fps: float, + skeleton: SkeletonBase, + name: str, + stats: Optional[Stats] = None, + ): + super().__init__(fps, skeleton, name, stats) + + # set the name with the setter defined below + self.name = name + + # define usefull info for the class + # from "root_keys_dim" and "body_keys_dim" + [*self.root_keys], [*self.root_ps] = zip(*self.root_keys_dim.items()) + [*self.body_keys], [*self.body_ps] = zip(*self.body_keys_dim.items()) + + # all info + self.keys_dim = self.root_keys_dim | self.body_keys_dim + self.keys = self.root_keys + self.body_keys + self.ps = self.root_ps + self.body_ps + + # compute dim + self.motion_rep_dim = sum((sum(x) if x else 1 for x in self.ps)) + self.motion_root_dim = sum((sum(x) if x else 1 for x in self.root_ps)) + self.motion_body_dim = sum((sum(x) if x else 1 for x in self.body_ps)) + + if stats is not None and stats.is_loaded(): + assert self.motion_rep_dim == stats.get_dim() + + # no subset, entire motion rep + self.motion_rep_subset_dim = self.motion_rep_dim + + # compute indices, for easy access + self.indices = {} + idx = 0 + for key, x in zip(self.keys, self.ps): + dim = sum(x) if x else 1 + self.indices[key] = np.arange(idx, idx + dim) + idx += dim + + self.indices["all"] = np.arange(0, self.motion_rep_dim) + self.indices["root"] = np.arange(0, self.motion_root_dim) + self.indices["body"] = np.arange( + self.motion_root_dim, self.motion_root_dim + self.motion_body_dim + ) + + self.removed_heading = self.compute_kwargs.get("removing_heading", True) + self.using_smooth_root = self.compute_kwargs.get("using_smooth_root", False) + + self.extra_skel = self.compute_kwargs.get("extra_skel", False) + if self.extra_skel: + # verify that the skeleton is extra + assert ( + repr(self.skeleton.__class__).split("'")[1].endswith("Extra") + ), "The skeleton should be an extra skeleton" + + def canonicalize_to_first_frame( + self, + motion: torch.Tensor, + is_normalized: bool, + to_normalize: bool, + return_numpy: bool = False, + ) -> torch.Tensor: + new_motion = self.change_first_heading( + motion, + first_heading_angle=0.0, + is_normalized=is_normalized, + to_normalize=to_normalize, + return_numpy=return_numpy, + ) + return new_motion + + def randomize_first_heading( + self, + motion: torch.Tensor, + is_normalized: bool, + to_normalize: bool, + return_numpy: bool = False, + ) -> torch.Tensor: + first_heading_angle = np.random.rand() * 2 * np.pi + new_motion = self.change_first_heading( + motion, + first_heading_angle=first_heading_angle, + is_normalized=is_normalized, + to_normalize=to_normalize, + return_numpy=return_numpy, + ) + return new_motion + + def slice(self, motion, key: str): + """Extracts a specific feature subset from the motion representation. + + Args: + motion (torch.Tensor): Motion features of shape [..., D] + key (str): Feature key to extract, must be in self.indices + + Returns: + torch.Tensor: Extracted feature subset + """ + + assert key in self.indices + assert motion.shape[-1] == self.motion_rep_dim + return motion[..., self.indices[key]] + + def detect_all_body_or_root(self, motion: torch.Tensor): + """Detects whether input contains full, root-only, or body-only features. + + Args: + motion (torch.Tensor): Motion features of shape [..., D] + + Returns: + str: One of "all", "root", or "body" indicating feature type + + Raises: + ValueError: If input dimension doesn't match any known feature subset + """ + dim = motion.shape[-1] + if dim == self.motion_rep_dim: + return "all" + elif dim == self.motion_root_dim: + return "root" + elif dim == self.motion_body_dim: + return "body" + else: + raise ValueError(f"This input dim is not recognized: {dim}") + + def normalize(self, motion: torch.Tensor, index=None) -> torch.Tensor: + """Normalizes motion features using stored statistics. + + Args: + motion (torch.Tensor): Motion features of shape [..., D] to normalize + index (Optional[np.ndarray]): If motion is a subset of full representation, + the indices within the full representation that the input contains + + Returns: + torch.Tensor: Normalized motion features + """ + if index is None: + index = self.indices[self.detect_all_body_or_root(motion)] + return self.stats.normalize(motion, index=index) + + def unnormalize(self, motion: torch.Tensor, index=None) -> torch.Tensor: + """Unnormalizes motion features using stored statistics. + + Args: + motion (torch.Tensor): Normalized motion features of shape [..., D] + index (Optional[np.ndarray]): If motion is a subset of full representation, + the indices within the full representation that the input contains + + Returns: + torch.Tensor: Unnormalized motion features + """ + if index is None: + index = self.indices[self.detect_all_body_or_root(motion)] + return self.stats.unnormalize(motion, index=index) + + def extract_root(self, motion: torch.Tensor) -> torch.Tensor: + """Extracts root motion features from input. + + Args: + motion (torch.Tensor): Motion features of shape [..., D] + + Returns: + torch.Tensor: Root motion features + + Raises: + ValueError: If input doesn't contain root features + """ + type = self.detect_all_body_or_root(motion) + + if type == "root": + return motion + elif type == "all": + return self.slice(motion, "root") + else: + raise ValueError("Cannot compute root info without root") + + def extract_body(self, motion: torch.Tensor) -> torch.Tensor: + """Extracts body motion features from input. + + Args: + motion (torch.Tensor): Motion features of shape [..., D] + + Returns: + torch.Tensor: Body motion features + + Raises: + ValueError: If input doesn't contain body features + """ + type = self.detect_all_body_or_root(motion) + if type == "body": + return motion + elif type == "all": + return self.slice(motion, "body") + else: + raise ValueError("Cannot compute body info without body") + + def extract_foot_contacts( + self, + motion: torch.Tensor, + is_normalized: bool, + contact_thresh: Optional[float] = 0.5, + ) -> torch.Tensor: + """Extracts foot contact states from motion features. + + Args: + motion (torch.Tensor): Motion features of shape [..., D] + is_normalized (bool): Whether input features are normalized + contact_thresh (Optional[float]): Threshold for binary contact classification. + If None, returns raw contact values. + + Returns: + torch.Tensor: Foot contact states, binary if threshold provided + """ + assert "foot_contacts" in self.indices + + foot_contacts = motion[..., self.indices["foot_contacts"]] + + if is_normalized: + foot_contacts = self.unnormalize( + foot_contacts, index=self.indices["foot_contacts"] + ) + + if contact_thresh is not None: + contacts = foot_contacts > contact_thresh + else: + contacts = foot_contacts + return contacts + + def compute_root_pos_and_rot( + self, + motion: torch.Tensor, + type: Optional[str] = None, + ): + """Compute root position and rotation from the representation. + + Args: + motion (torch.Tensor): Motion features of shape [..., D] (can be the full representation or the root subset) + type (Optional[str]): Type of motion features, if None will be auto-detected + + Returns: + Tuple[torch.Tensor, torch.Tensor]: + - torch.Tensor: [..., T, 3] global root position + - torch.Tensor: [..., T, 4] global root rotation quaternion (heading only) + """ + + root_motion = self.extract_root(motion) # noqa + ... + raise NotImplementedError + return root_pos, root_rot_quat # noqa + + def compute_root_rep_from_root_pos_and_rot( + self, root_pos: torch.Tensor, root_rot_quat: torch.Tensor + ): + """Compute root representation from root position and rotation. + + Args: + root_pos (torch.Tensor): [..., T, 3] global root position + root_rot_quat (torch.Tensor): [..., T, 4] global root rotation quaternion + + Returns: + torch.Tensor: [..., T, D] Root motion features + """ + raise NotImplementedError + return root_motion # noqa + + def __call__( + self, + input_tensor_dict, + to_normalize: bool, + original_skeleton: Optional[SkeletonBase] = None, + lengths: Optional[torch.Tensor] = None, + return_numpy: bool = False, + t_pose_from: Optional[str] = None, + return_init_heading_info: bool = False, + ) -> torch.Tensor: + """Converts input motion data to feature representation. + + Args: + input_tensor_dict (Dict): Input motion data containing joint rotations/positions + to_normalize (bool): Whether to normalize the output features + original_skeleton (Optional[SkeletonBase]): Source skeleton if different from self.skeleton + lengths (Optional[torch.Tensor]): Sequence lengths for batched data + return_numpy (bool): Whether to return numpy array instead of torch tensor + t_pose_from (Optional[str]): Source t-pose if converting between differnet t-poses + return_init_heading_info (bool): Whether to return initial heading information + + Returns: + torch.Tensor: Motion features of shape [..., D] + Optional[Dict]: Initial heading info if return_init_heading_info=True + """ + if original_skeleton is None: + # take the current one + # assume the skeleton is the same + original_skeleton = self.skeleton + + skel_slice = self.skeleton.get_skel_slice(original_skeleton) + + new_in_tensor_dict = dict() + for key, val in input_tensor_dict.items(): + if isinstance(val, np.ndarray): + val = torch.from_numpy(val) + + if not isinstance(val, torch.Tensor): + # it is not a tensor + new_in_tensor_dict[key] = val + continue + + # no slice for those + if key in ["translation", "foot_contacts", "root_pos"]: + new_in_tensor_dict[key] = val + continue + + # rotations matrices + if val.shape[-1] == 3 and val.shape[-2] == 3: + # verify the dimensions + if original_skeleton.nbjoints != val.shape[-3]: + base_skel = getattr(original_skeleton, "base_skel", None) + if base_skel is not None and base_skel.nbjoints == val.shape[-3]: + pass + else: + raise ValueError( + "The data is not compatible with the provided skeleton." + ) + val = val[..., skel_slice, :, :] + else: + # verify the dimensions + if original_skeleton.nbjoints != val.shape[-2]: + base_skel = getattr(original_skeleton, "base_skel", None) + if base_skel is not None and base_skel.nbjoints == val.shape[-2]: + pass + else: + raise ValueError( + "The data is not compatible with the provided skeleton." + ) + val = val[..., skel_slice, :] + + new_in_tensor_dict[key] = val + + features = compute_motion_features( + new_in_tensor_dict, + lengths=lengths, + motion_rep=self, + t_pose_from=t_pose_from, + return_init_heading_info=return_init_heading_info, + **self.compute_kwargs, + ) + if return_init_heading_info: + features, init_heading_info = features + + assert features.shape[-1] == self.motion_rep_dim + + if to_normalize: + features = self.normalize(features) + + if return_numpy: + features = features.cpu().numpy() + + if return_init_heading_info: + return features, init_heading_info + return features + + def inverse( + self, + features: torch.Tensor, + is_normalized: bool, + # Neutral joints (take the one from the skeleton by default) + neutral_joints: Optional[torch.Tensor] = None, + # Canonicalization info + init_heading_info: Optional[Dict] = None, + # Default options which depends on the motion rep + joint_positions_from: Optional[str] = None, + # Default options + return_quat: bool = False, + return_all: bool = False, + run_fk: bool = True, + return_numpy: bool = False, + extra_skel_process: bool = True, + # Optional to change t-pose + t_pose_to: str = None, + ) -> torch.Tensor: + """Converts motion features back to joint rotations and positions. + + Args: + features (torch.Tensor): Motion features of shape [..., D] + is_normalized (bool): Whether input features are normalized + neutral_joints (Optional[torch.Tensor]): Custom neutral joints to use for FK. Otherwise uses default from skeleton. + init_heading_info (Optional[Dict]): Initial heading/position for motion + joint_positions_from (Optional[str]): Source for computing default joint positions: + "rot_data", "ric_data", or "global_rot_data" + return_quat (bool): Return quaternions instead of rotation matrices + return_all (bool): Return joints positions from all the possible sources + run_fk (bool): Run forward kinematics to get joint positions + return_numpy (bool): Return numpy arrays instead of torch tensors + t_pose_to (Optional[str]): Target t-pose if converting between different t-poses + + Returns: + Dict[str, torch.Tensor]: Dictionary containing: + - posed_joints: Joint positions + - local_joint_rots: Local joint rotations + - global_joint_rots: Global joint rotations + - foot_contacts: Foot contact states + - all_posed_joints: Joint positions from all methods if return_all=True + - all_local_rots: Local rotations from all methods if return_all=True + - all_global_rots: Global rotations from all methods if return_all=True + """ + + # Changing the t_pose for the rotations + changing_t_pose = False + if t_pose_to is not None: + if self.skeleton.t_pose is None: + raise ValueError( + "Cannot change the t_pose if we don't know the origin t_pose" + ) + # True only if it is changing + changing_t_pose = self.skeleton.t_pose != t_pose_to + + # storage of the outputs + output_tensor_dict = { + "all_posed_joints": {}, + "all_local_rots": {}, + "all_global_rots": {}, + } + + if joint_positions_from is None: + joint_positions_from = self.default_joint_positions_from + + # make sure the default input can be taken + assert ( + joint_positions_from in self.indices + or joint_positions_from == "global_rot_data" + and self.extra_skel + ) + if isinstance(features, np.ndarray): + features = torch.from_numpy(features) + + # make is universally: [X, T, D] + features, ps = einops.pack([features], "* nbframes dim") + nbframes = features.shape[1] + + if init_heading_info is not None: + # universal shapes [X, D] + init_heading_info["init_heading_quat"] = einops.pack( + [init_heading_info["init_heading_quat"]], "* dim" + )[0].to(dtype=features.dtype, device=features.device) + init_heading_info["root_pos_init_xz"] = einops.pack( + [init_heading_info["root_pos_init_xz"]], "* dim" + )[0].to(dtype=features.dtype, device=features.device) + + if is_normalized: + features = self.unnormalize(features) + + root_pos, root_rot_quat = self.compute_root_pos_and_rot(features) + output_tensor_dict["root_pos"] = root_pos.clone() + + # add the hips offset to the root pos if using smooth root + if self.using_smooth_root: + assert ( + "ric_data" in self.indices + ), "ric_data should be in the motion rep if using smooth root. This is useful to get back the root offset" + joints_ric_pos = self.slice(features, "ric_data") + + hips_indices = np.array( + [ + self.skeleton.root_idx, + self.skeleton.root_idx + 1, + self.skeleton.root_idx + 2, + ] + ) + hips_positions = joints_ric_pos[..., hips_indices] + + # add back the hips offset to the root position + root_pos[..., [0, 2]] += hips_positions[..., [0, 2]] + root_pos[..., 1] = hips_positions[..., 1] + + # remove the rotation of the root position + # add back the init positions (already rotated by the rotations) + if init_heading_info is not None: + init_heading_quat = init_heading_info["init_heading_quat"] + root_pos_init_xz = init_heading_info["root_pos_init_xz"] + + # add time dimension + init_heading_quat_time = einops.repeat( + init_heading_quat, + "batch quat -> batch time quat", + time=nbframes, + ) + + # then rotate, to get back the first Z rotation + root_pos = quat_apply(init_heading_quat_time, root_pos) + + # and put the original root position + the offset + root_pos[:, :, [0, 2]] += root_pos_init_xz[:, None] + + # add extra init rotation to all root rotations + root_rot_quat = quat_mul(init_heading_quat_time, root_rot_quat) + else: + init_heading_quat = None + + # Do ric_data first, to get extrapos joints first, to get the global rotations + posed_joints_extra_skel = None + global_rot_mats_from_extra_skel = None + if "ric_data" in self.indices and ( + return_all or joint_positions_from == "ric_data" or self.extra_skel + ): + joints_ric_pos = self.slice(features, "ric_data") + + # recover global joint positions from positions + posed_joints_from_pos = recover_joints_from_ric_pos( + joints_ric_pos, + root_pos, + root_rot_quat, + skeleton=self.skeleton, + removed_heading=self.removed_heading, + init_heading_quat=init_heading_quat, # in case the heading is not removed + using_smooth_root=self.using_smooth_root, + ) + + if extra_skel_process and self.extra_skel: + # crop the output + skel_slice = self.skeleton.base_skel.get_skel_slice(self.skeleton) + posed_joints_extra_skel = posed_joints_from_pos + + # compute the global rotations from extrapos + global_rot_mats_from_extra_skel = compute_rotations_from_extrapos( + posed_joints_extra_skel, self.skeleton + ) + posed_joints_from_pos = posed_joints_extra_skel[..., skel_slice, :] + + [posed_joints_from_pos] = einops.unpack( + posed_joints_from_pos, ps, "* nbframes nbjoints xyz" + ) + output_tensor_dict["all_posed_joints"]["ric_data"] = posed_joints_from_pos + # the one by default + if joint_positions_from == "ric_data": + output_tensor_dict["posed_joints"] = posed_joints_from_pos + + if extra_skel_process and self.extra_skel: + skeleton = self.skeleton.base_skel + else: + skeleton = self.skeleton + + if "rot_data" in self.indices and ( + return_all or joint_positions_from == "rot_data" + ): + joints_ric_rot6d = self.slice(features, "rot_data") + # Get back the full rotation matrix + local_rot_mats = reconstruct_joint_rot_mats_from_ric_rots( + joints_ric_rot6d, + root_pos, + root_rot_quat, + skeleton, + removed_heading=self.removed_heading, + init_heading_quat=init_heading_quat, + ) + + # fk is necessary for changing t-pose + if run_fk or changing_t_pose: + # recover global joint positions from rotations + posed_joints_from_local_rots, global_rot_mats = recover_joints_with_FK( + local_rot_mats, + root_pos, + skeleton, + neutral_joints=neutral_joints, + return_global_rots=True, + ) + + # save the joints positions + [posed_joints_from_local_rots] = einops.unpack( + posed_joints_from_local_rots, ps, "* nbframes nbjoints xyz" + ) + output_tensor_dict["all_posed_joints"]["rot_data"] = ( + posed_joints_from_local_rots + ) + # the one by default + if joint_positions_from == "rot_data": + output_tensor_dict["posed_joints"] = posed_joints_from_local_rots + + if changing_t_pose: + # do this after FK, so that we can keep the old neutral joints + # it will not be compatible with our skeleton anymore + global_rot_mats = change_t_pose_global_mats( + global_rot_mats, + t_pose_to, + skeleton, + ) + local_rot_mats = global_mats_to_local_mats(global_rot_mats, skeleton) + + # save the local rots from local + [local_rot_mats] = einops.unpack( + local_rot_mats, ps, "* nbframes nbjoints dim1 dim2" + ) + if return_quat: + local_rots = matrix_to_quaternion(local_rot_mats) + else: + local_rots = local_rot_mats + + output_tensor_dict["all_local_rots"]["rot_data"] = local_rots + # the one by default + if joint_positions_from == "rot_data": + output_tensor_dict["local_joint_rots"] = local_rots + + # save the global rots from local + [global_rot_mats] = einops.unpack( + global_rot_mats, ps, "* nbframes nbjoints dim1 dim2" + ) + + if return_quat: + global_rots = matrix_to_quaternion(global_rot_mats) + else: + global_rots = global_rot_mats + + output_tensor_dict["all_global_rots"]["rot_data"] = global_rots + # the one by default + if joint_positions_from == "rot_data": + output_tensor_dict["global_joint_rots"] = global_rots + + if ( + "global_rot_data" in self.indices + or global_rot_mats_from_extra_skel is not None + ) and (return_all or joint_positions_from == "global_rot_data"): + if global_rot_mats_from_extra_skel is not None: + # use the global rotations from extrapos + global_rot_mats_from_global = ( + global_rot_mats_from_extra_skel # [B, T, J, 3, 3] + ) + + # obtain back the local rotations from the new global rotations + parent_rot_mats = global_rot_mats_from_global[ + :, :, skeleton.joint_parents + ] + # root joint + parent_rot_mats[:, :, skeleton.root_idx] = torch.eye(3) + local_rot_mats_from_global = torch.einsum( + "B T N n m , B T N n o -> B T N m o", + parent_rot_mats, + global_rot_mats_from_global, + ) + # add extra identity rots: should not be needed + local_rot_mats_from_global[:, :, skeleton.nbjoints :] = torch.eye(3) + else: + global_joints_ric_rot = self.slice(features, "global_rot_data") + + # Get back the local rotation matrix + local_rot_mats_from_global, global_rot_mats_from_global = ( + reconstruct_joint_rot_mats_from_ric_global_rots( + global_joints_ric_rot, + root_rot_quat, + skeleton, + removed_heading=self.removed_heading, + init_heading_quat=init_heading_quat, + ) + ) + + if run_fk: + # recover global joint positions from rotations + posed_joints_from_global_rots, global_rot_mats_from_global = ( + recover_joints_with_FK( + local_rot_mats_from_global, + root_pos, + skeleton, + neutral_joints=neutral_joints, + return_global_rots=True, + ) + ) + + # save the joints positions + [posed_joints_from_global_rots] = einops.unpack( + posed_joints_from_global_rots, ps, "* nbframes nbjoints xyz" + ) + output_tensor_dict["all_posed_joints"]["global_rot_data"] = ( + posed_joints_from_global_rots + ) + # the one by default + if joint_positions_from == "global_rot_data": + output_tensor_dict["posed_joints"] = posed_joints_from_global_rots + + # fk was not necessary for changing t-pose since we already have the global + if changing_t_pose: + # do this after FK, so that we can keep the old neutral joints + # it will not be compatible with our skeleton anymore + global_rot_mats_from_global = change_t_pose_global_mats( + global_rot_mats_from_global, + t_pose_to, + skeleton, + ) + local_rot_mats_from_global = global_mats_to_local_mats( + global_rot_mats_from_global, + skeleton, + ) + + # save the local rots from global + [local_rot_mats_from_global] = einops.unpack( + local_rot_mats_from_global, ps, "* nbframes nbjoints dim1 dim2" + ) + if return_quat: + local_rot_from_global = matrix_to_quaternion(local_rot_mats_from_global) + else: + local_rot_from_global = local_rot_mats_from_global + + output_tensor_dict["all_local_rots"]["global_rot_data"] = ( + local_rot_from_global + ) + # the one by default + if joint_positions_from == "global_rot_data": + output_tensor_dict["local_joint_rots"] = local_rot_from_global + + # save the global rots from global + [global_rot_mats_from_global] = einops.unpack( + global_rot_mats_from_global, ps, "* nbframes nbjoints dim1 dim2" + ) + + if return_quat: + global_rots_from_global = matrix_to_quaternion( + global_rot_mats_from_global + ) + else: + global_rots_from_global = global_rot_mats_from_global + + output_tensor_dict["all_global_rots"]["global_rot_data"] = ( + global_rots_from_global + ) + # the one by default + if joint_positions_from == "global_rot_data": + output_tensor_dict["global_joint_rots"] = global_rots_from_global + + # foot contacts + foot_contacts = self.extract_foot_contacts( + features, + is_normalized=False, # already unnormalized + ) + [output_tensor_dict["foot_contacts"]] = einops.unpack( + foot_contacts, ps, "* nbframes dim" + ) + + if return_numpy: + for key, val in output_tensor_dict.items(): + output_tensor_dict[key] = val.cpu().numpy() + return output_tensor_dict + + def concat_root_body(self, root_data: torch.Tensor, body_data: torch.Tensor): + """Concatenates root and body features into full motion representation. + + Args: + root_data (torch.Tensor): Root motion features of shape [..., root_dim] + body_data (torch.Tensor): Body motion features of shape [..., body_dim] + + Returns: + torch.Tensor: Combined motion features of shape [..., D] + """ + assert root_data.shape[-1] == self.motion_root_dim + assert body_data.shape[-1] == self.motion_body_dim + motion_data = torch.cat([root_data, body_data], axis=-1) + assert motion_data.shape[-1] == self.motion_rep_dim + return motion_data + + def get_feature_subset(self, motion: torch.Tensor, mode: str): + """Extracts a feature subset based on specified mode. + + Args: + motion (torch.Tensor): Motion features of shape [..., D] + mode (str): Subset selection mode + + Returns: + torch.Tensor: Feature subset + """ + return motion + + def get_motion_rep_subset(self, mode: str): + """Gets a subset motion representation. + + Args: + mode (str): Subset selection mode + + Returns: + SeparatedRootLocalBody: Motion representation for subset + """ + return self + + def get_root_index_subset(self, mode: str): + """Gets indices for root features subset. + + Args: + mode (str): Subset selection mode + + Returns: + np.ndarray: Indices for root features + """ + return self.indices["root"] + + def get_body_index_subset(self, mode: str): + """Gets indices for body features subset. + + Args: + mode (str): Subset selection mode + + Returns: + np.ndarray: Indices for body features + """ + return self.indices["body"] + + def change_first_heading_body( + self, + motion: torch.Tensor, + corrective_mat: torch.Tensor, + ): + root_idx = self.skeleton.root_idx + if not self.removed_heading: + all_body_feats = {} + for key in self.body_keys: + feats = self.slice(motion, key) + if key == "ric_data": + positions = einops.rearrange( + feats, + "batch time (nbjoints_minus_one xyz) -> batch time nbjoints_minus_one xyz", + xyz=3, + ) + + if self.using_smooth_root: + assert positions.shape[-2] == self.skeleton.nbjoints + else: + assert positions.shape[-2] == (self.skeleton.nbjoints - 1) + + # rotate the positions + positions = torch.einsum( + "bik,btdk->btdi", + corrective_mat, + positions, + ) # (AX)i = sum_k A_ik X_k + # put back into features + new_feats = einops.rearrange( + positions, + "batch time nbjoints_minus_one xyz -> batch time (nbjoints_minus_one xyz)", + ) + elif key == "local_vel": + local_vel = einops.rearrange( + feats, + "batch time (joints dim) -> batch time joints dim", + dim=3, + ) + # rotate the velocities + new_local_vel = torch.einsum( + "bik,btdk->btdi", + corrective_mat, + local_vel, + ) + new_feats = einops.rearrange( + new_local_vel, + "batch time joints dim -> batch time (joints dim)", + ) + elif key == "rot_data": + local_rot_data = einops.rearrange( + feats, + "batch time (joints dim) -> batch time joints dim", + dim=6, + ) + # extract only the root rotation + local_root_6d = local_rot_data[..., root_idx, :] + local_root_mat = cont6d_to_matrix(local_root_6d) + + new_local_root_mat = torch.einsum( + "bik,btkj->btij", + corrective_mat, + local_root_mat, + ) + new_local_root_6d = matrix_to_cont6d(new_local_root_mat) + new_local_rot_data, _ = einops.pack( + [ + local_rot_data[:, :, :root_idx], + new_local_root_6d, + local_rot_data[:, :, root_idx + 1 :], + ], + "batch time * dim", + ) + new_feats = einops.rearrange( + new_local_rot_data, + "batch time joints dim -> batch time (joints dim)", + ) + elif key == "global_rot_data": + global_rot_data = einops.rearrange( + feats, + "batch time (joints dim) -> batch time joints dim", + dim=6, + ) + global_rot_mats = cont6d_to_matrix(global_rot_data) + global_rot_mats = torch.einsum( + "bik,btdkj->btdij", + corrective_mat, + global_rot_mats, + ) + # (AB)ij = sum_k A_ik B_jk + new_global_rot_data = matrix_to_cont6d(global_rot_mats) + new_feats = einops.rearrange( + new_global_rot_data, + "batch time joints dim -> batch time (joints dim)", + ) + elif key == "foot_contacts": + new_feats = feats + else: + raise ValueError( + "This body feature is not recognised. Needs to verify the rotation for non heading motion reps." + ) + all_body_feats[key] = new_feats + new_body_motion, _ = einops.pack( + [all_body_feats[key] for key in self.body_keys], "batch time *" + ) + else: + # the body motion is already canonical for each frame + new_body_motion = self.extract_body(motion) + return new_body_motion diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/tools/__init__.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/tools/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/tools/changing_t_pose.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/tools/changing_t_pose.py new file mode 100644 index 0000000000000000000000000000000000000000..af69ac8370dfb11c08d9e8fa7274b99ab7a026a2 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/tools/changing_t_pose.py @@ -0,0 +1,192 @@ +import math +import os +from typing import Optional + +import einops +import torch + +from motionbricks.motionlib.core.skeletons import ( + G1Skeleton, + G1Skeleton32, + G1Skeleton34, + SkeletonBase, +) +from motionbricks.motionlib.core.utils.rotations import exp_map_to_matrix, quaternion_to_matrix +from motionbricks.motionlib.core.utils.torch_utils import batch_rigid_transform + + +def _local_rot_offset_from_old_neutral_to_new_T( + n_bones: int, name_to_idx: dict +) -> torch.Tensor: + # local offsets to make the weird skeleton a custom t-pose + + const_exp_map = torch.zeros(n_bones, 3) + + # set (pelvis, x) to -pi/2 + const_exp_map[name_to_idx["Hips"], 0] = -math.pi / 2 + # set (right_shoulder, y) to pi + const_exp_map[name_to_idx["RightShoulder"], 1] = math.pi + # set (right up leg, y) to pi/2 + const_exp_map[name_to_idx["RightUpLeg"], 1] = math.pi / 2 + # set (left up leg, y) to pi/2 + const_exp_map[name_to_idx["LeftUpLeg"], 1] = math.pi / 2 + # set (right foot, z) to -pi/2 + const_exp_map[name_to_idx["RightFoot"], 2] = -math.pi / 2 + # set (left foot, z) to -pi/2 + const_exp_map[name_to_idx["LeftFoot"], 2] = -math.pi / 2 + + const_rot_mats = exp_map_to_matrix(const_exp_map) # (N, 3, 3) + + return const_rot_mats + + +def get_global_offset( + t_pose: str, + skeleton: SkeletonBase, + neutral_joints: Optional[torch.Tensor] = None, + return_neutral_joints=False, + base_path: str = "./", # this is helpful when using the package as a submodule in other projects +): + """Loads the t-pose that we want to convert to and returns the joint positions along with global + joint rotations.""" + if neutral_joints is None: + neutral_joints = skeleton.neutral_joints + + device = neutral_joints.device + dtype = neutral_joints.dtype + + if t_pose == "capture": + # identity: no changes + local_offset = torch.eye(3).repeat(skeleton.nbjoints, 1, 1) + elif t_pose == "custom": + n_bones = skeleton.nbjoints + name_to_idx = skeleton.bone_index + # rotation offsets: (N, 3, 3) + local_offset = _local_rot_offset_from_old_neutral_to_new_T(n_bones, name_to_idx) + elif t_pose == "standard": + t_pose_path = None + native_skel = None + if isinstance(skeleton, G1Skeleton32): + t_pose_path = os.path.join( + base_path, + "assets/skeletons/g1skel32/standard_t_pose_g1skel32_joint_quat.p", + ) + native_skel = G1Skeleton32() + elif isinstance(skeleton, G1Skeleton34): + t_pose_path = os.path.join( + base_path, + "assets/skeletons/g1skel34/standard_t_pose_g1skel34_joint_quat.p", + ) + native_skel = G1Skeleton34() + else: + raise NotImplementedError( + f"This skeleton is not supported for t-pose conversion: {skeleton}" + ) + joints_orients_with_hands = torch.load(t_pose_path) + + skel_slice = skeleton.get_skel_slice(native_skel) + joints_orients = joints_orients_with_hands[skel_slice] + local_offset = quaternion_to_matrix(joints_orients) + else: + raise NotImplementedError(f"This t-pose is not recognized: {t_pose}") + + # run FK to compute new neutral joint positions, and global rot offsets for next step of transforming the motion rot mats + new_neutral_joints, global_rot_offsets = batch_rigid_transform( + local_offset[None].to(device=device, dtype=dtype), + neutral_joints[None], + skeleton.joint_parents, + skeleton.root_idx, + ) + new_neutral_joints = new_neutral_joints[0] # (N, 3) + global_rot_offsets = global_rot_offsets[0] # (N, 3, 3) + + if return_neutral_joints: + return global_rot_offsets, new_neutral_joints + return global_rot_offsets + + +def change_t_pose_global_mats( + global_mats: torch.Tensor, + t_pose_to: str, + skeleton: SkeletonBase, + t_pose_from: Optional[str] = None, +): + if t_pose_from is None: + t_pose_from = skeleton.t_pose + + # no changes + if t_pose_from == t_pose_to: + return global_mats + + assert t_pose_from in ["capture", "custom", "standard"] + assert t_pose_to in ["capture", "custom", "standard"] + + dtype = global_mats.dtype + device = global_mats.device + + global_offset_from = get_global_offset(t_pose_from, skeleton) + global_offset_to = get_global_offset(t_pose_to, skeleton) + + new_global_mats = torch.einsum( + "... N m n, N n o, N p o -> ... N m p", + global_mats, + global_offset_from.to(device=device, dtype=dtype), + global_offset_to.to(device=device, dtype=dtype), + ) + return new_global_mats + + +def change_t_pose_local_mats( + local_mats: torch.Tensor, + t_pose_to: str, + skeleton: SkeletonBase, + return_global_rots=False, + t_pose_from: Optional[str] = None, +): + if t_pose_from is None: + t_pose_from = skeleton.t_pose + + dtype = local_mats.dtype + device = local_mats.device + + orig_shape = local_mats.shape + local_mats = local_mats.reshape(-1, skeleton.nbjoints, 3, 3) + + nbpose = local_mats.shape[0] + neutral_joints = skeleton.neutral_joints + batched_neutral_joints = einops.repeat(neutral_joints, "j k -> b j k", b=nbpose).to( + dtype=dtype, device=device + ) + + _, global_mats = batch_rigid_transform( + local_mats, + batched_neutral_joints, + skeleton.joint_parents, + skeleton.root_idx, + ) # (T, N, 3, 3) + + new_global_mats = change_t_pose_global_mats( + global_mats, + t_pose_to, + skeleton, + t_pose_from=t_pose_from, + ) + new_local_mats = global_mats_to_local_mats(new_global_mats, skeleton) + + if return_global_rots: + return new_local_mats.reshape(orig_shape), new_global_mats.reshape(orig_shape) + return new_local_mats.reshape(orig_shape) + + +def global_mats_to_local_mats( + global_rot_mats: torch.Tensor, skeleton: SkeletonBase +): + # obtain back the local rotations from the global rotations + parent_rot_mats = global_rot_mats[..., skeleton.joint_parents, :, :] + parent_rot_mats[..., skeleton.root_idx, :, :] = torch.eye(3) # the root joint + local_rot_mats = torch.einsum( + "... N n m, ... N n o -> ... N m o", + parent_rot_mats, # taken as the inverse/transpose in einsum + global_rot_mats, + ) + return local_rot_mats diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/tools/feature_info.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/tools/feature_info.py new file mode 100644 index 0000000000000000000000000000000000000000..66142b0bdbb7af72be7d0318d802fe9053aa140d --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/tools/feature_info.py @@ -0,0 +1,13 @@ +def tensor_needed(motion_rep): + needs = set() + + for feature in motion_rep.body_keys: + if feature in ["ric_data", "local_vel", "foot_contacts"]: + needs.add("posed_joints") + elif feature in ["rot_data"]: + needs.add("local_joint_rots") + elif feature in ["global_rot_data"]: + needs.add("global_joint_rots") + else: + raise ValueError("This body feature is not recognised") + return needs diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/tools/feet.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/tools/feet.py new file mode 100644 index 0000000000000000000000000000000000000000..001c107799df3b1c1d14412a9a6c65913647cb45 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/tools/feet.py @@ -0,0 +1,50 @@ +from typing import Tuple + +import torch + + +def foot_detect_from_pos_and_vel( + positions: torch.Tensor, + velocity: torch.Tensor, + skeleton, + vel_thres: float, + height_thresh: float, +) -> Tuple[torch.Tensor, torch.Tensor]: + """Compute foot contact labels using heuristics combining joint height and velocities. + + Args: + positions (torch.Tensor): [X, T, J, 3] global joint positions + velocity (torch.Tensor): [X, T, J, 3] velocities (already padded correctly), already multiplied by 1 / dt + vel_thres (float): threshold for joint velocity + height_thresh (float): threshold for joint height + + Returns: + torch.Tensor: [X, T, 2] contact labels for left heel and left toe, 1 for foot plant + torch.Tensor: [X, T, 2] contact labels for right heel and right toe, 1 for foot plant + """ + + device = positions.device + fid_l = skeleton.left_foot_joint_idx + fid_r = skeleton.right_foot_joint_idx + + velfactor, heightfactor = ( + torch.tensor([vel_thres, vel_thres], device=device), + torch.tensor([height_thresh, height_thresh], device=device), + ) + + feet_l_v = torch.linalg.norm(velocity[:, :, fid_l], axis=-1) + feet_l_h = positions[:, :, fid_l, 1] + + feet_l = torch.logical_and( + feet_l_v < velfactor, + feet_l_h < heightfactor, + ).to(positions.dtype) + + feet_r_v = torch.linalg.norm(velocity[:, :, fid_r], axis=-1) + feet_r_h = positions[:, :, fid_r, 1] + + feet_r = torch.logical_and( + feet_r_v < velfactor, + feet_r_h < heightfactor, + ).to(positions.dtype) + return feet_l, feet_r diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/tools/heading.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/tools/heading.py new file mode 100644 index 0000000000000000000000000000000000000000..ed5beb207d4186a8bf234d6129f07bbdf09ed9ef --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/tools/heading.py @@ -0,0 +1,281 @@ +from typing import Optional + +import einops +import torch + +from motionbricks.motionlib.core.skeletons import SkeletonBase +from motionbricks.motionlib.core.utils.rotations import diff_angles, diff_between_two_angles, quat_apply +from motionbricks.motionlib.core.utils.torch_utils import normalize_vec + + +def calc_heading(compute_heading_method: str, **kwargs): + """Compute heading direction from various ways. + + Args: + input_tensor (torch.Tensor): [..., T, 4] quaternions or joints_pos [..., T, X, 3] + compute_heading_method (str): which function to use + Returns: + heading (torch.Tensor): [...] heading angle, or [..., 4] heading direction + """ + + if compute_heading_method == "hips_pos": + heading = calc_heading_from_joints_pos(**kwargs) + else: + if compute_heading_method == "quat": + heading = get_y_heading(**kwargs) + elif compute_heading_method == "refdir": + heading = calc_heading_refdir(**kwargs) + elif compute_heading_method == "refdir_inter": + heading = calc_heading_refdir(**kwargs) + else: + raise NotImplementedError + return heading + + +def calc_heading_refdir( + root_quat: torch.Tensor, + lengths: Optional[torch.Tensor] = None, + return_quat: Optional[bool] = False, + inverse: Optional[bool] = False, + fix_rot: Optional[bool] = False, + **kwargs, +): + """Compute the heading direction from the root quaternion, by computing the changes from a + reference direction. + + Args: + root_quat (torch.Tensor): [..., T, 4] global root rot quaternion + lengths (Optional[torch.Tensor]): [...] lengths of each motions (used only for the fix) + return_quat (bool): return quaternions or not + inverse (bool): return the inverse quaternion + fix_rot (bool): use the rotation interpolation fix + **kwargs (Dict): unecessary arguments + Returns: + heading (torch.Tensor): [...] heading angle, or [..., 4] heading quaternion + """ + + # type: (Tensor) -> Tensor + # calculate heading direction from quaternion + # the heading is the direction on the xz plane + # root_quat must be normalized + + assert root_quat.shape[-1] == 4 + + # make it [X, 4] + rquat, ps = einops.pack([root_quat], "* quat") + ref_dir = torch.zeros_like(rquat[..., 0:3]) + ref_dir[..., 0] = 1 + rot_dir = quat_apply(rquat, ref_dir) + heading = -torch.atan2(rot_dir[..., 2], rot_dir[..., 0]) + # negative value because of xz + + # get back original shape + [heading] = einops.unpack(heading, ps, "*") + + if fix_rot: + # ON GOING + __import__("ipdb").set_trace() + [rot_dir] = einops.unpack(rot_dir, ps, "* dim") + heading = fix_discountinuity_interpolation(heading, rot_dir, lengths) + + if inverse: + heading = -heading + + if return_quat: + heading_quat = torch.zeros_like(root_quat) + heading_quat[..., 0] = torch.cos(heading / 2) + heading_quat[..., 2] = torch.sin(heading / 2) + return heading_quat + + return heading + + +# moved from previous +# convert_joint_pos_to_rep function of global_root_local_joints_root_rot.py +def calc_heading_from_joints_pos( + posed_joints: torch.Tensor, + skeleton: SkeletonBase, + return_quat: Optional[bool] = False, + inverse: Optional[bool] = False, + **kargs, +): + """Compute the heading direction from the joint positions, by looking at the hip vector. + + Args: + posed_joints (torch.Tensor): [..., T, J, 3] global positions + skeleton (SkeletonBase): skeleton of the human, used to find location of hips + return_quat (bool): return quaternions or not + inverse (bool): return the inverse quaternion + **kwargs (Dict): unecessary arguments + Returns: + heading (torch.Tensor): [...] heading angle, or [..., 4] heading quaternion + """ + assert posed_joints.shape[-1] == 3 + + device = posed_joints.device + dtype = posed_joints.dtype + + # compute root heading for the sequence from hip positions + r_hip, l_hip = skeleton.hip_joint_idx + + skel2d = 1 * posed_joints + skel2d[..., 1] *= 0 # only need 2D (x,z) + + across = skel2d[:, :, r_hip] - skel2d[:, :, l_hip] + across = across / (torch.linalg.norm(across, axis=-1, keepdim=True) + 1e-6) + + root_heading = torch.cross( + torch.tensor([[[0.0, 1.0, 0.0]]]).to(across), across, dim=-1 + ) + root_heading = root_heading / torch.linalg.norm(root_heading, axis=-1, keepdim=True) + + # compute (inverse) quaternion from heading + root_heading = torch.atan2( + root_heading[..., 0], + root_heading[..., 2], + ) # z is the forward facing direction of the motion, so it is the second argument for atan2 + if inverse: + root_heading = -root_heading + + if return_quat: + root_quat = torch.zeros( + (*root_heading.shape, 4), + device=device, + dtype=dtype, + ) + + # NOTE: cos and sin here can crash with a floating point exception + # due to weird mkl issue on certain CPUs + root_quat[..., 0] = torch.cos(root_heading / 2) + root_quat[..., 2] = torch.sin(root_heading / 2) + return root_quat + + return root_heading + + +def get_y_heading( + root_quat: torch.Tensor, + return_quat: Optional[bool] = False, + inverse: Optional[bool] = False, + **kargs, +) -> torch.Tensor: + """Compute the heading direction from the root quaternion, by computing the changes from a + reference direction. + + Args: + root_quat (torch.Tensor): [..., T, 4] global root rot quaternion + return_quat (bool): return quaternions or not + inverse (bool): return the inverse quaternion + **kwargs (Dict): unecessary arguments + Returns: + heading (torch.Tensor): [...] heading angle, or [..., 4] heading quaternion + """ + + assert root_quat.shape[-1] == 4 + + root_quat = root_quat.clone() + root_quat[..., 1] = 0 + root_quat[..., 3] = 0 + + if inverse: + # reverse the sin in -sin + root_quat[..., 2] = -root_quat[..., 2] + + root_quat = normalize_vec(root_quat, dim=-1) + + if return_quat: + return root_quat + + root_heading = 2 * torch.atan2(root_quat[2], root_quat[0]) + return root_heading + + +def fix_discountinuity_interpolation( + heading: torch.Tensor, + rot_dir: torch.Tensor, + lengths: torch.Tensor, + threshold=0.5, +): + """Fix discountinuity in rotation + Args: + heading (torch.Tensor): [..., T] + rot_dir (torch.Tensor): [..., T, 3] + Returns: + heading (torch.Tensor): [..., T] fixed + """ + + # make it [X, T] + heading, ps = einops.pack([heading], "* nbframes") + # make it [X, T, 3] + rot_dir, _ = einops.pack([rot_dir], "* nbframes dim") + + # difference of angles + dangle = diff_angles(heading) + + unreliable_mask = rot_dir[..., 1].abs() > 0.5 + + # Find the indices where the mask changes value (True -> False or False -> True) + change_indices = torch.diff(unreliable_mask.to(int)) + + # Start of True intervals + starts = torch.where(change_indices == 1)[0] + 1 + + # End of True intervals + ends = torch.where(change_indices == -1)[0] + + # If the mask starts with True, include the start + if unreliable_mask[0]: + starts = torch.cat([torch.tensor([0]), starts]) + + # If the mask ends with True, include the end + if unreliable_mask[-1]: + ends = torch.cat([ends, torch.tensor([len(unreliable_mask) - 1])]) + + # Combine starts and ends into intervals + intervals = torch.column_stack((starts, ends)) + # close intervals + + # maximim index value of the array + N = len(unreliable_mask) - 1 + for a, b in intervals: + if a == 0: + # start (only info we have) + hstart = heading[a] + else: + # a >= 1 + # copy the last good heading + hstart = heading[a - 1] + if a >= 2: + # apply the last good velocity + # to the last heading + # (that's why "-2") + hstart += dangle[a - 2] + if b == N: + # end (only info we can take) + hend = heading[b] + else: + # b <= N-1 + # copy the first following good heading + hend = heading[b + 1] + + if b <= N - 2: + # apply the first good velocity + # to the first heading in reverse + # (that's why "+1", and "-") + hend -= dangle[b + 1] + + total_diff = diff_between_two_angles(hend, hstart) + total_elements = b - a + 1 + if total_elements > 1: + indexes = torch.arange(0, total_elements) + test_fill = indexes * total_diff / (total_elements - 1) + hstart + heading[a : b + 1] = test_fill + else: + # total_elements == 1 + # a = b + heading[a] = (hstart + hend) / 2 + + dangle = diff_angles(heading) + + # negative value because of xz + return -heading diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/tools/motion_features.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/tools/motion_features.py new file mode 100644 index 0000000000000000000000000000000000000000..a1288fc1c8a88c86f6f33f7a4be940f45c6ad7f1 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/tools/motion_features.py @@ -0,0 +1,1343 @@ +from typing import Dict, List, Optional + +import einops +import torch + +from motionbricks.motionlib.core.motion_reps.tools.changing_t_pose import ( + change_t_pose_global_mats, + change_t_pose_local_mats, + global_mats_to_local_mats, +) +from motionbricks.motionlib.core.skeletons import SkeletonBase +from motionbricks.motionlib.core.utils.rotations import ( + cont6d_to_matrix, + diff_angles, + matrix_to_quaternion, + quat_apply, + quat_conjugate, + quat_mul, + quat_unit, + quaternion_to_cont6d, + quaternion_to_matrix, +) +from motionbricks.motionlib.core.utils.torch_utils import batch_rigid_transform + +from .feature_info import tensor_needed +from .feet import foot_detect_from_pos_and_vel +from .heading import calc_heading + + +def compute_vel_angle( + root_rot_angles: torch.Tensor, + fps: float, + lengths: Optional[torch.Tensor] = None, +): + """Compute the local root rotation velocity: dtheta/dt. + + Args: + root_rot_angles (torch.Tensor): [..., T] rotation angle (in radian) + fps (float): frame per seconds + lengths (Optional[torch.Tensor]): [...] size of each input batched. If not provided, root_rot_angles should not be batched + + Returns: + local_root_rot_vel (torch.Tensor): [..., T] local root rotation velocity (in radian/s) + """ + device = root_rot_angles.device + # If the lengths is not provided, we do not assume full length + # the input should be a single sequence + if lengths is None: + # make sure it is a unique sequence input + assert len(root_rot_angles.shape) == 1 + lengths = torch.tensor([len(root_rot_angles)], device=device) + + root_rot_angles, ps = einops.pack([root_rot_angles], "* nbframes") + lengths, _ = einops.pack([lengths], "*") + + # useful for indexing + range_len = torch.arange(len(lengths)) + + local_root_rot_vel = diff_angles(root_rot_angles, fps) + pad_rot_vel_angles = torch.zeros_like(root_rot_angles[:, 0]) + local_root_rot_vel, _ = einops.pack( + [local_root_rot_vel, pad_rot_vel_angles], + "batch *", + ) + # repeat the last rotation angle + # with special care for different lengths with batches + local_root_rot_vel[(range_len, lengths - 1)] = local_root_rot_vel[ + (range_len, lengths - 2) + ] + + [local_root_rot_vel] = einops.unpack(local_root_rot_vel, ps, "* nbframes") + return local_root_rot_vel + + +def compute_vel_xyz( + positions: torch.Tensor, + fps: float, + lengths: Optional[torch.Tensor] = None, +): + """Compute the velocities from positions: dx/dt. Works with batches. The last velocity is duplicated to keep the same size. + + Args: + positions (torch.Tensor): [..., T, J, 3] xyz positions of a human skeleton + fps (float): frame per seconds + lengths (Optional[torch.Tensor]): [...] size of each input batched. If not provided, positions should not be batched + + Returns: + velocity (torch.Tensor): [..., T, J, 3] velocities computed from the positions + """ + device = positions.device + + # If the lengths is not provided, we do not assume full length + # the input should be a single sequence + if lengths is None: + # make sure it is a unique sequence input + assert len(positions.shape) == 3 + lengths = torch.tensor([len(positions)], device=device) + + positions, ps = einops.pack([positions], "* nbframes nbjoints xyz") + lengths, _ = einops.pack([lengths], "*") + + # useful for indexing + range_len = torch.arange(len(lengths)) + + # compute velocities with fps + velocity = fps * (positions[:, 1:] - positions[:, :-1]) + # pading the velocity vector + vel_pad = torch.zeros_like(velocity[:, 0]) + velocity, _ = einops.pack([velocity, vel_pad], "batch * nbjoints dim") + + # repeat the last velocities + # with special care for different lengths with batches + velocity[(range_len, lengths - 1)] = velocity[(range_len, lengths - 2)] + [velocity] = einops.unpack(velocity, ps, "* nbframes nbjoints xyz") + return velocity + + +def compute_heading_info( + heading_quat_raw: torch.Tensor, + nbjoints: int, + root_quat: Optional[torch.Tensor], + global_joint_quat: Optional[torch.Tensor], + **kwargs, # throw away unecessary args +): + """Compute heading info. From the raw output of calc_heading, compute a canonicalized heading + quaternion (first frame is 0 rotation), save the previous initial direction, and remove the + heading from the global root rotation if provided. + + Args: + heading_quat_raw: (torch.Tensor): [B, T, 4] heading direction in quaternion, direct output of calc_heading + nbjoints (int): number of joints of the skeleton + root_quat (Optional[torch.Tensor]): [B, T, 4] global rotation of the root + global_joint_quat (torch.Tensor): [B, T, J, 4] global joint quaternions of the input motion + **kwargs (Dict): unused arguments for easy function call + + Returns: + info (Dict): dictionnary which encapsulate all the output: heading_quat, init_heading_quat_inv, etc + """ + + nbframes = heading_quat_raw.shape[1] + init_heading_quat_raw = heading_quat_raw[:, 0] + + root_quat_wo_heading = None + root_quat_wo_first_heading = None + if root_quat is not None: + # root rotation without heading + root_quat_wo_heading = quat_mul( + quat_conjugate(heading_quat_raw), root_quat + ) # [X, T, 4] + + # root heading rotation on all joints + heading_quat = einops.repeat( + heading_quat_raw, + "batch nbframes quat -> batch nbframes nbjoints quat", + nbjoints=nbjoints, + ) # [X, T, J, 4] + + global_joint_quat_wo_heading = None + if global_joint_quat is not None: + # remove heading direction to all global rotations + global_joint_quat_wo_heading = quat_mul( + quat_conjugate(heading_quat), global_joint_quat + ) # [X, T, J, 4] + + # first frame root heading rotation on all joints + init_heading_quat_inv = quat_conjugate(heading_quat[:, 0]) # [X, D, 4] + init_heading_quat_inv = einops.repeat( + init_heading_quat_inv, + "batch nbjoints quat -> batch nbframes nbjoints quat", + nbframes=nbframes, + ) # [X, T, J, 4] + + root_quat_wo_first_heading = None + if root_quat is not None: + # root rotation without first heading + root_quat_wo_first_heading = quat_mul( + init_heading_quat_inv[:, :, 0], root_quat + ) # [X, T, 4] + + global_joint_quat_wo_first_heading = None + if global_joint_quat is not None: + global_joint_quat_wo_first_heading = quat_mul( + init_heading_quat_inv, global_joint_quat + ) # [X, T, J, 4] + + # root heading rotation on all joints, with first frame normalized to be 0 + heading_quat = quat_mul(heading_quat, init_heading_quat_inv) # [X, T, J, 4] + # fix some numerical issues: it is only a Y rotation axis rotation + heading_quat[..., 1] = 0 + heading_quat[..., 3] = 0 + # make it a unit quaternion agains + heading_quat = quat_unit(heading_quat) + heading_quat_inv = quat_conjugate(heading_quat) # [X, T, J, 4] + + info = { + "heading_quat": heading_quat, + "heading_quat_inv": heading_quat_inv, + "init_heading_quat_inv": init_heading_quat_inv, + "root_quat_wo_heading": root_quat_wo_heading, + "root_quat_wo_first_heading": root_quat_wo_first_heading, + "global_joint_quat_wo_heading": global_joint_quat_wo_heading, + "global_joint_quat_wo_first_heading": global_joint_quat_wo_first_heading, + "init_heading_quat_raw": init_heading_quat_raw, + } + return info + + +def compute_position_features( + posed_joints: torch.Tensor, + skeleton: SkeletonBase, + heading_quat_inv: torch.Tensor, + init_heading_quat_inv: torch.Tensor, + foot_contacts: Optional[torch.Tensor], + lengths: torch.Tensor, + fps: float, + local_root_vel_with_y: bool, + local_vel_without_root: bool, + removing_heading: bool = True, + **kwargs, # throw away unecessary args +): + """Compute local position features from the original joints position, and the heading direction. + Canonicalize each frame so that they all face in the same direction. + + Args: + posed_joints (torch.Tensor): [B, T, J, 3] joint positions of the input motion + skeleton (SkeletonBase): the skeleton corresponding to the human + heading_quat_inv (torch.Tensor): the inverse quaternion of the heading direction + init_heading_quat_inv (torch.Tensor): the first inverse direction (for canonicalization) + lengths (torch.Tensor): lengths of each motion for batch computation + fps (float): frame per seconds + local_root_vel_with_y (bool): if True: put Y (gravity axis) in the local_root_vel + local_vel_without_root (bool): if True: remove the root_idx from the local velocities + **kwargs (Dict): unused arguments for easy function call + + Returns: + info (Dict): dictionnary which encapsulate all the output: ric_data, local velocities, foot contacts etc. + """ + + root_idx = skeleton.root_idx + + global_positions = posed_joints.clone() + root_pos_init_xz = global_positions[:, 0, root_idx, [0, 2]].clone() + global_positions[..., [0, 2]] -= root_pos_init_xz[:, None, None] + + # all initially face Z+ + global_positions = quat_apply(init_heading_quat_inv, global_positions) + + # get root rotation/translation representation + # root linear velovity on xz plane (T, 2) + + velocity = compute_vel_xyz(global_positions, fps, lengths=lengths) + + if removing_heading: + # Rotate the velocity vector only if we remove heading + local_vel = quat_apply(heading_quat_inv, velocity) + else: + local_vel = velocity + + if local_root_vel_with_y: + root_local_vel = local_vel[:, :, root_idx].clone() + else: + root_local_vel = local_vel[:, :, root_idx, [0, 2]].clone() + + if local_vel_without_root: + # remove the root from the local velocities + local_vel, _ = einops.pack( + [ + local_vel[:, :, :root_idx], + local_vel[:, :, root_idx + 1 :], + ], + "batch time * dim", + ) + + # regroup data + local_vel = einops.rearrange( + local_vel, + "batch time joints dim -> batch time (joints dim)", + ) + + # root height (T, 1) + global_root_y = global_positions[:, :, root_idx, 1] + global_root_pos = global_positions[:, :, root_idx] # noqa + + # global_positions + # get joint position represention (T, (J-1)x3) + positions = global_positions.clone() + + # Root at the reference + # avoid "-=" for good results + positions[..., 0] = positions[..., 0] - positions[..., [root_idx], 0] + positions[..., 2] = positions[..., 2] - positions[..., [root_idx], 2] + + # all pose face Z+ if we remove the heading + if removing_heading: + positions = quat_apply(heading_quat_inv, positions) + + # remove the root index as it is all zeros (for x and z), and y is already saved + ric_data, _ = einops.pack( + [positions[:, :, :root_idx], positions[:, :, root_idx + 1 :]], + "batch time * dim", + ) + + # regroup data + ric_data = einops.rearrange( + ric_data, "batch time joints dim -> batch time (joints dim)" + ) + + if foot_contacts is None: + # compute them with the positions/velocities + + # get foot contact representation (T, 4) + # velocity is already padded correctly, with factor 1/dt + feet_l, feet_r = foot_detect_from_pos_and_vel( + global_positions, velocity, skeleton, 0.15, 0.10 + ) + foot_contacts = torch.cat((feet_l, feet_r), axis=-1) + + info = { + "ric_data": ric_data, + "local_root_vel": root_local_vel, + "local_vel": local_vel, + "global_root_y": global_root_y, + "global_root_pos": global_root_pos, + "root_pos_init_xz": root_pos_init_xz, + "foot_contacts": foot_contacts, + } + return info + + +def compute_position_features_with_smooth_root( + posed_joints: torch.Tensor, + smooth_translations: torch.Tensor, + skeleton: SkeletonBase, + heading_quat_inv: torch.Tensor, + init_heading_quat_inv: torch.Tensor, + foot_contacts: Optional[torch.Tensor], + lengths: torch.Tensor, + fps: float, + local_root_vel_with_y: bool, + local_vel_without_root: bool, + removing_heading: bool = True, + **kwargs, # throw away unecessary args +): + """Compute local position features from the original joints position, and the heading direction. + Canonicalize each frame so that they all face in the same direction. + + Args: + posed_joints (torch.Tensor): [B, T, J, 3] joint positions of the input motion + smooth_translations (torch.Tensor): [B, T, 3] smooth transltations of the input motion + skeleton (SkeletonBase): the skeleton corresponding to the human + heading_quat_inv (torch.Tensor): the inverse quaternion of the heading direction + init_heading_quat_inv (torch.Tensor): the first inverse direction (for canonicalization) + lengths (torch.Tensor): lengths of each motion for batch computation + fps (float): frame per seconds + local_root_vel_with_y (bool): if True: put Y (gravity axis) in the local_root_vel + local_vel_without_root (bool): if True: remove the root_idx from the local velocities + **kwargs (Dict): unused arguments for easy function call + + Returns: + info (Dict): dictionnary which encapsulate all the output: ric_data, local velocities, foot contacts etc. + """ + + root_idx = skeleton.root_idx + + global_positions = posed_joints.clone() + + # use the smooth root instead + # root_pos_init_xz = global_positions[:, 0, root_idx, [0, 2]].clone() + root_pos_init_xz = smooth_translations[:, 0, [0, 2]].clone() + global_positions[..., [0, 2]] -= root_pos_init_xz[:, None, None] + + # all initially face Z+ + global_positions = quat_apply(init_heading_quat_inv, global_positions) + + # also put the smooth translations at 0 and turn to face Z+ + smooth_translations[..., [0, 2]] -= root_pos_init_xz[:, None] + smooth_translations = quat_apply( + init_heading_quat_inv[:, :, root_idx], smooth_translations + ) + + # get root rotation/translation representation + # root linear velovity on xz plane (T, 2) + + velocity = compute_vel_xyz(global_positions, fps, lengths=lengths) + + if removing_heading: + # Rotate the velocity vector only if we remove heading + local_vel = quat_apply(heading_quat_inv, velocity) + else: + local_vel = velocity + + if local_root_vel_with_y: + root_local_vel = local_vel[:, :, root_idx].clone() + else: + root_local_vel = local_vel[:, :, root_idx, [0, 2]].clone() + + if local_vel_without_root: + # remove the root from the local velocities + local_vel, _ = einops.pack( + [ + local_vel[:, :, :root_idx], + local_vel[:, :, root_idx + 1 :], + ], + "batch time * dim", + ) + + # regroup data + local_vel = einops.rearrange( + local_vel, + "batch time joints dim -> batch time (joints dim)", + ) + + # root height (T, 1) + # + # same results for now + # global_root_y = global_positions[:, :, root_idx, 1] + global_root_y = smooth_translations[..., 1] + global_root_pos = smooth_translations + + # global_positions + # get joint position represention (T, (J-1)x3) + positions = global_positions.clone() + + # Root at the reference + # avoid "-=" for good results + positions[..., 0] = positions[..., 0] - smooth_translations[..., [0]] + positions[..., 2] = positions[..., 2] - smooth_translations[..., [2]] + + # all pose face Z+ if we remove the heading + if removing_heading: + positions = quat_apply(heading_quat_inv, positions) + + # does not remove the root index + # it is not all zeros anymore (for x and z) + # ric_data, _ = einops.pack( + # [positions[:, :, :root_idx], positions[:, :, root_idx + 1 :]], + # "batch time * dim", + # ) + ric_data = positions + + # regroup data + ric_data = einops.rearrange( + ric_data, "batch time joints dim -> batch time (joints dim)" + ) + + if foot_contacts is None: + # compute them with the positions/velocities + + # get foot contact representation (T, 4) + # velocity is already padded correctly, with factor 1/dt + feet_l, feet_r = foot_detect_from_pos_and_vel( + global_positions, velocity, skeleton, 0.15, 0.10 + ) + foot_contacts = torch.cat((feet_l, feet_r), axis=-1) + + info = { + "ric_data": ric_data, + "local_root_vel": root_local_vel, + "local_vel": local_vel, + "global_root_y": global_root_y, + "global_root_pos": global_root_pos, + "root_pos_init_xz": root_pos_init_xz, + "foot_contacts": foot_contacts, + } + return info + + +def compute_heading_features( + heading_quat: torch.Tensor, + root_idx: int, + fps: float, + lengths: Optional[torch.Tensor] = None, + **kwargs, # throw away unecessary args +): + """Compute heading features, local and global. + + Args: + heading_quat: (torch.Tensor): [B, T, 4] heading direction in quaternion + root_idx (int): index of the root in the skeleton + fps (float): frame per seconds + lengths (Optional[torch.Tensor]): [...] size of each input batched. If not provided, positions should not be batched + **kwargs (Dict): unused arguments for easy function call + + Returns: + info (Dict): dictionnary which encapsulate all the output: global_root_heading, local_root_rot_vel, root_rot + """ + # root rotation velocity along y-axis (T, 1) + root_rot = heading_quat[:, :, root_idx] + root_rot_angles = torch.arctan2(root_rot[..., 2], root_rot[..., 0]) * 2 + + local_root_rot_vel = compute_vel_angle(root_rot_angles, fps, lengths=lengths) + global_root_heading = torch.stack( + [torch.cos(root_rot_angles), torch.sin(root_rot_angles)], dim=-1 + ) + info = { + "global_root_heading": global_root_heading, + "local_root_rot_vel": local_root_rot_vel, + "root_rot": root_rot, + } + return info + + +def compute_local_rotation_features_wo_heading( + local_joint_quat: torch.Tensor, + root_quat_wo_heading: torch.Tensor, + lengths: torch.Tensor, + root_idx: int, + fps: int, + **kwargs, # throw away unecessary args +): + """Compute local rotational features from the original rotations, and the heading direction. + + Args: + local_joint_quat (torch.Tensor): [B, T, J, 4] local joint quaternions of the input motion + root_quat_wo_heading (torch.Tensor): the quaternion of the heading direction (after canonicalizing the first frame) + root_idx (int): index of the root + fps (float): frame per seconds + **kwargs (Dict): unused arguments for easy function call + + Returns: + info (Dict): dictionnary which encapsulate the output: rot_data + """ + + # get joint rotation representation using cont6d (T, Jx6) + # replace the root quat with the heading invariant one + rot_joint_quat, _ = einops.pack( + [ + local_joint_quat[:, :, :root_idx], + root_quat_wo_heading, + local_joint_quat[:, :, root_idx + 1 :], + ], + "batch time * dim", + ) + + cont_6d_params = quaternion_to_cont6d(rot_joint_quat) + rot_data = einops.rearrange( + cont_6d_params, "batch time joints dim -> batch time (joints dim)" + ) + info = { + "rot_data": rot_data, + } + return info + + +def compute_local_rotation_features( + local_joint_quat: torch.Tensor, + root_quat_wo_first_heading: torch.Tensor, + lengths: torch.Tensor, + root_idx: int, + fps: int, + **kwargs, # throw away unecessary args +): + """Compute local rotational features from the original rotations, and the heading direction. + + Args: + local_joint_quat (torch.Tensor): [B, T, J, 4] local joint quaternions of the input motion + root_quat_wo_heading (torch.Tensor): the quaternion of the heading direction (after canonicalizing the first frame) + root_idx (int): index of the root + fps (float): frame per seconds + **kwargs (Dict): unused arguments for easy function call + + Returns: + info (Dict): dictionnary which encapsulate the output: rot_data + """ + + # get joint rotation representation using cont6d (T, Jx6) + # replace the root quat with the heading invariant one + rot_joint_quat, _ = einops.pack( + [ + local_joint_quat[:, :, :root_idx], + root_quat_wo_first_heading, + local_joint_quat[:, :, root_idx + 1 :], + ], + "batch time * dim", + ) + + cont_6d_params = quaternion_to_cont6d(rot_joint_quat) + rot_data = einops.rearrange( + cont_6d_params, "batch time joints dim -> batch time (joints dim)" + ) + info = { + "rot_data": rot_data, + } + return info + + +def compute_global_rotation_features_wo_heading( + global_joint_quat_wo_heading: torch.Tensor, + lengths: torch.Tensor, + root_idx: int, + fps: int, + **kwargs, # throw away unecessary args +): + """Compute local rotational features from the original rotations, and the heading direction. + + Args: + global_joint_quat_wo_heading (torch.Tensor): [B, T, J, 4] global joint quaternions of the input motion without heading direction + root_idx (int): index of the root + fps (float): frame per seconds + **kwargs (Dict): unused arguments for easy function call + + Returns: + info (Dict): dictionnary which encapsulate the output: rot_data + """ + + # get joint rotation representation using cont6d [B, T, Jx6] + cont_6d_params = quaternion_to_cont6d(global_joint_quat_wo_heading) + global_rot_data = einops.rearrange( + cont_6d_params, "batch time joints dim -> batch time (joints dim)" + ) + info = { + "global_rot_data": global_rot_data, + } + return info + + +def compute_global_rotation_features( + global_joint_quat_wo_first_heading: torch.Tensor, + lengths: torch.Tensor, + root_idx: int, + fps: int, + **kwargs, # throw away unecessary args +): + """Compute local rotational features from the original rotations, and the heading direction. + + Args: + global_joint_quat_wo_first_heading (torch.Tensor): [B, T, J, 4] global joint quaternions of the input motion without heading direction for the first frame only + root_idx (int): index of the root + fps (float): frame per seconds + **kwargs (Dict): unused arguments for easy function call + + Returns: + info (Dict): dictionnary which encapsulate the output: rot_data + """ + + # get joint rotation representation using cont6d [B, T, Jx6] + cont_6d_params = quaternion_to_cont6d(global_joint_quat_wo_first_heading) + global_rot_data = einops.rearrange( + cont_6d_params, "batch time joints dim -> batch time (joints dim)" + ) + info = { + "global_rot_data": global_rot_data, + } + return info + + +def compute_motion_features( + input_tensor_dict: Dict[str, torch.Tensor], + motion_rep, + *, + # keywords mandatory arguments + local_vel_without_root: bool, + local_root_vel_with_y: bool, + compute_heading_method: str, + # keywords optional arguments + lengths: Optional[torch.Tensor] = None, + input_quat: Optional[bool] = False, + only_pos: Optional[bool] = False, + t_pose_from: Optional[str] = None, + return_init_heading_info: bool = False, + removing_heading: bool = True, + using_smooth_root: bool = False, + extra_skel: bool = False, +) -> torch.Tensor: + """Generate feature vector for one motion given joint rotation matrices and positions. + + Args: + input_tensor_dict (Dict[torch.Tensor]): contain all the input data (some can be optional) + posed_joints (torch.Tensor): [..., T, J, 3] joint positions of the input motion + local_joint_rots (torch.Tensor): [..., T, J, 3, 3] local joint rotation matrices of the input motion or [..., T, J, 4] quaternions + global_joint_rots (torch.Tensor): [..., T, J, 3, 3] global joint rotation matrices of the input motion or [..., T, J, 4] quaternions + foot_contacts (torch.Tensor): [..., T, 4] foot contacts (or None if we computed them from the positions) + lengths (torch.Tensor): [...] lengths of the motions + keys (List[str]): list of feature names in order, we want to concatenate in the motion rep + compute_heading_method (str): "quat" / "refdir" / "refdir_inter" + fps (float): frame per seconds + lengths (torch.Tensor): lengths of each motion if batched + local_root_vel_with_y (bool): if True: put Y (gravity axis) in the local_root_vel + local_vel_without_root (bool): if True: remove the root_idx from the local velocities + input_quat (bool): if True, consider the input to be quaternion, else matrices + only_pos (bool): if True, do not compute any rotation features (rot_data) + return_init_heading_info (bool): if True, return the canonicalization info + removing_heading (bool): if True, return the canonicalization info + using_smooth_root (bool): if True, compute a smooth trajectory for the root, and keep the hips joint in the positions data + extra_skel (bool): whether we use the extra position representation or not. This is not use in this script yet but necessary to avoid using **kwargs + """ + skeleton = motion_rep.skeleton + fps = motion_rep.fps + + # compute on the fly missing necessary elements if possible + + local_joint_rots = input_tensor_dict.get("local_joint_rots") + posed_joints = input_tensor_dict.get("posed_joints") + global_joint_rots = input_tensor_dict.get("global_joint_rots") + translation = input_tensor_dict.get("translation") + foot_contacts = input_tensor_dict.get("foot_contacts") + + # quick einpack for batch_rigid, extend joints + needs = tensor_needed(motion_rep) + + # Creating local joints rotations if it is not provided + if "local_joint_rots" in needs and local_joint_rots is None: + if global_joint_rots is None: + raise ValueError( + "Cannot create local joint rots, which is necessary for this motion rep." + ) + if global_joint_rots.shape[-1] == 4: + global_joint_rots = quaternion_to_matrix(global_joint_rots) + # compute the locals from the globals + local_joint_rots = global_mats_to_local_mats(global_joint_rots, skeleton) + + # Changing the local rotations / t_pose: + # do this Before FK, so that our skeleton is compatible with the input + if ( + local_joint_rots is not None + and t_pose_from is not None + and t_pose_from != motion_rep.skeleton.t_pose + ): + if local_joint_rots.shape[-1] == 4: + local_joint_rots = quaternion_to_matrix(local_joint_rots) + + # do this after FK, so that we can keep the old neutral joints + local_joint_rots, global_joint_rots = change_t_pose_local_mats( + local_joint_rots, + skeleton.t_pose, + skeleton, + t_pose_from=t_pose_from, + return_global_rots=True, + ) + + # Creating global joints rotations or posed joints if it is not provided + if ("global_joint_rots" in needs and global_joint_rots is None) or ( + "posed_joints" in needs and posed_joints is None + ): + if local_joint_rots is None: + raise ValueError( + "Cannot create global joint rots, which is necessary for this motion rep." + ) + if local_joint_rots.shape[-1] == 4: + local_joint_rots = quaternion_to_matrix(local_joint_rots) + + # one big chunk + local_joint_rots, ps = einops.pack([local_joint_rots], "* nbjoints dim1 dim2") + # run FK to compute global joints positions + _joints = einops.repeat( + skeleton.neutral_joints.to(dtype=local_joint_rots.dtype), + "j k -> b j k", + b=len(local_joint_rots), + ) + + _posed_joints, _global_joint_rots = batch_rigid_transform( + local_joint_rots, _joints, skeleton.joint_parents, skeleton.root_idx + ) + [local_joint_rots] = einops.unpack(local_joint_rots, ps, "* nbjoints dim1 dim2") + [_global_joint_rots] = einops.unpack( + _global_joint_rots, ps, "* nbjoints dim1 dim2" + ) + + if global_joint_rots is None and "global_joint_rots" in needs: + global_joint_rots = _global_joint_rots + + if posed_joints is None and "posed_joints" in needs: + if translation is None: + raise ValueError( + "You should provide at least translation if posed_joints are missing." + ) + [_posed_joints] = einops.unpack(_posed_joints, ps, "* nbjoints dim") + # add the translation to the posed joints + _posed_joints += translation[..., None, :] + posed_joints = _posed_joints + + # Converting the local rotations into quaternions + if local_joint_rots is not None and local_joint_rots.shape[-1] == 3: + local_joint_quat = matrix_to_quaternion(local_joint_rots) + else: + local_joint_quat = local_joint_rots + + # Converting the global rotations into quaternions + if global_joint_rots is not None and global_joint_rots.shape[-1] == 3: + global_joint_quat = matrix_to_quaternion(global_joint_rots) + else: + global_joint_quat = global_joint_rots + + if only_pos: + local_joint_quat = None + global_joint_quat = None + + if local_joint_quat is not None: + device = local_joint_quat.device + else: + assert posed_joints is not None + device = posed_joints.device + + # Store important info used for subfunction + info = { + "fps": fps, + "local_vel_without_root": local_vel_without_root, + "local_root_vel_with_y": local_root_vel_with_y, + "compute_heading_method": compute_heading_method, + "skeleton": skeleton, + "root_idx": skeleton.root_idx, + "device": device, + } + + # make it all [B, T, ...] + input_dict = { + "local_joint_quat": local_joint_quat, + "global_joint_quat": global_joint_quat, + "posed_joints": posed_joints, + "foot_contacts": foot_contacts, + } + universal_dict, lengths, original_ps = make_universal_input( + input_dict, lengths=lengths + ) + local_joint_quat = universal_dict["local_joint_quat"] + global_joint_quat = universal_dict["global_joint_quat"] + posed_joints = universal_dict["posed_joints"] + foot_contacts = universal_dict["foot_contacts"] + + if local_joint_quat is not None: + nbatch, nbframes, nbjoints = local_joint_quat.shape[:3] + root_quat = local_joint_quat[:, :, skeleton.root_idx] + else: + nbatch, nbframes, nbjoints = posed_joints.shape[:3] + root_quat = None + + if global_joint_quat is not None: + if local_joint_quat is None: + # take the info from the global one + # (it is the same as the local, as it is for the root) + nbatch, nbframes, nbjoints = global_joint_quat.shape[:3] + root_quat = global_joint_quat[:, :, skeleton.root_idx] + else: + # verify that the info is the same + assert local_joint_quat.shape[:3] == global_joint_quat.shape[:3] + assert ( + local_joint_quat[:, :, skeleton.root_idx] + == global_joint_quat[:, :, skeleton.root_idx] + ).all() + + info.update( + { + "local_joint_quat": local_joint_quat, + "global_joint_quat": global_joint_quat, + "root_quat": root_quat, + "posed_joints": posed_joints, + "foot_contacts": foot_contacts, + "lengths": lengths, + "nbatch": nbatch, + "nbframes": nbframes, + "nbjoints": nbjoints, + "removing_heading": removing_heading, + } + ) + + # compute raw root heading rotation # [B, T, 4] + info["heading_quat_raw"] = calc_heading(return_quat=True, **info) + + # + canonicalize it, compute the inverse, compute the global root without heading etc + info.update(compute_heading_info(**info)) + + # compute features from the heading: global root / local root + info.update(compute_heading_features(**info)) + + if posed_joints is not None: + # compute local positions features based on the heading + + if using_smooth_root: + from .smooth_root import get_smooth_root_pos + + # using the smooth root + # and store the hips pos in ric_data + hip_translations = posed_joints[:, :, skeleton.root_idx] + smooth_translations = get_smooth_root_pos(hip_translations) + info["smooth_translations"] = smooth_translations + info.update(compute_position_features_with_smooth_root(**info)) + else: + # using the hips pos as root, removing the hip from ric_data + info.update(compute_position_features(**info)) + + if local_joint_quat is not None: + # compute local rotation features based on heading + if removing_heading: + info.update(compute_local_rotation_features_wo_heading(**info)) + else: + info.update(compute_local_rotation_features(**info)) + + if global_joint_quat is not None: + # compute global rotation features based on heading + if removing_heading: + info.update(compute_global_rotation_features_wo_heading(**info)) + else: + info.update(compute_global_rotation_features(**info)) + + # verify all the dimensions + for key in motion_rep.keys: + dim_lst = motion_rep.keys_dim[key] + feat = info[key] + + if len(dim_lst) not in [0, 1]: + raise ValueError( + "In the key_dim dictionary, the lists should contain zero or one element." + ) + + # squeezed tensor + if not dim_lst and len(feat.shape) == 2: + continue + + # check the last dim + if len(feat.shape) == 3 and feat.shape[-1] == dim_lst[0]: + continue + + raise ValueError( + f"For the key {key}, the shape of the sub feature is {feat.shape[-1]} where it should be {dim_lst[0]}." + ) + + features, feats_ps = einops.pack( + [info[key] for key in motion_rep.keys], + "batch time *", + ) + # put back the original shape + # https://einops.rocks/4-pack-and-unpack/ + [features] = einops.unpack(features, original_ps, "* nbframes dim") + + # return extra info relative to canonicalization + if return_init_heading_info: + [init_heading_quat] = einops.unpack( + info["init_heading_quat_raw"], original_ps, "* dim" + ) + [root_pos_init_xz] = einops.unpack( + info["root_pos_init_xz"], original_ps, "* dim" + ) + init_heading_info = { + "init_heading_quat": init_heading_quat, + "root_pos_init_xz": root_pos_init_xz, + } + return features, init_heading_info + + return features + + +def make_universal_input( + input_tensor_dict: Dict[str, torch.Tensor], + lengths: Optional[torch.Tensor] = None, +): + """Make the input universal [B, T, J, X] from tensors of shape [..., T, J, X] + + Args: + input_tensor_dict (Dict[torch.Tensor]): contain all the input data (some can be optional) + lengths (torch.Tensor): lengths of each motion if batched + Return: + output_tensor_dict (Dict[torch.Tensor]): contain all the input data but with the same shape [B, T, J, X] + lengths (torch.Tensor): [B] + ps (Tuple): Save the indices for getting back the original shape + """ + output_tensor_dict = {} + keys = [] + for key, val in input_tensor_dict.items(): + if val is None: + output_tensor_dict[key] = None + else: + keys.append(key) + + # should not be empty + if not keys: + raise ValueError("At least one tensor should not be None.") + + no_joints_dim_keys = ["foot_contacts", "translation"] + candidate_first_keys = [key for key in keys if key not in no_joints_dim_keys] + + if not candidate_first_keys: + raise ValueError("At least one tensor should have the nbjoints dim.") + + first_key = candidate_first_keys[0] + first_el = input_tensor_dict[first_key] + device = first_el.device + + # If the lengths is not provided, we do not assume full length + # the input should be a single sequence + if lengths is None: + if len(first_el.shape) > 3: + raise ValueError("You should provide the lengths tensor using batching.") + elif len(first_el.shape) < 3: + raise ValueError("The tensor is not recognized") + # len(first_el.shape) == 3 + lengths = torch.tensor([len(first_el)], device=device) + + for key in keys: + val = input_tensor_dict[key] + if key in no_joints_dim_keys: + # make is universally: [X, T, Y] + val, _ = einops.pack([val], "* nbframes dim") + else: + # make is universally: [X, T, J, Y] + val, original_ps = einops.pack([val], "* nbframes nbjoints dim") + output_tensor_dict[key] = val + + # make is universally: [X] + lengths, _ = einops.pack([lengths], "*") + return output_tensor_dict, lengths, original_ps + + +def reconstruct_joint_rot_mats_from_ric_rots( + joints_ric_rot6d: torch.Tensor, + root_pos: torch.Tensor, + root_rot_quat: torch.Tensor, + skeleton: SkeletonBase, + removed_heading: bool, + init_heading_quat: Optional[torch.Tensor] = None, +): + """Recovers the local rotation matrices from the separated root heading quat and the other + rotations. + + Args: + joints_ric_rot6d (torch.Tensor): [..., T, nbjoints * 6] local 6D joint rotations + root_pos (torch.Tensor): [..., T, 3] global root position + root_quat (torch.Tensor): [..., T, 4] global root rot quaternion + removed_heading (bool): if True, the heading have been removed from the rotations + init_heading_quat (torch.Tensor): the first direction in case the heading is not removed. + Will just rotate by that, not overrided + Returns: + joint_rot_mats (torch.Tensor): [..., T, nbjoints, 3, 3] joint rotation matrices + """ + + root_idx = skeleton.root_idx + + joints_ric_rot6d, ps = einops.pack([joints_ric_rot6d], "* time dim") + root_pos, _ = einops.pack([root_pos], "* time dim") + + rot_6d = einops.rearrange( + joints_ric_rot6d, + "batch time (nbjoints six) -> batch time nbjoints six", + six=6, + ) + + rotmat = cont6d_to_matrix(rot_6d) # [B, T, 29, 3, 3] + + # deouble check + if removed_heading: + root_rot_quat, _ = einops.pack([root_rot_quat], "* time dim") + heading_rot_mat = quaternion_to_matrix(root_rot_quat) + # get global root rot by combining heading with local root rot + # do matrix product here + root_rot = torch.einsum( + "btik,btkj->btij", + heading_rot_mat, + rotmat[:, :, root_idx], + ) + # replace the root_rot by the full global one + joint_rot_mats, _ = einops.pack( + [ + rotmat[:, :, :root_idx], + root_rot, + rotmat[:, :, root_idx + 1 :], + ], + "batch time * dim1 dim2", + ) + elif init_heading_quat is not None: + init_heading_quat, _ = einops.pack([init_heading_quat], "* dim") # [B, 4] + + heading_rot_mat = quaternion_to_matrix(init_heading_quat) # [B, 3, 3] + root_rot = torch.einsum( + "bik,btkj->btij", + heading_rot_mat, + rotmat[:, :, root_idx], + ) + # replace the root_rot by the full global one + joint_rot_mats, _ = einops.pack( + [ + rotmat[:, :, :root_idx], + root_rot, + rotmat[:, :, root_idx + 1 :], + ], + "batch time * dim1 dim2", + ) + else: + # do not put back heading since it was not removed + joint_rot_mats = rotmat + + [joint_rot_mats] = einops.unpack(joint_rot_mats, ps, "* time nbjoints dim1 dim2") + return joint_rot_mats + + +def reconstruct_joint_rot_mats_from_ric_global_rots( + global_joints_ric_rots: torch.Tensor, + root_rot_quat: torch.Tensor, + skeleton: SkeletonBase, + removed_heading: bool, + init_heading_quat: Optional[torch.Tensor] = None, +): + """Recovers the local rotation matrices from the separated root heading quat and the other + global rotations without heading. + + Args: + global_joints_ric_rots (torch.Tensor): [..., T, 3, 3] or [..., T, 6] global 6D joint rotations + root_rot_quat (torch.Tensor): [..., T, 4] global root rot quaternion + removed_heading (bool): if True, the heading have been removed from the rotations + init_heading_quat (torch.Tensor): [..., 4] the first direction in case the heading is not removed. + Will just rotate by that, not overrided + Returns: + joint_rot_mats (torch.Tensor): [..., T, nbjoints, 3, 3] joint rotation matrices + """ + + # saving for shapes + _saved_root_quat = root_rot_quat + + # put batch and time together in a big batch + global_joints_ric_rots, ps = einops.pack([global_joints_ric_rots], "* dim") + + root_rot_quat, _ = einops.pack([root_rot_quat], "* dim") + + is_6d = global_joints_ric_rots.shape[-1] == skeleton.nbjoints * 6 + if is_6d: + global_rot = einops.rearrange( + global_joints_ric_rots, + "batch (nbjoints six) -> batch nbjoints six", + six=6, + ) + global_rot = cont6d_to_matrix(global_rot) # [B, J, 3, 3] + else: + global_rot = einops.rearrange( + global_joints_ric_rots, + "batch (nbjoints dim1 dim2) -> batch nbjoints dim1 dim2", + dim1=3, + dim2=3, + ) + + nbjoints = global_rot.shape[1] + + if removed_heading: + global_rotmat_wo_heading = global_rot + + heading_rot_mat = quaternion_to_matrix(root_rot_quat) # [B, 3, 3] + + # put back heading direction to all global rotations + global_rot_mats = torch.einsum( + "bik,bdkj->bdij", + heading_rot_mat, + global_rotmat_wo_heading, + ) + elif init_heading_quat is not None: + # repeat by time + init_heading_quat, _ = einops.pack([init_heading_quat], "* dim") # [B, 4] + + _saved_root_quat, _ = einops.pack([_saved_root_quat], "* time dim") + time = _saved_root_quat.shape[1] + + init_heading_quat = einops.repeat( + init_heading_quat, + "batch quat -> batch time quat", + time=time, + ) + + # joint batch and time + init_heading_quat, _ = einops.pack([init_heading_quat], "* dim") + # first init rotation + heading_rot_mat = quaternion_to_matrix(init_heading_quat) # [B, 3, 3] + + # put back heading direction to all global rotations + global_rot_mats = torch.einsum( + "bik,bdkj->bdij", + heading_rot_mat, + global_rot, + ) + else: + global_rot_mats = global_rot + + # obtain back the local rotations from the new global rotations + parent_rot_mats = global_rot_mats[:, skeleton.joint_parents] + parent_rot_mats[:, skeleton.root_idx] = torch.eye(3) # the root joint + parent_rot_mats_inv = parent_rot_mats.transpose(2, 3) + local_rot_mats = torch.einsum( + "T N m n, T N n o -> T N m o", parent_rot_mats_inv, global_rot_mats + ) + + # add dummy rotations if it is more than the number of joints + local_rot_mats[:, nbjoints:] = torch.eye(3) + + [local_rot_mats] = einops.unpack(local_rot_mats, ps, "* nbjoints dim1 dim2") + return local_rot_mats, global_rot_mats + + +def recover_joints_with_FK( + joint_rot_mats: torch.Tensor, + root_pos: torch.Tensor, + skeleton: SkeletonBase, + neutral_joints: Optional[torch.Tensor] = None, + return_global_rots: Optional[bool] = False, +): + """Recovers global joint positions given the global root motion and local joint rotations. + + Args: + joint_rot_mats (torch.Tensor): [..., T, J, 3, 3] joint rotation matrices + root_pos (torch.Tensor): [..., T, 3] positions xyz + skeleton (SkeletonBase) + return_global_rots (Optional[bool]=False): whether to return the global rotations in addition to positions + Returns: + torch.Tensor: [B, T, J, 3] global joint positions + """ + + original_shape = joint_rot_mats.shape + # big batch size for batch rigid transform + big_bs = torch.tensor(original_shape[:-3]).prod().item() + + device = joint_rot_mats.device + dtype = joint_rot_mats.dtype + + if neutral_joints is None: + neutral_joints = skeleton.neutral_joints.to(device=device, dtype=dtype) + joints = einops.repeat( + neutral_joints, + "nbjoints xyz -> big_batch nbjoints xyz", + big_batch=big_bs, + ) + else: + joints = neutral_joints.to(device=device, dtype=dtype) + # make it [B, J, 3] + joints, _ = einops.pack([joints], "* nbjoints dim1") + # make it [B, 1, J, 3] + joints = joints[:, None] + + joints = einops.repeat( + joints, + "bs 1 nbjoints xyz -> bs time nbjoints xyz", + time=big_bs // len(joints), + ) + joints = einops.rearrange( + joints, "bs time nbjoints xyz -> (bs time) nbjoints xyz" + ) + assert len(joints) == big_bs + + parents = skeleton.joint_parents.to(device) + root_idx = skeleton.root_idx + joint_rot_mats, ps = einops.pack([joint_rot_mats], "* nbjoints dim1 dim2") + + batch_size, nbframes = joint_rot_mats.shape[:2] + + # perform FK + positions, global_rots = batch_rigid_transform( + joint_rot_mats, joints, parents, root_idx + ) + [positions] = einops.unpack(positions, ps, "* nbjoints xyz") + # apply global root pos + positions = positions + root_pos[..., None, :] + + if return_global_rots: + [global_rots] = einops.unpack(global_rots, ps, "* nbjoints dim1 dim2") + return positions, global_rots + else: + return positions + + +def recover_joints_from_ric_pos( + joints_ric_pos: torch.Tensor, + root_pos: torch.Tensor, + root_quat: torch.Tensor, + skeleton, + removed_heading: bool, + init_heading_quat: Optional[torch.Tensor], + using_smooth_root: bool, +): + """Recovers global joint positions from global root motion and heading-invariant joint + positions. + + Args: + joints_ric_pos (torch.Tensor): [B, T, (J-1)*3] local joint positions, excluding root + root_pos (torch.Tensor): [B, T, 3] global root position + root_quat (torch.Tensor): [B, T, 4] global root rot quaternion + removed_heading (bool): if True, the heading have been removed from the rotations + init_heading_quat (torch.Tensor): the first direction in case the heading is not removed. + Will just rotate by that, not overrided + + Returns: + torch.Tensor: [B, T, J, 3] global joint positions + """ + + root_idx = skeleton.root_idx + + positions = einops.rearrange( + joints_ric_pos, + "batch time (nbjoints_minus_one xyz) -> batch time nbjoints_minus_one xyz", + xyz=3, + ) # [B, T, J-1, 3] + + if using_smooth_root: + # removing the hips joints + hips_positions = positions[:, :, root_idx].clone() + + positions, _ = einops.pack( + [ + positions[:, :, :root_idx], + positions[:, :, root_idx + 1 :], + ], + "batch time * dim", + ) + # removing the hips positions to all the positions + positions[..., [0, 2]] -= hips_positions[..., None, [0, 2]] + + time = positions.shape[1] + + if removed_heading: + root_quat = einops.repeat( + root_quat, + "batch time quat -> batch time nbjoints_minus_one quat", + nbjoints_minus_one=positions.shape[2], + ) + # apply root heading to the positions + positions = quat_apply( + root_quat, + positions, + ) + elif init_heading_quat is not None: + init_heading_all = einops.repeat( + init_heading_quat, + "batch quat -> batch time nbjoints_minus_one quat", + nbjoints_minus_one=positions.shape[2], + time=time, + ) + # apply first heading to the positions + positions = quat_apply( + init_heading_all, + positions, + ) + else: + pass + + # Concat root and joints + # add back the root joint (initialized to 0) + dummy_root = 0 * positions[:, :, 0] + positions, _ = einops.pack( + [ + positions[:, :, :root_idx], + dummy_root, + positions[:, :, root_idx:], + ], + "batch time * dim", + ) + # add the XZ to all the joints + positions[..., [0, 2]] += root_pos[..., None, [0, 2]] + + # put root_y + positions[:, :, root_idx, 1] += root_pos[..., 1] + return positions diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/tools/utils.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/tools/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..7c07f6f0d851828f4762f38427abd07cbad9c422 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/tools/utils.py @@ -0,0 +1,26 @@ +from typing import List, Optional, Union + +import torch + + +def length_to_mask( + length: Union[torch.Tensor, List], + max_len: Optional[int] = None, + device=None, +) -> torch.Tensor: + if isinstance(length, list): + if device is None: + device = "cpu" + length = torch.tensor(length, device=device) + + if device is not None: + assert device == length.device + device = length.device + + if max_len is None: + max_len = max(length) + + mask = torch.arange(max_len, device=device).expand( + len(length), max_len + ) < length.unsqueeze(1) + return mask diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/utils.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..37f83c3b6b5ab632420eea41d2f4c95575d04f24 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/motion_reps/utils.py @@ -0,0 +1,32 @@ +from typing import Optional + +import torch + +from motionbricks.motionlib.core.utils.rotations import quat_apply, quat_mul + + +def apply_base_rot( + joints_pos: Optional[torch.Tensor] = None, joints_rot: Optional[torch.Tensor] = None +): + """Flips output joint positions and/or rotations that is y-up to be z-up. + + Args: + joints_pos(Optional[torch.Tensor]): [B, T, J, 3] joint positions + joints_rot(Optional[torch.Tensor]): [B, T, J, 4] joint quaternions + """ + base_rot = torch.tensor([[0.5, 0.5, 0.5, 0.5]]) + if joints_pos is not None: + # rotate positions + joints_pos = quat_apply( + base_rot.to(joints_pos).expand(joints_pos.shape[:-1] + (4,)), joints_pos + ) + if joints_rot is not None: + # for rotations, apply base_rot to just the root + root_rot_quat = joints_rot[:, :, 0:1] + root_rot_quat = quat_mul( + base_rot[:, None, None].to(joints_rot).expand_as(root_rot_quat), + root_rot_quat, + ) + joints_rot = torch.cat([root_rot_quat, joints_rot[:, :, 1:]], dim=2) + + return joints_pos, joints_rot diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/skeletons/__init__.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/skeletons/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21a95a2a32e0c33b010037040b74a77e56a6affa --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/skeletons/__init__.py @@ -0,0 +1,4 @@ +# flake8: noqa + +from .base import SkeletonBase +from .g1 import G1Skeleton, G1Skeleton34, G1Skeleton32 diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/skeletons/base.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/skeletons/base.py new file mode 100644 index 0000000000000000000000000000000000000000..d3351cdeb34d09ab0ad02dd7958dba0006fd86d0 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/skeletons/base.py @@ -0,0 +1,112 @@ +import os.path as osp +from typing import Optional + +import torch + + +class SkeletonBase(torch.nn.Module): + "Utility class to hold info about a skeleton" + + # these should be defined in the subclass + name = None + bone_order_names_with_parents = None + bone_order_names_no_root = None + root_idx = None + foot_joint_names = None + foot_joint_idx = None + hip_joint_names = None # in order [right, left] + hip_joint_idx = None # in order [right, left] + + def __init__( + self, + folder: Optional[str] = None, + name: Optional[str] = None, + load: bool = True, + t_pose: Optional[str] = None, + **kwargs, # to catch addition args in configs + ): + super().__init__() + + if name is not None: + assert self.name in name + + self.folder = folder + self.name = name + self.t_pose = t_pose + + self.dim = len(self.bone_order_names_with_parents) + + if load and folder is not None: + neutral_joints = torch.load(osp.join(folder, "joints.p")).squeeze() + self.register_buffer("neutral_joints", neutral_joints, persistent=False) + + joint_parents = torch.load(osp.join(folder, "parents.p")) + self.register_buffer("joint_parents", joint_parents, persistent=False) + + self.bone_order_names = [x for x, y in self.bone_order_names_with_parents] + + self.bone_parents = dict(self.bone_order_names_with_parents) + self.bone_index = {x: idx for idx, x in enumerate(self.bone_order_names)} + self.bone_order_names_index = self.bone_index + + # create the parents tensor on the fly + joint_parents = torch.tensor( + [ + -1 if (y := self.bone_parents[x]) is None else self.bone_index[y] + for x in self.bone_order_names + ] + ) + + if "joint_parents" not in self.__dict__: + self.register_buffer("joint_parents", joint_parents, persistent=False) + else: + # check the saved one is coherent with the class + assert (self.joint_parents == joint_parents).all() + + self.nbjoints = len(self.bone_order_names) + + # check lengths + assert self.nbjoints == len(self.joint_parents) + if "neutral_joints" in self.__dict__: + assert self.nbjoints == len(self.neutral_joints) + + root_indices = torch.where(joint_parents == -1)[0] + assert len(root_indices) == 1 # should be one root only + self.root_idx = root_indices[0].item() + + if "neutral_joints" in self.__dict__: + assert (self.neutral_joints[0] == 0).all() + + # remove the root + self.bone_order_names_no_root = ( + self.bone_order_names[: self.root_idx] + + self.bone_order_names[self.root_idx + 1 :] + ) + + self.foot_joint_names = self.left_foot_joint_names + self.right_foot_joint_names + self.foot_joint_names_index = { + x: idx for idx, x in enumerate(self.foot_joint_names) + } + + self.left_foot_joint_idx = [ + self.bone_order_names.index(foot_joint) + for foot_joint in self.left_foot_joint_names + ] + + self.right_foot_joint_idx = [ + self.bone_order_names.index(foot_joint) + for foot_joint in self.right_foot_joint_names + ] + + self.foot_joint_idx = self.left_foot_joint_idx + self.right_foot_joint_idx + + self.hip_joint_idx = [ + self.bone_order_names.index(hip_joint) for hip_joint in self.hip_joint_names + ] + + def __repr__(self): + if self.folder is None: + return f"{self.__class__.__name__}()" + return f'{self.__class__.__name__}(folder="{self.folder}")' + + diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/skeletons/g1.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/skeletons/g1.py new file mode 100644 index 0000000000000000000000000000000000000000..9bd7bee56d4cb6242e98b26e140125a862cf0a88 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/skeletons/g1.py @@ -0,0 +1,205 @@ +from .base import SkeletonBase + +# If a joint's channel is not in this list, it is a dead joint that is not activated +# This is the list of channels which does not include hand motions +ACTIVATED_JOINTS_CHANNELS_IN_G1 = [ + # pelvis + "pelvis_skel.translateX", + "pelvis_skel.translateY", + "pelvis_skel.translateZ", + "pelvis_skel.rotateX", + "pelvis_skel.rotateY", + "pelvis_skel.rotateZ", + # right hip & right leg & right foot + "right_hip_pitch_skel.rotateX", + "right_hip_roll_skel.rotateZ", + "right_hip_yaw_skel.rotateY", + "right_knee_skel.rotateX", + "right_ankle_pitch_skel.rotateX", + "right_ankle_roll_skel.rotateZ", + # waist + "waist_yaw_skel.rotateY", + "waist_roll_skel.rotateZ", + "waist_pitch_skel.rotateX", + # right shoulder & right arm & right hand + "right_shoulder_pitch_skel.rotateX", + "right_shoulder_roll_skel.rotateZ", + "right_shoulder_yaw_skel.rotateY", + "right_elbow_skel.rotateX", + # left shoulder & left arm & left hand + "left_shoulder_pitch_skel.rotateX", + "left_shoulder_roll_skel.rotateZ", + "left_shoulder_yaw_skel.rotateY", + "left_elbow_skel.rotateX", + # left hip & left leg & left foot + "left_hip_pitch_skel.rotateX", + "left_hip_roll_skel.rotateZ", + "left_hip_yaw_skel.rotateY", + "left_knee_skel.rotateX", + "left_ankle_pitch_skel.rotateX", + "left_ankle_roll_skel.rotateZ", +] + +# in total we have 32 joints; other than pelvis, each joint is a hinge joint with 1 degree of freedom (including the +# dead joints) +COMPLETE_JOINT_LIST_IN_G1 = [ + "pelvis_skel", + # left hip & left leg & left foot + "left_hip_pitch_skel", + "left_hip_roll_skel", + "left_hip_yaw_skel", + "left_knee_skel", + "left_ankle_pitch_skel", + "left_ankle_roll_skel", + # right hip & right leg & right foot + "right_hip_pitch_skel", + "right_hip_roll_skel", + "right_hip_yaw_skel", + "right_knee_skel", + "right_ankle_pitch_skel", + "right_ankle_roll_skel", + # waist + "waist_yaw_skel", + "waist_roll_skel", + "waist_pitch_skel", + # left shoulder & left arm & left hand + "left_shoulder_pitch_skel", + "left_shoulder_roll_skel", + "left_shoulder_yaw_skel", + "left_elbow_skel", + "left_wrist_roll_skel", + "left_wrist_pitch_skel", + "left_wrist_yaw_skel", + "left_hand_roll_skel", + # right shoulder & right arm & right hand + "right_shoulder_pitch_skel", + "right_shoulder_roll_skel", + "right_shoulder_yaw_skel", + "right_elbow_skel", + "right_wrist_roll_skel", + "right_wrist_pitch_skel", + "right_wrist_yaw_skel", + "right_hand_roll_skel", +] + + +class G1Skeleton(SkeletonBase): + bone_order_names_with_parents = [] + name = "g1skel" + right_hand_joint_names = ["right_hand_roll_skel"] + left_hand_joint_names = ["left_hand_roll_skel"] + hip_joint_names = [ + "right_hip_pitch_skel", + "left_hip_pitch_skel", + ] # used to calculate root orientation, only need 1 pair of hip joints + + def get_skel_slice(self, skeleton: SkeletonBase): + """Return a slice element so that we can slice the input data into our current skeleton.""" + try: + skel_slice = [skeleton.bone_index[x] for x in self.bone_order_names] + except KeyError: + raise ValueError( + "The current skeleton contain joints that are not in the input" + ) + return skel_slice + + +class G1Skeleton32(G1Skeleton): + """This is the full skeleton with all 32 joints. + + but no toe joints. + """ + + name = "g1skel32" + right_foot_joint_names = ["right_ankle_pitch_skel", "right_ankle_roll_skel"] + left_foot_joint_names = ["left_ankle_pitch_skel", "left_ankle_roll_skel"] + + bone_order_names_with_parents = [ + ("pelvis_skel", None), + # left hip & left leg & left foot + ("left_hip_pitch_skel", "pelvis_skel"), + ("left_hip_roll_skel", "left_hip_pitch_skel"), + ("left_hip_yaw_skel", "left_hip_roll_skel"), + ("left_knee_skel", "left_hip_yaw_skel"), + ("left_ankle_pitch_skel", "left_knee_skel"), + ("left_ankle_roll_skel", "left_ankle_pitch_skel"), + # right hip & right leg & right foot + ("right_hip_pitch_skel", "pelvis_skel"), + ("right_hip_roll_skel", "right_hip_pitch_skel"), + ("right_hip_yaw_skel", "right_hip_roll_skel"), + ("right_knee_skel", "right_hip_yaw_skel"), + ("right_ankle_pitch_skel", "right_knee_skel"), + ("right_ankle_roll_skel", "right_ankle_pitch_skel"), + # waist + ("waist_yaw_skel", "pelvis_skel"), + ("waist_roll_skel", "waist_yaw_skel"), + ("waist_pitch_skel", "waist_roll_skel"), + # left shoulder & left arm & left hand + ("left_shoulder_pitch_skel", "waist_pitch_skel"), + ("left_shoulder_roll_skel", "left_shoulder_pitch_skel"), + ("left_shoulder_yaw_skel", "left_shoulder_roll_skel"), + ("left_elbow_skel", "left_shoulder_yaw_skel"), + ("left_wrist_roll_skel", "left_elbow_skel"), + ("left_wrist_pitch_skel", "left_wrist_roll_skel"), + ("left_wrist_yaw_skel", "left_wrist_pitch_skel"), + ("left_hand_roll_skel", "left_wrist_yaw_skel"), + # right shoulder & right arm & right hand + ("right_shoulder_pitch_skel", "waist_pitch_skel"), + ("right_shoulder_roll_skel", "right_shoulder_pitch_skel"), + ("right_shoulder_yaw_skel", "right_shoulder_roll_skel"), + ("right_elbow_skel", "right_shoulder_yaw_skel"), + ("right_wrist_roll_skel", "right_elbow_skel"), + ("right_wrist_pitch_skel", "right_wrist_roll_skel"), + ("right_wrist_yaw_skel", "right_wrist_pitch_skel"), + ("right_hand_roll_skel", "right_wrist_yaw_skel"), + ] + + +class G1Skeleton34(G1Skeleton): + """This is the full skeleton with all 32 joints, + 2 dummy toe joints.""" + + name = "g1skel34" + + bone_order_names_with_parents = [ + ("pelvis_skel", None), + # left hip & left leg & left foot + ("left_hip_pitch_skel", "pelvis_skel"), + ("left_hip_roll_skel", "left_hip_pitch_skel"), + ("left_hip_yaw_skel", "left_hip_roll_skel"), + ("left_knee_skel", "left_hip_yaw_skel"), + ("left_ankle_pitch_skel", "left_knee_skel"), + ("left_ankle_roll_skel", "left_ankle_pitch_skel"), + ("left_toe_base", "left_ankle_roll_skel"), + # right hip & right leg & right foot + ("right_hip_pitch_skel", "pelvis_skel"), + ("right_hip_roll_skel", "right_hip_pitch_skel"), + ("right_hip_yaw_skel", "right_hip_roll_skel"), + ("right_knee_skel", "right_hip_yaw_skel"), + ("right_ankle_pitch_skel", "right_knee_skel"), + ("right_ankle_roll_skel", "right_ankle_pitch_skel"), + ("right_toe_base", "right_ankle_roll_skel"), + # waist + ("waist_yaw_skel", "pelvis_skel"), + ("waist_roll_skel", "waist_yaw_skel"), + ("waist_pitch_skel", "waist_roll_skel"), + # left shoulder & left arm & left hand + ("left_shoulder_pitch_skel", "waist_pitch_skel"), + ("left_shoulder_roll_skel", "left_shoulder_pitch_skel"), + ("left_shoulder_yaw_skel", "left_shoulder_roll_skel"), + ("left_elbow_skel", "left_shoulder_yaw_skel"), + ("left_wrist_roll_skel", "left_elbow_skel"), + ("left_wrist_pitch_skel", "left_wrist_roll_skel"), + ("left_wrist_yaw_skel", "left_wrist_pitch_skel"), + ("left_hand_roll_skel", "left_wrist_yaw_skel"), + # right shoulder & right arm & right hand + ("right_shoulder_pitch_skel", "waist_pitch_skel"), + ("right_shoulder_roll_skel", "right_shoulder_pitch_skel"), + ("right_shoulder_yaw_skel", "right_shoulder_roll_skel"), + ("right_elbow_skel", "right_shoulder_yaw_skel"), + ("right_wrist_roll_skel", "right_elbow_skel"), + ("right_wrist_pitch_skel", "right_wrist_roll_skel"), + ("right_wrist_yaw_skel", "right_wrist_pitch_skel"), + ("right_hand_roll_skel", "right_wrist_yaw_skel"), + ] + right_foot_joint_names = ["right_ankle_roll_skel", "right_toe_base"] + left_foot_joint_names = ["left_ankle_roll_skel", "left_toe_base"] diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/utils/__init__.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/utils/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/utils/custom_logging.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/utils/custom_logging.py new file mode 100644 index 0000000000000000000000000000000000000000..4289267488509c15729b045fe71e39a8184b0a2a --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/utils/custom_logging.py @@ -0,0 +1,54 @@ +import logging +import os +from typing import Optional + +import colorlog + + +def setup_logging( + name: Optional[str] = None, + run_dir: Optional[str] = None, + rank: Optional[int] = 0, + level=logging.INFO, +): + # Get the root logger + root_logger = logging.getLogger() + + # Configure the root logger + root_logger.setLevel(level) + + # Ensure hydra or other libraries aren't adding handlers + root_logger.handlers.clear() + + # file handler only at rank 0, when we can create the path + if rank == 0 and run_dir is not None and name is not None: + # Create file handler: save to this file + file_handler = logging.FileHandler(os.path.join(run_dir, f"{name}.log")) + file_handler.setLevel(level) + file_formatter = logging.Formatter( + "[%(asctime)s] %(levelname)s %(message)s", + datefmt="%d/%m/%y %H:%M:%S", + ) + file_handler.setFormatter(file_formatter) + root_logger.addHandler(file_handler) + + # stdout logging, a bit more fancy + formatter = colorlog.ColoredFormatter( + "[%(white)s%(asctime)s%(reset)s] %(log_color)s%(levelname)s%(reset)s %(message)s", + datefmt="%d/%m/%y %H:%M:%S", + reset=True, + log_colors={ + "DEBUG": "purple", + "INFO": "blue", + "WARNING": "yellow", + "ERROR": "red", + "CRITICAL": "bg_white", + }, + secondary_log_colors={}, + style="%", + ) + stream_handler = colorlog.StreamHandler() + stream_handler.setLevel(level) + stream_handler.setFormatter(formatter) + root_logger.addHandler(stream_handler) + return root_logger diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/utils/rotations.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/utils/rotations.py new file mode 100644 index 0000000000000000000000000000000000000000..6d1cedaedc4d24def2406fed43d606cc1e2cc2db --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/utils/rotations.py @@ -0,0 +1,393 @@ +import einops +import numpy as np +import torch +import torch.nn.functional as F + +from motionbricks.motionlib.core.utils.torch_utils import normalize_vec + + +def quat_mul(a, b): + assert a.shape == b.shape + shape = a.shape + a = a.reshape(-1, 4) + b = b.reshape(-1, 4) + + w1, x1, y1, z1 = a[:, 0], a[:, 1], a[:, 2], a[:, 3] + w2, x2, y2, z2 = b[:, 0], b[:, 1], b[:, 2], b[:, 3] + ww = (z1 + x1) * (x2 + y2) + yy = (w1 - y1) * (w2 + z2) + zz = (w1 + y1) * (w2 - z2) + xx = ww + yy + zz + qq = 0.5 * (xx + (z1 - x1) * (x2 - y2)) + w = qq - ww + (z1 - y1) * (y2 - z2) + x = qq - xx + (x1 + w1) * (x2 + w2) + y = qq - yy + (w1 - x1) * (y2 + z2) + z = qq - zz + (z1 + y1) * (w2 - x2) + return torch.stack([w, x, y, z], dim=-1).view(shape) + + +def quat_conjugate(a): + shape = a.shape + a = a.reshape(-1, 4) + return torch.cat((a[:, 0:1], -a[:, 1:]), dim=-1).view(shape) + + +def quat_apply(a, b): + shape = b.shape + a = a.reshape(-1, 4) + b = b.reshape(-1, 3) + xyz = a[:, 1:].clone() + t = xyz.cross(b, dim=-1) * 2 + return (b + a[:, 0:1].clone() * t + xyz.cross(t, dim=-1)).view(shape) + + +def cont6d_to_matrix(cont6d): + assert cont6d.shape[-1] == 6, "The last dimension must be 6" + x_raw = cont6d[..., 0:3] + y_raw = cont6d[..., 3:6] + + x = x_raw / torch.norm(x_raw, dim=-1, keepdim=True) + z = torch.cross(x, y_raw, dim=-1) + z = z / torch.norm(z, dim=-1, keepdim=True) + + y = torch.cross(z, x, dim=-1) + + x = x[..., None] + y = y[..., None] + z = z[..., None] + + mat = torch.cat([x, y, z], dim=-1) + return mat + + +def matrix_to_cont6d(matrix): + cont_6d = torch.concat([matrix[..., 0], matrix[..., 1]], dim=-1) + return cont_6d + + +def quaternion_to_matrix(quaternions): + """Convert rotations given as quaternions to rotation matrices. + + Args: + quaternions: quaternions with real part first, + as tensor of shape (..., 4). + Returns: + Rotation matrices as tensor of shape (..., 3, 3). + """ + r, i, j, k = torch.unbind(quaternions, -1) + two_s = 2.0 / (quaternions * quaternions).sum(-1) + + o = torch.stack( + ( + 1 - two_s * (j * j + k * k), + two_s * (i * j - k * r), + two_s * (i * k + j * r), + two_s * (i * j + k * r), + 1 - two_s * (i * i + k * k), + two_s * (j * k - i * r), + two_s * (i * k - j * r), + two_s * (j * k + i * r), + 1 - two_s * (i * i + j * j), + ), + -1, + ) + return o.reshape(quaternions.shape[:-1] + (3, 3)) + + +def quaternion_to_cont6d(quaternions: torch.Tensor) -> torch.Tensor: + rotation_mat = quaternion_to_matrix(quaternions) + cont_6d = matrix_to_cont6d(rotation_mat) + return cont_6d + + +def _sqrt_positive_part(x: torch.Tensor) -> torch.Tensor: + """Returns torch.sqrt(torch.max(0, x)) subgradient is zero where x is 0.""" + ret = torch.zeros_like(x) + positive_mask = x > 0 + ret[positive_mask] = torch.sqrt(x[positive_mask]) + return ret + + +def matrix_to_quaternion(matrix: torch.Tensor) -> torch.Tensor: + """Convert rotations given as rotation matrices to quaternions. + + Args: + matrix: Rotation matrices as tensor of shape (..., 3, 3). + Returns: + quaternions with real part first, as tensor of shape (..., 4). + """ + if matrix.size(-1) != 3 or matrix.size(-2) != 3: + raise ValueError(f"Invalid rotation matrix shape {matrix.shape}.") + + batch_dim = matrix.shape[:-2] + m00, m01, m02, m10, m11, m12, m20, m21, m22 = torch.unbind( + matrix.reshape(batch_dim + (9,)), dim=-1 + ) + + q_abs = _sqrt_positive_part( + torch.stack( + [ + 1.0 + m00 + m11 + m22, + 1.0 + m00 - m11 - m22, + 1.0 - m00 + m11 - m22, + 1.0 - m00 - m11 + m22, + ], + dim=-1, + ) + ) + + quat_by_rijk = torch.stack( + [ + torch.stack([q_abs[..., 0] ** 2, m21 - m12, m02 - m20, m10 - m01], dim=-1), + torch.stack([m21 - m12, q_abs[..., 1] ** 2, m10 + m01, m02 + m20], dim=-1), + torch.stack([m02 - m20, m10 + m01, q_abs[..., 2] ** 2, m12 + m21], dim=-1), + torch.stack([m10 - m01, m20 + m02, m21 + m12, q_abs[..., 3] ** 2], dim=-1), + ], + dim=-2, + ) + + flr = torch.tensor(0.1).to(dtype=q_abs.dtype, device=q_abs.device) + quat_candidates = quat_by_rijk / (2.0 * q_abs[..., None].max(flr)) + + return quat_candidates[ + F.one_hot(q_abs.argmax(dim=-1), num_classes=4) > 0.5, : + ].reshape(batch_dim + (4,)) + + +def cont6d_to_quaternion(cont6d): + assert cont6d.shape[-1] == 6, "The last dimension must be 6" + matrix = cont6d_to_matrix(cont6d) + return matrix_to_quaternion(matrix) + + +def exp_map_to_matrix(exp_map): + quat = exp_map_to_quat(exp_map) + return quaternion_to_matrix(quat) + + +# +# Extra utils only needed for visualization +# + + +def quat_unit(a: torch.Tensor): + return normalize_vec(a) + + +def angle_axis_to_quaternion(angle, axis): + theta = (angle / 2).unsqueeze(-1) + xyz = normalize_vec(axis) * theta.sin() + w = theta.cos() + return quat_unit(torch.cat([w, xyz], dim=-1)) + + +def quat_between_two_vec(v1, v2, eps: float = 1e-6): + """Quaternion for rotating v1 to v2.""" + orig_shape = v1.shape + v1 = v1.reshape(-1, 3) + v2 = v2.reshape(-1, 3) + dot = (v1 * v2).sum(-1) + cross = torch.cross(v1, v2, dim=-1) + out = torch.cat([(1 + dot).unsqueeze(-1), cross], dim=-1) + # handle v1 & v2 with same direction + sind = dot > 1 - eps + out[sind] = torch.tensor([1.0, 0.0, 0.0, 0.0], device=v1.device) + # handle v1 & v2 with opposite direction + nind = dot < -1 + eps + if torch.any(nind): + vx = torch.tensor([1.0, 0.0, 0.0], device=v1.device) + vxdot = (v1 * vx).sum(-1).abs() + nxind = nind & (vxdot < 1 - eps) + if torch.any(nxind): + out[nxind] = exp_map_to_quat( + normalize_vec(torch.cross(vx.expand_as(v1[nxind]), v1[nxind], dim=-1)) + * np.pi + ) + # handle v1 & v2 with opposite direction and they are parallel to x axis + pind = nind & (vxdot >= 1 - eps) + if torch.any(pind): + vy = torch.tensor([0.0, 1.0, 0.0], device=v1.device) + out[pind] = exp_map_to_quat( + normalize_vec(torch.cross(vy.expand_as(v1[pind]), v1[pind], dim=-1)) + * np.pi + ) + # normalize and reshape + out = normalize_vec(out).view(orig_shape[:-1] + (4,)) + return out + + +def quaternion_angle_diff(q1, q2, eps=1e-6): + """Calculate the angle difference between two quaternions in radians. Handles arbitrary input + shapes where the last dimension is 4. + + Args: + q1: First quaternion tensor [..., 4] + q2: Second quaternion tensor [..., 4] + + Returns: + Angle in radians between the two quaternions, shape [...] + """ + # Normalize quaternions + q1 = q1 / torch.norm(q1, dim=-1, keepdim=True) + q2 = q2 / torch.norm(q2, dim=-1, keepdim=True) + + # Compute dot product + dot = torch.clamp(torch.abs(torch.sum(q1 * q2, dim=-1)), -1.0, 1.0) + # Calculate angle in radians + angle = 2 * torch.acos(dot) + angle[angle < eps] = 0.0 + + return angle + + +def normalize_angle(x): + return torch.atan2(torch.sin(x), torch.cos(x)) + + +def exp_map_to_angle_axis(exp_map): + min_theta = 1e-5 + + angle = torch.norm(exp_map, dim=-1) + angle_exp = torch.unsqueeze(angle, dim=-1) + axis = exp_map / angle_exp + angle = normalize_angle(angle) + + default_axis = torch.zeros_like(exp_map) + default_axis[..., -1] = 1 + + mask = torch.abs(angle) > min_theta + angle = torch.where(mask, angle, torch.zeros_like(angle)) + mask_expand = mask.unsqueeze(-1) + axis = torch.where(mask_expand, axis, default_axis) + + return angle, axis + + +def exp_map_to_quat(exp_map): + angle, axis = exp_map_to_angle_axis(exp_map) + q = angle_axis_to_quaternion(angle, axis) + return q + + +def quat_to_angle_axis(q): + # type: (Tensor) -> Tuple[Tensor, Tensor] + # computes axis-angle representation from quaternion q + # q must be normalized + min_theta = 1e-5 + qw, qx = 0, 1 + + norms = torch.norm(q[..., qx:], p=2, dim=-1) + half_angles = torch.atan2( + norms, q[..., qw] + ) # half_angles: [0,pi] because norms >= 0 + angle = 2 * half_angles # angle: [0, 2pi] + sin_theta = torch.sin(half_angles) # sin_theta: [0, 1] + sin_theta_expand = sin_theta.unsqueeze(-1) + axis = q[..., qx:] / sin_theta_expand + + mask = sin_theta > min_theta + default_axis = torch.zeros_like(axis) + default_axis[..., -1] = 1 + + angle = torch.where(mask, angle, torch.zeros_like(angle)) + mask_expand = mask.unsqueeze(-1) + axis = torch.where(mask_expand, axis, default_axis) + + # angle is within [0, 2pi]. + # if angle > pi, use shorter side of the arc(2*pi-angle) and flip the rotation axis + flip_axis = angle > torch.pi + angle = torch.where(flip_axis, 2 * torch.pi - angle, angle) + axis = torch.where(flip_axis[..., None], -axis, axis) + + return angle, axis + + +def angle_axis_to_exp_map(angle, axis): + # type: (Tensor, Tensor) -> Tensor + # compute exponential map from axis-angle + angle_expand = angle.unsqueeze(-1) + exp_map = angle_expand * axis + return exp_map + + +def quat_to_exp_map(q): + # type: (Tensor) -> Tensor + # compute exponential map from quaternion + # q must be normalized + angle, axis = quat_to_angle_axis(q) + exp_map = angle_axis_to_exp_map(angle, axis) + return exp_map + + +def angle_to_Y_rotation_matrix(angle): + cos, sin = torch.cos(angle), torch.sin(angle) + one, zero = torch.ones_like(angle), torch.zeros_like(angle) + mat = torch.stack((cos, zero, sin, zero, one, zero, -sin, zero, cos), -1) + mat = mat.reshape(angle.shape + (3, 3)) + return mat + + +def diff_angles(angles, fps: float): + """Computes differences between angles. + + Args: + angles (Tensor): [..., T] the batched sequences of rotation angles in radians. + + Returns: + Tensor: [..., T-1] the difference between consecutive angles + """ + + cos = torch.cos(angles) + sin = torch.sin(angles) + + cos_diff = cos[..., 1:] * cos[..., :-1] + sin[..., 1:] * sin[..., :-1] + sin_diff = sin[..., 1:] * cos[..., :-1] - cos[..., 1:] * sin[..., :-1] + + # should be close to angles.diff() but more robust + # multiply by fps = 1 / dt + angles_diff = fps * torch.arctan2(sin_diff, cos_diff) + return angles_diff + + +def diff_between_two_angles(b, a, fps: float): + # angle: b - a + cos_a = np.cos(a) + sin_a = np.sin(a) + + cos_b = np.cos(b) + sin_b = np.sin(b) + + cos_diff = cos_b * cos_a + sin_b * sin_a + sin_diff = sin_b * cos_a - cos_b * sin_a + + return fps * np.arctan2(sin_diff, cos_diff) + + +# Numpy-backed utils + + +def diff_angles_np(angles: np.array, fps: float) -> np.array: + angles = torch.from_numpy(angles) + return diff_angles(angles, fps).numpy() + + +def qmul_np(q: np.array, r: np.array) -> np.array: + q = torch.from_numpy(q).contiguous().float() + r = torch.from_numpy(r).contiguous().float() + return quat_mul(q, r).numpy() + + +def qrot_np(q: np.array, v: np.array) -> np.array: + q = torch.from_numpy(q).contiguous().float() + v = torch.from_numpy(v).contiguous().float() + return quat_apply(q, v).numpy() + + +def qinv_np(q: np.array) -> np.array: + q = torch.from_numpy(q).contiguous().float() + return quat_conjugate(q).numpy() + + +def quaternion_to_cont6d_np(q: np.array) -> np.array: + q = torch.from_numpy(q).contiguous().float() + return quaternion_to_cont6d(q).numpy() diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/utils/stats.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/utils/stats.py new file mode 100644 index 0000000000000000000000000000000000000000..5764fd9095f06f4e544ed6276df3d90ab76adc1f --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/utils/stats.py @@ -0,0 +1,117 @@ +import logging +import os +from typing import Optional + +import numpy as np +import torch + +log = logging.getLogger(__name__) + + +class Stats(torch.nn.Module): + """Simple class to handle stats with pytorch. + + Similar to: + https://pytorch.org/docs/stable/generated/torch.nn.LayerNorm.html + for handling precision + + (data - mean) / np.sqrt(var + eps) + """ + + def __init__( + self, + folder: Optional[str] = None, + load: bool = True, + eps=1e-05, + legacy=False, + ): + super().__init__() + self.legacy = legacy + # for legacy behavior, the std stats are already cliped to 1e-3 + + self.folder = folder + self.eps = eps + if folder is not None and load: + self.load() + + def load(self): + mean = torch.from_numpy(np.load(os.path.join(self.folder, "mean.npy"))) + std = torch.from_numpy(np.load(os.path.join(self.folder, "std.npy"))) + self.register_from_tensors(mean, std) + + def register_from_tensors(self, mean: torch.Tensor, std: torch.Tensor): + self.register_buffer("mean", mean, persistent=False) + self.register_buffer("std", std, persistent=False) + + def normalize(self, data: torch.Tensor, index=None) -> torch.Tensor: + mean = self.mean.to(device=data.device, dtype=data.dtype) + std = self.std.to(device=data.device, dtype=data.dtype) + + if index is not None: + mean = mean[..., index] + std = std[..., index] + + if self.legacy: + return (data - mean) / torch.clip(std, 1e-3) + + # adjust std with eps + return (data - mean) / torch.sqrt(std**2 + self.eps) + + def unnormalize(self, data: torch.Tensor, index=None) -> torch.Tensor: + mean = self.mean.to(device=data.device, dtype=data.dtype) + std = self.std.to(device=data.device, dtype=data.dtype) + + if index is not None: + mean = mean[..., index] + std = std[..., index] + + if self.legacy: + return data * torch.clip(std, 1e-3) + mean + + # adjust std with eps + return data * torch.sqrt(std**2 + self.eps) + mean + + def is_loaded(self): + return hasattr(self, "mean") + + def get_dim(self): + return self.mean.shape[0] + + def save( + self, + folder: Optional[str] = None, + mean: Optional[torch.Tensor] = None, + std: Optional[torch.Tensor] = None, + ): + if folder is None: + folder = self.folder + if folder is None: + raise ValueError("No folder to save stats") + + if mean is None and std is None: + try: + mean = self.mean.cpu().numpy() + std = self.std.cpu().numpy() + except AttributeError: + raise ValueError("Stats were not loaded") + + # don't override stats folder + os.makedirs(folder, exist_ok=False) + + np.save(os.path.join(folder, "mean.npy"), mean) + np.save(os.path.join(folder, "std.npy"), std) + + def __eq__(self, other): + return (self.mean.cpu() == other.mean.cpu()).all() and ( + self.std.cpu() == other.std.cpu() + ).all() + + # should define a hash value for pytorch, as we defined __eq__ + def __hash__(self): + # Convert mean and std to bytes for a consistent hash value + mean_hash = hash(self.mean.detach().cpu().numpy().tobytes()) + std_hash = hash(self.std.detach().cpu().numpy().tobytes()) + return hash((mean_hash, std_hash)) + + def __repr__(self): + return f'Stats(folder="{self.folder}")' diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/utils/torch_utils.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/utils/torch_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..c0e19abf9f3549238bdaa7558f21af1676832d3f --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/core/utils/torch_utils.py @@ -0,0 +1,136 @@ +from typing import List, Optional, Union + +import torch +import torch.nn.functional as F + + +def normalize_vec(x: torch.Tensor, dim: int = -1, eps: float = 1e-9): + return x / x.norm(p=2, dim=dim).clamp(min=eps, max=None).unsqueeze(-1) + + +@torch.jit.script +def transform_mat(R, t): + """Creates a batch of transformation matrices. + + Args: + - R: Bx3x3 array of a batch of rotation matrices + - t: Bx3x1 array of a batch of translation vectors + Returns: + - T: Bx4x4 Transformation matrix + """ + # No padding left or right, only add an extra row + return torch.cat([F.pad(R, [0, 0, 0, 1]), F.pad(t, [0, 0, 0, 1], value=1.0)], dim=2) + + +def compute_idx_levels(parents): + idx_levs = [[]] + lev_dicts = {0: -1} + for i in range(1, parents.shape[0]): + assert int(parents[i]) in lev_dicts + lev = lev_dicts[int(parents[i])] + 1 + if lev + 1 > len(idx_levs): + idx_levs.append([]) + idx_levs[lev].append(int(i)) + lev_dicts[int(i)] = lev + idx_levs = [torch.tensor(x).long() for x in idx_levs] + return idx_levs + + +def batch_rigid_transform(rot_mats, joints, parents, root_idx): + """Perform batch rigid transformation on a skeletal structure. + + Args: + rot_mats: Local rotation matrices for each joint: (B, J, 3, 3) + joints: Initial joint positions: (B, J, 3) + parents: Tensor indicating the parent of each joint: (J,) + root_idx (int): index of the root + + Returns: + Transformed joint positions after applying forward kinematics. + """ + + # Compute the hierarchical levels of joints based on their parent relationships + idx_levs = compute_idx_levels(parents) + + # Apply forward kinematics to transform the joints + return forward_kinematics(rot_mats, joints, parents, idx_levs, root_idx) + + +@torch.jit.script +def forward_kinematics( + rot_mats, + joints, + parents: torch.Tensor, + idx_levs: List[torch.Tensor], + root_idx: int, +): + """Perform forward kinematics to compute posed joints and global rotation matrices. + + Args: + rot_mats: Local rotation matrices for each joint: (B, J, 3, 3) + joints: Initial joint positions: (B, J, 3) + parents: Tensor indicating the parent of each joint: (J,) + idx_levs: List of tensors containing indices for each level in the kinematic tree + root_idx (int): index of the root + Returns: + Posed joints: (B, J, 3) + Global rotation matrices: (B, J, 3, 3) + """ + + # Add an extra dimension to joints + joints = torch.unsqueeze(joints, dim=-1) + + # Compute relative joint positions + rel_joints = joints.clone() + + mask_no_root = torch.ones(joints.shape[1], dtype=torch.bool) + mask_no_root[root_idx] = False + rel_joints[:, mask_no_root] -= joints[:, parents[mask_no_root]].clone() + + # Compute initial transformation matrices + # (B, J + 1, 4, 4) + transforms_mat = transform_mat( + rot_mats.reshape(-1, 3, 3), rel_joints.reshape(-1, 3, 1) + ).reshape(-1, joints.shape[1], 4, 4) + + # Initialize the root transformation matrices + transforms = torch.zeros_like(transforms_mat) + transforms[:, root_idx] = transforms_mat[:, root_idx] + + # Compute global transformations level by level + for indices in idx_levs: + curr_res = torch.matmul( + transforms[:, parents[indices]], transforms_mat[:, indices] + ) + transforms[:, indices] = curr_res + + # Extract posed joint positions from the transformation matrices + posed_joints = transforms[:, :, :3, 3] + + # Extract global rotation matrices from the transformation matrices + global_rot_mat = transforms[:, :, :3, :3] + + return posed_joints, global_rot_mat + + +def length_to_mask( + length: Union[torch.Tensor, List], + max_len: Optional[int] = None, + device=None, +) -> torch.Tensor: + if isinstance(length, list): + if device is None: + device = "cpu" + length = torch.tensor(length, device=device) + + if device is not None: + assert device == length.device + device = length.device + + if max_len is None: + max_len = max(length) + + mask = torch.arange(max_len, device=device).expand( + len(length), max_len + ) < length.unsqueeze(1) + return mask diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/train/__init__.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/train/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/train/scheduler.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/train/scheduler.py new file mode 100644 index 0000000000000000000000000000000000000000..27b00401f36f01ab7c57ea8f207d84fd226ad3c7 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/train/scheduler.py @@ -0,0 +1,37 @@ +import math +from torch.optim import Optimizer +from torch.optim.lr_scheduler import _LRScheduler + + +class WarmupCosineScheduler(_LRScheduler): + """Linear warmup followed by cosine annealing to a final learning rate.""" + + def __init__( + self, + optimizer: Optimizer, + num_warmup_steps: int, + num_training_steps: int, + final_lr: float = 0.0, + last_epoch: int = -1, + ): + self.num_warmup_steps = num_warmup_steps + self.num_training_steps = num_training_steps + self.final_lr = final_lr + super().__init__(optimizer, last_epoch) + + def get_lr(self): + current_step = self.last_epoch + if current_step < self.num_warmup_steps: + return [ + base_lr * float(current_step) / float(max(1, self.num_warmup_steps)) + for base_lr in self.base_lrs + ] + else: + progress = float(current_step - self.num_warmup_steps) / float( + max(1, self.num_training_steps - self.num_warmup_steps) + ) + cosine_decay = 0.5 * (1.0 + math.cos(math.pi * min(progress, 1.0))) + return [ + self.final_lr + (base_lr - self.final_lr) * cosine_decay + for base_lr in self.base_lrs + ] diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/train/utils.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/train/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..aebc00da99c0d3661da36c6e9bc1f281efa897ee --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/motionlib/train/utils.py @@ -0,0 +1,31 @@ +# numpy / torch / pytorch_lightning should not be imported +# even implicitely in the imports +# so that the logging behave properly +import logging +import os +from typing import Optional + +from motionbricks.motionlib.core.utils.custom_logging import setup_logging + + +# from lightning_fabric/utilities/rank_zero.py +# but return 0 +def get_rank() -> Optional[int]: + # SLURM_PROCID can be set even if SLURM is not managing the multiprocessing, + # therefore LOCAL_RANK needs to be checked first + rank_keys = ("RANK", "LOCAL_RANK", "SLURM_PROCID", "JSM_NAMESPACE_RANK") + for key in rank_keys: + rank = os.environ.get(key) + if rank is not None: + return int(rank) + # None to differentiate whether an environment variable was set at all + return 0 + + +def setup_train_logging(run_dir: str, rank: int, level=logging.INFO): + return setup_logging( + name="train", + run_dir=run_dir, + rank=rank, + level=level, + ) diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/vqvae/__init__.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/vqvae/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/vqvae/models/__init__.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/vqvae/models/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/vqvae/models/motion_vqvae.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/vqvae/models/motion_vqvae.py new file mode 100644 index 0000000000000000000000000000000000000000..60fe70af01c8f011a9db16eb58abf6999f54cd67 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/vqvae/models/motion_vqvae.py @@ -0,0 +1,467 @@ +import numpy as np +import torch as t +import torch +import logging +from typing import Callable, Optional, Union, Dict +from pytorch_lightning import LightningModule +from motionbricks.motionlib.core.motion_reps import MotionRepBase +from motionbricks.motionlib.core.motion_reps.dual_root_global_joints import ( + GlobalRootGlobalJoints, + LocalRootGlobalJoints, +) +from motionbricks.helper.data_training_util import extract_feature_from_motion_rep +from motionbricks.helper.data_training_util import ( + sample_motion_segments_from_motion_clips, +) +from motionbricks.helper.data_training_util import sample_keyframes +from motionbricks.vqvae.neural_modules import vqvae as vqvae_module + +log = logging.getLogger(__name__) + + +class MotionVQVAEModel(LightningModule): + """VQVAE model for motion generation, wrapped in PyTorch Lightning. + + The pose VQVAE encodes local/global motion representations into discrete + codes and reconstructs them with optional keyframe conditioning and + external root-motion conditioning. + """ + + def __init__( + self, + pose_vqvae_network: vqvae_module.VQVAE, + root_vqvae_network: Optional[vqvae_module.VQVAE], + motion_rep: MotionRepBase, + optimizer: Callable[[list], torch.optim.Optimizer], + scheduler: Optional[ + Callable[[torch.optim.Optimizer], torch.optim.lr_scheduler.LRScheduler] + ], + device: Optional[Union[str, torch.device]] = None, + args: Dict = None, + **kwargs, + ): + super().__init__() + + self.optimizer = optimizer + self.scheduler = scheduler + + assert ( + motion_rep.dual_rep.local_motion_rep.num_joints + == motion_rep.dual_rep.global_motion_rep.num_joints + ), "The number of joints should be the same." + self.NUM_JOINTS = motion_rep.num_joints + + self.pose_net = pose_vqvae_network + self.root_net = root_vqvae_network + self.motion_rep: GlobalRootGlobalJoints = motion_rep + self.global_motion_rep: GlobalRootGlobalJoints = ( + motion_rep.dual_rep.global_motion_rep + ) + self.local_motion_rep: LocalRootGlobalJoints = ( + motion_rep.dual_rep.local_motion_rep + ) + self._args = args + + if device is not None: + self.pose_net = self.pose_net.to(device) + self.root_net = ( + self.root_net.to(device) if self.root_net is not None else None + ) + + def configure_optimizers(self): + optimizer = self.optimizer(self.parameters()) + if not self.scheduler: + return optimizer + + lt_kwargs = dict(self.scheduler.keywords.pop("lt_kwargs", {})) + lt_kwargs["scheduler"] = self.scheduler(optimizer) + return {"optimizer": optimizer, "lr_scheduler": lt_kwargs} + + def training_step(self, batch, batch_idx): + batch_size, device = batch["batch_size"], batch["motion"].device + motions, motion_lengths, _ = ( + batch.pop("motion"), + batch.pop("motion_len"), + batch.pop("motion_pad_mask"), + ) + + num_codes = np.random.choice( + np.arange(self._args["min_tokens"], self._args["max_tokens"] + 1) + ) + num_frames = num_codes * self.get_num_frames_per_code() + + # filter out short samples and truncate + valid_samples_id = motion_lengths >= num_frames + 1 + num_invalid_samples = batch_size - valid_samples_id.sum() + if num_invalid_samples > batch_size // 2: + return None + + motions = sample_motion_segments_from_motion_clips( + motions, + motion_lengths, + num_frames, + self.args["batchsize_mul_factor"], + motion_rep=self.global_motion_rep, + ) + actual_batch_size = int(batch_size * self.args["batchsize_mul_factor"]) + + # prepare global & local motion representations + first_frame_heading_angle = ( + t.rand(actual_batch_size).to(device) * np.pi * 2.0 + if not self.motion_rep.compute_kwargs["removing_heading"] + else 0.0 + ) + global_motions = self.global_motion_rep.change_first_heading( + motions, + first_frame_heading_angle, + is_normalized=True, + to_normalize=True, + ) + local_motions = self.motion_rep.dual_rep.global_to_local( + global_motions, + is_normalized=True, + to_normalize=True, + lengths=t.full([actual_batch_size], motions.shape[1]).to(device), + ) + local_motions, global_motions = ( + local_motions[:, :num_frames, :], + global_motions[:, :num_frames, :], + ) + + # keyframe conditioning + assert self.pose_net.motion_rep.name in [ + "local", + "global", + ], "should be using local or global rep." + prob_pose_num_keyframes, _ = self._construct_keyframe_prob() + pose_motions = ( + local_motions + if self.pose_net.motion_rep.name == "local" + else global_motions + ) + pose_has_target_cond, pose_target_cond = sample_keyframes( + pose_motions, + self._args["pose_vqvae_max_num_keyframes"], + prob_pose_num_keyframes, + ) + pose_external_cond = extract_feature_from_motion_rep( + pose_motions, + self.pose_net.motion_rep, + self.pose_net.decoder_external_cond_feature_mode, + ) + + batch["local_motions"], batch["global_motions"] = local_motions, global_motions + batch["pose_has_target_cond"] = pose_has_target_cond + pose_external_cond = self._construct_masked_pose_external_cond_if_needed( + pose_external_cond, batch + ) + + # network forward + if self.root_net is not None: + raise NotImplementedError("Root VQVAE is not implemented.") + else: + root_net_output = None + + pose_net_output = self.pose_net( + batch["local_motions"] + if self.pose_net.motion_rep.name == "local" + else batch["global_motions"], + target_cond=pose_target_cond, + has_target_cond=pose_has_target_cond, + external_cond=pose_external_cond, + ) + losses = self.loss(batch, pose_net_output, root_net_output) + + for key, val in losses.items(): + self.log( + f"loss/train_{key}", + val, + on_step=True, + on_epoch=True, + sync_dist=True, + batch_size=batch["batch_size"], + ) + return losses["loss"] + + def loss(self, batch, pose_net_output, root_net_output): + if self.root_net is not None: + raise NotImplementedError("Root VQVAE is not implemented.") + else: + global_root_recons_loss = local_root_recons_loss = 0.0 + + # pose reconstruction loss + if self.pose_net.motion_rep.name == "local": + local_pose_recons_loss = t.nn.SmoothL1Loss()( + pose_net_output["recon_state"], batch["local_motions"][:, :, :] + ) + global_pose_recons_loss = 0.0 + pose_recons_loss = local_pose_recons_loss + else: + global_pose_recons_loss = t.nn.SmoothL1Loss()( + pose_net_output["recon_state"], batch["global_motions"][:, :, :] + ) + pred_local_motions = self.motion_rep.dual_rep.global_to_local( + pose_net_output["recon_state"], + is_normalized=True, + to_normalize=True, + lengths=t.full( + [pose_net_output["recon_state"].shape[0]], + pose_net_output["recon_state"].shape[1], + ).to(pose_net_output["recon_state"].device), + ) + pred_local_motions = t.concat( + [ + pred_local_motions[:, :-1, :], + t.concat( + [ + batch["local_motions"][ + :, -1:, self.local_motion_rep.indices["root"] + ], + pred_local_motions[ + :, -1:, self.local_motion_rep.indices["body"] + ], + ], + dim=-1, + ), + ], + dim=1, + ) + local_pose_recons_loss = t.nn.SmoothL1Loss()( + pred_local_motions, batch["local_motions"] + ) + pose_recons_loss = ( + self.args["global_root_loss_coeff"] * global_pose_recons_loss + + self.args["local_root_loss_coeff"] * local_pose_recons_loss + ) + + global_root_recons_loss = t.nn.SmoothL1Loss()( + pose_net_output["recon_state"][ + :, :, self.global_motion_rep.indices["root"] + ], + batch["global_motions"][:, :, self.global_motion_rep.indices["root"]], + ) + local_root_recons_loss = t.nn.SmoothL1Loss()( + pred_local_motions[:, :, self.local_motion_rep.indices["root"]], + batch["local_motions"][:, :, self.local_motion_rep.indices["root"]], + ) + + # foot contact loss + if self.pose_net.motion_rep.name == "local": + pred_joints_output = self.local_motion_rep.inverse( + pose_net_output["recon_state"], + is_normalized=True, + return_quat=True, + return_all=True, + ) + else: + pred_joints_output = self.global_motion_rep.inverse( + pose_net_output["recon_state"], + is_normalized=True, + return_quat=True, + return_all=True, + ) + + pred_joints_pos = pred_joints_output["posed_joints"] + pred_foot_contacts = pred_joints_output.get("foot_contacts") + + fidx = self.motion_rep.skeleton.foot_joint_idx + feet_pos = pred_joints_pos[:, :, fidx] + dt = 1.0 / self.motion_rep.fps + foot_vel = torch.norm(feet_pos[:, 1:] - feet_pos[:, :-1], dim=-1) / dt + + foot_contacts = pred_foot_contacts[:, :-1] + vel_err = foot_vel * foot_contacts + mean_vel = torch.sum(vel_err, (1, 2)) / ( + torch.sum(foot_contacts, (1, 2)) + 1e-6 + ) + mean_vel = mean_vel.mean() + + # joint velocity loss + joint_vel_loss_coeff = self._args.get("joint_vel_loss_coeff", 0.0) + if joint_vel_loss_coeff > 0.0: + batch_size, num_frames = ( + pred_joints_pos.shape[0], + pred_joints_pos.shape[1], + ) + pred_joints_vel = ( + (pred_joints_pos[:, 1:] - pred_joints_pos[:, :-1]) / dt + ).view([batch_size, num_frames - 1, -1]) + gt_joints_pos = self.global_motion_rep.inverse( + batch["global_motions"], + is_normalized=True, + return_quat=False, + return_all=False, + joint_positions_from="ric_data", + )["posed_joints"] + gt_joints_vel = ( + (gt_joints_pos[:, 1:] - gt_joints_pos[:, :-1]) / dt + ).view([batch_size, num_frames - 1, -1]) + joint_vel_indices = self.global_motion_rep.indices["local_vel"] + vel_mean = self.global_motion_rep.stats.mean[joint_vel_indices] + vel_std = self.global_motion_rep.stats.std[joint_vel_indices] + + joint_vel_loss = t.nn.SmoothL1Loss()( + (pred_joints_vel - vel_mean) / torch.sqrt(vel_std**2 + 1e-5), + (gt_joints_vel - vel_mean) / torch.sqrt(vel_std**2 + 1e-5), + ) + joint_vel_loss = ( + joint_vel_loss + / len(self.local_motion_rep.indices["all"]) + * len(joint_vel_indices) + ) + else: + joint_vel_loss = 0.0 + + losses = {} + losses["perplexity_pose"] = pose_net_output["perplexity"] + losses["l_commit_pose"] = pose_net_output["l_commit"] + losses["l_recons_pose"] = pose_recons_loss + losses["l_recons_root_global"] = global_root_recons_loss + losses["l_recons_root_local"] = local_root_recons_loss + losses["l_joint_vel"] = joint_vel_loss + losses["l_recons_pose_global"] = global_pose_recons_loss + losses["l_recons_pose_local"] = local_pose_recons_loss + losses["l_skate_contact"] = mean_vel + skate_contact_loss_coeff = self._args.get("skate_contact_loss_coeff", 0.0) + + losses["loss"] = ( + pose_recons_loss + + self._args["commit_loss_coeff"] * losses["l_commit_pose"] + + skate_contact_loss_coeff * losses["l_skate_contact"] + + joint_vel_loss_coeff * losses["l_joint_vel"] + ) + return losses + + @property + def args(self): + return self._args + + def get_num_frames_per_code(self): + return 2 ** self._args["down_t"] + + def _construct_keyframe_prob(self): + probs = dict() + for module in ["pose", "root"]: + max_num_keyframes = self.args[f"{module}_vqvae_max_num_keyframes"] * ( + self.trainer.global_step / self.args["keyframe_num_warmup_steps"] + ) + max_num_keyframes = int( + max( + 1, + min( + max_num_keyframes, + self.args[f"{module}_vqvae_max_num_keyframes"], + ), + ) + ) + + prob_num_keyframes = [ + 1.0 if i > 0 and i <= max_num_keyframes else 0.0 + for i in range(self.args[f"{module}_vqvae_max_num_keyframes"] + 1) + ] + prob_no_keyframe = self.args[f"{module}_vqvae_no_keyframe_prob"] + prob_num_keyframes[0] = ( + sum(prob_num_keyframes) / (1 - prob_no_keyframe) * prob_no_keyframe + ) + prob_num_keyframes = np.array(prob_num_keyframes) + prob_num_keyframes /= prob_num_keyframes.sum() + probs[module] = prob_num_keyframes + + return probs["pose"], probs["root"] + + def _construct_masked_pose_external_cond_if_needed( + self, pose_external_cond: t.Tensor, batch: dict + ): + if self.pose_net.motion_rep.name != "global": + return pose_external_cond + if ( + self.pose_net.decoder_external_cond_feature_mode + != "root_without_hip_height_without_heading_with_mask" + ): + return pose_external_cond + + batch_size, motion_length = ( + batch["local_motions"].shape[0], + batch["local_motions"].shape[1], + ) + device = batch["local_motions"].device + unnorm_gt_local_motion = self.local_motion_rep.unnormalize( + batch["local_motions"] + ) + + max_perturb_angle = self.args.get("max_perturb_angle", 5.0) + max_vel_norm_perturb_ratio = self.args.get("max_vel_norm_perturb_ratio", 0.2) + norm_ratio = ( + torch.rand([batch_size, unnorm_gt_local_motion.shape[1], 1]) + * max_vel_norm_perturb_ratio + * 2 + + (1 - max_vel_norm_perturb_ratio) + ) + angle = ( + torch.rand([batch_size, unnorm_gt_local_motion.shape[1]]) + * max_perturb_angle + * 2 + - max_perturb_angle + ) * np.pi / 180.0 + norm_ratio, angle = norm_ratio.to(device), angle.to(device) + + accumulated_angle = torch.cumsum(angle, dim=1) + unnorm_gt_local_motion[ + :, :, self.local_motion_rep.indices["local_root_vel"] + ] *= norm_ratio[:, :, :] + cos, sin = torch.cos(accumulated_angle), torch.sin(accumulated_angle) + rotated_x = ( + unnorm_gt_local_motion[ + :, :, self.local_motion_rep.indices["local_root_vel"][0] + ] + * cos + - unnorm_gt_local_motion[ + :, :, self.local_motion_rep.indices["local_root_vel"][1] + ] + * sin + ) + rotated_z = ( + unnorm_gt_local_motion[ + :, :, self.local_motion_rep.indices["local_root_vel"][0] + ] + * sin + + unnorm_gt_local_motion[ + :, :, self.local_motion_rep.indices["local_root_vel"][1] + ] + * cos + ) + unnorm_gt_local_motion[ + :, :, self.local_motion_rep.indices["local_root_vel"][0] + ] = rotated_x + unnorm_gt_local_motion[ + :, :, self.local_motion_rep.indices["local_root_vel"][1] + ] = rotated_z + + perturbed_pose_external_cond = extract_feature_from_motion_rep( + self.motion_rep.dual_rep.local_to_global( + unnorm_gt_local_motion, + is_normalized=False, + to_normalize=True, + lengths=torch.full([batch_size], motion_length).to(device), + ), + self.pose_net.motion_rep, + self.pose_net.decoder_external_cond_feature_mode, + ) + + perturbed = torch.rand([batch_size]) < self.args.get( + "percentage_of_perturbed_samples", 0.2 + ) + perturbed_pose_external_cond = t.where( + batch["pose_has_target_cond"][:, :, None], + pose_external_cond, + perturbed_pose_external_cond, + ) + pose_external_cond = t.where( + perturbed[:, None, None].to(device), + perturbed_pose_external_cond, + pose_external_cond, + ) + pose_external_cond[:, :, -1] = batch["pose_has_target_cond"].float() + + batch["perturbed"] = perturbed + return pose_external_cond diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/vqvae/neural_modules/__init__.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/vqvae/neural_modules/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/vqvae/neural_modules/encdec.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/vqvae/neural_modules/encdec.py new file mode 100644 index 0000000000000000000000000000000000000000..fccdc96b3b8c4c3eafb5d4542564d0dcef584cf1 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/vqvae/neural_modules/encdec.py @@ -0,0 +1,37 @@ +import torch.nn as nn +import torch +from motionbricks.vqvae.neural_modules.resnet import Resnet1D + +class Encoder(nn.Module): + def __init__(self, + input_emb_width, # 251 + output_emb_width = 512, + down_t = 3, + stride_t = 2, + width = 512, + depth = 3, + dilation_growth_rate = 3, + activation='relu', + norm=None): + super().__init__() + + blocks = [] + filter_t, pad_t = stride_t * 2, stride_t // 2 # stride = 2 + blocks.append(nn.Conv1d(input_emb_width, width, 3, 1, 1)) + blocks.append(nn.ReLU()) + + input_dim = width + + for i in range(down_t): + input_dim = width + block = nn.Sequential( + nn.Conv1d(input_dim, width, filter_t, stride_t, pad_t), + Resnet1D(width, depth, dilation_growth_rate, activation=activation, norm=norm), + ) + blocks.append(block) + blocks.append(nn.Conv1d(width, output_emb_width, 3, 1, 1)) + self.model = nn.Sequential(*blocks) + + def forward(self, x): + return self.model(x) + diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/vqvae/neural_modules/encdec_double_cond.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/vqvae/neural_modules/encdec_double_cond.py new file mode 100644 index 0000000000000000000000000000000000000000..a2b529805ed908ff2f186786c0b781fddca0c183 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/vqvae/neural_modules/encdec_double_cond.py @@ -0,0 +1,138 @@ +import torch.nn as nn +import torch +from motionbricks.vqvae.neural_modules.resnet import Resnet1D + +class DoubleCondDecoder(nn.Module): + def __init__(self, + input_emb_width: int = 3, + output_emb_width: int = 512, + down_t: int = 3, + width: int = 512, + depth: int = 3, + dilation_growth_rate: int = 3, + activation: str = 'relu', + norm: str = None, + target_cond_dim: int = -1, + external_cond_dim: int = -1, + cond_fusion_last_layer=False): + """ @brief: consider both the internal target condition and external target condition. + external condition is used to help generate the results, while target condition is directly the results + we want to reconstructed. + Target condition is a way to enforce strict constraints on the results. + """ + super().__init__() + + # log configurations + self._down_t, self._width, self._input_emb_width, self._output_emb_width = \ + down_t, width, input_emb_width, output_emb_width + self._target_cond_dim, self._external_cond_dim = \ + target_cond_dim, external_cond_dim + self._HAS_EXTERNAL_COND, self._HAS_TARGET_COND = external_cond_dim > 0, target_cond_dim > 0 + self._COND_FUSION_LAST_LAYER = cond_fusion_last_layer + + # step 1: the main model + blocks = [] + blocks.append(nn.Conv1d(output_emb_width, width, 3, 1, 1)) # this does not change sequence length + blocks.append(nn.ReLU()) + for i in range(down_t): + out_dim = width + block = nn.Sequential( + Resnet1D(width, depth, dilation_growth_rate, reverse_dilation=True, activation=activation, norm=norm), + nn.Upsample(scale_factor=2, mode='nearest'), + nn.Conv1d(width, out_dim, 3, 1, 1) + ) + blocks.append(block) + blocks.append(nn.Conv1d(width, width, 3, 1, 1)) + blocks.append(nn.ReLU()) + blocks.append(nn.Conv1d(width, input_emb_width, 3, 1, 1)) + self.model = nn.Sequential(*blocks) + + """ step 2: external cond embeddings. + At each layer, the external embedding will be merged with the hidden state. The external condition is dense + and expected to be always available in each frame. + """ + if self._HAS_EXTERNAL_COND: + external_cond_blocks = [] + for i in range(down_t + (1 if self._COND_FUSION_LAST_LAYER else 0)): + cond_feat_dim = (2 ** (down_t - i)) * self._external_cond_dim + external_cond_blocks.append(nn.Linear(cond_feat_dim + width, width)) + external_cond_blocks.append(nn.ReLU()) + self.external_cond_blocks = nn.ModuleList(external_cond_blocks) + + """ step 3: target cond embeddings. + The target condition is sparse and expected to be available in certain frames. + we replace the hidden state with the target condition embeddings for given frames. + In earlier layers where each position corresponds to multiple frames, we reshape the hidden states to map to + each frame position (see @forward method) + """ + if self._HAS_TARGET_COND: + target_cond_blocks = [] + assert width % (2 ** down_t) == 0, \ + "width % (2 ** down_t) needs to 0 so that hidden can be split for each frame in earlier layers." + for i in range(down_t + (1 if self._COND_FUSION_LAST_LAYER else 0)): + target_cond_blocks.append(nn.Linear(self._target_cond_dim, int(width / (2 ** (down_t - i))))) + target_cond_blocks.append(nn.ReLU()) + self.target_cond_blocks = nn.ModuleList(target_cond_blocks) + + def forward(self, x: torch.Tensor, external_cond: torch.Tensor = None, + target_cond: torch.Tensor = None, has_target_cond: torch.Tensor = None, + token_mask: torch.Tensor = None): + """ @brief: the decoder could take the external condition and target condition as input. + @params x: shape -> [batch, feat_dim, timesteps // (2 ** down_t)] + @params external_cond: shape -> [batch, timesteps, feat_dim] + @params target_cond: shape -> [batch, timesteps, feat_dim] + @params has_target_cond: shape -> [batch, timesteps] (dtype=bool) + """ + batch_size = x.shape[0] + + # preprocess + x = x * token_mask[:, None, :] if token_mask is not None else x # zeroing out the padded tokens' embeddings + h = self.model[0](x) # conv1d + h = self.model[1](h) # relu; h.shape = ([batch, width, timesteps // (2 ** down_t)]) + + for i in range(self._down_t + (1 if self._COND_FUSION_LAST_LAYER else 0)): + numFrames_per_position = 2 ** (self._down_t - i) + numPositions = h.shape[-1] # numPositions = timesteps // numFrames_per_position + timesteps = numPositions * numFrames_per_position + + # step 1: consider the target cond + if (not self._HAS_TARGET_COND) or target_cond is None or has_target_cond is None: + pass + else: + h_target_cond = self.target_cond_blocks[i * 2](target_cond) # [batch, timesteps, feat] + h_target_cond = self.target_cond_blocks[i * 2 + 1](h_target_cond) # [batch_size, timesteps, feat] + + # h had shape [batch, feat=self._width, numPositions] at the beginning of each loop + h = h.transpose(1, 2) # [batch, numPos, self._width] + h = h.reshape([batch_size, numPositions * numFrames_per_position, + self._width // numFrames_per_position]) # [batch, timesteps, feat] + h = torch.where(has_target_cond[:, :, None], h_target_cond, h) # [batch, timesteps, feat] + h = h.reshape([batch_size, numPositions, self._width]).transpose(1, 2) # [batch, feat, numPositions] + + # step 2: merge the emb from external cond and the original h + if self._HAS_EXTERNAL_COND: + assert external_cond is not None and external_cond.shape[1] == timesteps + + h_cond = external_cond.reshape([batch_size, numPositions, -1]) # [batch, numPosition, feat] + h = torch.cat([h.transpose(1, 2), h_cond], dim=-1) # [batch, numPosition, feat] + h = self.external_cond_blocks[i * 2](h).transpose(1, 2) # [batch, feat, numPosition] + h = self.external_cond_blocks[i * 2 + 1](h) # relu + + if i == self._down_t: # if fusion the cond at the last layer, skip the last main model + continue + + # step 3: the main model + h = self.model[i + 2][0](h, token_mask) + h = self.model[i + 2][1](h) # upsampling + token_mask = token_mask.repeat_interleave(2, 1) if token_mask is not None else None + h = h * token_mask[:, None, :] if token_mask is not None else h # zeroing out padded tokens' embeddings + h = self.model[i + 2][2](h) # conv1d # [batch, feat_dim, numPosition] + + # post process + h = h * token_mask[:, None, :] if token_mask is not None else h # zeroing out the padded tokens' embeddings + h = self.model[2 + self._down_t](h) # conv1d + h = self.model[2 + self._down_t + 1](h) # relu + h = h * token_mask[:, None, :] if token_mask is not None else h # zeroing out the padded tokens' embeddings + h = self.model[2 + self._down_t + 2](h) # conv1d + h = h * token_mask[:, None, :] if token_mask is not None else h # zeroing out the padded tokens' embeddings + return h diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/vqvae/neural_modules/quantize_cnn_multihead.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/vqvae/neural_modules/quantize_cnn_multihead.py new file mode 100644 index 0000000000000000000000000000000000000000..4db4a3333f920f55e1881463d15391bbaab783f6 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/vqvae/neural_modules/quantize_cnn_multihead.py @@ -0,0 +1,121 @@ +# NOTE: taken from MotionGPT code base +import numpy as np +import torch +import torch.nn as nn +import torch.nn.functional as F +from vector_quantize_pytorch import VectorQuantize + +class QuantizeEMAResetMultiHead(nn.Module): + def __init__(self, nb_code: int, code_dim: int, args): + super().__init__() + self.nb_code = nb_code + self.code_dim = code_dim + self.mu = args.mu # the decay for ema reset + self.num_heads = args.num_heads + assert self.code_dim % self.num_heads == 0, "code dim cannot be divided by the number of heads." + self.nb_code_per_head = int(round(2 ** (np.log2(self.nb_code) / self.num_heads))) + assert self.nb_code_per_head ** self.num_heads == self.nb_code, \ + "the specified number of code is not compatible with the number of heads." + self.vq = VectorQuantize( + dim=self.code_dim, + codebook_dim=self.code_dim // self.num_heads, # smaller codebook dimension is acceptable + heads=self.num_heads, # number of heads to vector quantize, codebook shared across all heads + separate_codebook_per_head=True, # whether to have a separate codebook per head. + codebook_size=self.nb_code_per_head, + accept_image_fmap=False, + threshold_ema_dead_code = 1, # if the number of code usage < 1; reset it + decay=self.mu, + kmeans_init=bool(args.kmeans_init) + ) # commitment loss coeff = 1.0 since we do that weighting outside # + self.init = True + self._calculate_per_head_perplexity = getattr(args, "calculate_per_head_perplexity", False) + + @torch.no_grad() + def compute_perplexity(self, code_idx, nb_code=None): + # Calculate new centres + code_onehot = torch.zeros(self.nb_code if nb_code is None else nb_code, + code_idx.shape[0], device=code_idx.device) # nb_code, N * L + code_onehot.scatter_(0, code_idx.view(1, code_idx.shape[0]), 1) + + code_count = code_onehot.sum(dim=-1) # nb_code + prob = code_count / torch.sum(code_count) + perplexity = torch.exp(-torch.sum(prob * torch.log(prob + 1e-7))) + return perplexity + + @torch.no_grad() + def compute_perplexity_per_head(self, code_idx): + # Calculate new centres + perplexity = 0.0 + for i in range(self.num_heads): + perplexity += self.compute_perplexity(code_idx[:, :, i].view(-1), nb_code=self.nb_code_per_head) + return perplexity / self.num_heads + + def from_mh_indices_to_overall_indices(self, mh_indices): + exponential_mul = \ + self.nb_code_per_head ** torch.arange(0, self.num_heads)[None, None, :].to(mh_indices.device) + overall_indices = (exponential_mul * mh_indices).sum(dim=-1) + return overall_indices + + def from_overall_indices_to_mh_indices(self, overall_indices): + exponential_mul = \ + self.nb_code_per_head ** torch.arange(0, self.num_heads)[None, None, :].to(overall_indices.device) + + mh_indices = (overall_indices[:, :, None] % (exponential_mul * self.nb_code_per_head)) // exponential_mul + return mh_indices + + def dequantize(self, code_idx, use_overall_indices = True): + if use_overall_indices: + mh_indices = self.from_overall_indices_to_mh_indices(code_idx) + else: + mh_indices = code_idx # [batch, numTokens, numHeads] + batch_size, numToken = code_idx.shape[0], code_idx.shape[1] + x = self.vq.get_codes_from_indices(mh_indices).view([batch_size, numToken, -1]) + return x + + def forward(self, x): + N, width, T = x.shape + # expected the shape of the input to vq: (1, 1024, 256) --> batch, Timesteps, feat_dim + # The input to x is batch, width(feat_dim), T + x = x.permute(0, 2, 1).contiguous() + + # quantize and dequantize through bottleneck + x_d, mh_indices, commit_loss = self.vq(x) + + # Update embeddings + if self._calculate_per_head_perplexity: + if self.num_heads == 1: + mh_indices = mh_indices[:, :, None] + perplexity = self.compute_perplexity_per_head(mh_indices) + else: + overall_indices = self.from_mh_indices_to_overall_indices(mh_indices) + perplexity = self.compute_perplexity(overall_indices.view([-1])) + + # Loss + commit_loss = F.mse_loss(x, x_d.detach()) + + # Passthrough + x_d = x + (x_d - x).detach() + + # Postprocess + x_d = x_d.view(N, T, -1).permute(0, 2, 1).contiguous() #(N, DIM, T) + + return x_d, commit_loss, perplexity + + def forward_into_idx(self, x, fetch_overall_indices: bool = True): + N, width, T = x.shape + + # expected the shape of the input: (1, 1024, 256) --> batch, T, width + # The input to x is batch, width, T + x = x.permute(0, 2, 1).contiguous() + + # quantize and dequantize through bottleneck + _, mh_indices, _ = self.vq(x) + overall_indices = self.from_mh_indices_to_overall_indices(mh_indices) + + if fetch_overall_indices: + return overall_indices + else: + return mh_indices + +class QuantizeEMAResetLFQ(nn.Module): + pass diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/vqvae/neural_modules/resnet.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/vqvae/neural_modules/resnet.py new file mode 100644 index 0000000000000000000000000000000000000000..428dac2836257ad01804fe20b5d50d1215535951 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/vqvae/neural_modules/resnet.py @@ -0,0 +1,90 @@ +import torch.nn as nn +import torch + +class nonlinearity(nn.Module): + def __init__(self): + super().__init__() + + def forward(self, x): + # swish + return x * torch.sigmoid(x) + +class ResConv1DBlock(nn.Module): + def __init__(self, n_in, n_state, dilation=1, activation='silu', norm=None, dropout=None): + super().__init__() + padding = dilation + self.norm = norm + if norm == "LN": + self.norm1 = nn.LayerNorm(n_in) + self.norm2 = nn.LayerNorm(n_in) + elif norm == "GN": + self.norm1 = nn.GroupNorm(num_groups=32, num_channels=n_in, eps=1e-6, affine=True) + self.norm2 = nn.GroupNorm(num_groups=32, num_channels=n_in, eps=1e-6, affine=True) + elif norm == "BN": + self.norm1 = nn.BatchNorm1d(num_features=n_in, eps=1e-6, affine=True) + self.norm2 = nn.BatchNorm1d(num_features=n_in, eps=1e-6, affine=True) + else: + self.norm1 = nn.Identity() + self.norm2 = nn.Identity() + + if activation == "relu": + self.activation1 = nn.ReLU() + self.activation2 = nn.ReLU() + + elif activation == "silu": + self.activation1 = nonlinearity() + self.activation2 = nonlinearity() + + elif activation == "gelu": + self.activation1 = nn.GELU() + self.activation2 = nn.GELU() + + self.conv1 = nn.Conv1d(n_in, n_state, 3, 1, padding, dilation) + self.conv2 = nn.Conv1d(n_state, n_in, 1, 1, 0,) + + def forward(self, x: torch.Tensor, token_mask: torch.Tensor = None): + x = x * token_mask[:, None, :] if token_mask is not None else x + x_orig = x + if self.norm == "LN": + x = self.norm1(x.transpose(-2, -1)) + x = self.activation1(x.transpose(-2, -1)) + else: + x = self.norm1(x) + x = self.activation1(x) + + x = x * token_mask[:, None, :] if token_mask is not None else x + x = self.conv1(x) + + if self.norm == "LN": + x = self.norm2(x.transpose(-2, -1)) + x = self.activation2(x.transpose(-2, -1)) + else: + x = self.norm2(x) + x = self.activation2(x) + + x = x * token_mask[:, None, :] if token_mask is not None else x + x = self.conv2(x) + x = x + x_orig + x = x * token_mask[:, None, :] if token_mask is not None else x + return x + +class Resnet1D(nn.Module): + def __init__(self, n_in, n_depth, dilation_growth_rate=1, reverse_dilation=True, activation='relu', norm=None): + """ @brief: a n_depth-layer resnet structures. Each layer has different dilattion rate. For example The first + Three layer is 1, 3, 9 dilation respectively. + """ + super().__init__() + + blocks = [ResConv1DBlock(n_in, n_in, + dilation=dilation_growth_rate ** depth, + activation=activation, norm=norm) + for depth in range(n_depth)] + if reverse_dilation: + blocks = blocks[::-1] + + self.model = nn.Sequential(*blocks) + + def forward(self, x: torch.Tensor, token_mask: torch.Tensor = None): + for block in self.model: + x = block(x, token_mask) + return x diff --git a/GR00T-WholeBodyControl/motionbricks/motionbricks/vqvae/neural_modules/vqvae.py b/GR00T-WholeBodyControl/motionbricks/motionbricks/vqvae/neural_modules/vqvae.py new file mode 100644 index 0000000000000000000000000000000000000000..6c3dd9f8288a45f4468317d7f0d2eb11d6f27556 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/motionbricks/vqvae/neural_modules/vqvae.py @@ -0,0 +1,180 @@ +import torch as t +from torch import nn +import numpy as np +from motionbricks.vqvae.neural_modules.quantize_cnn_multihead import QuantizeEMAResetMultiHead +from motionbricks.vqvae.neural_modules.encdec_double_cond import DoubleCondDecoder +from motionbricks.vqvae.neural_modules.encdec import Encoder +from typing import Mapping, Tuple, List, Any +from types import SimpleNamespace +from motionbricks.motionlib.core.motion_reps import MotionRepBase +from motionbricks.helper.data_training_util import convert_sparse_cond_to_dense_cond_if_needed +from motionbricks.helper.data_training_util import extract_feature_from_motion_rep + +class VQVAE(nn.Module): + ALLOWED_FEATURE_MODE = [ + 'invalid', "pose", + "root", "root_without_hip_height", "root_without_hip_height_without_heading", "root_without_heading", + "root_without_hip_height_without_heading_with_mask", + "joint_positions_and_rotations", + "joint_positions_and_rotations_and_foot_contact", "joint_positions_and_rotations_and_hip_height" + ] + def __init__(self, + pose_root_mode: str, + motion_rep: MotionRepBase, + + # dim information + encoder_state_dim: int, + decoder_state_dim: int, + + decoder_target_cond_dim: int, + decoder_external_cond_dim: int, + feature_mode: List, + + # network config + quantizer_strategy: str = 'multihead_ema_reset', + quantizer_mu: float = 0.99, + nb_code: int = 512, + code_dim: int = 512, + output_emb_width: int = 512, + down_t: int = 2, + stride_t: int = 2, + width: int = 512, + depth: int = 3, + dilation_growth_rate: int = 3, + activation: str = 'relu', + num_heads: int = 4, + kmeans_init: bool = True, + norm: str = None, + calculate_per_head_perplexity: bool = True, + **kwargs): + """ @brief: + Both the root vqvae and pose vqvae use a similar structure where + 1) the encoder is a unconditional x -> z + 2) the decoder takes z, c-> x + The c is the condition vector. For root vqvae, it's the target condition (boundary root values). + And for pose vqvae, it's target condition (boundary pose values) as well as external + condition (root values). + """ + + super().__init__() + self.code_dim = code_dim + self.num_code = nb_code + self._num_heads = num_heads + self._motion_rep = motion_rep + self._pose_root_mode = pose_root_mode + self._down_t = down_t + self._calculate_per_head_perplexity = calculate_per_head_perplexity + + assert self._pose_root_mode in ['pose', 'root'], "Only support either provide local pose rep or root rep." + assert len(feature_mode) == 4 and np.all([f in self.ALLOWED_FEATURE_MODE for f in feature_mode]) + self.encoder_input_feature_mode, self.decoder_input_feature_mode, \ + self.decoder_target_cond_feature_mode, self.decoder_external_cond_feature_mode = feature_mode + + dummy_input = t.zeros([1, 1, len(motion_rep.indices['all'])]) + encoder_state_dim = extract_feature_from_motion_rep(dummy_input, motion_rep, + self.encoder_input_feature_mode).shape[-1] + decoder_state_dim = extract_feature_from_motion_rep(dummy_input, motion_rep, + self.decoder_input_feature_mode).shape[-1] + decoder_target_cond_dim = extract_feature_from_motion_rep(dummy_input, motion_rep, + self.decoder_target_cond_feature_mode).shape[-1] + decoder_external_cond_dim = extract_feature_from_motion_rep(dummy_input, motion_rep, + self.decoder_external_cond_feature_mode).shape[-1] + + self.encoder = Encoder(encoder_state_dim, output_emb_width, + down_t, stride_t, width, depth, + dilation_growth_rate, activation=activation, norm=norm) + self.decoder = DoubleCondDecoder(decoder_state_dim, output_emb_width, + down_t, width, depth, dilation_growth_rate, + activation=activation, norm=norm, + target_cond_dim=decoder_target_cond_dim, + external_cond_dim=decoder_external_cond_dim, + cond_fusion_last_layer=kwargs.get('cond_fusion_last_layer', False)) + + self.quant_strategy = quantizer_strategy + quant_args = SimpleNamespace(mu=quantizer_mu, num_heads=num_heads, kmeans_init=kmeans_init, + calculate_per_head_perplexity=calculate_per_head_perplexity) + if quantizer_strategy == "multihead_ema_reset": + self.quantizer = QuantizeEMAResetMultiHead(nb_code, code_dim, quant_args) + else: + assert False, "Invalid quantizer strategy for training." + + def extract_feature(self, x: t.Tensor, feature: str = ""): + """ @brief: extract the root / localPose / boundary features from the original full 353 feature + """ + feature = self._pose_root_mode if feature == "" else feature + return extract_feature_from_motion_rep(x, self._motion_rep, feature) + + def forward(self, x, target_cond: t.Tensor, has_target_cond: t.Tensor = None, external_cond: t.Tensor = None): + """ @brief: full encoder decoder path that goes from x to z to x + @params x: [batch_size, numFrames, feat_dim] + @params target_cond: [batch_size, numFrames, feat_dim] + @params has_target_cond: [batch_size, numFrames] + @params external_cond: [batch_size, numFrames, feat_dim] + + @returns x_out: [batch_size, numFrames, feat_dim] + """ + num_expected_frames = x.shape[1] + # encoder + x_in = self.extract_feature(x, self.encoder_input_feature_mode).permute(0, 2, 1) # from [B,T,F] to [B,F,T] + x_encoder = self.encoder(x_in) + + # quantization + x_quantized, loss, perplexity = self.quantizer(x_encoder) + + # decoder + if target_cond is not None: + target_cond, has_target_cond = \ + convert_sparse_cond_to_dense_cond_if_needed(target_cond, has_target_cond, num_expected_frames) + target_cond = self.extract_feature(target_cond, self.decoder_target_cond_feature_mode) + x_decoder = self.decoder(x_quantized, external_cond, target_cond, has_target_cond) + + x_out = x_decoder.permute(0, 2, 1) + return {'recon_state': x_out, 'l_commit': loss, 'perplexity': perplexity} + + def encode_into_idx(self, x, fetch_overall_indices: bool = True): + """ @brief: encoder part of the @forward function + @param x: the frame features. + """ + assert self.quant_strategy == "multihead_ema_reset" + x_in = self.extract_feature(x, self.encoder_input_feature_mode).permute(0, 2, 1) # from [B,T,F] to [B,F,T] + + x_encoder = self.encoder(x_in) + code_idx = self.quantizer.forward_into_idx(x_encoder, fetch_overall_indices=fetch_overall_indices) + return code_idx + + def forward_decoder(self, x, + target_cond: t.Tensor, has_target_cond: t.Tensor = None, external_cond: t.Tensor = None, + use_overall_indices: bool = True, token_mask: t.Tensor = None): + """ @brief: decoder part of the @forward function + @param x: the code indices. + """ + assert self.quant_strategy == "multihead_ema_reset" + num_expected_frames = x.shape[1] * (2 ** self._down_t) + x_d = self.quantizer.dequantize(x, use_overall_indices=use_overall_indices) + x_quantized = x_d.permute(0, 2, 1).contiguous() # [batch, feat_dim, T] + + # decoder + if target_cond is not None: + target_cond, has_target_cond = \ + convert_sparse_cond_to_dense_cond_if_needed(target_cond, has_target_cond, num_expected_frames) + target_cond = self.extract_feature(target_cond, self.decoder_target_cond_feature_mode) + x_decoder = self.decoder(x_quantized, external_cond, target_cond, has_target_cond, token_mask=token_mask) + + x_out = x_decoder.permute(0, 2, 1) + return {'recon_state': x_out} + + def get_codebook(self): + if self.quant_strategy == "ema_reset": + return self.quantizer.codebook.clone() + elif self.quant_strategy == "multihead_ema_reset": + return self.quantizer.vq.codebook.clone() + else: + raise NotImplementedError + + @property + def pose_root_mode(self): + return self._pose_root_mode + + @property + def motion_rep(self): + return self._motion_rep diff --git a/GR00T-WholeBodyControl/motionbricks/out/motionbricks_pose/version_1/config.yaml b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_pose/version_1/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..00d7fbc4b163892abb619d13be841a2ae6cc813a --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_pose/version_1/config.yaml @@ -0,0 +1,245 @@ +model: + backbone_network: + _target_: motionbricks.motion_backbone.neural_modules.pose_backbone.pose_backbone_network + motion_rep: ??? + args: + pose_root_mode: ${model.args.pose_root_mode} + min_tokens: ${model.args.min_tokens} + max_tokens: ${model.args.max_tokens} + down_t: ${model.args.down_t} + pose_token_mlp_num_layers: 2 + root_feat_width: 256 + pose_feat_width: 640 + token_length_feat_width: 128 + text_emb_dim: 4096 + text_embeddings: ${data.text_embeddings} + local_pose_feature: ${model.args.local_pose_feature} + cond_root_feature: ${model.args.cond_root_feature} + cond_root_feature_is_from_motion_rep: ${model.args.cond_root_feature_is_from_motion_rep} + n_embd: 1024 + n_head: 16 + n_layers: 16 + pose_vqvae: + nb_code: ${model.pose_vqvae_network.nb_code} + code_dim: ${model.pose_vqvae_network.code_dim} + num_heads: ${model.pose_vqvae_network.num_heads} + has_codebook: ${oc.select:model.pose_vqvae_network.has_codebook,true} + root_vqvae: + nb_code: 1024 + code_dim: 60 + num_heads: 1 + pose_vqvae_network: + _target_: motionbricks.vqvae.neural_modules.vqvae.VQVAE + pose_root_mode: pose + motion_rep: ??? + encoder_state_dim: 241 + decoder_state_dim: 329 + decoder_target_cond_dim: 241 + decoder_external_cond_dim: 2 + feature_mode: + - joint_positions_and_rotations_and_hip_height + - pose + - joint_positions_and_rotations_and_hip_height + - root_without_hip_height_without_heading + quantizer_strategy: multihead_ema_reset + quantizer_mu: 0.99 + nb_code: 100000000 + code_dim: 256 + output_emb_width: 256 + down_t: 2 + stride_t: 2 + width: 512 + depth: 4 + dilation_growth_rate: 3 + activation: relu + num_heads: 8 + kmeans_init: false + norm: None + calculate_per_head_perplexity: true + cond_fusion_last_layer: false + _target_: motionbricks.motion_backbone.models.pose_model.MotionModel + motion_rep: ??? + root_vqvae_network: null + pose_vqvae_motion_rep: local + denoiser: + backbone: + llm_shape: null + args: + min_tokens: 6 + max_tokens: 16 + down_t: 2 + vqvae_model_ckpt_path: out/motionbricks_vqvae/version_1/checkpoints/model-step=2000000.ckpt + pose_vqvae_motion_rep: ${model.pose_vqvae_motion_rep} + incorrect_token_ratio_min: 0.0 + incorrect_token_ratio_max: 1.0 + masked_token_ratio: 0.8 + batchsize_mul_factor: 2 + pose_root_mode: pose + local_pose_feature: joint_positions_and_rotations_and_hip_height + cond_root_feature: root_without_hip_height + cond_root_feature_is_from_motion_rep: global + max_num_start_keyframes: 4 + no_start_keyframe_prob: 0.0 + max_num_end_keyframes: 4 + no_end_keyframe_prob: 0.0 + max_num_middle_keyframes: 8 + no_middle_keyframe_prob: 0.5 + prob_provide_text_emb: 0.2 + keyframe_num_warmup_steps: 200000 + floor_estimation: min_joint_height_within_windows + floor_estimation_window_time: 1.0 + optimizer: + _target_: adam_atan2_pytorch.AdamAtan2 + _partial_: true + lr: 0.0001 + weight_decay: 0.0 + scheduler: + _target_: motionbricks.motionlib.train.scheduler.WarmupCosineScheduler + _partial_: true + num_warmup_steps: 10000 + num_training_steps: ${trainer.max_steps} + final_lr: 2.0e-06 + last_epoch: -1 + lt_kwargs: + interval: step + frequency: 1 +trainer: + _target_: pytorch_lightning.Trainer + precision: 32 + enable_progress_bar: false + profiler: null + check_val_every_n_epoch: null + detect_anomaly: false + num_sanity_val_steps: 0 + max_steps: 2000001 + gradient_clip_val: 0.5 + log_every_n_steps: 50 + val_check_interval: 50000 + devices: 8 + num_nodes: 4 + accelerator: gpu + strategy: ddp +loggers: + out_dir: ${out_dir} + cfg_id: ${id} + max_steps: ${trainer.max_steps} + log_nsteps: ${trainer.log_every_n_steps} + use_wandb: true + wandb_run: ${wandb_run} + wandb_group: null + wandb_project: motionbricks + wandb_entity: null + wandb_run_name: motionbricks_pose + logger_project: motionbricks +callbacks: + callback_dict: + checkpoint_epoch_cb: + _target_: motionbricks.motionlib.train.callbacks.ckpt.ReadPermissionModelCheckpoint + monitor: null + dirpath: out/motionbricks_pose/version_1/checkpoints + filename: model-{step:07d} + save_last: false + save_top_k: -1 + mode: min + every_n_train_steps: 50000 + learning_rate_monitor: + _target_: pytorch_lightning.callbacks.LearningRateMonitor + logging_interval: step + autoresume: + _target_: motionbricks.motionlib.train.callbacks.autoresume.AutoResumeCallback + autoresume_after: 1260000 + save_checkpoint_on_exception: true + pose_evaluate: + _target_: motionbricks.motion_backbone.callbacks.evaluation.PoseEvaluate + every_n_steps: 50001 + train_dataloader: ??? + val_dataloader: ??? + seed: 2333 + batch_size: 32 + max_num_data: 40000 + max_num_visualization: 32 + out_dir: ${run_dir}/vis + only_rank_zero: + - learning_rate_monitor + - pose_evaluate + need_version: [] + need_dataloaders: + - pose_evaluate + need_ema: [] + need_motionbricks_test: [] + need_log: + - pose_evaluate + need_autoresume: + - pose_evaluate + need_mask_cond_sampler: [] + need_one_logger_callback: + - autoresume +dataloader: + _target_: torch.utils.data.DataLoader + batch_size: 128 + num_workers: 11 + shuffle: ??? + persistent_workers: true + collate_fn: + _target_: motionbricks.motionlib.data.utils.collate_batch + _partial_: true + llm_shape: ${model.denoiser.backbone.llm_shape} + num_frames: null +data: + _target_: motionbricks.motionlib.data.motion_dataset.MotionDataset + name: motionbricks-G1 + folder: ../datasets/motionbricks-G1 + text_embeddings: null + split: ??? + motion_sampler: + _target_: motionbricks.motionlib.data.motion_sampler.MaxDurationRandomCrop + max_seconds: 30 + motion_loading_mode: memmap + use_natural_desc: true + use_short_desc: true + use_technical_desc: false + use_nv_overview_desc: false + nv_overview_prob: null + drop_text_prob: 0.1 + augment_text: false + aug_text_suffix: '' + aug_text_prob: 0.75 + aug_text_ind_range: + - 1 + - 61 + load_neutral_joints: false + timelines_mode: false + timelines_name: null + dataset_sampler: null + dataset_sampler_only_at_train: true + to_canonicalize: false + randomize_first_heading: true + loading_mode: motion_only +skeleton: + base_name: g1skel34 + folder: out/motionbricks_pose/version_1/skeleton + t_pose: capture + orig_prefix: '' + name: g1skel34 + _target_: motionbricks.motionlib.core.skeletons.g1.G1Skeleton34 +motion_rep: + name: ${skeleton.name}_dual_root_global_joints + stats: + _target_: motionbricks.motionlib.core.utils.stats.Stats + folder: out/motionbricks_pose/version_1/stats/motion + _target_: motionbricks.motionlib.core.motion_reps.dual_root_global_joints.GlobalRootGlobalJoints +fps: 30 +wandb_run: motionbricks_pose +resume: false +version: 1 +cp: last_epoch +matmul_precision: high +seed: 7 +id: ${hydra:runtime.choices.exp}_gpu${trainer.devices}_node${trainer.num_nodes} +out_dir: out/motionbricks_pose +run_dir: out/motionbricks_pose/version_1 +pure_testing: false +config_version: 4 +data_root: datasets +tmr_checkpoints_root: null +use_one_logger: false diff --git a/GR00T-WholeBodyControl/motionbricks/out/motionbricks_pose/version_1/hparams.yaml b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_pose/version_1/hparams.yaml new file mode 100644 index 0000000000000000000000000000000000000000..54883f3a0ffd54996314d0fa87d422747686f3ce --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_pose/version_1/hparams.yaml @@ -0,0 +1,245 @@ +model: + backbone_network: + _target_: motionbricks.motion_backbone.neural_modules.pose_backbone.pose_backbone_network + motion_rep: ??? + args: + pose_root_mode: ${model.args.pose_root_mode} + min_tokens: ${model.args.min_tokens} + max_tokens: ${model.args.max_tokens} + down_t: ${model.args.down_t} + pose_token_mlp_num_layers: 2 + root_feat_width: 256 + pose_feat_width: 640 + token_length_feat_width: 128 + text_emb_dim: 4096 + text_embeddings: ${data.text_embeddings} + local_pose_feature: ${model.args.local_pose_feature} + cond_root_feature: ${model.args.cond_root_feature} + cond_root_feature_is_from_motion_rep: ${model.args.cond_root_feature_is_from_motion_rep} + n_embd: 1024 + n_head: 16 + n_layers: 16 + pose_vqvae: + nb_code: ${model.pose_vqvae_network.nb_code} + code_dim: ${model.pose_vqvae_network.code_dim} + num_heads: ${model.pose_vqvae_network.num_heads} + has_codebook: ${oc.select:model.pose_vqvae_network.has_codebook,true} + root_vqvae: + nb_code: 1024 + code_dim: 60 + num_heads: 1 + pose_vqvae_network: + _target_: motionbricks.vqvae.neural_modules.vqvae.VQVAE + pose_root_mode: pose + motion_rep: ??? + encoder_state_dim: 241 + decoder_state_dim: 329 + decoder_target_cond_dim: 241 + decoder_external_cond_dim: 2 + feature_mode: + - joint_positions_and_rotations_and_hip_height + - pose + - joint_positions_and_rotations_and_hip_height + - root_without_hip_height_without_heading + quantizer_strategy: multihead_ema_reset + quantizer_mu: 0.99 + nb_code: 100000000 + code_dim: 256 + output_emb_width: 256 + down_t: 2 + stride_t: 2 + width: 512 + depth: 4 + dilation_growth_rate: 3 + activation: relu + num_heads: 8 + kmeans_init: false + norm: None + calculate_per_head_perplexity: true + cond_fusion_last_layer: false + _target_: motionbricks.motion_backbone.models.pose_model.MotionModel + motion_rep: ??? + root_vqvae_network: null + pose_vqvae_motion_rep: local + denoiser: + backbone: + llm_shape: null + args: + min_tokens: 6 + max_tokens: 16 + down_t: 2 + vqvae_model_ckpt_path: out/motionbricks_vqvae/version_1/checkpoints/model-step=2000000.ckpt + pose_vqvae_motion_rep: ${model.pose_vqvae_motion_rep} + incorrect_token_ratio_min: 0.0 + incorrect_token_ratio_max: 1.0 + masked_token_ratio: 0.8 + batchsize_mul_factor: 2 + pose_root_mode: pose + local_pose_feature: joint_positions_and_rotations_and_hip_height + cond_root_feature: root_without_hip_height + cond_root_feature_is_from_motion_rep: global + max_num_start_keyframes: 4 + no_start_keyframe_prob: 0.0 + max_num_end_keyframes: 4 + no_end_keyframe_prob: 0.0 + max_num_middle_keyframes: 8 + no_middle_keyframe_prob: 0.5 + prob_provide_text_emb: 0.2 + keyframe_num_warmup_steps: 200000 + floor_estimation: min_joint_height_within_windows + floor_estimation_window_time: 1.0 + optimizer: + _target_: adam_atan2_pytorch.AdamAtan2 + _partial_: true + lr: 0.0001 + weight_decay: 0.0 + scheduler: + _target_: motionbricks.motionlib.train.scheduler.WarmupCosineScheduler + _partial_: true + num_warmup_steps: 10000 + num_training_steps: ${trainer.max_steps} + final_lr: 2.0e-06 + last_epoch: -1 + lt_kwargs: + interval: step + frequency: 1 +trainer: + _target_: pytorch_lightning.Trainer + precision: 32 + enable_progress_bar: false + profiler: null + check_val_every_n_epoch: null + detect_anomaly: false + num_sanity_val_steps: 0 + max_steps: 2000001 + gradient_clip_val: 0.5 + log_every_n_steps: 50 + val_check_interval: 50000 + devices: 8 + num_nodes: 4 + accelerator: gpu + strategy: ddp +loggers: + out_dir: ${out_dir} + cfg_id: ${id} + max_steps: ${trainer.max_steps} + log_nsteps: ${trainer.log_every_n_steps} + use_wandb: true + wandb_run: ${wandb_run} + wandb_group: null + wandb_project: motionbricks + wandb_entity: null + wandb_run_name: motionbricks_pose + logger_project: motionbricks +callbacks: + callback_dict: + checkpoint_epoch_cb: + _target_: motionbricks.motionlib.train.callbacks.ckpt.ReadPermissionModelCheckpoint + monitor: null + dirpath: null + filename: model-{step:07d} + save_last: false + save_top_k: -1 + mode: min + every_n_train_steps: 50000 + learning_rate_monitor: + _target_: pytorch_lightning.callbacks.LearningRateMonitor + logging_interval: step + autoresume: + _target_: motionbricks.motionlib.train.callbacks.autoresume.AutoResumeCallback + autoresume_after: 1260000 + save_checkpoint_on_exception: true + pose_evaluate: + _target_: motionbricks.motion_backbone.callbacks.evaluation.PoseEvaluate + every_n_steps: 50001 + train_dataloader: ??? + val_dataloader: ??? + seed: 2333 + batch_size: 32 + max_num_data: 40000 + max_num_visualization: 32 + out_dir: ${run_dir}/vis + only_rank_zero: + - learning_rate_monitor + - pose_evaluate + need_version: [] + need_dataloaders: + - pose_evaluate + need_ema: [] + need_motionbricks_test: [] + need_log: + - pose_evaluate + need_autoresume: + - pose_evaluate + need_mask_cond_sampler: [] + need_one_logger_callback: + - autoresume +dataloader: + _target_: torch.utils.data.DataLoader + batch_size: 128 + num_workers: 11 + shuffle: ??? + persistent_workers: true + collate_fn: + _target_: motionbricks.motionlib.data.utils.collate_batch + _partial_: true + llm_shape: ${model.denoiser.backbone.llm_shape} + num_frames: null +data: + _target_: motionbricks.motionlib.data.motion_dataset.MotionDataset + name: motionbricks-G1 + folder: ../datasets/motionbricks-G1 + text_embeddings: null + split: ??? + motion_sampler: + _target_: motionbricks.motionlib.data.motion_sampler.MaxDurationRandomCrop + max_seconds: 30 + motion_loading_mode: memmap + use_natural_desc: true + use_short_desc: true + use_technical_desc: false + use_nv_overview_desc: false + nv_overview_prob: null + drop_text_prob: 0.1 + augment_text: false + aug_text_suffix: '' + aug_text_prob: 0.75 + aug_text_ind_range: + - 1 + - 61 + load_neutral_joints: false + timelines_mode: false + timelines_name: null + dataset_sampler: null + dataset_sampler_only_at_train: true + to_canonicalize: false + randomize_first_heading: true + loading_mode: motion_only +skeleton: + base_name: g1skel34 + folder: out/motionbricks_pose/version_1/skeleton + t_pose: capture + orig_prefix: '' + name: g1skel34 + _target_: motionbricks.motionlib.core.skeletons.g1.G1Skeleton34 +motion_rep: + name: ${skeleton.name}_dual_root_global_joints + stats: + _target_: motionbricks.motionlib.core.utils.stats.Stats + folder: out/motionbricks_pose/version_1/stats/motion + _target_: motionbricks.motionlib.core.motion_reps.dual_root_global_joints.GlobalRootGlobalJoints +fps: 30 +wandb_run: motionbricks_pose +resume: false +version: 1 +cp: last_epoch +matmul_precision: high +seed: 7 +id: ${hydra:runtime.choices.exp}_gpu${trainer.devices}_node${trainer.num_nodes} +out_dir: out/motionbricks_pose +run_dir: ??? +pure_testing: false +config_version: 4 +data_root: datasets +tmr_checkpoints_root: null +use_one_logger: false diff --git a/GR00T-WholeBodyControl/motionbricks/out/motionbricks_pose/version_1/meta.yaml b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_pose/version_1/meta.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ea3333db676ec38db1cd034e4fed9b5c5ce32b36 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_pose/version_1/meta.yaml @@ -0,0 +1 @@ +wandb_run: motionbricks_pose diff --git a/GR00T-WholeBodyControl/motionbricks/out/motionbricks_pose/version_1/skeleton/joints.p b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_pose/version_1/skeleton/joints.p new file mode 100644 index 0000000000000000000000000000000000000000..ed7b5816c26b8c72b6f4afd95a1504844a84a90f Binary files /dev/null and b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_pose/version_1/skeleton/joints.p differ diff --git a/GR00T-WholeBodyControl/motionbricks/out/motionbricks_pose/version_1/skeleton/parents.p b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_pose/version_1/skeleton/parents.p new file mode 100644 index 0000000000000000000000000000000000000000..10d16e22d12d42868d6a9e650fc3ab536d5b4974 Binary files /dev/null and b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_pose/version_1/skeleton/parents.p differ diff --git a/GR00T-WholeBodyControl/motionbricks/out/motionbricks_pose/version_1/skeleton/skeleton.yaml b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_pose/version_1/skeleton/skeleton.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2600b68ec94feb9e2c643656e864ab8a2bba7941 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_pose/version_1/skeleton/skeleton.yaml @@ -0,0 +1,6 @@ +base_name: g1skel34 +folder: ${data.folder}/features/motion_rep/${motion_rep.name}_fps_${fps}/skeleton +t_pose: capture +orig_prefix: '' +name: g1skel34 +_target_: motionbricks.motionlib.core.skeletons.g1.G1Skeleton34 diff --git a/GR00T-WholeBodyControl/motionbricks/out/motionbricks_root/version_1/config.yaml b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_root/version_1/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3fb00ca3ff1b2df86427d4879fb4d4170bc54a5f --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_root/version_1/config.yaml @@ -0,0 +1,223 @@ +model: + backbone_network: + _target_: motionbricks.motion_backbone.neural_modules.root_backbone.root_backbone_network + motion_rep: ??? + args: + min_tokens: ${model.args.min_tokens} + max_tokens: ${model.args.max_tokens} + down_t: ${model.args.down_t} + use_hard_num_token_emb_for_root_prediction: ${model.args.use_hard_num_token_emb_for_root_prediction} + local_root_feature: ${model.args.local_root_feature} + global_root_feature: ${model.args.global_root_feature} + local_pose_feature: ${model.args.local_pose_feature} + pose_feat_dim: 256 + local_root_feat_dim: 64 + global_root_feat_dim: 64 + text_emb_dim: 4096 + text_embeddings: ${data.text_embeddings} + input_feat_mlp_num_layers: 2 + n_embd: 512 + n_head: 16 + n_layers_shared: 3 + n_layers_root_token: 3 + width: 512 + depth: 4 + dilation_growth_rate: 3 + activation: relu + norm: None + pose_vqvae: + nb_code: 1024 + code_dim: 60 + num_heads: 1 + root_vqvae: + nb_code: 1024 + code_dim: 60 + num_heads: 1 + _target_: motionbricks.motion_backbone.models.root_model.MotionModel + motion_rep: ??? + root_vqvae_network: null + pose_vqvae_network: null + denoiser: + backbone: + llm_shape: null + args: + pose_root_mode: root + local_pose_feature: joint_positions_and_rotations_and_hip_height + local_root_feature: root + global_root_feature: root + min_tokens: 6 + max_tokens: 16 + use_hard_num_token_emb_for_root_prediction: true + min_off_target_tokens_to_sample: 25 + max_off_target_tokens_to_sample: 40 + prob_off_range_target_token: 0.0 + prob_provide_num_tokens: 0.0 + down_t: 2 + vqvae_model_ckpt_path: null + batchsize_mul_factor: 2 + max_num_start_keyframes: 4 + no_start_keyframe_prob: 0.0 + max_num_end_keyframes: 4 + no_end_keyframe_prob: 0.0 + prob_provide_text_emb: 0.0 + num_token_loss_coeff: 1.0 + global_root_loss_coeff: 2.0 + local_root_loss_coeff: 1.0 + keyframe_num_warmup_steps: 200000 + floor_estimation: min_joint_height_within_windows + floor_estimation_window_time: 1.0 + optimizer: + _target_: adam_atan2_pytorch.AdamAtan2 + _partial_: true + lr: 0.0001 + weight_decay: 0.0 + scheduler: + _target_: motionbricks.motionlib.train.scheduler.WarmupCosineScheduler + _partial_: true + num_warmup_steps: 10000 + num_training_steps: ${trainer.max_steps} + final_lr: 2.0e-06 + last_epoch: -1 + lt_kwargs: + interval: step + frequency: 1 +trainer: + _target_: pytorch_lightning.Trainer + precision: 32 + enable_progress_bar: false + profiler: null + check_val_every_n_epoch: null + detect_anomaly: false + num_sanity_val_steps: 0 + max_steps: 2000001 + gradient_clip_val: 0.5 + log_every_n_steps: 50 + val_check_interval: 50000 + devices: 8 + num_nodes: 2 + accelerator: gpu + strategy: ddp +loggers: + out_dir: ${out_dir} + cfg_id: ${id} + max_steps: ${trainer.max_steps} + log_nsteps: ${trainer.log_every_n_steps} + use_wandb: true + wandb_run: ${wandb_run} + wandb_group: null + wandb_project: motionbricks + wandb_entity: null + wandb_run_name: motionbricks_root + logger_project: motionbricks +callbacks: + callback_dict: + checkpoint_epoch_cb: + _target_: motionbricks.motionlib.train.callbacks.ckpt.ReadPermissionModelCheckpoint + monitor: null + dirpath: out/motionbricks_root/version_1/checkpoints + filename: model-{step:07d} + save_last: false + save_top_k: -1 + mode: min + every_n_train_steps: 50000 + learning_rate_monitor: + _target_: pytorch_lightning.callbacks.LearningRateMonitor + logging_interval: step + autoresume: + _target_: motionbricks.motionlib.train.callbacks.autoresume.AutoResumeCallback + autoresume_after: 1260000 + save_checkpoint_on_exception: true + pose_evaluate: + _target_: motionbricks.motion_backbone.callbacks.evaluation.PoseEvaluate + every_n_steps: 50001 + train_dataloader: ??? + val_dataloader: ??? + seed: 2333 + batch_size: 32 + max_num_data: 40000 + max_num_visualization: 32 + out_dir: ${run_dir}/vis + only_rank_zero: + - learning_rate_monitor + - pose_evaluate + need_version: [] + need_dataloaders: + - pose_evaluate + need_ema: [] + need_motionbricks_test: [] + need_log: + - pose_evaluate + need_autoresume: + - pose_evaluate + need_mask_cond_sampler: [] + need_one_logger_callback: + - autoresume +dataloader: + _target_: torch.utils.data.DataLoader + batch_size: 128 + num_workers: 11 + shuffle: ??? + persistent_workers: true + collate_fn: + _target_: motionbricks.motionlib.data.utils.collate_batch + _partial_: true + llm_shape: ${model.denoiser.backbone.llm_shape} + num_frames: null +data: + _target_: motionbricks.motionlib.data.motion_dataset.MotionDataset + name: motionbricks-G1 + folder: ../datasets/motionbricks-G1 + text_embeddings: null + split: ??? + motion_sampler: + _target_: motionbricks.motionlib.data.motion_sampler.MaxDurationRandomCrop + max_seconds: 30 + motion_loading_mode: memmap + use_natural_desc: true + use_short_desc: true + use_technical_desc: false + use_nv_overview_desc: false + nv_overview_prob: null + drop_text_prob: 0.1 + augment_text: false + aug_text_suffix: '' + aug_text_prob: 0.75 + aug_text_ind_range: + - 1 + - 61 + load_neutral_joints: false + timelines_mode: false + timelines_name: null + dataset_sampler: null + dataset_sampler_only_at_train: true + to_canonicalize: false + randomize_first_heading: true + loading_mode: motion_only +skeleton: + base_name: g1skel34 + folder: out/motionbricks_root/version_1/skeleton + t_pose: capture + orig_prefix: '' + name: g1skel34 + _target_: motionbricks.motionlib.core.skeletons.g1.G1Skeleton34 +motion_rep: + name: ${skeleton.name}_dual_root_global_joints + stats: + _target_: motionbricks.motionlib.core.utils.stats.Stats + folder: out/motionbricks_root/version_1/stats/motion + _target_: motionbricks.motionlib.core.motion_reps.dual_root_global_joints.GlobalRootGlobalJoints +fps: 30 +wandb_run: motionbricks_root +resume: false +version: 1 +cp: last_epoch +matmul_precision: high +seed: 7 +id: ${hydra:runtime.choices.exp}_gpu${trainer.devices}_node${trainer.num_nodes} +out_dir: out/motionbricks_root +run_dir: out/motionbricks_root/version_1 +pure_testing: false +config_version: 4 +data_root: datasets +tmr_checkpoints_root: null +use_one_logger: false diff --git a/GR00T-WholeBodyControl/motionbricks/out/motionbricks_root/version_1/hparams.yaml b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_root/version_1/hparams.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e247ba7b4e854d0aff6c5ab259264d30b1d787e4 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_root/version_1/hparams.yaml @@ -0,0 +1,223 @@ +model: + backbone_network: + _target_: motionbricks.motion_backbone.neural_modules.root_backbone.root_backbone_network + motion_rep: ??? + args: + min_tokens: ${model.args.min_tokens} + max_tokens: ${model.args.max_tokens} + down_t: ${model.args.down_t} + use_hard_num_token_emb_for_root_prediction: ${model.args.use_hard_num_token_emb_for_root_prediction} + local_root_feature: ${model.args.local_root_feature} + global_root_feature: ${model.args.global_root_feature} + local_pose_feature: ${model.args.local_pose_feature} + pose_feat_dim: 256 + local_root_feat_dim: 64 + global_root_feat_dim: 64 + text_emb_dim: 4096 + text_embeddings: ${data.text_embeddings} + input_feat_mlp_num_layers: 2 + n_embd: 512 + n_head: 16 + n_layers_shared: 3 + n_layers_root_token: 3 + width: 512 + depth: 4 + dilation_growth_rate: 3 + activation: relu + norm: None + pose_vqvae: + nb_code: 1024 + code_dim: 60 + num_heads: 1 + root_vqvae: + nb_code: 1024 + code_dim: 60 + num_heads: 1 + _target_: motionbricks.motion_backbone.models.root_model.MotionModel + motion_rep: ??? + root_vqvae_network: null + pose_vqvae_network: null + denoiser: + backbone: + llm_shape: null + args: + pose_root_mode: root + local_pose_feature: joint_positions_and_rotations_and_hip_height + local_root_feature: root + global_root_feature: root + min_tokens: 6 + max_tokens: 16 + use_hard_num_token_emb_for_root_prediction: true + min_off_target_tokens_to_sample: 25 + max_off_target_tokens_to_sample: 40 + prob_off_range_target_token: 0.0 + prob_provide_num_tokens: 0.0 + down_t: 2 + vqvae_model_ckpt_path: null + batchsize_mul_factor: 2 + max_num_start_keyframes: 4 + no_start_keyframe_prob: 0.0 + max_num_end_keyframes: 4 + no_end_keyframe_prob: 0.0 + prob_provide_text_emb: 0.0 + num_token_loss_coeff: 1.0 + global_root_loss_coeff: 2.0 + local_root_loss_coeff: 1.0 + keyframe_num_warmup_steps: 200000 + floor_estimation: min_joint_height_within_windows + floor_estimation_window_time: 1.0 + optimizer: + _target_: adam_atan2_pytorch.AdamAtan2 + _partial_: true + lr: 0.0001 + weight_decay: 0.0 + scheduler: + _target_: motionbricks.motionlib.train.scheduler.WarmupCosineScheduler + _partial_: true + num_warmup_steps: 10000 + num_training_steps: ${trainer.max_steps} + final_lr: 2.0e-06 + last_epoch: -1 + lt_kwargs: + interval: step + frequency: 1 +trainer: + _target_: pytorch_lightning.Trainer + precision: 32 + enable_progress_bar: false + profiler: null + check_val_every_n_epoch: null + detect_anomaly: false + num_sanity_val_steps: 0 + max_steps: 2000001 + gradient_clip_val: 0.5 + log_every_n_steps: 50 + val_check_interval: 50000 + devices: 8 + num_nodes: 2 + accelerator: gpu + strategy: ddp +loggers: + out_dir: ${out_dir} + cfg_id: ${id} + max_steps: ${trainer.max_steps} + log_nsteps: ${trainer.log_every_n_steps} + use_wandb: true + wandb_run: ${wandb_run} + wandb_group: null + wandb_project: motionbricks + wandb_entity: null + wandb_run_name: motionbricks_root + logger_project: motionbricks +callbacks: + callback_dict: + checkpoint_epoch_cb: + _target_: motionbricks.motionlib.train.callbacks.ckpt.ReadPermissionModelCheckpoint + monitor: null + dirpath: null + filename: model-{step:07d} + save_last: false + save_top_k: -1 + mode: min + every_n_train_steps: 50000 + learning_rate_monitor: + _target_: pytorch_lightning.callbacks.LearningRateMonitor + logging_interval: step + autoresume: + _target_: motionbricks.motionlib.train.callbacks.autoresume.AutoResumeCallback + autoresume_after: 1260000 + save_checkpoint_on_exception: true + pose_evaluate: + _target_: motionbricks.motion_backbone.callbacks.evaluation.PoseEvaluate + every_n_steps: 50001 + train_dataloader: ??? + val_dataloader: ??? + seed: 2333 + batch_size: 32 + max_num_data: 40000 + max_num_visualization: 32 + out_dir: ${run_dir}/vis + only_rank_zero: + - learning_rate_monitor + - pose_evaluate + need_version: [] + need_dataloaders: + - pose_evaluate + need_ema: [] + need_motionbricks_test: [] + need_log: + - pose_evaluate + need_autoresume: + - pose_evaluate + need_mask_cond_sampler: [] + need_one_logger_callback: + - autoresume +dataloader: + _target_: torch.utils.data.DataLoader + batch_size: 128 + num_workers: 11 + shuffle: ??? + persistent_workers: true + collate_fn: + _target_: motionbricks.motionlib.data.utils.collate_batch + _partial_: true + llm_shape: ${model.denoiser.backbone.llm_shape} + num_frames: null +data: + _target_: motionbricks.motionlib.data.motion_dataset.MotionDataset + name: motionbricks-G1 + folder: ../datasets/motionbricks-G1 + text_embeddings: null + split: ??? + motion_sampler: + _target_: motionbricks.motionlib.data.motion_sampler.MaxDurationRandomCrop + max_seconds: 30 + motion_loading_mode: memmap + use_natural_desc: true + use_short_desc: true + use_technical_desc: false + use_nv_overview_desc: false + nv_overview_prob: null + drop_text_prob: 0.1 + augment_text: false + aug_text_suffix: '' + aug_text_prob: 0.75 + aug_text_ind_range: + - 1 + - 61 + load_neutral_joints: false + timelines_mode: false + timelines_name: null + dataset_sampler: null + dataset_sampler_only_at_train: true + to_canonicalize: false + randomize_first_heading: true + loading_mode: motion_only +skeleton: + base_name: g1skel34 + folder: out/motionbricks_root/version_1/skeleton + t_pose: capture + orig_prefix: '' + name: g1skel34 + _target_: motionbricks.motionlib.core.skeletons.g1.G1Skeleton34 +motion_rep: + name: ${skeleton.name}_dual_root_global_joints + stats: + _target_: motionbricks.motionlib.core.utils.stats.Stats + folder: out/motionbricks_root/version_1/stats/motion + _target_: motionbricks.motionlib.core.motion_reps.dual_root_global_joints.GlobalRootGlobalJoints +fps: 30 +wandb_run: motionbricks_root +resume: false +version: 1 +cp: last_epoch +matmul_precision: high +seed: 7 +id: ${hydra:runtime.choices.exp}_gpu${trainer.devices}_node${trainer.num_nodes} +out_dir: out/motionbricks_root +run_dir: ??? +pure_testing: false +config_version: 4 +data_root: datasets +tmr_checkpoints_root: null +use_one_logger: false diff --git a/GR00T-WholeBodyControl/motionbricks/out/motionbricks_root/version_1/meta.yaml b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_root/version_1/meta.yaml new file mode 100644 index 0000000000000000000000000000000000000000..971f0d8e08ce9eb4479d1fd8e19bee2395f49951 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_root/version_1/meta.yaml @@ -0,0 +1 @@ +wandb_run: motionbricks_root diff --git a/GR00T-WholeBodyControl/motionbricks/out/motionbricks_root/version_1/skeleton/joints.p b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_root/version_1/skeleton/joints.p new file mode 100644 index 0000000000000000000000000000000000000000..ed7b5816c26b8c72b6f4afd95a1504844a84a90f Binary files /dev/null and b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_root/version_1/skeleton/joints.p differ diff --git a/GR00T-WholeBodyControl/motionbricks/out/motionbricks_root/version_1/skeleton/parents.p b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_root/version_1/skeleton/parents.p new file mode 100644 index 0000000000000000000000000000000000000000..10d16e22d12d42868d6a9e650fc3ab536d5b4974 Binary files /dev/null and b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_root/version_1/skeleton/parents.p differ diff --git a/GR00T-WholeBodyControl/motionbricks/out/motionbricks_root/version_1/skeleton/skeleton.yaml b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_root/version_1/skeleton/skeleton.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2600b68ec94feb9e2c643656e864ab8a2bba7941 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_root/version_1/skeleton/skeleton.yaml @@ -0,0 +1,6 @@ +base_name: g1skel34 +folder: ${data.folder}/features/motion_rep/${motion_rep.name}_fps_${fps}/skeleton +t_pose: capture +orig_prefix: '' +name: g1skel34 +_target_: motionbricks.motionlib.core.skeletons.g1.G1Skeleton34 diff --git a/GR00T-WholeBodyControl/motionbricks/out/motionbricks_vqvae/version_1/config.yaml b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_vqvae/version_1/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4edd11069c35c2ae1d28a7062fa4133b18c6b139 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_vqvae/version_1/config.yaml @@ -0,0 +1,228 @@ +model: + pose_vqvae_network: + _target_: motionbricks.vqvae.neural_modules.vqvae.VQVAE + pose_root_mode: pose + motion_rep: ??? + encoder_state_dim: 241 + decoder_state_dim: 329 + decoder_target_cond_dim: 241 + decoder_external_cond_dim: 2 + feature_mode: + - joint_positions_and_rotations_and_hip_height + - pose + - joint_positions_and_rotations_and_hip_height + - root_without_hip_height_without_heading + quantizer_strategy: multihead_ema_reset + quantizer_mu: 0.99 + nb_code: 100000000 + code_dim: 256 + output_emb_width: 256 + down_t: 2 + stride_t: 2 + width: 512 + depth: 4 + dilation_growth_rate: 3 + activation: relu + num_heads: 8 + kmeans_init: false + norm: None + calculate_per_head_perplexity: true + cond_fusion_last_layer: false + _target_: motionbricks.vqvae.models.motion_vqvae.MotionVQVAEModel + motion_rep: ??? + pose_vqvae_motion_rep: local + root_vqvae_network: null + denoiser: + backbone: + llm_shape: null + args: + min_tokens: 6 + max_tokens: 16 + down_t: 2 + commit_loss_coeff: 0.02 + batchsize_mul_factor: 2 + root_vqvae_max_num_keyframes: 5 + root_vqvae_no_keyframe_prob: 0.25 + pose_vqvae_max_num_keyframes: 10 + pose_vqvae_no_keyframe_prob: 0.25 + keyframe_num_warmup_steps: 200000 + global_root_loss_coeff: 0.5 + local_root_loss_coeff: 0.5 + max_angle_diff: 5.0 + max_norm_ratio: 0.2 + percentage_of_perturbed_samples: 0.2 + floor_estimation: min_joint_height_within_windows + floor_estimation_window_time: 1.0 + skate_contact_loss_coeff: 0.01 + joint_vel_loss_coeff: 2.0 + optimizer: + _target_: adam_atan2_pytorch.AdamAtan2 + _partial_: true + lr: 0.0002 + weight_decay: 0.0 + scheduler: + _target_: motionbricks.motionlib.train.scheduler.WarmupCosineScheduler + _partial_: true + num_warmup_steps: 10000 + num_training_steps: ${trainer.max_steps} + final_lr: 4.0e-06 + last_epoch: -1 + lt_kwargs: + interval: step + frequency: 1 +trainer: + _target_: pytorch_lightning.Trainer + precision: 32 + enable_progress_bar: false + profiler: null + check_val_every_n_epoch: null + detect_anomaly: false + num_sanity_val_steps: 0 + max_steps: 2000001 + gradient_clip_val: 0.5 + log_every_n_steps: 50 + val_check_interval: 50000 + devices: 8 + num_nodes: 4 + accelerator: gpu + strategy: ddp +loggers: + out_dir: ${out_dir} + cfg_id: ${id} + max_steps: ${trainer.max_steps} + log_nsteps: ${trainer.log_every_n_steps} + use_wandb: true + wandb_run: ${wandb_run} + wandb_group: null + wandb_project: motionbricks + wandb_entity: null + wandb_run_name: motionbricks_vqvae + logger_project: motionbricks +callbacks: + callback_dict: + checkpoint_epoch_cb: + _target_: motionbricks.motionlib.train.callbacks.ckpt.ReadPermissionModelCheckpoint + monitor: null + dirpath: out/motionbricks_vqvae/version_1/checkpoints + filename: model-{step:07d} + save_last: false + save_top_k: -1 + mode: min + every_n_train_steps: 50000 + learning_rate_monitor: + _target_: pytorch_lightning.callbacks.LearningRateMonitor + logging_interval: step + autoresume: + _target_: motionbricks.motionlib.train.callbacks.autoresume.AutoResumeCallback + autoresume_after: 1260000 + save_checkpoint_on_exception: true + eval_visualize: + _target_: motionbricks.vqvae.callbacks.evaluation.VQVAE_Evaluate + every_n_steps: 50001 + train_dataloader: ??? + val_dataloader: ??? + seed: 2333 + batch_size: 32 + max_num_data: 40000 + max_num_visualization: 32 + out_dir: ${run_dir}/vis + metrics: + - _target_: motionbricks.eval.metrics.FootSkateFromHeight + - _target_: motionbricks.eval.metrics.FootSkateFromContacts + - _target_: motionbricks.eval.metrics.JointPosConsistency + train_end: + _target_: motionbricks.motionlib.train.callbacks.train_end.TrainEndCallback + only_rank_zero: + - eval_visualize + - learning_rate_monitor + - evaluate + - train_end + need_version: [] + need_dataloaders: + - eval_visualize + - evaluate + need_ema: [] + need_motionbricks_test: [] + need_log: + - eval_visualize + - evaluate + need_autoresume: [] + need_mask_cond_sampler: [] + need_one_logger_callback: + - autoresume +dataloader: + _target_: torch.utils.data.DataLoader + batch_size: 128 + num_workers: 11 + shuffle: ??? + persistent_workers: true + collate_fn: + _target_: motionbricks.motionlib.data.utils.collate_batch + _partial_: true + llm_shape: ${model.denoiser.backbone.llm_shape} + num_frames: null +data: + _target_: motionbricks.motionlib.data.motion_dataset.MotionDataset + name: motionbricks-G1 + folder: ../datasets/motionbricks-G1 + text_embeddings: null + split: ??? + motion_sampler: + _target_: motionbricks.motionlib.data.motion_sampler.MaxDurationRandomCrop + max_seconds: 30 + motion_loading_mode: memmap + use_natural_desc: true + use_short_desc: true + use_technical_desc: false + use_nv_overview_desc: false + nv_overview_prob: null + drop_text_prob: 0.1 + augment_text: false + aug_text_suffix: '' + aug_text_prob: 0.75 + aug_text_ind_range: + - 1 + - 61 + load_neutral_joints: false + timelines_mode: false + timelines_name: null + dataset_sampler: null + dataset_sampler_only_at_train: true + to_canonicalize: false + randomize_first_heading: true + loading_mode: motion_only +skeleton: + base_name: g1skel34 + folder: out/motionbricks_vqvae/version_1/skeleton + t_pose: capture + orig_prefix: '' + name: g1skel34 + _target_: motionbricks.motionlib.core.skeletons.g1.G1Skeleton34 +motion_rep: + name: ${skeleton.name}_dual_root_global_joints + stats: + _target_: motionbricks.motionlib.core.utils.stats.Stats + folder: out/motionbricks_vqvae/version_1/stats/motion + _target_: motionbricks.motionlib.core.motion_reps.dual_root_global_joints.GlobalRootGlobalJoints +fps: 30 +wandb_run: motionbricks_vqvae +resume: false +version: 1 +cp: last_epoch +matmul_precision: high +seed: 7 +id: ${hydra:runtime.choices.exp}_gpu${trainer.devices}_node${trainer.num_nodes} +out_dir: out/motionbricks_vqvae +run_dir: out/motionbricks_vqvae/version_1 +pure_testing: false +test: + unlimit_max_code: false + max_num_data: 16 + min_length: 10 + max_length: 60 + ckpt_dir: null + ckpt_name: null +config_version: 4 +data_root: datasets +tmr_checkpoints_root: null +use_one_logger: false diff --git a/GR00T-WholeBodyControl/motionbricks/out/motionbricks_vqvae/version_1/hparams.yaml b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_vqvae/version_1/hparams.yaml new file mode 100644 index 0000000000000000000000000000000000000000..060c8027aebed3ed52de0ffa3fb569a488e953f3 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_vqvae/version_1/hparams.yaml @@ -0,0 +1,228 @@ +model: + pose_vqvae_network: + _target_: motionbricks.vqvae.neural_modules.vqvae.VQVAE + pose_root_mode: pose + motion_rep: ??? + encoder_state_dim: 241 + decoder_state_dim: 329 + decoder_target_cond_dim: 241 + decoder_external_cond_dim: 2 + feature_mode: + - joint_positions_and_rotations_and_hip_height + - pose + - joint_positions_and_rotations_and_hip_height + - root_without_hip_height_without_heading + quantizer_strategy: multihead_ema_reset + quantizer_mu: 0.99 + nb_code: 100000000 + code_dim: 256 + output_emb_width: 256 + down_t: 2 + stride_t: 2 + width: 512 + depth: 4 + dilation_growth_rate: 3 + activation: relu + num_heads: 8 + kmeans_init: false + norm: None + calculate_per_head_perplexity: true + cond_fusion_last_layer: false + _target_: motionbricks.vqvae.models.motion_vqvae.MotionVQVAEModel + motion_rep: ??? + pose_vqvae_motion_rep: local + root_vqvae_network: null + denoiser: + backbone: + llm_shape: null + args: + min_tokens: 6 + max_tokens: 16 + down_t: 2 + commit_loss_coeff: 0.02 + batchsize_mul_factor: 2 + root_vqvae_max_num_keyframes: 5 + root_vqvae_no_keyframe_prob: 0.25 + pose_vqvae_max_num_keyframes: 10 + pose_vqvae_no_keyframe_prob: 0.25 + keyframe_num_warmup_steps: 200000 + global_root_loss_coeff: 0.5 + local_root_loss_coeff: 0.5 + max_angle_diff: 5.0 + max_norm_ratio: 0.2 + percentage_of_perturbed_samples: 0.2 + floor_estimation: min_joint_height_within_windows + floor_estimation_window_time: 1.0 + skate_contact_loss_coeff: 0.01 + joint_vel_loss_coeff: 2.0 + optimizer: + _target_: adam_atan2_pytorch.AdamAtan2 + _partial_: true + lr: 0.0002 + weight_decay: 0.0 + scheduler: + _target_: motionbricks.motionlib.train.scheduler.WarmupCosineScheduler + _partial_: true + num_warmup_steps: 10000 + num_training_steps: ${trainer.max_steps} + final_lr: 4.0e-06 + last_epoch: -1 + lt_kwargs: + interval: step + frequency: 1 +trainer: + _target_: pytorch_lightning.Trainer + precision: 32 + enable_progress_bar: false + profiler: null + check_val_every_n_epoch: null + detect_anomaly: false + num_sanity_val_steps: 0 + max_steps: 2000001 + gradient_clip_val: 0.5 + log_every_n_steps: 50 + val_check_interval: 50000 + devices: 8 + num_nodes: 4 + accelerator: gpu + strategy: ddp +loggers: + out_dir: ${out_dir} + cfg_id: ${id} + max_steps: ${trainer.max_steps} + log_nsteps: ${trainer.log_every_n_steps} + use_wandb: true + wandb_run: ${wandb_run} + wandb_group: null + wandb_project: motionbricks + wandb_entity: null + wandb_run_name: motionbricks_vqvae + logger_project: motionbricks +callbacks: + callback_dict: + checkpoint_epoch_cb: + _target_: motionbricks.motionlib.train.callbacks.ckpt.ReadPermissionModelCheckpoint + monitor: null + dirpath: null + filename: model-{step:07d} + save_last: false + save_top_k: -1 + mode: min + every_n_train_steps: 50000 + learning_rate_monitor: + _target_: pytorch_lightning.callbacks.LearningRateMonitor + logging_interval: step + autoresume: + _target_: motionbricks.motionlib.train.callbacks.autoresume.AutoResumeCallback + autoresume_after: 1260000 + save_checkpoint_on_exception: true + eval_visualize: + _target_: motionbricks.vqvae.callbacks.evaluation.VQVAE_Evaluate + every_n_steps: 50001 + train_dataloader: ??? + val_dataloader: ??? + seed: 2333 + batch_size: 32 + max_num_data: 40000 + max_num_visualization: 32 + out_dir: ${run_dir}/vis + metrics: + - _target_: motionbricks.eval.metrics.FootSkateFromHeight + - _target_: motionbricks.eval.metrics.FootSkateFromContacts + - _target_: motionbricks.eval.metrics.JointPosConsistency + train_end: + _target_: motionbricks.motionlib.train.callbacks.train_end.TrainEndCallback + only_rank_zero: + - eval_visualize + - learning_rate_monitor + - evaluate + - train_end + need_version: [] + need_dataloaders: + - eval_visualize + - evaluate + need_ema: [] + need_motionbricks_test: [] + need_log: + - eval_visualize + - evaluate + need_autoresume: [] + need_mask_cond_sampler: [] + need_one_logger_callback: + - autoresume +dataloader: + _target_: torch.utils.data.DataLoader + batch_size: 128 + num_workers: 11 + shuffle: ??? + persistent_workers: true + collate_fn: + _target_: motionbricks.motionlib.data.utils.collate_batch + _partial_: true + llm_shape: ${model.denoiser.backbone.llm_shape} + num_frames: null +data: + _target_: motionbricks.motionlib.data.motion_dataset.MotionDataset + name: motionbricks-G1 + folder: ../datasets/motionbricks-G1 + text_embeddings: null + split: ??? + motion_sampler: + _target_: motionbricks.motionlib.data.motion_sampler.MaxDurationRandomCrop + max_seconds: 30 + motion_loading_mode: memmap + use_natural_desc: true + use_short_desc: true + use_technical_desc: false + use_nv_overview_desc: false + nv_overview_prob: null + drop_text_prob: 0.1 + augment_text: false + aug_text_suffix: '' + aug_text_prob: 0.75 + aug_text_ind_range: + - 1 + - 61 + load_neutral_joints: false + timelines_mode: false + timelines_name: null + dataset_sampler: null + dataset_sampler_only_at_train: true + to_canonicalize: false + randomize_first_heading: true + loading_mode: motion_only +skeleton: + base_name: g1skel34 + folder: out/motionbricks_vqvae/version_1/skeleton + t_pose: capture + orig_prefix: '' + name: g1skel34 + _target_: motionbricks.motionlib.core.skeletons.g1.G1Skeleton34 +motion_rep: + name: ${skeleton.name}_dual_root_global_joints + stats: + _target_: motionbricks.motionlib.core.utils.stats.Stats + folder: out/motionbricks_vqvae/version_1/stats/motion + _target_: motionbricks.motionlib.core.motion_reps.dual_root_global_joints.GlobalRootGlobalJoints +fps: 30 +wandb_run: motionbricks_vqvae +resume: false +version: 1 +cp: last_epoch +matmul_precision: high +seed: 7 +id: ${hydra:runtime.choices.exp}_gpu${trainer.devices}_node${trainer.num_nodes} +out_dir: out/motionbricks_vqvae +run_dir: ??? +pure_testing: false +test: + unlimit_max_code: false + max_num_data: 16 + min_length: 10 + max_length: 60 + ckpt_dir: null + ckpt_name: null +config_version: 4 +data_root: datasets +tmr_checkpoints_root: null +use_one_logger: false diff --git a/GR00T-WholeBodyControl/motionbricks/out/motionbricks_vqvae/version_1/meta.yaml b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_vqvae/version_1/meta.yaml new file mode 100644 index 0000000000000000000000000000000000000000..327cee4a946882f44127bb8bfb72136bbd63e9ab --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_vqvae/version_1/meta.yaml @@ -0,0 +1 @@ +wandb_run: motionbricks_vqvae diff --git a/GR00T-WholeBodyControl/motionbricks/out/motionbricks_vqvae/version_1/skeleton/joints.p b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_vqvae/version_1/skeleton/joints.p new file mode 100644 index 0000000000000000000000000000000000000000..ed7b5816c26b8c72b6f4afd95a1504844a84a90f Binary files /dev/null and b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_vqvae/version_1/skeleton/joints.p differ diff --git a/GR00T-WholeBodyControl/motionbricks/out/motionbricks_vqvae/version_1/skeleton/parents.p b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_vqvae/version_1/skeleton/parents.p new file mode 100644 index 0000000000000000000000000000000000000000..10d16e22d12d42868d6a9e650fc3ab536d5b4974 Binary files /dev/null and b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_vqvae/version_1/skeleton/parents.p differ diff --git a/GR00T-WholeBodyControl/motionbricks/out/motionbricks_vqvae/version_1/skeleton/skeleton.yaml b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_vqvae/version_1/skeleton/skeleton.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2600b68ec94feb9e2c643656e864ab8a2bba7941 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/out/motionbricks_vqvae/version_1/skeleton/skeleton.yaml @@ -0,0 +1,6 @@ +base_name: g1skel34 +folder: ${data.folder}/features/motion_rep/${motion_rep.name}_fps_${fps}/skeleton +t_pose: capture +orig_prefix: '' +name: g1skel34 +_target_: motionbricks.motionlib.core.skeletons.g1.G1Skeleton34 diff --git a/GR00T-WholeBodyControl/motionbricks/scripts/interactive_demo_g1.py b/GR00T-WholeBodyControl/motionbricks/scripts/interactive_demo_g1.py new file mode 100644 index 0000000000000000000000000000000000000000..410992756a7aca4988ed2bb9e270e70e455e4eeb --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/scripts/interactive_demo_g1.py @@ -0,0 +1,173 @@ +import argparse +import torch as t +import time +import platform + +import mujoco +import mujoco.viewer +import numpy as np +from motionbricks.motion_backbone.demo.utils import navigation_demo + + +def _disable_mujoco_keyboard_shortcuts(controller_keys='wasdrtfgeqzxcvb'): + """Prevent MuJoCo's viewer from processing keyboard shortcuts that + conflict with the WASD motion controller. + + On Linux/X11: uses passive key grabs to intercept keys at the X server + level before GLFW sees them. pynput still captures keys via XRecord. + + On macOS/Windows: not yet supported — MuJoCo shortcuts may interfere. + """ + if platform.system() != 'Linux': + return + try: + from Xlib import display as xdisplay, X + _xdpy = xdisplay.Display() + _root = _xdpy.screen().root + + def _find_window_by_name(win, name_substr): + try: + name = win.get_wm_name() + if name and name_substr in name: + return win + except Exception: + pass + for child in win.query_tree().children: + r = _find_window_by_name(child, name_substr) + if r: + return r + return None + + time.sleep(0.5) + mj_win = _find_window_by_name(_root, 'MuJoCo') + if mj_win: + for ch in controller_keys: + keycode = _xdpy.keysym_to_keycode(ord(ch) - 32) + mj_win.grab_key(keycode, X.AnyModifier, + False, X.GrabModeAsync, X.GrabModeAsync) + _xdpy.sync() + except Exception as e: + print(f"Note: could not disable MuJoCo keyboard shortcuts: {e}") + + +def main(args) -> None: + demo_agent = navigation_demo(args) + + num_runs = 0 + while num_runs < args.num_runs: + num_runs += 1 + print(f"Running iteration {num_runs}... / {args.num_runs}") + random_seed = args.random_seed * (num_runs + 2333) * 2333 % (2 ** 32 - 1) + np.random.seed(random_seed) + t.manual_seed(random_seed) + demo_agent.full_agent.reset() + + steps = 0 + + if args.has_viewer: + with mujoco.viewer.launch_passive(demo_agent.mj_model, demo_agent.mj_data) as viewer: + _disable_mujoco_keyboard_shortcuts() + + while viewer.is_running() and steps < args.max_steps: + force_idle = steps + 100 > args.max_steps + steps += 1 + viewer.user_scn.ngeom = 0 + step_start = time.time() + qpos = demo_agent.full_agent.get_next_frame() + context_motion_features = demo_agent.full_agent.get_context_motion_features() + context_mujoco_qpos = demo_agent.full_agent.get_context_mujoco_qpos() + demo_agent.mj_data.qpos[:] = qpos + + control_signals = demo_agent.controller.generate_control_signals( + viewer, demo_agent.mj_model, demo_agent.mj_data, visualize=True, + control_info={"force_idle": force_idle, + 'allowed_mode': getattr(args, 'allowed_mode', None)} + ) + + if args.use_qpos: + control_signals['context_mujoco_qpos'] = context_mujoco_qpos + else: + control_signals['context_motion_features'] = context_motion_features + + with t.no_grad(): + demo_agent.full_agent.generate_new_frames( + control_signals, + demo_agent.controller.get_controller_dt() * args.generate_dt + ) + + mujoco.mj_forward(demo_agent.mj_model, demo_agent.mj_data) + viewer.cam.lookat[:] = demo_agent.controller.get_prev_qpos()[:, :3].mean(axis=0) + viewer.sync() + time_until_next_step = demo_agent.mj_model.opt.timestep - (time.time() - step_start) + if time_until_next_step > 0: + time.sleep(time_until_next_step) + else: + while steps < args.max_steps: + steps += 1 + force_idle = steps + 100 > args.max_steps + qpos = demo_agent.full_agent.get_next_frame() + context_motion_features = demo_agent.full_agent.get_context_motion_features() + context_mujoco_qpos = demo_agent.full_agent.get_context_mujoco_qpos() + demo_agent.mj_data.qpos[:] = qpos + + control_signals = demo_agent.controller.generate_control_signals( + None, demo_agent.mj_model, demo_agent.mj_data, visualize=False, + control_info={"force_idle": force_idle, 'allowed_mode': getattr(args, 'allowed_mode', None)} + ) + if args.use_qpos: + control_signals['context_mujoco_qpos'] = context_mujoco_qpos + else: + control_signals['context_motion_features'] = context_motion_features + + with t.no_grad(): + demo_agent.full_agent.generate_new_frames( + control_signals, demo_agent.controller.get_controller_dt() * args.generate_dt + ) + + mujoco.mj_forward(demo_agent.mj_model, demo_agent.mj_data) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description="Interactive demo for the G1 humanoid") + + # path configs + parser.add_argument("--humanoid_xml", type=str, default="assets/skeletons/g1/scene_29dof.xml") + parser.add_argument("--result_dir", type=str, default="./out") + parser.add_argument("--data_root", type=str, default="./datasets") + parser.add_argument("--explicit_dataset_folder", type=str, default=None) + parser.add_argument("--reprocess_clips", type=int, default=0) + + # controller config + parser.add_argument("--controller", type=str, default="wasd", + choices=["wasd", "random"]) + parser.add_argument("--lookat_movement_direction", type=int, default=0) + parser.add_argument("--has_viewer", type=int, default=1) + parser.add_argument("--pre_filter_qpos", type=int, default=1) + parser.add_argument("--source_root_realignment", type=int, default=1) + parser.add_argument("--target_root_realignment", type=int, default=1) + parser.add_argument("--force_canonicalization", type=int, default=1) + parser.add_argument("--skip_ending_target_cond", type=int, default=0) + parser.add_argument("--random_speed_scale", type=int, default=0) + parser.add_argument("--speed_scale", type=str, default="0.8,1.2") + parser.add_argument("--generate_dt", type=float, default=2.0) + + # run configs + parser.add_argument("--max_steps", type=int, default=10000) + parser.add_argument("--random_seed", type=int, default=1234) + parser.add_argument("--num_runs", type=int, default=1) + + # model configurations + parser.add_argument("--use_qpos", type=int, default=1) + parser.add_argument("--planner", type=str, default="default") + parser.add_argument("--allowed_mode", type=str, default=None) + parser.add_argument("--clips", type=str, default="G1") + + args = parser.parse_args() + + args.return_model_configs = True + args.return_dataloader = True + args.recording_dir = None + args.EXP = args.planner + args.speed_scale = [float(i) for i in args.speed_scale.split(",")] + + main(args) diff --git a/GR00T-WholeBodyControl/motionbricks/scripts/train_pose.py b/GR00T-WholeBodyControl/motionbricks/scripts/train_pose.py new file mode 100644 index 0000000000000000000000000000000000000000..861f7aaf0cf1561a065e606d974c6f8a2b6d0f49 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/scripts/train_pose.py @@ -0,0 +1,160 @@ +"""Pose model training script using synthetic data. + +Demonstrates how the pose backbone training pipeline works without +requiring the actual motion dataset. Loads the saved model config from +the checkpoint directory and trains on randomly generated motion tensors. + +The pose model requires a pretrained VQVAE checkpoint to encode motions +into discrete tokens. The VQVAE weights are loaded automatically from +the path specified in the config. + +Usage: + python scripts/train_pose.py --max_steps 100 +""" + +import argparse +import copy +import os + +import pytorch_lightning as pl +import torch +from hydra.utils import instantiate +from omegaconf import DictConfig, OmegaConf, open_dict +from torch.utils.data import DataLoader + +from motionbricks.data.synthetic_dataset import SyntheticMotionDataset, collate_batch +from motionbricks.helper.pl_util import load_motion_rep + + +def load_config(result_dir: str, max_steps: int): + """Load and patch hparams.yaml for single-GPU training.""" + version_dir = os.path.join(result_dir, "motionbricks_pose", "version_1") + hparams_path = os.path.join(version_dir, "hparams.yaml") + conf = OmegaConf.load(hparams_path) + + with open_dict(conf): + # resolve data paths to the version directory (where skeleton/stats live) + conf.data = {"folder": version_dir, "text_embeddings": None} + conf.skeleton.folder = os.path.join(version_dir, "skeleton") + conf.motion_rep.stats.folder = os.path.join(version_dir, "stats", "motion") + + # single-GPU training overrides + conf.trainer.devices = 1 + conf.trainer.num_nodes = 1 + conf.trainer.max_steps = max_steps + conf.trainer.accelerator = "auto" + conf.trainer.strategy = "auto" + conf.trainer.enable_progress_bar = True + conf.trainer.log_every_n_steps = 10 + conf.trainer.val_check_interval = max_steps + conf.trainer.num_sanity_val_steps = 0 + + # resolve ${trainer.max_steps} in scheduler + conf.model.scheduler.num_training_steps = max_steps + + # remove keys with unresolvable ${hydra:...} interpolations + conf.id = "synthetic" + conf.run_dir = "." + conf.out_dir = result_dir + + # resolve all ${} interpolations, then re-wrap as DictConfig + resolved = OmegaConf.to_container(conf, resolve=True) + conf = OmegaConf.create(resolved) + + return conf, version_dir + + +def main(): + parser = argparse.ArgumentParser(description="Pose model training") + parser.add_argument("--result_dir", type=str, default="./out", + help="Directory containing pretrained checkpoints") + parser.add_argument("--max_steps", type=int, default=200, + help="Number of training steps") + parser.add_argument("--batch_size", type=int, default=8, + help="Batch size") + parser.add_argument("--num_samples", type=int, default=500, + help="Number of synthetic samples in dataset") + parser.add_argument("--seed", type=int, default=42) + args = parser.parse_args() + + pl.seed_everything(args.seed) + conf, version_dir = load_config(args.result_dir, args.max_steps) + + # instantiate skeleton and motion representation + motion_rep = load_motion_rep(conf) + feat_dim = len(motion_rep.indices['all']) + + # create synthetic dataset + dataset = SyntheticMotionDataset( + feat_dim=feat_dim, + num_samples=args.num_samples, + min_frames=80, + max_frames=200, + ) + dataloader = DataLoader( + dataset, + batch_size=args.batch_size, + shuffle=True, + num_workers=2, + collate_fn=collate_batch, + persistent_workers=True, + ) + + # instantiate networks and model + model_conf = copy.deepcopy(conf.model) + with open_dict(model_conf): + # instantiate pose VQVAE network (will be frozen; weights loaded by model) + pose_vqvae_net = instantiate( + model_conf.pose_vqvae_network, + motion_rep=motion_rep.dual_rep.local_motion_rep, + ) + + # instantiate backbone network (needs full motion_rep for dual_rep access) + backbone_net = instantiate( + model_conf.backbone_network, + motion_rep=motion_rep, + _recursive_=False, + ) + + # build optimizer and scheduler as partials + optimizer_fn = instantiate(model_conf.optimizer) + scheduler_fn = instantiate(model_conf.scheduler) if model_conf.scheduler else None + + model = instantiate( + model_conf, + pose_vqvae_network=pose_vqvae_net, + root_vqvae_network=None, + backbone_network=backbone_net, + motion_rep=motion_rep, + optimizer=optimizer_fn, + scheduler=scheduler_fn, + _recursive_=False, + ) + + # create trainer (no callbacks) + trainer = pl.Trainer( + max_steps=conf.trainer.max_steps, + devices=conf.trainer.devices, + num_nodes=conf.trainer.num_nodes, + accelerator=conf.trainer.accelerator, + strategy=conf.trainer.strategy, + precision=conf.trainer.precision, + gradient_clip_val=conf.trainer.gradient_clip_val, + enable_progress_bar=conf.trainer.enable_progress_bar, + log_every_n_steps=conf.trainer.log_every_n_steps, + num_sanity_val_steps=0, + enable_checkpointing=False, + logger=False, + ) + + print(f"Starting pose model training for {args.max_steps} steps...") + print(f" Feature dim: {feat_dim}") + print(f" Batch size: {args.batch_size}") + print(f" Dataset size: {args.num_samples}") + print(f" VQVAE loaded: {model.vqvae_model_loaded}") + trainer.fit(model, train_dataloaders=dataloader) + print("Training complete.") + + +if __name__ == "__main__": + main() diff --git a/GR00T-WholeBodyControl/motionbricks/scripts/train_root.py b/GR00T-WholeBodyControl/motionbricks/scripts/train_root.py new file mode 100644 index 0000000000000000000000000000000000000000..147d4694a65eb9244da6e32ef6a81bc030d9d8d9 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/scripts/train_root.py @@ -0,0 +1,152 @@ +"""Root model training script using synthetic data. + +Demonstrates how the root backbone training pipeline works without +requiring the actual motion dataset. Loads the saved model config from +the checkpoint directory and trains on randomly generated motion tensors. + +The root model does not require a pretrained VQVAE — it directly +predicts continuous root motion values. + +Usage: + python scripts/train_root.py --max_steps 100 +""" + +import argparse +import copy +import os + +import pytorch_lightning as pl +import torch +from hydra.utils import instantiate +from omegaconf import DictConfig, OmegaConf, open_dict +from torch.utils.data import DataLoader + +from motionbricks.data.synthetic_dataset import SyntheticMotionDataset, collate_batch +from motionbricks.helper.pl_util import load_motion_rep + + +def load_config(result_dir: str, max_steps: int): + """Load and patch hparams.yaml for single-GPU training.""" + version_dir = os.path.join(result_dir, "motionbricks_root", "version_1") + hparams_path = os.path.join(version_dir, "hparams.yaml") + conf = OmegaConf.load(hparams_path) + + with open_dict(conf): + # resolve data paths to the version directory (where skeleton/stats live) + conf.data = {"folder": version_dir, "text_embeddings": None} + conf.skeleton.folder = os.path.join(version_dir, "skeleton") + conf.motion_rep.stats.folder = os.path.join(version_dir, "stats", "motion") + + # single-GPU training overrides + conf.trainer.devices = 1 + conf.trainer.num_nodes = 1 + conf.trainer.max_steps = max_steps + conf.trainer.accelerator = "auto" + conf.trainer.strategy = "auto" + conf.trainer.enable_progress_bar = True + conf.trainer.log_every_n_steps = 10 + conf.trainer.val_check_interval = max_steps + conf.trainer.num_sanity_val_steps = 0 + + # resolve ${trainer.max_steps} in scheduler + conf.model.scheduler.num_training_steps = max_steps + + # remove keys with unresolvable ${hydra:...} interpolations + conf.id = "synthetic" + conf.run_dir = "." + conf.out_dir = result_dir + + # resolve all ${} interpolations, then re-wrap as DictConfig + resolved = OmegaConf.to_container(conf, resolve=True) + conf = OmegaConf.create(resolved) + + return conf, version_dir + + +def main(): + parser = argparse.ArgumentParser(description="Root model training") + parser.add_argument("--result_dir", type=str, default="./out", + help="Directory containing pretrained checkpoints") + parser.add_argument("--max_steps", type=int, default=200, + help="Number of training steps") + parser.add_argument("--batch_size", type=int, default=8, + help="Batch size") + parser.add_argument("--num_samples", type=int, default=500, + help="Number of synthetic samples in dataset") + parser.add_argument("--seed", type=int, default=42) + args = parser.parse_args() + + pl.seed_everything(args.seed) + conf, version_dir = load_config(args.result_dir, args.max_steps) + + # instantiate skeleton and motion representation + motion_rep = load_motion_rep(conf) + feat_dim = len(motion_rep.indices['all']) + + # create synthetic dataset + dataset = SyntheticMotionDataset( + feat_dim=feat_dim, + num_samples=args.num_samples, + min_frames=200, + max_frames=400, + ) + dataloader = DataLoader( + dataset, + batch_size=args.batch_size, + shuffle=True, + num_workers=2, + collate_fn=collate_batch, + persistent_workers=True, + ) + + # instantiate networks and model + model_conf = copy.deepcopy(conf.model) + with open_dict(model_conf): + # instantiate backbone network (needs full motion_rep for dual_rep access) + backbone_net = instantiate( + model_conf.backbone_network, + motion_rep=motion_rep, + _recursive_=False, + ) + + # build optimizer and scheduler as partials + optimizer_fn = instantiate(model_conf.optimizer) + scheduler_fn = instantiate(model_conf.scheduler) if model_conf.scheduler else None + + model = instantiate( + model_conf, + pose_vqvae_network=None, + root_vqvae_network=None, + backbone_network=backbone_net, + motion_rep=motion_rep, + optimizer=optimizer_fn, + scheduler=scheduler_fn, + _recursive_=False, + ) + + # create trainer (no callbacks) + trainer = pl.Trainer( + max_steps=conf.trainer.max_steps, + devices=conf.trainer.devices, + num_nodes=conf.trainer.num_nodes, + accelerator=conf.trainer.accelerator, + strategy=conf.trainer.strategy, + precision=conf.trainer.precision, + gradient_clip_val=conf.trainer.gradient_clip_val, + enable_progress_bar=conf.trainer.enable_progress_bar, + log_every_n_steps=conf.trainer.log_every_n_steps, + num_sanity_val_steps=0, + enable_checkpointing=False, + logger=False, + ) + + print(f"Starting root model training for {args.max_steps} steps...") + print(f" Feature dim: {feat_dim}") + print(f" Batch size: {args.batch_size}") + print(f" Dataset size: {args.num_samples}") + trainer.fit(model, train_dataloaders=dataloader) + print("Training complete.") + + +if __name__ == "__main__": + main() diff --git a/GR00T-WholeBodyControl/motionbricks/scripts/train_vqvae.py b/GR00T-WholeBodyControl/motionbricks/scripts/train_vqvae.py new file mode 100644 index 0000000000000000000000000000000000000000..6fa259f95c41772ab330b68b5d76acf156d184d3 --- /dev/null +++ b/GR00T-WholeBodyControl/motionbricks/scripts/train_vqvae.py @@ -0,0 +1,140 @@ +"""VQVAE training script using synthetic data. + +Demonstrates how the VQVAE training pipeline works without requiring +the actual motion dataset. Loads the saved model config from the +checkpoint directory and trains on randomly generated motion tensors. + +Usage: + python scripts/train_vqvae.py --max_steps 100 +""" + +import argparse +import copy +import os + +import pytorch_lightning as pl +import torch +from functools import partial +from hydra.utils import instantiate +from omegaconf import OmegaConf, open_dict +from torch.utils.data import DataLoader + +from motionbricks.data.synthetic_dataset import SyntheticMotionDataset, collate_batch +from motionbricks.helper.pl_util import load_motion_rep + + +def load_config(result_dir: str, max_steps: int): + """Load and patch hparams.yaml for single-GPU training.""" + version_dir = os.path.join(result_dir, "motionbricks_vqvae", "version_1") + hparams_path = os.path.join(version_dir, "hparams.yaml") + conf = OmegaConf.load(hparams_path) + + with open_dict(conf): + # resolve data paths to the version directory (where skeleton/stats live) + conf.data = {"folder": version_dir} + conf.skeleton.folder = os.path.join(version_dir, "skeleton") + conf.motion_rep.stats.folder = os.path.join(version_dir, "stats", "motion") + + # single-GPU training overrides + conf.trainer.devices = 1 + conf.trainer.num_nodes = 1 + conf.trainer.max_steps = max_steps + conf.trainer.accelerator = "auto" + conf.trainer.strategy = "auto" + conf.trainer.enable_progress_bar = True + conf.trainer.log_every_n_steps = 10 + conf.trainer.val_check_interval = max_steps # no validation + conf.trainer.num_sanity_val_steps = 0 + + # resolve ${trainer.max_steps} in scheduler + conf.model.scheduler.num_training_steps = max_steps + + return conf, version_dir + + +def main(): + parser = argparse.ArgumentParser(description="VQVAE training") + parser.add_argument("--result_dir", type=str, default="./out", + help="Directory containing pretrained checkpoints") + parser.add_argument("--max_steps", type=int, default=200, + help="Number of training steps") + parser.add_argument("--batch_size", type=int, default=8, + help="Batch size") + parser.add_argument("--num_samples", type=int, default=500, + help="Number of synthetic samples in dataset") + parser.add_argument("--seed", type=int, default=42) + args = parser.parse_args() + + pl.seed_everything(args.seed) + conf, version_dir = load_config(args.result_dir, args.max_steps) + + # instantiate skeleton and motion representation + motion_rep = load_motion_rep(conf) + feat_dim = len(motion_rep.indices['all']) + + # create synthetic dataset + # min_frames must exceed max possible num_frames + 1 used in training_step + # max_tokens=16, down_t=2 => max frames = 16 * 4 = 64, +1 for global->local = 65 + dataset = SyntheticMotionDataset( + feat_dim=feat_dim, + num_samples=args.num_samples, + min_frames=80, + max_frames=200, + ) + dataloader = DataLoader( + dataset, + batch_size=args.batch_size, + shuffle=True, + num_workers=2, + collate_fn=collate_batch, + persistent_workers=True, + ) + + # instantiate the VQVAE network and model + model_conf = copy.deepcopy(conf.model) + with open_dict(model_conf): + # inject the motion_rep into sub-configs that use ??? + pose_net = instantiate( + model_conf.pose_vqvae_network, + motion_rep=motion_rep.dual_rep.local_motion_rep, + ) + # build optimizer and scheduler as partials + optimizer_fn = instantiate(model_conf.optimizer) + scheduler_fn = instantiate(model_conf.scheduler) if model_conf.scheduler else None + + model = instantiate( + model_conf, + pose_vqvae_network=pose_net, + root_vqvae_network=None, + motion_rep=motion_rep, + optimizer=optimizer_fn, + scheduler=scheduler_fn, + _recursive_=False, + ) + + # create trainer (no callbacks needed) + trainer = pl.Trainer( + max_steps=conf.trainer.max_steps, + devices=conf.trainer.devices, + num_nodes=conf.trainer.num_nodes, + accelerator=conf.trainer.accelerator, + strategy=conf.trainer.strategy, + precision=conf.trainer.precision, + gradient_clip_val=conf.trainer.gradient_clip_val, + enable_progress_bar=conf.trainer.enable_progress_bar, + log_every_n_steps=conf.trainer.log_every_n_steps, + num_sanity_val_steps=0, + enable_checkpointing=False, + logger=False, + ) + + print(f"Starting VQVAE training for {args.max_steps} steps...") + print(f" Feature dim: {feat_dim}") + print(f" Batch size: {args.batch_size}") + print(f" Dataset size: {args.num_samples}") + trainer.fit(model, train_dataloaders=dataloader) + print("Training complete.") + + +if __name__ == "__main__": + main()