Fix camera pose output from keyboard control tool#137
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes the camera pose values printed by the keyboard-control utility so the reported rotation matches the expected coordinate convention used elsewhere in the simulator/tooling.
Changes:
- Adjust pose printing on
Pkey to apply a Y/Z axis flip before computing quaternion/Euler output.
Comments suppressed due to low confidence (1)
embodichain/lab/sim/utility/keyboard_utils.py:19
- Import of 'np' is not used.
import numpy as np
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 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] |
There was a problem hiding this comment.
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).
Description
Same as title
Type of change
Screenshots
Please attach before and after screenshots of the change if applicable.
Checklist
black .command to format the code base.