-
-
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
Add Ensenso support #888
Add Ensenso support #888
Conversation
Does PCL even use the How does PCL projects builds when using a simple CMakeFile? |
PCL provides
|
Thank you Jochen you spared a lot of my time 😄 I edited my first message to explain the modifications done. |
@@ -247,6 +247,37 @@ macro(find_openni2) | |||
endif(OPENNI2_FOUND) | |||
endmacro(find_openni2) | |||
|
|||
#remove this as soon as the Ensenso SDK is shipped with FindEnsenso.cmake | |||
macro(find_ensenso) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why we need both this and cmake/Modules/FindEnsenso.cmake
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cmake/Modules/FindEnsenso.cmake
is checked by cmake
to determine whether the system has Ensenso SDK or not: CMakeLists.txt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that part I understand. But why this macro?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we don't have the macro in PCLConfig.cmake.in
then the generated PCLConfig.cmake
will not be able to check whether the system has the Ensenso SDK or not.
The Ensenso SDK does not install a cmake file (eg: in /usr/share/cmake-2.8/Modules/
) in the system. Thus PCL cmake file has to embed its own way to find if the Ensenso SDK is there or not.
This is what I understood. Hope it's right.. 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, thanks for the explanation. I am not very familiar with this beast :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PCLConfig.cmake
is used by projects using the PCL to find the headers and libs. Adding Ensenso in there allows these projects to transparently use the Ensenso SDK.
That's all from my side. @jspricke please merge if you think the PR is in good shape. Thanks for contributing, Victor! |
Apart from my comments above, I'm fine with merging this. Thanks for the work Victor! |
No more In PCLConfig.cmake.in the guess path are taken from the
|
I tested how this behaves by moving my include directory and it seems to be working fine. |
@jspricke As a CMake expert, could you have another look at config files and merge if they are okay? :) |
@VictorLamoine looks like the CMake stuff is back to it's beginning. Did you remove the version without pkg-config intentionally? |
@jspricke I pushed the wrong branch, it is now back sorry.
Yes we can get rid of it as long as the Ensenso SDK doesn't provide a pkg-config file. |
option(WITH_ENSENSO "Build IDS-Imaging Ensenso's camera support" TRUE) | ||
if(WITH_ENSENSO) | ||
set(ENSENSO_API_DIR "/opt/ensenso/development/c/" CACHE PATH "directory of Ensenso API") | ||
set(ENSENSO_LIB_DIR "/usr/lib/" CACHE PATH "directory of Ensenso library") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIR find_package will search in /usr/lib
by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
find_library
that is.
I'm still not sure we should merge the Also, I think we should be more strict about the namespace in future. So |
I understand that Victor followed the footsteps of openni grabber developers, who also provided such an example. Though I do not see what's the purpose. The point of this contribution is to provide a grabber class that abstracts away the API specific to the device driver, so why would anyone in "PCL world" be interested in using
So far none of the existing grabbers sit in What about dropping "simple" from |
..all using their internal grabber, btw ;).
I think we should start this now ;).
+1 |
Perhaps a separate PR later that puts all of them into |
Can we make forward declarations to be backward compatible? |
As far as I see, there is just a single forward-declaration for a grabber in the whole PCL codebase:
Shouldn't something like the following work? namespace pcl
{
namespace io
{
class OpenNIGrabber
{
// ...
};
}
using io::OpenNIGrabber;
} |
I guess so. Maybe we should move this discussion to pcl-dev@? |
I've done the modifications to the CMake files using Windows guess paths.
If the user wants to do something that has not been coded in the |
@VictorLamoine please update the tutorial text. |
All good on my side. |
+1 from me, thanks a lot @VictorLamoine! |
@VictorLamoine any idea about the issue brought up in this comment? |
Configuring a simple PCL program (pcd write example):
Everything is normal at this point (I removed Ensenso libraries/include dirs from my OS)
ccmake shows:
I don't know why |
I suspect these two lines: https://github.com/PointCloudLibrary/pcl/blob/master/PCLConfig.cmake.in#L267-L268 |
@simonschmeisser you might be interested in the fact that PCL trunk version supports the Ensenso cameras (thus, ROS); tutorial. |
Thanks for the hint, I came across your tutorial some while ago already and definitely plan to compare it to my current halcon based approach. Nice job! |
If you want to test please read the tutorial first. For the last steps you will, of course, need an Ensenso device!
pcl-developers topic