class_docstr: DatasetBuilder for robomimic datasets.
code: def _get_features(self) -> tfds.features.FeaturesDict:
      obs_dim = TASKS[self.builder_config.task]["object"]
      states_dim = TASKS[self.builder_config.task]["states"]
      action_size = TASKS[self.builder_config.task]["action_size"]
  
      observation = {
          "object": tensor_feature(
              obs_dim,
          ),
          "robot0_eef_pos": tensor_feature(
              3, doc="End-effector position"
          ),
          "robot0_eef_quat": tensor_feature(
              4, doc="End-effector orientation"
          ),
          "robot0_eef_vel_ang": tensor_feature(
              3, doc="End-effector angular velocity"
          ),
          "robot0_eef_vel_lin": tensor_feature(
              3, doc="End-effector cartesian velocity"
          ),
          "robot0_gripper_qpos": tensor_feature(
              2, doc="Gripper position"
          ),
          "robot0_gripper_qvel": tensor_feature(
              2, doc="Gripper velocity"
          ),
          "robot0_joint_pos": tensor_feature(
              7, doc="7DOF joint positions"
          ),
          "robot0_joint_pos_cos": tensor_feature(7),
          "robot0_joint_pos_sin": tensor_feature(7),
          "robot0_joint_vel": tensor_feature(
              7, doc="7DOF joint velocities"
          ),
      }
      if self.builder_config.task == Task.TRANSPORT:
          observation["robot1_eef_pos"] = tensor_feature(
              3, doc="End-effector position"
          )
          observation["robot1_eef_quat"] = tensor_feature(
              4, doc="End-effector orientation"
          )
          observation["robot1_eef_vel_ang"] = tensor_feature(
              3, doc="End-effector angular velocity"
          )
          observation["robot1_eef_vel_lin"] = tensor_feature(
              3, doc="End-effector cartesian velocity"
          )
          observation["robot1_gripper_qpos"] = tensor_feature(
              2, doc="Gripper position"
          )
          observation["robot1_gripper_qvel"] = tensor_feature(
              2, doc="Gripper velocity"
          )
          observation["robot1_joint_pos"] = tensor_feature(
              7, doc="7DOF joint positions"
          )
          observation["robot1_joint_pos_cos"] = tensor_feature(7)
          observation["robot1_joint_pos_sin"] = tensor_feature(7)
          observation["robot1_joint_vel"] = tensor_feature(
              7, doc="7DOF joint velocities"
          )
  
      if self.builder_config.filename == ObservationType.IMAGE:
          if self.builder_config.task == Task.TOOL_HANG:
              observation["robot0_eye_in_hand_image"] = image_feature(
                  240
              )
              observation["sideview_image"] = image_feature(240)
          elif self.builder_config.task == Task.TRANSPORT:
              observation["robot0_eye_in_hand_image"] = image_feature(
                  84
              )
              observation["robot1_eye_in_hand_image"] = image_feature(
                  84
              )
              observation["shouldercamera0_image"] = image_feature(84)
              observation["shouldercamera1_image"] = image_feature(84)
          else:
              observation["agentview_image"] = image_feature(84)
              observation["robot0_eye_in_hand_image"] = image_feature(
                  84
              )
  
      # metadata depends on the quality type
      metadata = self._get_metadata()
  
      features = tfds.features.FeaturesDict(
          {
              "horizon": np.int32,
              "episode_id": np.str_,
              "steps": tfds.features.Dataset(
                  {
                      "action": tensor_feature(action_size),
                      "observation": observation,
                      "reward": np.float64,
                      "is_first": np.bool_,
                      "is_last": np.bool_,
                      "is_terminal": np.bool_,
                      "discount": np.int32,
                      "states": tensor_feature(states_dim),
                  }
              ),
              **metadata,
          }
      )
      return features
  
imports: import dataclasses
  import enum
  from typing import Any, Dict, List, Mapping
  from etils import epath
  import h5py
  import numpy
  import tensorflow_datasets.public_api
  import tree
label_desc: Use image node_id 2 for calling the RobomimicBuilder obj's underlying member method code with example usage: obj._get_features() and returns: features