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

0it [00:00, ?it/s] #4

Open
JoseM1219 opened this issue Mar 13, 2022 · 16 comments
Open

0it [00:00, ?it/s] #4

JoseM1219 opened this issue Mar 13, 2022 · 16 comments

Comments

@JoseM1219
Copy link

Finish to load point clouds!
Finish to generate csv meta file
Converting Start!
0it [00:00, ?it/s] when I run the file "pcd2bin.py". How can i figure it out please?
Would you please give me some help please? Thank you very much.

@Yuseung-Na
Copy link
Owner

What is your file folder tree like?
And how did you enter the command?

@AsiDiaz
Copy link

AsiDiaz commented Mar 16, 2022

I have the same issue, I have a folder with all the pcd files and the bin folder is empty. This is the command I used: python3 pcd2bin.py --pcd_path={"/home/asier/rosbag2pcd2bin_converter/pcd_files"} --file_name={"0000000000"}

I changed the default bin path in the code to /home/asier/lidar_bin.

@JoseM1219
Copy link
Author

What is your file folder tree like? And how did you enter the command?

Same as AsiDiaz said, i'm using the command like this "python3 pcd2bin.py --pcd_path=~/Escritorio/PcdToBin/1531799410.004783000.pcd --bin_path=Binarios --file_name=test"

@Yuseung-Na
Copy link
Owner

I've used like python pcd2bin.py --pcd_path=/home/user/lidar_pcd --bin_path=/home/user/lidar_bin --file_name=convert

Then, converted ".bin" files are saved at /home/user/lidar_bin as "convert_00000.bin, convert_00001.bin, ..."

@JoseM1219
Copy link
Author

What version of python are you using??
I'm using Python 3.8.10 and i runned this command
"python3 pcd2bin.py --pcd_path=/home/user/Escritorio/PcdToBin --bin_path=/home/user/Escritorio/lidar_bin --file_name=convert"
and this happened:
Finish to load point clouds!
Finish to generate csv meta file
Converting Start!
0%| | 0/1 [00:00<?, ?it/s]
Traceback (most recent call last):
File "pcd2bin.py", line 112, in
main()
File "pcd2bin.py", line 84, in main
pc = pypcd.PointCloud.from_path(pcd_file)
File "/home/user/.local/lib/python3.8/site-packages/pypcd/pypcd.py", line 736, in from_path
return point_cloud_from_path(fname)
File "/home/user/.local/lib/python3.8/site-packages/pypcd/pypcd.py", line 303, in point_cloud_from_path
pc = point_cloud_from_fileobj(f)
File "/home/user/.local/lib/python3.8/site-packages/pypcd/pypcd.py", line 283, in point_cloud_from_fileobj
if ln.startswith('DATA'):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

@Yuseung-Na
Copy link
Owner

I've evaluated my code with python version 2.7 in both Windows 10 and Linux Ubuntu 18.04 using Anaconda envs.

@JoseM1219
Copy link
Author

I've evaluated my code with python version 2.7 in both Windows 10 and Linux Ubuntu 18.04 using Anaconda envs.

I will try that, thank you so much!!

@Yuseung-Na
Copy link
Owner

I should test with python 3.x..
Maybe pypcd will make error with python 3.x if install by pip.

@JoseM1219
Copy link
Author

I should test with python 3.x.. Maybe pypcd will make error with python 3.x if install by pip.

If you do that, please let me know. It would be awesome!!

@mreece813
Copy link

hello, i came across this repo to try and help me change pcd files to bin. I have pip installed pypcd but i am getting an error at the moment saying:
image

if you have come across this that would be amazing. Thank you

@mreece813
Copy link

i was able to fix the pypcd error. I was able to clone a pypcd repo inside of this repo. then have to change line 15 from:
import pypcd to
from pypcd import pypcd
this is the clone repo:
!pip install --user git+https://github.com/DanielPollithy/pypcd.git

@JoseM1219
Copy link
Author

I've evaluated my code with python version 2.7 in both Windows 10 and Linux Ubuntu 18.04 using Anaconda envs.

This happened when i tried to execute the command on my Anaconda env with python 2.7. Would you please give me some help?

Finish to load point clouds!
Finish to generate csv meta file
Converting Start!
0%| | 0/9197 [00:00<?, ?it/s]
Traceback (most recent call last):
File "pcd2bin.py", line 112, in
main()
File "pcd2bin.py", line 84, in main
pc = pypcd.PointCloud.from_path(pcd_file)
File "/home/josem/.local/lib/python2.7/site-packages/pypcd/pypcd.py", line 735, in from_path
return point_cloud_from_path(fname)
File "/home/josem/.local/lib/python2.7/site-packages/pypcd/pypcd.py", line 302, in point_cloud_from_path
pc = point_cloud_from_fileobj(f)
File "/home/josem/.local/lib/python2.7/site-packages/pypcd/pypcd.py", line 284, in point_cloud_from_fileobj
dtype = _build_dtype(metadata)
File "/home/josem/.local/lib/python2.7/site-packages/pypcd/pypcd.py", line 210, in _build_dtype
dtype = np.dtype(zip(fieldnames, typenames))
ValueError: field '__0000' occurs more than once

@Yuseung-Na
Copy link
Owner

It is comes from DATA type.

Here is the same issue as yours.
dimatura/pypcd#30

@eiffelbastin
Copy link

hey @Yuseung-Na

i used this line to input my pcd file and mention the output folder directory and file name
python pcd2bin.py --pcd_path=C:\Users\91828\Downloads\New folder\pcd --bin_path=C:\Users\91828\Downloads\New folder\bin --file_name=test123

but I'm getting this 'unrecognized argument' error
usage: pcd2bin.py [-h] [--pcd_path PCD_PATH] [--bin_path BIN_PATH] [--file_name FILE_NAME] pcd2bin.py: error: unrecognized arguments: folder\pcd folder\bin

can u help me out of this situation

@Yuseung-Na
Copy link
Owner

I think you should erase 'space' such as "New folder" in the path.
Please change "New folder" to "New_folder" or something.

@eiffelbastin
Copy link

I think you should erase 'space' such as "New folder" in the path. Please change "New folder" to "New_folder" or something.

thank you so much buddy (excuse my silly mistake !!)

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

5 participants