Open venkataksv opened 4 years ago
I have the same problem. If the .pcd file have DATA ascii
there is no problem but in the case DATA binary
I get the same error.
So, my problem was that I had used the bag_to_pcd
from the ros node pcl_ros
. That script added two _
in FIELDS
line in the header. Changing these two _
to something else made it work.
@TheLaas adding the two highlighted lines below fixes the issue
def parseheader(lines): """ Parse header of PCD files. """ metadata = {} for ln in lines: if ln.startswith('#') or len(ln) < 2: continue **ln = ln.replace('','s',1) ln = ln.replace('_','m',1)** print(ln) match = re.match('(\w+)\s+([\w\s.]+)', str(ln))
@TheLaas Could oyu please tell me how and where did you edit the code? I do No t know how to do this ..
So, my problem was that I had used the
bag_to_pcd
from the ros nodepcl_ros
. That script added two_
inFIELDS
line in the header. Changing these two_
to something else made it work.
I have the same question. Could you have the answer to this question?
If I remember correctly I didn't change the code, I made a script that changed the output-files from bag_to_pcl
. And replaced the _
from FIELDS
there.
@TheLaas adding the two highlighted lines below fixes the issue
def parse_header(lines): """ Parse header of PCD files. """ metadata = {} for ln in lines: if ln.startswith('#') or len(ln) < 2: continue ln = ln.replace('_','s',1) ln = ln.replace('_','m',1) print(ln) match = re.match('(\w+)\s+([\w\s.]+)', str(ln))
I think this is an addition to the above section, although it may have been resolved.
Hi, if I change pypcd.py as you suggested above, I get the following error: Has someone an idea how I can fix this issue? Thanks in advance!
@dimatura , Thanks for putting together an amazing support for reading point cloud data in python. PCD is a widely used extension in the CV community. I was trying to leverage pypcd support to read a binary pcd but was unsuccessful in all my attempts. Can you please guide me on how to fix this issue to be able to read the pcd info ( binary/ascii ) successfully.
Attaching for reference of the error i had been receiving:
FYI: I was just using
where abc.pcd was a binary format pcd.