Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion run_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def main(
episodes = 10,
headless: bool = True,
scene: int = 1,
num_envs: int = 1,
):
# launch omniverse app with arguments (inside function to prevent overriding tyro)
from isaaclab.app import AppLauncher
Expand All @@ -55,7 +56,7 @@ def main(
env_cfg = parse_env_cfg(
"DROID",
device=args_cli.device,
num_envs=1,
num_envs=num_envs,
use_fabric=True,
)
instruction = None
Expand Down
6 changes: 3 additions & 3 deletions src/environments/droid_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def arm_joint_pos(
joint_indices = [
i for i, name in enumerate(robot.data.joint_names) if name in joint_names
]
joint_pos = robot.data.joint_pos[0, joint_indices]
joint_pos = robot.data.joint_pos[:, joint_indices]
return joint_pos


Expand All @@ -304,7 +304,7 @@ def gripper_pos(
joint_indices = [
i for i, name in enumerate(robot.data.joint_names) if name in joint_names
]
joint_pos = robot.data.joint_pos[0, joint_indices]
joint_pos = robot.data.joint_pos[:, joint_indices]

# rescale
joint_pos = joint_pos / (np.pi / 4)
Expand Down Expand Up @@ -372,7 +372,7 @@ class CurriculumCfg:

@configclass
class EnvCfg(ManagerBasedRLEnvCfg):
scene = SceneCfg(num_envs=1, env_spacing=7.0)
scene = SceneCfg(env_spacing=7.0)

observations = ObservationCfg()
actions = ActionCfg()
Expand Down
4 changes: 2 additions & 2 deletions src/inference/droid_jointpos.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ def infer(self, obs: dict, instruction: str) -> dict:

def _extract_observation(self, obs_dict, *, save_to_disk=False):
# Assign images
right_image = obs_dict["policy"]["external_cam"][0].clone().detach().cpu().numpy()
wrist_image = obs_dict["policy"]["wrist_cam"][0].clone().detach().cpu().numpy()
right_image = obs_dict["policy"]["external_cam"].clone().detach().cpu().numpy()
wrist_image = obs_dict["policy"]["wrist_cam"].clone().detach().cpu().numpy()

# Capture proprioceptive state
robot_state = obs_dict["policy"]
Expand Down