[FEATURE] Add draw_debug_frustum and draw_debug_trajectory to scene API#2593
Open
Mehak261124 wants to merge 6 commits intoGenesis-Embodied-AI:mainfrom
Open
[FEATURE] Add draw_debug_frustum and draw_debug_trajectory to scene API#2593Mehak261124 wants to merge 6 commits intoGenesis-Embodied-AI:mainfrom
Mehak261124 wants to merge 6 commits intoGenesis-Embodied-AI:mainfrom
Conversation
…PI with documentation
…PI with documentation
duburcqa
reviewed
Mar 23, 2026
duburcqa
reviewed
Mar 23, 2026
duburcqa
requested changes
Mar 23, 2026
Collaborator
duburcqa
left a comment
There was a problem hiding this comment.
All PRs adding features or fixing bugs must come with accompanying unit tests. In this case you have no other choice than resorting on screenshot-based validation.
Author
|
Hey @duburcqa, I have addressed your feedback and added the screenshot-based unit tests for draw_debug_frustum and draw_debug_trajectory. Could you take a look? |
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
Added two new debug visualization methods to
scene.py:draw_debug_frustum(camera): Visualizes the frustum of any camera including sensor cameras, by reusing the existingcreate_camera_frustum()fromutils/mesh.py. Previously this was only available for the interactive viewer camera viashow_cameras=Trueinvis_options.draw_debug_trajectory(positions): Draws a trajectory as a series of connected lines by connecting a list of 3D positions. Useful for visualizing robot paths and motion history.Both methods follow the same pattern as existing
draw_debug_*methods and render as markers — visible in the interactive viewer but invisible to robot cameras (depth, segmentation, RGB renders are unaffected).Related Issue
Resolves #1049
Motivation and Context
draw_debug_frustumreuses the existingcreate_camera_frustum()fromutils/mesh.pywhich was previously only used internally for the viewer camera. This change makes frustum visualization available for any camera including sensor cameras, without duplicating code.draw_debug_trajectorywas missing entirely from the debug visualization API and is a commonly needed tool for visualizing robot paths during development and debugging.How Has This Been / Can This Be Tested?
Tested manually on macOS Apple Silicon (M2), Python 3.11.
Test draw_debug_frustum:
Test draw_debug_trajectory:
Screenshots:
Checklist: