-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #888 from VictorLamoine/ensenso
Add Ensenso support
- Loading branch information
Showing
16 changed files
with
1,145 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
############################################################################### | ||
# - Try to find Ensenso SDK (IDS-Imaging) | ||
# Once done this will define | ||
# ENSENSO_FOUND - System has Ensenso SDK | ||
# ENSENSO_INCLUDE_DIRS - The Ensenso SDK include directories | ||
# ENSENSO_LIBRARIES - The libraries needed to use Ensenso SDK | ||
# ENSENSO_DEFINITIONS - Compiler switches required for using Ensenso SDK | ||
# ----------------------- | ||
|
||
find_path(ENSENSO_INCLUDE_DIR nxLib.h | ||
HINTS ${ENSENSO_ABI_HINT} | ||
/opt/ensenso/development/c | ||
"$ENV{PROGRAMFILES}/Ensenso/development/c" "$ENV{PROGRAMW6432}/Ensenso/development/c" | ||
PATH_SUFFIXES include/) | ||
|
||
find_library(ENSENSO_LIBRARY QUIET NAMES NxLib64 NxLib32 nxLib64 nxLib32 | ||
HINTS ${ENSENSO_ABI_HINT} | ||
"$ENV{PROGRAMFILES}/Ensenso/development/c" "$ENV{PROGRAMW6432}/Ensenso/development/c" | ||
PATH_SUFFIXES lib/) | ||
|
||
set(ENSENSO_LIBRARIES ${ENSENSO_LIBRARY}) | ||
set(ENSENSO_INCLUDE_DIRS ${ENSENSO_INCLUDE_DIR}) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
# handle the QUIETLY and REQUIRED arguments and set ENSENSO_FOUND to TRUE | ||
# if all listed variables are TRUE | ||
find_package_handle_standard_args(ensenso DEFAULT_MSG | ||
ENSENSO_LIBRARY ENSENSO_INCLUDE_DIR) | ||
|
||
mark_as_advanced(ENSENSO_INCLUDE_DIR ENSENSO_LIBRARY) | ||
|
||
if(ENSENSO_FOUND) | ||
message(STATUS "Ensenso SDK found") | ||
endif(ENSENSO_FOUND) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
.. _ensenso_cameras: | ||
|
||
========================================== | ||
Grabbing point clouds from Ensenso cameras | ||
========================================== | ||
|
||
In this tutorial we will learn how to use the `IDS-Imaging <http://en.ids-imaging.com/>`_ Ensenso cameras within PCL. This tutorial will show you how to configure PCL | ||
and how to use the examples to fetch point clouds from the `Ensenso <http://www.ensenso.de/>`_. | ||
|
||
.. contents:: | ||
|
||
Install Ensenso drivers | ||
======================= | ||
|
||
The Ensenso drivers are free (as in beer) and available for download, for each of them follow the instructions provided: | ||
|
||
* `uEye <http://en.ids-imaging.com/download-ueye.html>`_ | ||
* `Ensenso SDK <http://www.ensenso.de/download>`_ | ||
|
||
Plug-in the camera and test if the Ensenso is working, launch ``nxView`` in your terminal to check if you can actually use the camera. | ||
|
||
Configuring PCL | ||
=============== | ||
|
||
You need at least PCL 1.8.0 to be able to use the Ensenso cameras. You need to make sure ``WITH_ENSENSO`` is set to ``true`` in the CMake | ||
configuration (it should be set to true by default if you have followed the instructions before). | ||
|
||
The default following values can be tweaked into cmake if you don't have a standard installation, for example: | ||
|
||
.. code-block:: | ||
ENSENSO_ABI_DIR /opt/ensenso_test/development/c | ||
You can deactivate building the Ensenso support by setting ``BUILD_ENSENSO`` to false. | ||
Compile and install PCL. | ||
|
||
Using the example | ||
================== | ||
|
||
The `pcl_ensenso_viewer <https://github.com/PointCloudLibrary/pcl/blob/master/visualization/tools/ensenso_viewer.cpp>`_ example shows how to | ||
display a point cloud grabbed from an Ensenso device using the `EnsensoGrabber <http://docs.pointclouds.org/trunk/classpcl_1_1_ensenso_grabber.html>`_ class. | ||
|
||
Note that this program opens the TCP port of the nxLib tree, this allows you to open the nxLib tree with the nxTreeEdit program (port 24000). | ||
The capture parameters (exposure, gain etc..) are set to default values. | ||
If you have performed and stored an extrinsic calibration it will be temporary reset. | ||
|
||
.. code-block:: cpp | ||
ensenso_grabber->enumDevices (); | ||
ensenso_grabber->openTcpPort (); | ||
ensenso_grabber->openDevice (); | ||
ensenso_grabber->configureCapture (); | ||
ensenso_grabber->setExtrinsicCalibration (); | ||
The code is very similar to the ``pcl_openni_viewer``. | ||
All the Ensenso devices connected are listed and then the point cloud are fetched as fast as possible. | ||
|
||
Here is an example of the terminal output :: | ||
$ pcl_ensenso_viewer | ||
Initialising nxLib | ||
Number of connected cameras: 1 | ||
Serial No Model Status | ||
140242 N10-1210-18 Available | ||
Opening Ensenso stereo camera id = 0 | ||
FPS: 4.46927 | ||
FPS: 5.01253 | ||
FPS: 5.16351 | ||
FPS: 5.27506 | ||
FPS: 5.32569 | ||
FPS: 5.51645 | ||
FPS: 5.53013 | ||
FPS: 5.56729 | ||
Closing Ensenso stereo camera | ||
|
||
.. image:: images/ensenso/ensenso_viewer.jpg | ||
:height: 550 | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
75d97aa
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 have just checked out pcl-trunk and I am getting the following error when compiling my own pcl project that uses
io
module:I have tried recompiling PCL with
BUILD_ENSENSO
andWITH_ENSENSO
turned off, but that didn't help.75d97aa
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.
Thanks for reporting, as a temporary fix just put an empty string into
ENSENSO_LIBRARY
. I'm looking at this problem right now.