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

viewer as cloud player #15

Open
rfsch opened this issue Jun 18, 2019 · 4 comments
Open

viewer as cloud player #15

rfsch opened this issue Jun 18, 2019 · 4 comments

Comments

@rfsch
Copy link

rfsch commented Jun 18, 2019

Hi

is it possible to make the viewer play successive point cloud frames ?

Thanks

@kentaroy47
Copy link

+1

2 similar comments
@ghost
Copy link

ghost commented Oct 23, 2019

+1

@chenxyyy
Copy link

+1

@tsucres
Copy link

tsucres commented Oct 21, 2020

I got it to work by commenting the following lines in viewer.h (in void reply()):

qDebug() << "Viewer: received positions";

_points->loadPoints(positions);
// Comment the 3 following lines
//_camera = QtCamera(_points->getBox());
//_camera.setAspectRatio((float)width() / height());
//_floor_grid->setFloorLevel(_points->getFloor());
renderPoints();
renderPointsFine();
break;

I am not sure whether there are situations where it is necessary to reset the camera position after loading a new pointcloud. But this solution suits my use case.

After re-compiling, the following snippet will render a sequence of random pointclouds while maintaining the camera position:

import pptk
import numpy as np
import time

pointclouds = np.random.random([200, 1000, 3])

v = pptk.viewer(pointclouds[0])

for pc in pointclouds[1:]:
    time.sleep(0.1)
    v.load(pc)

(I share this as a workaround, not as a solution to the current issue)

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

4 participants