Closed K-M-Ibrahim-Khalilullah closed 2 years ago
I don't think the error is from the code snippet of yours. The error is only thrown here. Do you have a create_coordinate_frame
somewhere else in your code?
I have met the problem too. For a .py script file, I successfully run it in vscode, but the error happened the next day. Finally, I found that I can the script successfully in the Windows PowerShell.
I have exactly the same error. Is there anybody who solved the problem? Solution of here did not work for me
I set the wrong input file path。 When the file path is fixed, it works normally.
Thank you for response @lirhlirh . In detail, I am using reconstruction codes and making fragments seem okey. It is because there are 15 frames to integrate and making fragment function combining 15 frames. Hence I think paths are okey for me.
Output (with error):
====================================
Configuration
====================================
name : Captured frames using Realsense
path_dataset : /home/emre/Programs/Open3D/examples/Python/ReconstructionSystem/dataset_hacettepe/mini
path_intrinsic : /home/emre/Programs/Open3D/examples/Python/ReconstructionSystem/dataset_hacettepe/instrict.json
max_depth : 3.0
voxel_size : 0.05
max_depth_diff : 0.07
preference_loop_closure_odometry : 0.1
preference_loop_closure_registration : 5.0
tsdf_cubic_size : 3.0
icp_method : color
global_registration : ransac
python_multi_threading : True
depth_map_type : redwood
n_frames_per_fragment : 100
n_keyframes_per_n_frame : 5
min_depth : 0.3
folder_fragment : fragments/
template_fragment_posegraph : fragments/fragment_%03d.json
template_fragment_posegraph_optimized : fragments/fragment_optimized_%03d.json
template_fragment_pointcloud : fragments/fragment_%03d.ply
folder_scene : scene/
template_global_posegraph : scene/global_registration.json
template_global_posegraph_optimized : scene/global_registration_optimized.json
template_refined_posegraph : scene/refined_registration.json
template_refined_posegraph_optimized : scene/refined_registration_optimized.json
template_global_mesh : scene/integrated.ply
template_global_traj : scene/trajectory.log
debug_mode : True
OpenCV is detected. Using ORB + 5pt algorithm
making fragments from RGBD sequence.
Fragment 000 / 000 :: RGBD matching between frame : 0 and 1
Fragment 000 / 000 :: RGBD matching between frame : 0 and 5
Fragment 000 / 000 :: RGBD matching between frame : 0 and 10
Fragment 000 / 000 :: RGBD matching between frame : 1 and 2
Fragment 000 / 000 :: RGBD matching between frame : 2 and 3
Fragment 000 / 000 :: RGBD matching between frame : 3 and 4
Fragment 000 / 000 :: RGBD matching between frame : 4 and 5
Fragment 000 / 000 :: RGBD matching between frame : 5 and 6
Fragment 000 / 000 :: RGBD matching between frame : 5 and 10
Fragment 000 / 000 :: RGBD matching between frame : 6 and 7
Fragment 000 / 000 :: RGBD matching between frame : 7 and 8
Fragment 000 / 000 :: RGBD matching between frame : 8 and 9
Fragment 000 / 000 :: RGBD matching between frame : 9 and 10
Fragment 000 / 000 :: RGBD matching between frame : 10 and 11
Fragment 000 / 000 :: RGBD matching between frame : 11 and 12
Fragment 000 / 000 :: RGBD matching between frame : 12 and 13
Fragment 000 / 000 :: RGBD matching between frame : 13 and 14
[Open3D DEBUG] Validating PoseGraph - finished.
[Open3D DEBUG] [GlobalOptimizationLM] Optimizing PoseGraph having 15 nodes and 17 edges.
[Open3D DEBUG] Line process weight : 0.002450
[Open3D DEBUG] [Initial ] residual : 1.032394e+01, lambda : 1.000849e-04
[Open3D DEBUG] Maximum coefficient of right term < 1.000000e-06
[Open3D DEBUG] [GlobalOptimizationLM] total time : 0.000 sec.
[Open3D DEBUG] [GlobalOptimizationLM] Optimizing PoseGraph having 15 nodes and 14 edges.
[Open3D DEBUG] Line process weight : 0.002450
[Open3D DEBUG] [Initial ] residual : 6.333382e-11, lambda : 1.000849e-04
[Open3D DEBUG] Maximum coefficient of right term < 1.000000e-06
[Open3D DEBUG] [GlobalOptimizationLM] total time : 0.000 sec.
[Open3D DEBUG] CompensateReferencePoseGraphNode : reference : 0
Fragment 000 / 000 :: integrate rgbd frame 0 (1 of 15).
Fragment 000 / 000 :: integrate rgbd frame 1 (2 of 15).
Fragment 000 / 000 :: integrate rgbd frame 2 (3 of 15).
Fragment 000 / 000 :: integrate rgbd frame 3 (4 of 15).
Fragment 000 / 000 :: integrate rgbd frame 4 (5 of 15).
Fragment 000 / 000 :: integrate rgbd frame 5 (6 of 15).
Fragment 000 / 000 :: integrate rgbd frame 6 (7 of 15).
Fragment 000 / 000 :: integrate rgbd frame 7 (8 of 15).
Fragment 000 / 000 :: integrate rgbd frame 8 (9 of 15).
Fragment 000 / 000 :: integrate rgbd frame 9 (10 of 15).
Fragment 000 / 000 :: integrate rgbd frame 10 (11 of 15).
Fragment 000 / 000 :: integrate rgbd frame 11 (12 of 15).
Fragment 000 / 000 :: integrate rgbd frame 12 (13 of 15).
Fragment 000 / 000 :: integrate rgbd frame 13 (14 of 15).
Fragment 000 / 000 :: integrate rgbd frame 14 (15 of 15).
register fragments.
[Open3D WARNING] PoseGraph read JSON failed: empty edges.
[Open3D DEBUG] Validating PoseGraph - finished.
[Open3D DEBUG] [GlobalOptimizationLM] Optimizing PoseGraph having 1 nodes and 0 edges.
[Open3D DEBUG] Line process weight : 0.000000
[Open3D DEBUG] [Initial ] residual : 0.000000e+00, lambda : 0.000000e+00
[Open3D DEBUG] Maximum coefficient of right term < 1.000000e-06
[Open3D DEBUG] [GlobalOptimizationLM] Optimizing PoseGraph having 1 nodes and 0 edges.
[Open3D DEBUG] Line process weight : 0.000000
[Open3D DEBUG] [Initial ] residual : 0.000000e+00, lambda : 0.000000e+00
[Open3D DEBUG] Maximum coefficient of right term < 1.000000e-06
[Open3D DEBUG] CompensateReferencePoseGraphNode : reference : 0
refine rough registration of fragments.
[Open3D WARNING] PoseGraph read JSON failed: empty edges.
registration::PoseGraph with 1 nodes and 0 edges.
[Open3D WARNING] PoseGraph read JSON failed: empty edges.
[Open3D DEBUG] Validating PoseGraph - finished.
[Open3D DEBUG] [GlobalOptimizationLM] Optimizing PoseGraph having 1 nodes and 0 edges.
[Open3D DEBUG] Line process weight : 0.000000
[Open3D DEBUG] [Initial ] residual : 0.000000e+00, lambda : 0.000000e+00
[Open3D DEBUG] Maximum coefficient of right term < 1.000000e-06
[Open3D DEBUG] [GlobalOptimizationLM] Optimizing PoseGraph having 1 nodes and 0 edges.
[Open3D DEBUG] Line process weight : 0.000000
[Open3D DEBUG] [Initial ] residual : 0.000000e+00, lambda : 0.000000e+00
[Open3D DEBUG] Maximum coefficient of right term < 1.000000e-06
[Open3D DEBUG] CompensateReferencePoseGraphNode : reference : 0
integrate the whole RGBD sequence using estimated camera pose.
Fragment 000 / 000 :: integrate rgbd frame 0 (1 of 15).
Fragment 000 / 000 :: integrate rgbd frame 1 (2 of 15).
Fragment 000 / 000 :: integrate rgbd frame 2 (3 of 15).
Fragment 000 / 000 :: integrate rgbd frame 3 (4 of 15).
Fragment 000 / 000 :: integrate rgbd frame 4 (5 of 15).
Fragment 000 / 000 :: integrate rgbd frame 5 (6 of 15).
Fragment 000 / 000 :: integrate rgbd frame 6 (7 of 15).
Fragment 000 / 000 :: integrate rgbd frame 7 (8 of 15).
Fragment 000 / 000 :: integrate rgbd frame 8 (9 of 15).
Fragment 000 / 000 :: integrate rgbd frame 9 (10 of 15).
Fragment 000 / 000 :: integrate rgbd frame 10 (11 of 15).
Fragment 000 / 000 :: integrate rgbd frame 11 (12 of 15).
Fragment 000 / 000 :: integrate rgbd frame 12 (13 of 15).
Fragment 000 / 000 :: integrate rgbd frame 13 (14 of 15).
Fragment 000 / 000 :: integrate rgbd frame 14 (15 of 15).
Traceback (most recent call last):
File "/home/emre/Programs/Open3D/examples/Python/ReconstructionSystem/run_system.py", line 79, in <module>
integrate_scene.run(config)
File "/home/emre/Programs/Open3D/examples/Python/ReconstructionSystem/integrate_scene.py", line 71, in run
scalable_integrate_rgb_frames(config["path_dataset"], intrinsic, config)
File "/home/emre/Programs/Open3D/examples/Python/ReconstructionSystem/integrate_scene.py", line 54, in scalable_integrate_rgb_frames
o3d.visualization.draw_geometries([mesh])
RuntimeError: [Open3D ERROR] [CreateCoordinateFrame] size <= 0
I also tried to give ICL-NUIM dataset as an input. Nothing changed. Here is output:
====================================
Configuration
====================================
name : Captured frames using Realsense
path_dataset : /home/emre/Programs/Open3D/examples/Python/ReconstructionSystem/dataset_hacettepe/mini
path_intrinsic : /home/emre/Programs/Open3D/examples/Python/ReconstructionSystem/dataset_hacettepe/instrict_kt2.json
max_depth : 3.0
voxel_size : 0.05
max_depth_diff : 0.07
preference_loop_closure_odometry : 0.1
preference_loop_closure_registration : 5.0
tsdf_cubic_size : 3.0
icp_method : color
global_registration : ransac
python_multi_threading : True
depth_map_type : redwood
n_frames_per_fragment : 100
n_keyframes_per_n_frame : 5
min_depth : 0.3
folder_fragment : fragments/
template_fragment_posegraph : fragments/fragment_%03d.json
template_fragment_posegraph_optimized : fragments/fragment_optimized_%03d.json
template_fragment_pointcloud : fragments/fragment_%03d.ply
folder_scene : scene/
template_global_posegraph : scene/global_registration.json
template_global_posegraph_optimized : scene/global_registration_optimized.json
template_refined_posegraph : scene/refined_registration.json
template_refined_posegraph_optimized : scene/refined_registration_optimized.json
template_global_mesh : scene/integrated.ply
template_global_traj : scene/trajectory.log
debug_mode : True
OpenCV is detected. Using ORB + 5pt algorithm
making fragments from RGBD sequence.
Fragment 000 / 000 :: RGBD matching between frame : 0 and 1
Fragment 000 / 000 :: RGBD matching between frame : 0 and 5
Fragment 000 / 000 :: RGBD matching between frame : 0 and 10
Fragment 000 / 000 :: RGBD matching between frame : 1 and 2
Fragment 000 / 000 :: RGBD matching between frame : 2 and 3
Fragment 000 / 000 :: RGBD matching between frame : 3 and 4
Fragment 000 / 000 :: RGBD matching between frame : 4 and 5
Fragment 000 / 000 :: RGBD matching between frame : 5 and 6
Fragment 000 / 000 :: RGBD matching between frame : 5 and 10
Fragment 000 / 000 :: RGBD matching between frame : 6 and 7
Fragment 000 / 000 :: RGBD matching between frame : 7 and 8
Fragment 000 / 000 :: RGBD matching between frame : 8 and 9
Fragment 000 / 000 :: RGBD matching between frame : 9 and 10
Fragment 000 / 000 :: RGBD matching between frame : 10 and 11
Fragment 000 / 000 :: RGBD matching between frame : 11 and 12
Fragment 000 / 000 :: RGBD matching between frame : 12 and 13
Fragment 000 / 000 :: RGBD matching between frame : 13 and 14
[Open3D DEBUG] Validating PoseGraph - finished.
[Open3D DEBUG] [GlobalOptimizationLM] Optimizing PoseGraph having 15 nodes and 17 edges.
[Open3D DEBUG] Line process weight : 0.002450
[Open3D DEBUG] [Initial ] residual : 0.000000e+00, lambda : 2.000000e-04
[Open3D DEBUG] Maximum coefficient of right term < 1.000000e-06
[Open3D DEBUG] [GlobalOptimizationLM] Optimizing PoseGraph having 15 nodes and 17 edges.
[Open3D DEBUG] Line process weight : 0.002450
[Open3D DEBUG] [Initial ] residual : 0.000000e+00, lambda : 2.000000e-04
[Open3D DEBUG] Maximum coefficient of right term < 1.000000e-06
[Open3D DEBUG] CompensateReferencePoseGraphNode : reference : 0
Fragment 000 / 000 :: integrate rgbd frame 0 (1 of 15).
Fragment 000 / 000 :: integrate rgbd frame 1 (2 of 15).
Fragment 000 / 000 :: integrate rgbd frame 2 (3 of 15).
Fragment 000 / 000 :: integrate rgbd frame 3 (4 of 15).
Fragment 000 / 000 :: integrate rgbd frame 4 (5 of 15).
Fragment 000 / 000 :: integrate rgbd frame 5 (6 of 15).
Fragment 000 / 000 :: integrate rgbd frame 6 (7 of 15).
Fragment 000 / 000 :: integrate rgbd frame 7 (8 of 15).
Fragment 000 / 000 :: integrate rgbd frame 8 (9 of 15).
Fragment 000 / 000 :: integrate rgbd frame 9 (10 of 15).
Fragment 000 / 000 :: integrate rgbd frame 10 (11 of 15).
Fragment 000 / 000 :: integrate rgbd frame 11 (12 of 15).
Fragment 000 / 000 :: integrate rgbd frame 12 (13 of 15).
Fragment 000 / 000 :: integrate rgbd frame 13 (14 of 15).
Fragment 000 / 000 :: integrate rgbd frame 14 (15 of 15).
register fragments.
[Open3D WARNING] PoseGraph read JSON failed: empty edges.
[Open3D DEBUG] Validating PoseGraph - finished.
[Open3D DEBUG] [GlobalOptimizationLM] Optimizing PoseGraph having 1 nodes and 0 edges.
[Open3D DEBUG] Line process weight : 0.000000
[Open3D DEBUG] [Initial ] residual : 0.000000e+00, lambda : 0.000000e+00
[Open3D DEBUG] Maximum coefficient of right term < 1.000000e-06
[Open3D DEBUG] [GlobalOptimizationLM] Optimizing PoseGraph having 1 nodes and 0 edges.
[Open3D DEBUG] Line process weight : 0.000000
[Open3D DEBUG] [Initial ] residual : 0.000000e+00, lambda : 0.000000e+00
[Open3D DEBUG] Maximum coefficient of right term < 1.000000e-06
[Open3D DEBUG] CompensateReferencePoseGraphNode : reference : 0
refine rough registration of fragments.
[Open3D WARNING] PoseGraph read JSON failed: empty edges.
registration::PoseGraph with 1 nodes and 0 edges.
[Open3D WARNING] PoseGraph read JSON failed: empty edges.
[Open3D DEBUG] Validating PoseGraph - finished.
[Open3D DEBUG] [GlobalOptimizationLM] Optimizing PoseGraph having 1 nodes and 0 edges.
[Open3D DEBUG] Line process weight : 0.000000
[Open3D DEBUG] [Initial ] residual : 0.000000e+00, lambda : 0.000000e+00
[Open3D DEBUG] Maximum coefficient of right term < 1.000000e-06
[Open3D DEBUG] [GlobalOptimizationLM] Optimizing PoseGraph having 1 nodes and 0 edges.
[Open3D DEBUG] Line process weight : 0.000000
[Open3D DEBUG] [Initial ] residual : 0.000000e+00, lambda : 0.000000e+00
[Open3D DEBUG] Maximum coefficient of right term < 1.000000e-06
[Open3D DEBUG] CompensateReferencePoseGraphNode : reference : 0
integrate the whole RGBD sequence using estimated camera pose.
OWN CAM IS USED
Fragment 000 / 000 :: integrate rgbd frame 0 (1 of 15).
Fragment 000 / 000 :: integrate rgbd frame 1 (2 of 15).
Fragment 000 / 000 :: integrate rgbd frame 2 (3 of 15).
Fragment 000 / 000 :: integrate rgbd frame 3 (4 of 15).
Fragment 000 / 000 :: integrate rgbd frame 4 (5 of 15).
Fragment 000 / 000 :: integrate rgbd frame 5 (6 of 15).
Fragment 000 / 000 :: integrate rgbd frame 6 (7 of 15).
Fragment 000 / 000 :: integrate rgbd frame 7 (8 of 15).
Fragment 000 / 000 :: integrate rgbd frame 8 (9 of 15).
Fragment 000 / 000 :: integrate rgbd frame 9 (10 of 15).
Fragment 000 / 000 :: integrate rgbd frame 10 (11 of 15).
Fragment 000 / 000 :: integrate rgbd frame 11 (12 of 15).
Fragment 000 / 000 :: integrate rgbd frame 12 (13 of 15).
Fragment 000 / 000 :: integrate rgbd frame 13 (14 of 15).
Fragment 000 / 000 :: integrate rgbd frame 14 (15 of 15).
Traceback (most recent call last):
File "/home/emre/Programs/Open3D/examples/Python/ReconstructionSystem/run_system.py", line 81, in <module>
integrate_scene.run(config)
File "/home/emre/Programs/Open3D/examples/Python/ReconstructionSystem/integrate_scene.py", line 72, in run
scalable_integrate_rgb_frames(config["path_dataset"], intrinsic, config)
File "/home/emre/Programs/Open3D/examples/Python/ReconstructionSystem/integrate_scene.py", line 54, in scalable_integrate_rgb_frames
o3d.visualization.draw_geometries([mesh])
RuntimeError: [Open3D ERROR] [CreateCoordinateFrame] size <= 0
I do not want to keep busy the issue, but I download datasets with scripts. Results is fine. I guess depth images in my own dataset are not valid. I am going deeper :)))
There should be something wrong with the poses, since normally we would expect to see outputs from global optimization similar to our tutorial instead of pure 0s. Incorrect poses will cause the integration module sparsly scattering points inside the TSDF volume, where MarchingCubes cannot extract a single point.
General problems can be caused by:
Oh @EmreOzkose I closely checked your log, the problem was with fragments. We assume a dataset contains more than 100 frames and we construct one fragment per 100 frames, but you only input 15 frames. This will not trigger following stages and will cause an error in the final output.
The reconstructed model of the 15 frames should be already in fragments/
folder. If you want a large complete model, try more frames.
Hi I am trying to run a simple python script;
pcd_load = o3d.io.read_point_cloud('000012.ply') pcd_load.transform([[1, 0, 0, 0], [0, -1, 0, 0], [0, 0, -1, 0], [0, 0, 0, 1]]) o3d.visualization.draw_geometries([pcd_load])
which displays the loaded point cloud file when I run the python script from VS, cmd, anaconda prompt and powershell. However for some reasons I have to execute the same python file via a UI which I am writing in c#. While running the python script from c#, the error comes as RuntimeError: [Open3D ERROR] [CreateCoordinateFrame] size <= 0?
However running the source python file as it is does not throw any error, could you let me know what is going wrong? I am sure that my way of running python script from c# is correct, coz I am able to run other similar scripts in a same manner.
Thanks
I have the same issue. macOS with open3d._version_ == 1.10.0.0
o3d.geometry.RGBDImage.create_from_color_and_depth(o3d.io.read_image("/img/path.png"), o3d.io.read_image("/depth/path.png"))
gives:
RuntimeError: [Open3D ERROR] [CreateCoordinateFrame] size <= 0
How do I fix this? Please.
I have this issue just now, but I found that is was my mistake because I have input an empty mesh to the draw function. Why I input an empty mesh? because I have a wrong file path input, then there is actually no mesh loaded at all. When I set the correct path of input file, the function works perfect.
Closing since the error has been resolved. Thanks @johnnyhuziqin , @EmreOzkose, @lirhlirh . Others please ensure that your file path is correct and that the read point cloud is not empty. If you still face problems, please open a new issue.
I am try to smooth mesh , but it gives the following error: RuntimeError: [Open3D ERROR] [CreateCoordinateFrame] size <= 0
my code segment:
Environment: Anaconda3; python 3; Windows 10
I don't know where is my problem? Is there any explanation please?