GithubHelp home page GithubHelp logo

salihmarangoz / vl53l1x_scanner Goto Github PK

View Code? Open in Web Editor NEW
11.0 3.0 5.0 1.54 MB

DIY 2D/3D Laser Scanner and Depth Camera with ROS Driver (VL53L1X ToF Ranging Sensor + 28BYJ-48 Stepper Motor + Arduino)

Home Page: https://www.patreon.com/salihmarangoz

License: MIT License

CMake 1.09% C++ 72.32% Shell 0.15% TeX 0.61% Python 2.14% C 23.69%
vl53l1x 28byj-48 arduino laserscan pointcloud depth-camera ros

vl53l1x_scanner's Introduction

VL53L1X Scanner (Abandoned Project)

1. Introduction

Note: This project is abandoned. The code works well but the hardware selection is poor. Single VL53L1X is too slow and stepper motor has problems. Althought, the code can be used as a reference.

This is my DIY laser scanner project that I designed in quarantine days of covid-19. I aim to demonstrate the capabilities of VL53L1X range finder sensor and design a 2D/3D scanner and depth camera.

Features:

  • ROS Driver
  • 2D and 3D scanning mode (~1500 step in horizontal ~270 deg fov / 13 step in vertical ~27 deg fov)
  • Resets stepper motor position to 0 when the driver is terminated
  • Depth camera mode
  • Stepper One Phase/Two Phase Mode
  • Adaptive Scanning
    • Adaptive stepper resolution based on the measurement

2. Making the Scanner

Materials should be placed on to the breadboard and connections should be made as it is shown in the pictures below:

Requirements:

  • VL53L1X ToF Laser Distance Sensor
  • 28BYJ-48 Stepper Motor and its driver board (ULN2003APG)
  • A header for stepper motor (I used servo motor header)
  • Arduino UNO
  • Breadboard & Jumper Cables
  • Hot glue & Adhesive Tape
  • PC and USB Cable for Arduino (Will be used in Installing the Software section)

Connection Diagram:

  • (Blue) Arduino D9 <=> Stepper motor driver IN1
  • (Blue) Arduino D10 <=> Stepper motor driver IN2
  • (Blue) Arduino D11 <=> Stepper motor driver IN3
  • (Blue) Arduino D12 <=> Stepper motor driver IN4
  • (Cyan) Arduino SDA <=> VL53L1X SDA
  • (Cyan) Arduino SCL <=> VL53L1X SCL
  • (Red) Arduino 5V <=> Stepper Motor Driver 5V <=> VL53L1X VIN
  • (Black) Arduino GND <=> Stepper Motor Driver GND <=> VL53L1X GND
  • (Colorful) Stepper Motor Driver <=> Stepper Motor

vl53l1x_scanner_bb

Result:

prototype

3. Installing the Software

Requirements:

Installing:

  • Add user to dialout group then restart the PC:
$ sudo adduser $USER dialout
  • Clone the project into catkin_ws:
$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/src
$ git clone https://github.com/salihmarangoz/vl53l1x_scanner.git
  • Compile the project:
$ cd ~/catkin_ws
$ catkin_make # or "catkin build"
  • Extract the API folder (vl53l1_api) into ~/Arduino/libraries/ (Link in the requirements section)
  • Upload the Arduino code using Arduino IDE: ~/catkin_ws/src/vl53l1x_scanner/arduino_code/vl53l1x_scanner_arduino/vl53l1x_scanner_arduino.ino

4. Running

  • Before running the systems, calibration process must be done if the laser is not faced forward:
$ cd ~/catkin_ws/src/vl53l1x_scanner/script/
# Positive for counter-clockwise or negative for clockwise rotation.
# The value "+100" is an example for positive rotation. Try "-100".
# As a result, laser should be facing forward.
# NOTE: May not work at the first try.
$ ./calibrate.sh /dev/ttyACM0 +100   
  • Run the scanner driver:
$ source ~/catkin_ws/devel/setup.bash

# TO START THE DRIVER SELECT ONE:
$ roslaunch vl53l1x_scanner start_2d_laserscan.launch
$ roslaunch vl53l1x_scanner start_2d_pointcloud.launch # <- preffered
$ roslaunch vl53l1x_scanner start_3d_pointcloud.launch
$ roslaunch vl53l1x_scanner start_depth_camera.launch

# OR;

# TO INVESTIGATE PRE-RECORDED BAGS SELECT ONE:
$ roslaunch vl53l1x_scanner bag_2d.launch
$ roslaunch vl53l1x_scanner bag_3d.launch
  • Run RViz:
$ roslaunch vl53l1x_scanner rviz.launch

5. References

vl53l1x_scanner's People

Contributors

salihmarangoz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.