SL Sensor is an open-source, ROS-based, structured light sensor for high-accuracy 3D scanning. It can produce high-fidelity point clouds in real-time at 5Hz using hardware triggering of the camera and the projector.
Refer to the Wiki pages for the wiring schematics, CAD as well as steps to calibrate/setup the sensor.
The sample build we have provided contains two cameras (because we want it as a research platform to test our linear motion compensation strategy in both directions) but it can be modified to work with only one camera as well.
Some experience with C++ and ROS is required to troubleshoot and configure roslaunch files to make it work on your system.
Scanning.a.Brick.and.Motar.Wall.mov
Motion.Compenation.mov
Colour.Scanning.Demo.mov
- Computer/Laptop with at least one USB3 Port
- Ubuntu 18.04 with ROS Melodic installed
- Required Libraries (* included in 18.04 installation)
- sl_sensor_calibration: Calibration utilities for the SL Sensor
- sl_sensor_codec: Generate different structured light patterns (encoding) and processing images to obtain projector coordinates (decoding)
- sl_sensor_image_acquisition: Group images that are from the same pattern sequence together from timestamped image streams from Versavis
- sl_sensor_logger: Logging utilities to save images and point clouds
- sl_sensor_motion_compensation: Motion compensation algorithm that enables scanning while in motion (constrained to linear motion at the moment)
- sl_sensor_reconstruction: Converts decoded projector coordinate images into point clouds
- sl_sensor_registration: Basic utilities to register point cloud in a pairwise fashion using ICP
- sl_sensor_rqt_gui: Simple GUI for calibration and scanning
- sl_sensor_timer: Basic timing utilities
- Set up your Personal Access Token so you can clone over SSH
- Install ros-melodic
- Clone this repository into the src folder of your workspace
- Configure your workspace to build in release: catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release
- Install vcstool and catkin-tools from apt: sudo apt install python3-catkin-tools python3-vcstool
- From the src folder of your workspace, clone source dependencies with vcs tool: vcs import < sl_sensor/dependencies.vcs
- From the src folder of your workspace, install the system dependencies with rosdep: rosdep install --from-paths . --ignore-src -r -y
- Build the FLIR camera driver
catkin build flir_camera_driver
- Build the SL Sensor package
catkin build sl_sensor
- To ensure the scannning RQt dashboard loads properly, change the directories in the following RQt perspective files to reflect the actual location in your computer
- sl_sensor/core/sl_sensor_rqt_guis/sl_sensor_rqt_guis_common/rqt_perspectives/scan_gui_monochrome.perspective:
Change line 527 ("repr": "u'/home/ltf/catkin_ws/src/sl_sensor/sl_sensor/rviz/scan_rqt_gui_monochrome.rviz'") - sl_sensor/core/sl_sensor_rqt_guis/sl_sensor_rqt_guis_common/rqt_perspectives/scan_gui_colour.perspective:
Change line 527 ("repr": "u'/home/ltf/catkin_ws/src/sl_sensor/sl_sensor/rviz/scan_rqt_gui_colour.rviz'")
- sl_sensor/core/sl_sensor_rqt_guis/sl_sensor_rqt_guis_common/rqt_perspectives/scan_gui_monochrome.perspective:
- Download the parameter files and rosbags from here
- Replace core/sl_sensor_codec/codec_yaml/codec_config.yaml with the codec_config.yaml in the downloaded folder parameter_files
- Replace the xml files primary_camera.xml, secondary_camera.xml, projector.xml core/sl_sensor_calirbation/calibration_files with those in the downloaded folder parameter_files
- Start a roscore in a terminal by running
roscore
- On a separate terminal run
rosparam set /use_sim_time true
- Roslaunch the reconstruction pipeline that has the same pattern name as the rosbag in the downloaded folder
- For example, if you want to run
rosbag play --clock 2p1_tpu_horizontal.bag
(make sure terminal is in the 2p1_tpu_horizontal folder) - Run
roslaunch sl_sensor 2p1_tpu_horizontal_motion_compensation.launch
to see motion compensation in action - Run
roslaunch sl_sensor 2p1_tpu_horizontal.launch
if you want to see the distortion due to motion if a standard reconstruction pipeline is used
- For example, if you want to run
This repo contains code adapted from:
- Reconstruction pipeline components - SLStudio
- Bundle Adjustment dual camera-projector calibration (experimental) IDIAP Multicam Calibration