Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
wensi-ai committed Nov 28, 2023
1 parent 65c5e5e commit bedd859
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions omnigibson/robots/franka_leap.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,11 @@ def arm_joint_names(self):

@property
def eef_link_names(self):
return {self.default_arm: "palm_lower"}
return {self.default_arm: "palm_center"}

@property
def finger_link_names(self):
links = ["mcp_joint", "pip", "dip", "fingertip"]
links = ["mcp_joint", "pip", "dip", "fingertip", "realtip"]
return {self.default_arm: [f"{link}_{i}" for i in range(1, 5) for link in links]}

@property
Expand All @@ -205,7 +205,7 @@ def urdf_path(self):

@property
def vr_rotation_offset(self):
return {self.default_arm: T.euler2quat(np.array([0, np.pi / 2, 0]))}
return {self.default_arm: T.euler2quat(np.array([0, np.pi, np.pi / 2]))}

def gen_action_from_vr_data(self, vr_data: dict):
action = np.zeros(22)
Expand Down
11 changes: 6 additions & 5 deletions omnigibson/utils/xr_utils.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import carb
import numpy as np
from omni.kit.xr.core import XRCore, XRDeviceClass, XRCoreEventType
from omni.kit.xr.ui.stage.common import XRAvatarManager
from typing import Iterable, List, Optional, Tuple

import omnigibson as og
import omnigibson.utils.transform_utils as T
from omnigibson.robots.robot_base import BaseRobot

# enable xr extension
from omni.isaac.core.utils.extensions import enable_extension
enable_extension("omni.kit.xr.profile.vr")
from omni.kit.xr.core import XRCore, XRDeviceClass, XRCoreEventType
from omni.kit.xr.ui.stage.common import XRAvatarManager

class VRSys():
def __init__(
self,
Expand All @@ -33,9 +37,6 @@ def __init__(
NOTE: enable_touchpad_movement and align_anchor_to_robot_base cannot be enabled at the same time.
The former is to enable free movement of the VR system (i.e. the user), while the latter is constraining the VR system to the robot pose.
"""
# enable xr extension
from omni.isaac.core.utils.extensions import enable_extension
enable_extension("omni.kit.xr.profile.vr")
# get xr core and profile
self.xr_core = XRCore.get_singleton()
self.vr_profile = self.xr_core.get_profile("vr")
Expand Down

0 comments on commit bedd859

Please sign in to comment.