Add keyborad control to adjust camera sensor pose in simulation#128
Merged
Add keyborad control to adjust camera sensor pose in simulation#128
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a simulation utility for interactively adjusting a camera sensor’s local pose via keyboard input (with a live OpenCV preview), and exposes it through the sim utility package.
Changes:
- Added
run_keyboard_control_for_camera()helper to visualize camera output and apply incremental pose adjustments from key presses. - Exported the new helper via
embodichain.lab.sim.utilitypackage__init__. - Tweaked
run_env.pypreview-mode logging to uselog_info(..., color="green").
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
embodichain/lab/sim/utility/keyboard_utils.py |
New interactive keyboard-driven camera pose control loop with OpenCV display. |
embodichain/lab/sim/utility/__init__.py |
Re-exports the new keyboard utility. |
embodichain/lab/scripts/run_env.py |
Changes preview-mode message from warning to green info log. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| from .sim_utils import * | ||
| from .mesh_utils import * | ||
| from .gizmo_utils import * | ||
| from .keyboard_utils import * |
There was a problem hiding this comment.
Import pollutes the enclosing namespace, as the imported module embodichain.lab.sim.utility.keyboard_utils does not define 'all'.
Suggested change
| from .keyboard_utils import * | |
| from . import keyboard_utils |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR add helper function to control camera sensor pose in simulation. This feature would be useful for configuring the camera setup for simulation or for gym.
Type of change
Checklist
black .command to format the code base.