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

Including GRSD a global radius-based surface descriptor #790

Merged
merged 1 commit into from
Jul 31, 2014

Conversation

desinghkar
Copy link
Contributor

GRSD is developed by Zoltan-Marton, this was a old patch as part of his branch being included into the trunk.

@desinghkar
Copy link
Contributor Author

Can somebody help me in merging this? Travis CI build failed twice and I have no clue of what should be done. Thanks in advance! :)

@VictorLamoine
Copy link
Contributor

Sure,

Take a look at travis build (line 972)

In file included from /home/travis/build/PointCloudLibrary/pcl/features/src/grsd.cpp:41:
/home/travis/build/PointCloudLibrary/pcl/features/include/pcl/features/impl/grsd.hpp:41:10: fatal error:
'/home/kar/workspace/gsoc_14/pcl_test/grsd/grsd.h' file not found
#include "/home/kar/workspace/gsoc_14/pcl_test/grsd/grsd.h"

You have set a global path to a file; this will only work on your machine with your folder tree.

#ifndef PCL_FEATURES_IMPL_GRSD_H_
#define PCL_FEATURES_IMPL_GRSD_H_

#include "/home/kar/workspace/gsoc_14/pcl_test/grsd/grsd.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This must be a relative path !

@desinghkar
Copy link
Contributor Author

Oh my bad! Thanks Victor. I solved it and pushed again. Hopefully it should build. :)


/** \brief Get the sphere radius used for determining the neighbors. */
inline double
getRadiusSearch () { return (search_radius_); }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add const qualifier.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh ok!
I changed it to getRadiusSearch() const { return search_radius_); }

@taketwo
Copy link
Member

taketwo commented Jul 8, 2014

Hi, please check out the contributors guide. We'll need you to fix the code according to the style guide (add spaces between function names and braces) and clean up the commit history.

@desinghkar
Copy link
Contributor Author

Is there a pcl style file for vim?
Any smart way of checking if my code satisfies the code style?

@VictorLamoine
Copy link
Contributor

@desinghkar
Copy link
Contributor Author

Oh ok I will check if I can convert the emacs style file for Vim. Thanks

@desinghkar
Copy link
Contributor Author

Ok i am checking the checklist mentioned in the contributors guide and have following queries.

  1. This code is developed by Zoltan-marton, I just changed the licence to the one shown in the guide. How to insert his id / or say its his code?
  2. How to clean up the commit history (sorry not so familiar with git)?

@taketwo
Copy link
Member

taketwo commented Jul 8, 2014

  1. Usually it is sufficient to put the name in the \author tag of doxygen comment. (This is done already in your code.) But it would also be nice to check with him if he is okay with giving up the copyright to Open Perception.
  2. Right now there are three commits. The first one is the "meat", and the others are just fixups. And you will add up more fixups with style changes. There is no point of keeping this sort of history in the main repository, so we need to squash them into a single commit. Check out this article.

@VictorLamoine
Copy link
Contributor

  1. \author Zoltan Csaba Marton he is explicitly the author in the code; if you have the rights to include the code in PCL and you respect his license I think it's fine.
  2. Each commit should be a logical unit. For example you should merge the last two commits into one. For example:
    git rebase -i upstream master
    Then replace pick by s to squash a commit

@taketwo
Copy link
Member

taketwo commented Jul 8, 2014

@VictorLamoine :)

@desinghkar
Copy link
Contributor Author

That was really helpful guys! Really appreciate that.
I just have to check with the author about giving up the copyright to Open Perception. For now I have pushed it with the existing copyrights. I will update the same in my future requests. I hope its fine!

@VictorLamoine
Copy link
Contributor

Compilation fails: line 1351

@desinghkar
Copy link
Contributor Author

I checked it again locally and it builds just fine. RSD Estimation is enabled in the CMakeLists.txt of the features module. Is there a unit test phase that I should be aware off?

@VictorLamoine
Copy link
Contributor

Compile it like the travis.sh script and you'll get the bug.
I guess it comes from PCL_ONLY_CORE_POINT_TYPES; I had the problem in a recent pull request.

Bye

@desinghkar
Copy link
Contributor Author

@VictorLamoine: Ya it seems so but when I turn on the PCL_ONLY_CORE_POINT_TYPES option I don't see the error locally. Build is failing at clang and travis.sh has only PCL_ONLY_CORE_POINT_TYPES being turned on. Am I missing something. And the way I turned the PCL_ONLY_CORE_POINT_TYPES on is by using pcl_options.cmake in cmake folder.

@VictorLamoine
Copy link
Contributor

I get the same errors as the Travis build with gcc 4.6.3.
You should not edit pcl_options.cmake but rather configure your PCL compilation like:

