Skip to content

Commit cb4dd54

Browse files
Inverts SE-2 keyboard device actions (Z, X) for yaw command (isaac-sim#1030)
# Description This MR swaps the keyboard command (X, Z) for yaw in the `Se2Keyboard` class to have the following mapping: - Z - positive yaw - X - negative yaw It also corrects the docstring of the `Se2Keyboard` class. Fixes isaac-sim#1029 _Note:_ I double checked the `Se3Keyboard` class and the implementation there is correct. ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Checklist - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have run all the tests with `./isaaclab.sh --test` and they pass - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [ ] I have added my name to the `CONTRIBUTORS.md` or my name already exists there
1 parent 18a208e commit cb4dd54

File tree

1 file changed

+5
-5
lines changed
  • source/extensions/omni.isaac.lab/omni/isaac/lab/devices/keyboard

1 file changed

+5
-5
lines changed

source/extensions/omni.isaac.lab/omni/isaac/lab/devices/keyboard/se2_keyboard.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Se2Keyboard(DeviceBase):
3030
====================== ========================= ========================
3131
Move along x-axis Numpad 8 / Arrow Up Numpad 2 / Arrow Down
3232
Move along y-axis Numpad 4 / Arrow Right Numpad 6 / Arrow Left
33-
Rotate along z-axis Numpad 7 / X Numpad 9 / Y
33+
Rotate along z-axis Numpad 7 / Z Numpad 9 / X
3434
====================== ========================= ========================
3535
3636
.. seealso::
@@ -82,8 +82,8 @@ def __str__(self) -> str:
8282
msg += "\tMove backward (along x-axis): Numpad 2 / Arrow Down\n"
8383
msg += "\tMove right (along y-axis): Numpad 4 / Arrow Right\n"
8484
msg += "\tMove left (along y-axis): Numpad 6 / Arrow Left\n"
85-
msg += "\tYaw positively (along z-axis): Numpad 7 / X\n"
86-
msg += "\tYaw negatively (along z-axis): Numpad 9 / Y"
85+
msg += "\tYaw positively (along z-axis): Numpad 7 / Z\n"
86+
msg += "\tYaw negatively (along z-axis): Numpad 9 / X"
8787
return msg
8888

8989
"""
@@ -160,8 +160,8 @@ def _create_key_bindings(self):
160160
"RIGHT": np.asarray([0.0, -1.0, 0.0]) * self.v_y_sensitivity,
161161
# yaw command (positive)
162162
"NUMPAD_7": np.asarray([0.0, 0.0, 1.0]) * self.omega_z_sensitivity,
163-
"X": np.asarray([0.0, 0.0, 1.0]) * self.omega_z_sensitivity,
163+
"Z": np.asarray([0.0, 0.0, 1.0]) * self.omega_z_sensitivity,
164164
# yaw command (negative)
165165
"NUMPAD_9": np.asarray([0.0, 0.0, -1.0]) * self.omega_z_sensitivity,
166-
"Z": np.asarray([0.0, 0.0, -1.0]) * self.omega_z_sensitivity,
166+
"X": np.asarray([0.0, 0.0, -1.0]) * self.omega_z_sensitivity,
167167
}

0 commit comments

Comments
 (0)