This repository holds code of a ROS package for point cloud acquisition with EnsensoNx 3D cameras. It is basically a ROS wrapper of the low-level API provided by IDS, the manufacturer of the camera. The ROS node can be configured to act as a server or as publisher at a given rate. The package has been tested with N20 and N35 cameras.
This package works correctly with the following dependencies:
- Ubuntu 16.04
- CMake + gcc
- ROS Kinetic
- Point Cloud Library v1.7 (shipped with ROS Kinetic)
- UEYE driver 4.81.1 (camera interface from manufacturer IDS)
- Ensenso SDK 1.3.18 and 2.0.140 (propietary library from manufacturer IDS)
- Forked version of ROS sensor_msgs, with definition of SnapshotCloud.srv
To install the latest three dependencies of the above list:
-
Download the UEYE from the IDS website (file uEye_4.81.1_Linux_64.tgz)
-
Uncompress, move to the folder and run the script (ethernet or usb as needed)
$ sudo sh ./ueyesdk-setup-4.81.01-eth-amd64.gz.run
-
Download SDK additional package from the IDS website (file codemeter_6.40.2402.501_amd64.deb)
-
Move to the folder where you installed your deb file and then Install it with:
sudo dpkg -i codemeter_6.40.2402.501_amd64.deb
-
Download the SDK from the IDS website (file ensenso-sdk-2.0.140-x64.deb)
-
Install it with
$ sudo dpkg -i ensenso-sdk-2.0.140-x64.deb
- Clone to your ROS workspace /src the forked version of common_msgs
$ git clone https://github.com/beta-robots/common_msgs.git
- Build them with
$ catkin_make --only-pkg-with-deps common_msgs
- Make sure that your ~/.bashrc contains these lines (the order is important):
source /opt/ros/kinetic/setup.bash
source /home/user_name/catkin_ws/devel/setup.bash
- At the end of your ~/.bashrc file, add the following line:
export ENSENSO_INSTALL=/opt/ensenso
-
Do not forget to source again your .bashrc, or open a new terminal.
-
Download this repository to your ROS workspace /src, with the command:
$ git clone https://github.com/beta-robots/ensenso_nx.git
- and from your ROS workspace, build it with:
$ catkin_make --only-pkg-with-deps ensenso_nx
- Start the ueye daemon (in case it didn't started on system boot):
$ sudo /etc/init.d/ueyeethdrc start
- Decide whether you want to operate the camera as a publisher or as a server, by setting the run_mode parameter of the config/ensenso_nx_params.yaml file. Thereafter, run the node (by default a rviz window will appear)
$ roslaunch ensenso_nx ensenso_nx.launch
- If you are running the node in mode "SERVER", from another terminal request a Point Cloud capture, providing the dense point cloud flag and a given exposure value (0 meaning autoexposure):
$ rosservice call /ensenso_nx/ensenso_server "dense_cloud: false exposure: 0"
- The IDS application nxView shows 3D realtime data, and allows to manage all parameters involved in the stereo computation.
$ nxView
- Check that the IP of the computer and that of the camera are in the same network. To manually set the IP of the camera, or manage other configurations, go to:
$ ueyecameramanager
- In some cases you have to manually edit the file /usr/local/share/ueye/ueyeethd/ueyeethd.conf with sudo privileges and set the interface and port. For instance, if you are using eth0 interface, the file should look like:
;ueye configuration file
[Parameters]
Interfaces = eth0
[eth0]
Port_Base = 50000
- Sometimes you have to stop the ueye daemon an then start it again
$ sudo /etc/init.d/ueyeethdrc stop
$ sudo /etc/init.d/ueyeethdrc start