-
Notifications
You must be signed in to change notification settings - Fork 143
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
Fixbug save_pclouds.py #29
Conversation
1.Fix wrong type : WindowPath -> str(path) for np.loadtxt 2.Fix wrong rgb, depth file path 3. 'is not' keyword seems to make warnnig in python 3.8 4. default state of parameter 'disable_project_pinhole' in 'save_pclouds()' changed to true.
The point cloud will be overwrited If it already exists.
rgb_tmp = Path(rgb_parts[1]) / Path(rgb_parts[2]) | ||
depth_parts = Path(depth_proj_path).parts[2:] | ||
depth_parts = Path(depth_proj_path).parts[3:] | ||
depth_tmp = Path(depth_parts[1]) / Path(depth_parts[2]) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the path of everyone is not the same, so the best solution is as follows:
rgb_parts = Path(rgb_proj_path).parts[2:]
rgb_tmp = Path(rgb_parts[-2]) / Path(rgb_parts[-1])
depth_parts = Path(depth_proj_path).parts[2:]
depth_tmp = Path(depth_parts[-2]) / Path(depth_parts[-1])
And tsdf-integration.py can be run correctly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, The filepath seems to be different for each OS.
Your code works well in windows10, I haven't tried it for other OS, but it will probably work.
I have found bugs since I try to run tsdf script. The bugs is made by save_pclouds.py script.
Please confirm my reports. (It's only tested in Windows 10)
1.Fix wrong type : WindowPath -> str(path) on np.loadtxt()
2.Fix wrong generation code : rgb, depth filepath in [pinhole_projection/depth.txt, rgb.txt]
3. 'is not' keyword seems to make warnnig in python 3.8
4. default state of parameter 'disable_project_pinhole' in 'save_pclouds()' changed to true.
5. remove 'skip code' of generating .ply if it already exist. So files in 'pinhole_projection' will be overwrited if it is already exists.
Nevertheless, The reason why it need to be overwrited is that original code have possibility to create bug that it also does not create right .txt files(rgb,depth,odometry,trajectory...) if .ply was already generated by other script.