feat(viewer): add an option whether to render map#278
Merged
Conversation
Contributor
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a user-configurable switch for rendering the vector map in the visualization CLI (t4viz) and propagates that choice through T4Devkit into the rendering helper so map rendering can be toggled for scene, instance, and pointcloud visualizations.
Changes:
- Added a
--map(-m) flag tot4viz scene|instance|pointcloudand passed the value into the rendering calls. - Introduced a
render_mapparameter onT4Devkit.render_scene/render_instance/render_pointcloudand on the correspondingRenderingHelpermethods. - Made map rendering conditional (
_try_render_map) based onrender_map.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
t4_devkit/cli/visualize.py |
Adds CLI flag to control whether map rendering is enabled and forwards it to the API. |
t4_devkit/helper/rendering.py |
Threads render_map into rendering entrypoints and gates _try_render_map behind it. |
t4_devkit/tier4.py |
Exposes render_map on the public T4Devkit render methods and forwards to helper. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
a03d6bf to
1bcb2e0
Compare
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.
What
This pull request adds a new feature to the visualization CLI and rendering pipeline that allows users to optionally render the map in scene, instance, and pointcloud visualizations. The change introduces a
--map(-m) command-line flag to the relevant CLI commands and propagates theshow_mapparameter through the codebase to control map rendering.To improve the rendering speed,
show_map=Falseby defaults.The most important changes are:
CLI Enhancements:
--map(-m) boolean option to thescene,instance, andpointcloudcommands int4_devkit/cli/visualize.pyto allow users to specify whether to render the map. [1] [2] [3]Rendering Pipeline Updates:
render_scene,render_instance, andrender_pointcloudmethods int4_devkit/helper/rendering.pyandt4_devkit/tier4.pyto accept and propagate theshow_mapparameter, including updating docstrings to document the new argument. [1] [2] [3] [4] [5] [6] [7]Rendering Logic:
t4_devkit/helper/rendering.pyto conditionally call the map rendering function (_try_render_map) whenshow_mapisTruefor all three visualization modes. [1] [2] [3]These changes collectively enable users to control map rendering in visualizations via a simple CLI flag, improving flexibility and usability.