Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic camera position not reflecting #232

Open
mcs32 opened this issue Jul 27, 2022 · 1 comment
Open

Dynamic camera position not reflecting #232

mcs32 opened this issue Jul 27, 2022 · 1 comment

Comments

@mcs32
Copy link

mcs32 commented Jul 27, 2022

  • 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

@alexanderias
Copy link

Hello mcs32,

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants