unrealcv/unrealcv

Dynamic camera position not reflecting

mcs32 opened this issue · 1 comments

mcs32 commented
  • Operating System: Windows
  • UE4 Version: 4.26.2
  • UnrealCV Version: 0.3.10
  • Client (python2, 3 or matlab): python3
  • Problem Description: I am updating the camera position while playing the game but the changed camera position is not available in unrealcv. The process can be outlined as follows
  1. Press play in the Unreal Engine to start the game
  2. Press the button C by executing the request client.request('vset /action/keyboard C 1'). This will change the camera location (for example it can translate the camera by 5 units along Z axis). The camera location is updated in the level blueprint.
  3. Execute the line print(client.request('vget /camera/0/pose')) to check if location change is reflecting in unrealcv. It is not reflecting.
  4. Execute the following to get the lit image
        res = client.request('vget /camera/0/lit png')
        rgb = read_png(res)

It returns the lit image from the old camera position since the location change is not available.

Note that after executing the step 2, the camera location does change in the unreal engine's viewport but the changes don't reflect in unrealcv. Also, there is only one camera actor in this setup. I have also tried using sleep to wait for the change to reflect but it didn't help.

I understand that I can explicitly set the camera pose by using vset /camera/0/pose, that said, I was wondering if what I am observing is the expected behavior.

Thanks

Hello mcs32,

I actually have the exact same problem and wanted to ask if you have found a solution by chance?