Fix camera settings in render()#51
Merged
amacati merged 5 commits intolearnsyslab:mainfrom Mar 18, 2026
Merged
Conversation
Collaborator
|
Is there any way for us to test the changed behavior? Something that failed before and works now? |
Collaborator
Author
|
This is something you can only see in the renderer. We could write a hard coded test to check some pixels, which could reveal if the correct cam was selected. Not sure if this works though (i.e., if pixels are returned at all). Also, this would be quite brittle, since changing the models or scene could break the test. |
Collaborator
|
We could have an A/B test and check if the view changes correctly. We do something like that in https://github.com/utiasDSL/crazyflow/blob/main/tests/unit/test_visualizations.py |
Collaborator
|
The current ones look decent enough though. Just needs a format fix |
amacati
approved these changes
Mar 18, 2026
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.
Previously, setting the cam_id or cam_name didn't do anything when using the renderer (human mode). This PR fixes that by forcing the cam ID after initialization of the renderer.
Known issues: If there will ever be another camera defined by the scene.xml, the user wont be able to move it in the GUI, since we force the camera to be fixed