Giter Club home page Giter Club logo

sl_sensor's Introduction

drawing

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.

drawing

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.

Demos

Scanning of Brick and Mortar Wall

Scanning.a.Brick.and.Motar.Wall.mov

Scans of Table Tennis Balls (vs RealSense L515)

drawing

Linear Motion Compensation

Motion.Compenation.mov

Colour Scanning (Depth Information using top camera, RGB information using left camera)

Colour.Scanning.Demo.mov

System Requirements

  • Computer/Laptop with at least one USB3 Port
  • Ubuntu 18.04 with ROS Melodic installed
  • Required Libraries (* included in 18.04 installation)
    • *yaml-cpp (Version 0.5.2)
    • *OpenCV 3.2.0
    • *Point Cloud Library PCL (Version 1.8)
    • Spinnaker (Version 2.4.0.143)
    • Open3d (Version 0.13.0) NOTE: Please refer to this issue to ensure that you can build and install Open3d so that it is ROS-compatible

Contained Packages

  • 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

Build

  1. Set up your Personal Access Token so you can clone over SSH
  2. Install ros-melodic
  3. Clone this repository into the src folder of your workspace
  4. Configure your workspace to build in release: catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release
  5. Install vcstool and catkin-tools from apt: sudo apt install python3-catkin-tools python3-vcstool
  6. From the src folder of your workspace, clone source dependencies with vcs tool: vcs import < sl_sensor/dependencies.vcs
  7. From the src folder of your workspace, install the system dependencies with rosdep: rosdep install --from-paths . --ignore-src -r -y
  8. Build the FLIR camera driver catkin build flir_camera_driver
  9. Build the SL Sensor package catkin build sl_sensor
  10. 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'")

Making sure that the package is working

  1. Download the parameter files and rosbags from here
  2. Replace core/sl_sensor_codec/codec_yaml/codec_config.yaml with the codec_config.yaml in the downloaded folder parameter_files
  3. 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
  4. Start a roscore in a terminal by running roscore
  5. On a separate terminal run rosparam set /use_sim_time true
  6. 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

Acknowledgements

This repo contains code adapted from:

sl_sensor's People

Contributors

tengfoonglam avatar hermannsblum avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.