Hello,
I am developing application, where I am working with point clouds, so I am using PCL. Target platform is linux running on Nvidia Jetson TX2. So far I figured out how to set up CLion IDE to remotely deploy code to Jetson. Since I do not (and do not want to) have a monitor attached to Jetson, I would like to run some executable on Jetson, then produce some output (lets say, take a picture from RealSense camera and save it to PCD format) and examine it on my computer (where I am running CLion, so I am writing code here. Also Ubuntu 16.04 LTS).
The issue is - I am able to take a picture and convert it to PCD !AND! display it BUT only on Jetson. As I have mentioned above - I no longer have ani kind of display attached on Jetson, so I simply copy the .pcd file to my computer via SFTP. When I run this short piece of code:
pcl::io::loadPCDFile<pcl::PointXYZRGB> (filename, *cloud);
on my computer, I get _Failed to find match for field 'rgb'_ message. I am able to run this and view this pointcloud on Jetson. Also I am able to open this .pcd file on my computer from terminal, like this pcl_viewer 2.pcd it opens just fine. The only problem is, when I try to run it from code.
Any suggestions? Thank you
//EDIT: I am adding output of ldconfig -p | grep pcl on both systems
Computer, Ubuntu 16.04 LTS:
libpcl_2d.so.1.8 (libc6,x86-64) => /usr/local/lib/libpcl_2d.so.1.8
libpcl_2d.so (libc6,x86-64) => /usr/local/lib/libpcl_2d.so
libpcl_visualization.so.1.8 (libc6,x86-64) => /usr/local/lib/libpcl_visualization.so.1.8
libpcl_visualization.so (libc6,x86-64) => /usr/local/lib/libpcl_visualization.so
libpcl_tracking.so.1.8 (libc6,x86-64) => /usr/local/lib/libpcl_tracking.so.1.8
libpcl_tracking.so (libc6,x86-64) => /usr/local/lib/libpcl_tracking.so
libpcl_surface.so.1.8 (libc6,x86-64) => /usr/local/lib/libpcl_surface.so.1.8
libpcl_surface.so (libc6,x86-64) => /usr/local/lib/libpcl_surface.so
libpcl_stereo.so.1.8 (libc6,x86-64) => /usr/local/lib/libpcl_stereo.so.1.8
libpcl_stereo.so (libc6,x86-64) => /usr/local/lib/libpcl_stereo.so
libpcl_segmentation.so.1.8 (libc6,x86-64) => /usr/local/lib/libpcl_segmentation.so.1.8
libpcl_segmentation.so (libc6,x86-64) => /usr/local/lib/libpcl_segmentation.so
libpcl_search.so.1.8 (libc6,x86-64) => /usr/local/lib/libpcl_search.so.1.8
libpcl_search.so (libc6,x86-64) => /usr/local/lib/libpcl_search.so
libpcl_sample_consensus.so.1.8 (libc6,x86-64) => /usr/local/lib/libpcl_sample_consensus.so.1.8
libpcl_sample_consensus.so (libc6,x86-64) => /usr/local/lib/libpcl_sample_consensus.so
libpcl_registration.so.1.8 (libc6,x86-64) => /usr/local/lib/libpcl_registration.so.1.8
libpcl_registration.so (libc6,x86-64) => /usr/local/lib/libpcl_registration.so
libpcl_recognition.so.1.8 (libc6,x86-64) => /usr/local/lib/libpcl_recognition.so.1.8
libpcl_recognition.so (libc6,x86-64) => /usr/local/lib/libpcl_recognition.so
libpcl_people.so.1.8 (libc6,x86-64) => /usr/local/lib/libpcl_people.so.1.8
libpcl_people.so (libc6,x86-64) => /usr/local/lib/libpcl_people.so
libpcl_outofcore.so.1.8 (libc6,x86-64) => /usr/local/lib/libpcl_outofcore.so.1.8
libpcl_outofcore.so (libc6,x86-64) => /usr/local/lib/libpcl_outofcore.so
libpcl_octree.so.1.8 (libc6,x86-64) => /usr/local/lib/libpcl_octree.so.1.8
libpcl_octree.so (libc6,x86-64) => /usr/local/lib/libpcl_octree.so
libpcl_ml.so.1.8 (libc6,x86-64) => /usr/local/lib/libpcl_ml.so.1.8
libpcl_ml.so (libc6,x86-64) => /usr/local/lib/libpcl_ml.so
libpcl_keypoints.so.1.8 (libc6,x86-64) => /usr/local/lib/libpcl_keypoints.so.1.8
libpcl_keypoints.so (libc6,x86-64) => /usr/local/lib/libpcl_keypoints.so
libpcl_kdtree.so.1.8 (libc6,x86-64) => /usr/local/lib/libpcl_kdtree.so.1.8
libpcl_kdtree.so (libc6,x86-64) => /usr/local/lib/libpcl_kdtree.so
libpcl_io_ply.so.1.8 (libc6,x86-64) => /usr/local/lib/libpcl_io_ply.so.1.8
libpcl_io_ply.so (libc6,x86-64) => /usr/local/lib/libpcl_io_ply.so
libpcl_io.so.1.8 (libc6,x86-64) => /usr/local/lib/libpcl_io.so.1.8
libpcl_io.so (libc6,x86-64) => /usr/local/lib/libpcl_io.so
libpcl_filters.so.1.8 (libc6,x86-64) => /usr/local/lib/libpcl_filters.so.1.8
libpcl_filters.so (libc6,x86-64) => /usr/local/lib/libpcl_filters.so
libpcl_features.so.1.8 (libc6,x86-64) => /usr/local/lib/libpcl_features.so.1.8
libpcl_features.so (libc6,x86-64) => /usr/local/lib/libpcl_features.so
libpcl_common.so.1.8 (libc6,x86-64) => /usr/local/lib/libpcl_common.so.1.8
libpcl_common.so (libc6,x86-64) => /usr/local/lib/libpcl_common.so
Nvidia Jetson TX2, Ubuntu 16.04 LTS:
libpcl_visualization.so.1.8 (libc6,AArch64) => /usr/local/lib/libpcl_visualization.so.1.8
libpcl_visualization.so (libc6,AArch64) => /usr/local/lib/libpcl_visualization.so
libpcl_tracking.so.1.8 (libc6,AArch64) => /usr/local/lib/libpcl_tracking.so.1.8
libpcl_tracking.so (libc6,AArch64) => /usr/local/lib/libpcl_tracking.so
libpcl_surface.so.1.8 (libc6,AArch64) => /usr/local/lib/libpcl_surface.so.1.8
libpcl_surface.so (libc6,AArch64) => /usr/local/lib/libpcl_surface.so
libpcl_stereo.so.1.8 (libc6,AArch64) => /usr/local/lib/libpcl_stereo.so.1.8
libpcl_stereo.so (libc6,AArch64) => /usr/local/lib/libpcl_stereo.so
libpcl_segmentation.so.1.8 (libc6,AArch64) => /usr/local/lib/libpcl_segmentation.so.1.8
libpcl_segmentation.so (libc6,AArch64) => /usr/local/lib/libpcl_segmentation.so
libpcl_search.so.1.8 (libc6,AArch64) => /usr/local/lib/libpcl_search.so.1.8
libpcl_search.so (libc6,AArch64) => /usr/local/lib/libpcl_search.so
libpcl_sample_consensus.so.1.8 (libc6,AArch64) => /usr/local/lib/libpcl_sample_consensus.so.1.8
libpcl_sample_consensus.so (libc6,AArch64) => /usr/local/lib/libpcl_sample_consensus.so
libpcl_registration.so.1.8 (libc6,AArch64) => /usr/local/lib/libpcl_registration.so.1.8
libpcl_registration.so (libc6,AArch64) => /usr/local/lib/libpcl_registration.so
libpcl_recognition.so.1.8 (libc6,AArch64) => /usr/local/lib/libpcl_recognition.so.1.8
libpcl_recognition.so (libc6,AArch64) => /usr/local/lib/libpcl_recognition.so
libpcl_people.so.1.8 (libc6,AArch64) => /usr/local/lib/libpcl_people.so.1.8
libpcl_people.so (libc6,AArch64) => /usr/local/lib/libpcl_people.so
libpcl_outofcore.so.1.8 (libc6,AArch64) => /usr/local/lib/libpcl_outofcore.so.1.8
libpcl_outofcore.so (libc6,AArch64) => /usr/local/lib/libpcl_outofcore.so
libpcl_octree.so.1.8 (libc6,AArch64) => /usr/local/lib/libpcl_octree.so.1.8
libpcl_octree.so (libc6,AArch64) => /usr/local/lib/libpcl_octree.so
libpcl_ml.so.1.8 (libc6,AArch64) => /usr/local/lib/libpcl_ml.so.1.8
libpcl_ml.so (libc6,AArch64) => /usr/local/lib/libpcl_ml.so
libpcl_keypoints.so.1.8 (libc6,AArch64) => /usr/local/lib/libpcl_keypoints.so.1.8
libpcl_keypoints.so (libc6,AArch64) => /usr/local/lib/libpcl_keypoints.so
libpcl_kdtree.so.1.8 (libc6,AArch64) => /usr/local/lib/libpcl_kdtree.so.1.8
libpcl_kdtree.so (libc6,AArch64) => /usr/local/lib/libpcl_kdtree.so
libpcl_io_ply.so.1.8 (libc6,AArch64) => /usr/local/lib/libpcl_io_ply.so.1.8
libpcl_io_ply.so (libc6,AArch64) => /usr/local/lib/libpcl_io_ply.so
libpcl_io.so.1.8 (libc6,AArch64) => /usr/local/lib/libpcl_io.so.1.8
libpcl_io.so (libc6,AArch64) => /usr/local/lib/libpcl_io.so
libpcl_filters.so.1.8 (libc6,AArch64) => /usr/local/lib/libpcl_filters.so.1.8
libpcl_filters.so (libc6,AArch64) => /usr/local/lib/libpcl_filters.so
libpcl_features.so.1.8 (libc6,AArch64) => /usr/local/lib/libpcl_features.so.1.8
libpcl_features.so (libc6,AArch64) => /usr/local/lib/libpcl_features.so
libpcl_common.so.1.8 (libc6,AArch64) => /usr/local/lib/libpcl_common.so.1.8
libpcl_common.so (libc6,AArch64) => /usr/local/lib/libpcl_common.so
I get Failed to find match for field 'rgb' message.
This is just a warning from the loader saying the pcd file you gave to it has no color information, although you're trying to create an PointXYZRGB point cloud from it.
Also I am able to open this .pcd file on my computer from terminal, like this pcl_viewer 2.pcd it opens just fine. The only problem is, when I try to run it from code.
This means everything is ok with your pcd file and that your code is not working.
Any suggestions?
There's not much I can say without seeing your code. But in theory following this tutorial should get you there
http://pointclouds.org/documentation/tutorials/cloud_viewer.php#cloud-viewer
Thanks for your reply. But the .pcd file has a color data. Look here: https://github.com/eMrazSVK/JetsonSLAM/blob/develop/shared_resources/2.pcd
When I run the same code on Jetson it works fine. It just does not work on my laptop. I do not know why. Btw the whole code is in my JetsonSLAM repo here on my github account. Here is the piece of code where I try to load pcd file: https://github.com/eMrazSVK/JetsonSLAM/blob/develop/lib/jetSlam_registration_toolkit.cpp#L4
This means everything is ok with your pcd file and that your code is not working.
My code works on different system (Jetson).
What PCL version are you using on your computer and on Jetson? Did you compile any of them yourself?
I am using PCL 1.8 (this is why I posted output from ldconfig -p | grep pcl in my original question). Yeah, I compiled it myself both on my computer and on Jetson too.
Could you give it a try at compiling current master branch and report results? We tweaked pcd io functionalities around that 1.8.0 version.
I'm sorry. Before that... you told me pcl_viewer is working on your computer. Please try the tutorial I've linked before just so that we can ensure/rule out if this is a problem with your pcl version or your project.
I'm sorry. Before that... you told me pcd_viewer is working on your computer. Please try the tutorial I've linked before just so that we can ensure rule out if this is a problem with your pcl version or your project.
Yeah, but it is working. From command line it works fine on my computer. But not from code. That is the problem which causes confusion.
//EDIT: We have a little misunderstanding I guess - it fails on loading the cloud. The viewer is not a problem.
Also try to change point type to PointXYZRGBA.
@taketwo hi, thanks for the tip, but Ive already tried that one. Same output - Failed to find match for field 'rgb', but instead of rgb, I get 'rgba'
Could you either post the entire PCD file, or it's header (plain text)?
@taketwo Hello again,
You cand find the .pcd file here
https://github.com/eMrazSVK/JetsonSLAM/tree/develop/shared_resources
I am able to load the file without any warnings, my PCL was compiled from GitHub master in mid September.
You mentioned that you compiled 1.8 from source on both systems. Was it 1.8.0 or 1.8.1? Could it be that you have different patch versions on your machines? Anyway, I'd recommend to recompile from latest source on your development machine.
Is there any way I can find which exact version I am using? Sorry, I dont remember, this is my fault.
I will recompile from latest source anyways and close this issue, if it will resolve the problem.
Many thanks!
Well it's totally our fault that we have incompatibility between patch versions. But what's done is done :(
You can find PCL version in PCLConfigVersion.cmake, which is installed into PCL_ROOT/share/pcl-1.8/ folder.
Hello again,
Thanks to both of you, @taketwo @SergioRAgostinho . Recompilation from source (current source downloaded from GitHub) solved the issue, I am now able to load the .pcd file, view it from code, detect keypoints and do all processing, which I programmed in the past. So I can close this one.
Have a nice day