Hello, I have created a function to save images from two cameras pre-created in usd file. This function will be called after every update. There is only one default viewport. When i run the code, the viewport will change to camera_third from perspective in a few seconds. But it will not change to camera_first. So two images saved are both saved with camera_third. How to solve this problem ? PPPPlease
Hi!(Maybe you are Chinese? Me too!)
Have you solved this please?
I also have a robot file with two cameras installed and would like to get the images this way, the viewport also switches after the code is run, appreciate if you have any solution!
I have solved this problem now.
I have created some viewports from cameras of different angles by function create_viewport_for_camera after having cleaned the viewport default by function destroy_all_viewports. And in every update, i just run save_image()
So the solution is keeping all the viewports active.
Note: you should make every viewport have his own window to display like the image below. If not, you will find that the images from only one viewport are saved.