Problems with PCD Viewer sample

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems with PCD Viewer sample

Orlando
Hello everybody, somebody here can tell me why the PCD Viewer (in the PCL web) doesnt work, please?

Because I have tried follow the sample in these pages:
 
The sample of a PCD file:
http://www.pointclouds.org/documentation/tutorials/pcd_file_format.php

The code sample:
http://www.pointclouds.org/documentation/tutorials/cloud_viewer.php
 
But doesnt work for me :(

Other thing, in the sample file there are  4 columns ( 0.93773 0.33763 0 4.2108e+06 )
What is the fourth one? ( 1, 2 & 3 are "x,y,z" )

Can you help me please. I am beginning in PCL.
Thanks in advance.
Orlando Herrera
twitter: @orlando_herrera
Reply | Threaded
Open this post in threaded view
|

Re: Problems with PCD Viewer sample

Sergey
Administrator
Hi Orlando,

This sample and this PCD file seem to work for most of the people. We therefore can not help you if don't provide any details (what exactly are you doing, what error are you getting, what is your PCL version, etc.).

As for the second question, the header of the file contains the line "FIELDS x y z rgb", which explains the meaning of the columns. The fourth one is thus "rgb" which is the color of a point, obviously.

Regards,
Sergey
Reply | Threaded
Open this post in threaded view
|

Re: Problems with PCD Viewer sample

Orlando
Im sorry Sergey.

Yes, Im using PCL 1.5.1 on windows 7 64 bits and Visual Studio 2010.
The PCD file is the same of the website and the code is exactly the same of the website.

The project is compiled fine, and when I build the project in Visual Studio is ok.

But when I execute the program there is an error:
" FILED TO FIND  A FIELD NAMED 'RGBA' CANNOT CONVERT MESSAGE TO PCL TYPE "

This is a picture of the error"
http://postimage.org/image/gdaw8uuw5/

The error is in this line :  pcl::io::loadPCDFile ("sample_pcd.pcd", *cloud);

Thank you for your help :D


The "cmake" file is very simple, is this (the same of the website):

cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
project(cloud_viewer)
find_package(PCL 1.2 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
add_executable (cloud_viewer cloud_viewer.cpp)
target_link_libraries (cloud_viewer ${PCL_LIBRARIES})





Orlando Herrera
twitter: @orlando_herrera
Reply | Threaded
Open this post in threaded view
|

Re: Problems with PCD Viewer sample

Radu B. Rusu
Administrator
Either change your point type to PointXYZRGB instead of PointXYZRGBA, or change your dataset.

This was solved in trunk, but didn't make it into a release yet. The two color types have been historically incompatible
on load. That has been fixed.

Cheers,
Radu.
--
http://openperception.org

On 08/13/2012 08:08 AM, orlando wrote:

> Im sorry Sergey.
>
> Yes, Im using PCL 1.5.1 on windows 7 64 bits and Visual Studio 2010.
> The PCD file is the same of the website and the code is exactly the same of
> the website.
>
> The project is compiled fine, and when I build the project in Visual Studio
> is ok.
>
> But when I execute the program there is an error:
> " FILED TO FIND  A FIELD NAMED 'RGBA' CANNOT CONVERT MESSAGE TO PCL TYPE"
>
> This is a picture of the error"
> http://postimage.org/image/gdaw8uuw5/
>
> The error is in this line :  pcl::io::loadPCDFile ("sample_pcd.pcd",
> *cloud);
>
> Thank you for your help :D
>
>
> The "cmake" file is very simple, is this (the same of the website):
>
> cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
> project(cloud_viewer)
> find_package(PCL 1.2 REQUIRED)
> include_directories(${PCL_INCLUDE_DIRS})
> link_directories(${PCL_LIBRARY_DIRS})
> add_definitions(${PCL_DEFINITIONS})
> add_executable (cloud_viewer cloud_viewer.cpp)
> target_link_libraries (cloud_viewer ${PCL_LIBRARIES})
>
>
>
>
>
>
>
>
>
> --
> View this message in context: http://www.pcl-users.org/Problems-with-PCD-Viewer-sample-tp4021347p4021362.html
> Sent from the Point Cloud Library (PCL) Users mailing list archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users
>
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Problems with PCD Viewer sample

Sergey
Administrator
Orlando,

So my claim that "This sample and this PCD file seem to work for most of the people" was somewhat misleading, because in fact this sample does not work with this PCD file. Sorry :)

Sergey
Reply | Threaded
Open this post in threaded view
|

Re: Problems with PCD Viewer sample

Orlando
In reply to this post by Radu B. Rusu
Yes, Thank you Adu B. Rusu
I have done your suggestion. And now, works fine.
Thank you very much.

Other thing, can you recommend me one tutorial or example for surface reconstructing.
For example if I want to reconstruct the surface of that sphere in the "pcd viewer" sample.

Thank you again =)
Orlando Herrera
twitter: @orlando_herrera
Reply | Threaded
Open this post in threaded view
|

Re: Problems with PCD Viewer sample

Orlando
In reply to this post by Sergey
Thank you for your help Mr. Sergey.
Orlando Herrera
twitter: @orlando_herrera