Skip to content
Merged
Changes from all 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
7 changes: 5 additions & 2 deletions embodichain/lab/sim/utility/keyboard_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,11 @@ def run_keyboard_control_for_camera(
pose_changed = True
log_info("Reset to initial pose")
elif key == ord("p"):
translation = new_pose[:3, 3]
rot = R.from_matrix(new_pose[:3, :3])
new_pose_print = new_pose.copy()
new_pose_print[:3, 1] = -new_pose_print[:3, 1]
new_pose_print[:3, 2] = -new_pose_print[:3, 2]
Comment on lines +199 to +201
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Y/Z axis sign flip here is doing an implicit OpenGL↔OpenCV coordinate-system conversion, but that intent isn’t documented and the same conversion appears elsewhere in the codebase. Consider adding a short comment clarifying which frame new_pose is in and which frame is being printed, and/or factoring this into a small shared helper (to avoid future mismatches).

Copilot uses AI. Check for mistakes.
translation = new_pose_print[:3, 3]
rot = R.from_matrix(new_pose_print[:3, :3])
quaternion = rot.as_quat()
log_info("Current Camera pose:")
log_info(f"Translation: {translation}")
Expand Down
Loading