Automation-Research-Team / aist_phoxi_camera

ROS driver for Photoneo PhoXi 3D cameras
BSD 3-Clause "New" or "Revised" License
3 stars 2 forks source link

aist_phoxi_camera: ROS driver for PhoXi 3D Scanner and MotionCam-3D

This package provides a ROS driver for controlling PhoXi 3D scanners. Although it is inspired by ROS drvier by the manufacturer, i.e. Photoneo co., the structure of the code is completely reorganized.

aist_phoxi_control has the following features.

The driver is tested under the following conditions.

Installation

Before compiling the ROS driver, you have to install the latest version of PhoXiControl which is a GUI-based controller for PhoXi 3D scanners.

Then append the following lines to your ~/.bashrc

if [ -d /opt/Photoneo/PhoXiControl-x.y.z ]; then
  export PHOXI_CONTROL_PATH=/opt/Photoneo/PhoXiControl-x.y.z
  export PATH=${PATH}:${PHOXI_CONTROL_PATH}/bin
  export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PHOXI_CONTROL_PATH}/API/lib
  export CPATH=${CPATH}:${PHOXI_CONTROL_PATH}/API/include
fi

where x.y.z should be replaced with the correct version number of PhoXiControl you have downloaded. Update the environment variables by typing

$ source ~/.bashrc

After the preparation above, download the driver source code as well as the ddynamic_reconfigure package by typing

$ cd (your-catkin-workspace)/src
$ git clone https://github.com/Automation-Research-Team/aist_phoxi_camera
$ git clone https://github.com/Automation-Research-Team/ddynamic_reconfigure

aist_phoxi_camera requires the latter which is a modified version of the original to fix some bugs and add new features.

Finally, you can compile the ROS driver by typing

$ source (your-catkin-workspace)/devel/setup.bash
$ catkin build aist_phoxi_camera

Testing

You have to invoke PhoXiControl in advance of running aist_phoxi_camera. It directly communicates with one or more scanners on the network. Our ROS driver, aist_phoxi_camera, establishes a connection to one of the available scanners, sends control commands to it and receives various data streams, ex. point cloud, texture map, depth map, confidence map, etc., via PhoXiControl. You can start PhoXiControl by typing

$ PhoXiControl

PhoXiControl provides a virtual scanner device named "InstalledExamples-basic-example". Therefore, you can test the driver even if no real scanners are connected to your host. You can launch the driver and establish a connection to the virtual scanner by typing

$ roslaunch aist_phoxi_camera run.launch vis:=true

where vis:=true means that the ROS visualizer, rviz, and the parameter setting GUI, rqt_reconfigure, are invoked as well. Here, rviz is configured to subscribe two topics, pointcloud and texture, published by the driver. As the driver is started with trigger_mode:=0 i.e. Free Run mode, you will see continuously updated point cloud and image streams. You can interactively change various capturing parameters through rqt_reconfigure.

When the driver is started with a virtual scanner, there will be many error messages complaining that some parameters cannot be set. This might be because not all the features of real scanners are emulated by the virtual scanner. You can safely ignore them.

If you wish to connect a real device, specify its unique ID;

$ roslaunch aist_phoxi_camera run.launch vis:=true id:="2018-09-016-LC3"

Here, the ID, "2018-09-016-LC3", varies for each device which can be known from Network Discovery window of PhoXiControl.

Starting the driver as a nodelet

You can launch the driver as a nodelet by

$ roslaunch aist_phoxi_camera run.launch manager:=<manager_name> [external_manager:=[true|false]]

where

Then zero-copy transfer will be realized if you load subscriber nodelets into the same manager.

ROS services

The following services are available.

ROS topics

The following topics are published by the driver.

For MotionCam-3D Color, a transform from the frame at the color sensor to that at the depth sensor is broadcasted as a static tf2 message as well. Thus you will have the pose of color sensor relative to the depth sensor by looking up a transform between them.

ROS parameters

The following parameters can be optionally specified

when starting the driver by

$ roslaunch aist_phoxi_camera run.launch <parameter_name>:=<parameter_value>...

Many other scanning parameters configurable with PhoXiControl can also be interactively changed with rqt_reconfigure at runtime. If not specified above, the default values of all the parameters conform to the device state when the driver is started.