Firstly I have created some viewports through code and assign each to a camera view, which works perfectly through code:
window_1 = create_viewport_window("camera1") window_1.viewport_api.set_active_camera("/World/envs/env_0/Robot/Camera1") window_2 = create_viewport_window("camera2") window_2.viewport_api.set_active_camera("/World/envs/env_0/Robot/Camera2")
However, when I use the dock_in function following the IsaacSim code to achieve some layouts as shown in the picture below, I encounter issues. The dock_in function does not seem to be working.
Isaacsim Code:
# Dock the second camera window left_viewport = omni.ui.Workspace.get_window("Viewport") right_viewport = omni.ui.Workspace.get_window("Viewport 2") if right_viewport is not None and left_viewport is not None: right_viewport.dock_in(left_viewport, omni.ui.DockPosition.RIGHT)
My code:
# Dock the second camera window window_2.dock_in(window_1, omni.ui.DockPosition.TOP, 0.5) window_3.dock_in(window_2, .....) ......
When I execute the code, nothing happens
System Info
Describe the characteristic of your environment:
Isaac Sim Version: 4.2.0
OS: [e.g. Ubuntu 22.04]
GPU: RTX 4090
CUDA: 12.0
GPU Driver: 550.107.02
Additional context
Add any other context about the problem here.
Checklist
[ ✔️] I have checked that there is no similar issue in the repo (required)
[ ✔️] I have checked that the issue is not in running Isaac Sim itself and is related to the repo
Describe the bug
Firstly I have created some viewports through code and assign each to a camera view, which works perfectly through code:
window_1 = create_viewport_window("camera1") window_1.viewport_api.set_active_camera("/World/envs/env_0/Robot/Camera1") window_2 = create_viewport_window("camera2") window_2.viewport_api.set_active_camera("/World/envs/env_0/Robot/Camera2")
However, when I use the dock_in function following the IsaacSim code to achieve some layouts as shown in the picture below, I encounter issues. The dock_in function does not seem to be working. Isaacsim Code:
# Dock the second camera window left_viewport = omni.ui.Workspace.get_window("Viewport") right_viewport = omni.ui.Workspace.get_window("Viewport 2") if right_viewport is not None and left_viewport is not None: right_viewport.dock_in(left_viewport, omni.ui.DockPosition.RIGHT)
My code:
# Dock the second camera window window_2.dock_in(window_1, omni.ui.DockPosition.TOP, 0.5) window_3.dock_in(window_2, .....) ......
When I execute the code, nothing happens
System Info
Describe the characteristic of your environment:
Additional context
Add any other context about the problem here.
Checklist