Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiplayer HITL #1939

Merged
merged 9 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from 8 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
10 changes: 6 additions & 4 deletions examples/hitl/pick_throw_vr/pick_throw_vr.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ def _try_grasp_remote(self):
hand_positions = []
num_hands = 2
for i in range(num_hands):
hand_pos, _ = remote_client_state.get_hand_pose(i)
hand_pos, _ = remote_client_state.get_hand_pose(
user_index=0, hand_idx=i
)
if hand_pos:
hand_positions.append(hand_pos)
if len(hand_positions) == 0:
Expand Down Expand Up @@ -250,10 +252,10 @@ def _update_held_and_try_throw_remote(self):
assert history_len >= 2
history_offset = 1
pos1, _ = remote_client_state.get_hand_pose(
hand_idx, history_index=history_offset
user_index=0, hand_idx=hand_idx, history_index=history_offset
)
pos0, _ = remote_client_state.get_hand_pose(
hand_idx, history_index=history_len - 1
user_index=0, hand_idx=hand_idx, history_index=history_len - 1
)
if pos0 and pos1:
vel = (pos1 - pos0) / (
Expand All @@ -269,7 +271,7 @@ def _update_held_and_try_throw_remote(self):
else:
# snap to hand
hand_pos, hand_rotation = remote_client_state.get_hand_pose(
self._remote_held_hand_idx
user_index=0, hand_idx=self._remote_held_hand_idx
)
assert hand_pos is not None

Expand Down
3 changes: 2 additions & 1 deletion examples/hitl/rearrange_v2/collaboration_episode_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@


class CollaborationEpisodeData:
instruction: str = ""
def __init__(self):
self.instruction: str = ""


if collaboration_episode_enabled:
Expand Down
Loading