Skip to content

Commit 8d3d2d3

Browse files
authored
Fix camera pose output from keyboard control tool (#137)
1 parent a323f8d commit 8d3d2d3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

embodichain/lab/sim/utility/keyboard_utils.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,11 @@ def run_keyboard_control_for_camera(
196196
pose_changed = True
197197
log_info("Reset to initial pose")
198198
elif key == ord("p"):
199-
translation = new_pose[:3, 3]
200-
rot = R.from_matrix(new_pose[:3, :3])
199+
new_pose_print = new_pose.copy()
200+
new_pose_print[:3, 1] = -new_pose_print[:3, 1]
201+
new_pose_print[:3, 2] = -new_pose_print[:3, 2]
202+
translation = new_pose_print[:3, 3]
203+
rot = R.from_matrix(new_pose_print[:3, :3])
201204
quaternion = rot.as_quat()
202205
log_info("Current Camera pose:")
203206
log_info(f"Translation: {translation}")

0 commit comments

Comments
 (0)