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

Access camera params (extrinsics, intrinsics, near/far plane) for pointcloud calculation #232

Open
stepjam opened this issue Dec 22, 2021 · 1 comment

Comments

@stepjam
Copy link

stepjam commented Dec 22, 2021

Hello,
Is there a way to get either access to a point-cloud observation or access to the camera params (extrinsics, intrinsics, near/far plane) such that I can calculate the point-cloud from z-buffer observation?
Thanks!

@charlesbeattie
Copy link
Collaborator

You can get information about the camera position with game:playerInfo. I believe the default vertical field of view is 90. You can calculate the horizontal FOV using the aspect ratio. You can use ray casts from the players eye position to generate a point cloud. See game:raycast.

Player look direction and posion:

local game = require 'dmlab.system.game'
local info = game:playerInfo()
local look = info.angles
local eye = info.eyePos

Raycast see:
https://github.com/deepmind/lab/blob/2f21c07371e0f2a2c8e6a039b330c44b97d418ff/game_scripts/levels/tests/raycast_test.lua#L74

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