Open HM102 opened 3 years ago
As a follow up.I tired something similar in c++ and it works, however can not figured out how to do it in python:
auto point_cloud = open3d::geometry::PointCloud();
open3d::io::ReadPointCloud("cloud_bin_0.pcd", point_cloud);
auto cloud_ptr = std::make_shared<open3d::geometry::PointCloud>(point_cloud);
open3d::camera::PinholeCameraTrajectory trajec;
int cnt = 0;
visualization::DrawGeometriesWithKeyCallbacks(
{cloud_ptr},
{{GLFW_KEY_SPACE,
[&](visualization::Visualizer *vis) {
open3d::visualization::ViewControl view_control = vis->GetViewControl();
auto view_params = open3d::camera::PinholeCameraParameters();
view_control.ConvertToPinholeCameraParameters(view_params);
trajec.parameters_.push_back(view_params);
std::cout<<trajec.parameters_[cnt].extrinsic_<<std::endl;
cnt++;
std::this_thread::sleep_for(
std::chrono::milliseconds(30));
return false;
}}},
"Press Space to save trajectory", 1600, 900);
+1 any solutions for this?
I am trying to append the current camera view to a trajectory class
when I press
"S"
I always get an empty list[]
The trajectory is always empty, I checked the param it has intrinsic and extrinsic so it is not empty!
print(np.asarray(param.extrinsic))