-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
3D Object Recognition Using Global Descriptor (Ensemble of Shape Functions) via PCL #5770
Comments
@muneeb127 I would change int main() {
calculateESFDescriptor("/path/to/file/one.pcd");
calculateESFDescriptor("/path/to/file/two.pcd");
calculateESFDescriptor("/path/to/file/three.pcd");
calculateESFDescriptor("/path/to/file/four.pcd");
} Does this process the given files correctly? |
@muneeb127 I tested the code from your last comment, only changing calculateESFDescriptor("/home/mvieth/pcl/test/bun01.pcd");
calculateESFDescriptor("/home/mvieth/pcl/test/bun02.pcd");
calculateESFDescriptor("/home/mvieth/pcl/test/bun03.pcd");
calculateESFDescriptor("/home/mvieth/pcl/test/bun4.pcd"); and it printed
So it works as expected on my computer.
Can you try to find out, where exactly the program exits, either with a debugger or with |
@mvieth Following are the specifications of my machine.
The program exits after saving the file to disk. It is not returning to main and entering the function the second time. If I am removing the functionality inside the function calculateESFDescriptor() and just printing a single statement in this function, the program is running as expected. See the code below for reference.
The above program will run four times as expected. |
@muneeb127 Okay, if you have a minimal function that works, then you can add back the code piece by piece until it no longer works (that is, until it no longer runs four times as expected). For example, first add the |
@mvieth The line which is making the difference is the Following is my CMakeLists.txt
The problem lies somewhere in the computation of the esf descriptor, which just stops the program after running for once. |
@muneeb127 Can you put the ESFEstimation object into an extra scope, like this: {
pcl::ESFEstimation<pcl::PointXYZ, pcl::ESFSignature640> esf;
esf.setInputCloud(object);
esf.compute(*descriptor);
}
std::cout << "ESFEstimation object destroyed" << std::endl; I want to test whether the program exits when that object is destroyed. |
@mvieth I am using the files from the dataset vfh_recognition_tutorial_data.tbz available in the tutorial . Normally, the file in this dataset contains around 3500 points and the average size of files is around 400 KB. I have also tried for other .pcd files, but the code also does not work for them. Moreover, I tried changing the code as per your suggestion which is as follows:
Still, nothing after the try block gets executed. |
@mvieth Is there any tutorial related to this where a particular descriptor is being calculated for multiple files or a complete dataset? |
@mvieth If I am calculating GRSD instead of ESF, the program is working as expected and giving four files as output. What could be the case for this? I think the problem lies somewhere in the computation of ESF in PCL.
|
@muneeb127 My best guess is that one of the two members of ESFEstimation causes a crash when ESFEstimation is destroyed after the members are filled in |
Can you post the command line options that are given to your compiler? For example, if you invoke |
You pass Then try |
Could also be the c++14 vs default c++ 17. Try force your own project to only c++ 14. |
I tried
I do not know why the same code is working for GRSD but not for ESF. |
@muneeb127 That was not meant to fix the problem, only to display the compiler and linker commands with all arguments. Do you see them? Otherwise try to delete all generated CMake files and build from scratch.
Here also: please build from scratch to make sure that CMake uses these settings. My best guess right now how you can fix the problem is adding |
These are the results for the compiler/linker commands. |
@muneeb127 Maybe try |
Looks like there is a mistake in the tutorial, the line should be
Have you tried using a debugger or similar to find out where exactly that error comes from? That is, have you tried getting a stack trace? On Ubuntu, I don't see that error. |
The code was giving the error on |
I had the chance to test this under Windows with the 1.13.1 all-in-one installer, and I could reproduce the access violation error when the |
No, I don't think anything will change with PCL All-in-one Installer 1.13.0 and PCL All-in-one Installer 1.13.1. |
I am developing a system for 3D object recognition using the point cloud library. I want to apply an ESF descriptor to a data set that I have stored locally. I am giving the folder containing data to the program as an argument. I am attaching the code for reference.
The problem is that the function calculateESFDescriptor() runs only once and then the program shuts down without any error, whereas I have multiple .pcd files in the directory and the function should execute for all the files in the directory. I want to calculate the ESF descriptor for all the files to compare them with user-given input at a later stage to calculate the accuracy. I cannot debug where I am making the mistake due to which the program cannot execute for all the files in the directory. The program runs for the whole directory when I comment out the following line. calculateESFDescriptor(base_dir/it->path().filename());
The question is if it is possible to compute descriptor for the whole directory at once or do I have to give each file as input and run the program for each file separately?
The text was updated successfully, but these errors were encountered: