Skip to content

Commit

Permalink
Fix typo: writs_dof -> wrist_dof
Browse files Browse the repository at this point in the history
  • Loading branch information
JafarAbdi committed Oct 15, 2024
1 parent 94979d4 commit 7e5460d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions bigym/robots/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ class ArmConfig:
Attributes:
site: The site on the robot where the gripper could be attached.
links: A list of body links of the hand.
writs_dof: Optional wrist DOF which could be added to the arm.
wrist_dof: Optional wrist DOF which could be added to the arm.
offset_position: Mounting positional offset.
offset_euler: Mounting euler offset.
"""

site: str
links: list[str]
writs_dof: Optional[Dof] = None
wrist_dof: Optional[Dof] = None
offset_position: np.ndarray = field(default_factory=lambda: np.zeros(3))
offset_euler: np.ndarray = field(default_factory=lambda: np.zeros(3))

Expand Down
4 changes: 2 additions & 2 deletions bigym/robots/configs/h1.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"left_shoulder_yaw_link",
"left_elbow_link",
],
writs_dof=H1_WRIST_DOF,
wrist_dof=H1_WRIST_DOF,
offset_euler=np.array([np.pi / 2, np.pi / 2, 0]),
)
H1_RIGHT_ARM = ArmConfig(
Expand All @@ -36,7 +36,7 @@
"right_shoulder_yaw_link",
"right_elbow_link",
],
writs_dof=H1_WRIST_DOF,
wrist_dof=H1_WRIST_DOF,
offset_euler=np.array([np.pi / 2, np.pi / 2, 0]),
)
H1_ACTUATORS = {
Expand Down
10 changes: 5 additions & 5 deletions bigym/robots/robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def _on_loaded(self, model: mjcf.RootElement):
# Configure wrist joints
self._wrist_sites: dict[HandSide, Site] = {}
for side, arm_config in self.config.arms.items():
if arm_config.writs_dof:
if arm_config.wrist_dof:
self._add_wrist(model, side, arm_config)
self._wrist_sites[side]: Site = Site.get(
self._mojo, arm_config.site, mojo_model
Expand Down Expand Up @@ -319,14 +319,14 @@ def _add_wrist(model: mjcf.RootElement, side: HandSide, arm_config: ArmConfig):
wrist.add("site", name=site_name)
joint = wrist.add(
"joint",
type=arm_config.writs_dof.joint_type.value,
type=arm_config.wrist_dof.joint_type.value,
name=join_name,
axis=arm_config.writs_dof.axis,
range=arm_config.writs_dof.joint_range,
axis=arm_config.wrist_dof.axis,
range=arm_config.wrist_dof.joint_range,
)
model.actuator.add(
"motor",
name=join_name,
joint=joint,
ctrlrange=arm_config.writs_dof.action_range,
ctrlrange=arm_config.wrist_dof.action_range,
)

0 comments on commit 7e5460d

Please sign in to comment.