cd pcl/build && \
cmake .. -DPCL_ONLY_CORE_POINT_TYPES=ON && \
make -j2

@desinghkar
Copy link
Contributor Author

@VictorLamoine : Thanks a lot that helped me debug it easly and I had to add the below lines into the grsd.cpp. I have been looking at RSD as the error suggested so but then GRSD was calling RSD and was failing for all the types.

#ifdef PCL_ONLY_CORE_POINT_TYPES
 PCL_INSTANTIATE_PRODUCT(GRSDEstimation, ((pcl::PointXYZ)(pcl::PointXYZI)(pcl::PointXYZRGBA))((pcl::Normal))((pcl::GRSDSignature21)))
#else
         PCL_INSTANTIATE_PRODUCT(GRSDEstimation, (PCL_XYZ_POINT_TYPES)(PCL_NORMAL_POINT_TYPES)((pcl::GRSDSignature21)))
#endif
#endif

@desinghkar
Copy link
Contributor Author

Hi again :)
Trace build error again! It says

I'm sorry but your test run exceeded 50.0 minutes.
One possible solution is to split up your test run.

So how to do that. And I don't think I have written any tests for RSD and GRSD how to go about that?

@VictorLamoine
Copy link
Contributor

Don't bother the timeout. Basically you don't have to do anything about this.

You could write a test unit for the RSD / GRSD if you think it is useful.
Don't hesitate to take a look at existing files in the test folder.

I don't think we need the features/doxyfile file from your pull request.

@desinghkar
Copy link
Contributor Author

I removed the doxyfile in the latest commit and pushed it.

#ifdef PCL_ONLY_CORE_POINT_TYPES
PCL_INSTANTIATE_PRODUCT(GRSDEstimation, ((pcl::PointXYZ)(pcl::PointXYZI)(pcl::PointXYZRGBA))((pcl::Normal))((pcl::GRSDSignature21)))
#else
PCL_INSTANTIATE_PRODUCT(GRSDEstimation, (PCL_XYZ_POINT_TYPES)(PCL_NORMAL_POINT_TYPES)((pcl::GRSDSignature21)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use spaces here.

@taketwo
Copy link
Member

taketwo commented Jul 16, 2014

Please also edit the commit message. I think it suffices to keep just the first paragraph.

@desinghkar
Copy link
Contributor Author

Sure Sergey! will fix them now.

@desinghkar
Copy link
Contributor Author

Its a timeout error again! I have written global_tests for RSD and GRSD. I would like to include them in the trunk as well. But should I wait for this pull request to pass and raise another? Or should I push them along with this request since its still on hold. Let me know which is appropriate!

@VictorLamoine
Copy link
Contributor

Push the test unit into an other commit of this pull request!
EDIT: And please correct the files to match PCL style guide 😉

double max_min_radius_diff = 0.050)
{
if (min_radius > min_radius_plane)
return 1; // plane
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put return values into braces please ?
return (1):
etc.

@taketwo
Copy link
Member

taketwo commented Jul 23, 2014

Push the test unit into an other commit of this pull request!

👍 just add a second commit

@desinghkar
Copy link
Contributor Author

Hope I have followed all the rules of style guide and the error is just with respect to the time out!

@desinghkar
Copy link
Contributor Author

Is the clang error relevant to my push?

@VictorLamoine
Copy link
Contributor

No that's a Travis bug!

@desinghkar
Copy link
Contributor Author

Ok then! Anything I should do to merge this and close the request?

*/

inline int
getSimpleType (float min_radius, float max_radius,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not like this free documentation-less function in pcl namespace. I would suggest we make it a static member of GRSDEstimation. (Private or protected if it is not supposed to be used outside of the class, or public otherwise.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you tell me on how to do that?
Or point me to similar modules so that i can replicate them accordingly!
Thanks in advance!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure what confuses you there. Static functions is not something PCL-specific... just have a look at some article (like this) to give yourself a refresher on the topic.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks that was helpful. :)

@taketwo
Copy link
Member

taketwo commented Jul 27, 2014

Hi Karthik, I think we are very close to merging, but please have a look at the comments I left.

@desinghkar
Copy link
Contributor Author

Sure Sergey! I will look into them now.

GRSD is developed by Zoltan-Marton, this was a old patch as part of his branch being included into the trunk
Adding test files for RSD and GRSD.

style guide issues resolved
@taketwo
Copy link
Member

taketwo commented Jul 31, 2014

Three weeks, 50+ comments, and we are finally done :)
@VictorLamoine thanks for helping with the review

taketwo added a commit that referenced this pull request Jul 31, 2014
Including GRSD a global radius-based surface descriptor
@taketwo taketwo merged commit 5a621c3 into PointCloudLibrary:master Jul 31, 2014
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

Successfully merging this pull request may close these issues.

3 participants