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

Fixbug save_pclouds.py #29

Merged
merged 6 commits into from
Nov 3, 2020
Merged

Conversation

IkbeomJeon
Copy link
Contributor

@IkbeomJeon IkbeomJeon commented Sep 25, 2020

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)

  • Fixed bugs/warnning list

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.

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.
@ghost
Copy link

ghost commented Sep 25, 2020

CLA assistant check
All CLA requirements met.

@fbogo fbogo requested a review from kysucix September 25, 2020 13:32
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])

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

Copy link
Contributor Author

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.

@kysucix kysucix merged commit 87da3f2 into microsoft:main Nov 3, 2020
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

Successfully merging this pull request may close these issues.

None yet

3 participants