Skip to content

Fix camera settings in render()#51

Merged
amacati merged 5 commits intolearnsyslab:mainfrom
ratheron:main
Mar 18, 2026
Merged

Fix camera settings in render()#51
amacati merged 5 commits intolearnsyslab:mainfrom
ratheron:main

Conversation

@ratheron
Copy link
Copy Markdown
Collaborator

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

@ratheron ratheron requested a review from amacati as a code owner March 18, 2026 14:26
@ratheron ratheron added the bug Something isn't working label Mar 18, 2026
@amacati
Copy link
Copy Markdown
Collaborator

amacati commented Mar 18, 2026

Is there any way for us to test the changed behavior? Something that failed before and works now?

@ratheron
Copy link
Copy Markdown
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.

@amacati
Copy link
Copy Markdown
Collaborator

amacati commented Mar 18, 2026

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

@amacati
Copy link
Copy Markdown
Collaborator

amacati commented Mar 18, 2026

The current ones look decent enough though. Just needs a format fix

@amacati amacati merged commit 75bf7a3 into learnsyslab:main Mar 18, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants