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.
nodelet
.The driver is tested under the following conditions.
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
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
.
You can launch the driver as a nodelet
by
$ roslaunch aist_phoxi_camera run.launch manager:=<manager_name> [external_manager:=[true|false]]
where
manager
which has been started in advance. If false, a manager with the name specified by manager
will be newly created.Then zero-copy transfer will be realized if you load subscriber nodelets into the same manager.
The following services are available.
The following topics are published by the driver.
send_texture
is true. In addition, each pixel will be associated with a 3D normal vector if the parameter send_normal_map
is true.MotionCam-3D Color
.MotionCam-3D Color
.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.
The following parameters can be optionally specified
free run
mode (default: 20.0 (Hz))texture
topic (default: 0.5)free run
(0), software trigger
(1), and hardware trigger
(2) modesnormal_map
if true.depth_map
if true.confidence_map
if true.event_map
if true.texture
if true.color/image
and color/camera_info
if true. Available only for MotionCam-3D Color
.pointcloud
if true. Each pixel has its 3D coordinates with respect to the depth sensor. It will also be associated with an intensity/color value if send_texture
is true, and with a 3D normal vector if send_normal_map
is true.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.