Coder Social home page Coder Social logo

seanngpack / swag-scanner-cpp Goto Github PK

View Code? Open in Web Editor NEW
9.0 4.0 2.0 4.42 MB

A 3D scanning system built from the ground up!

License: MIT License

CMake 6.92% C++ 93.08%
3d 3dscan 3dscanner 3d-scanning 3d-scanner 3d-scan pcl-library pointcloud infrared librealsense2

swag-scanner-cpp's Introduction

SwagScanner

HitCount Issues Build Status MIT License

Test Image 1

SwagScanner is a device that can scan your small/medium-sized objects into the virtual world. The system is designed and built from the ground up. I designed the software pipeline to be extensible, robust, and fast. SwagScanner is compatible with any depth camera--just verify its minimum scanning distance and acquire the correct mounting hardware and API and you're good to go. You can find more information about the design on my website.

sponge

Status

This is the C++ codebase of Swag Scanner. Everything is highly subject to change.

Hardware: Currently working on physical model complete overhaul. Designing for manufacturing.

Software: Improving GUI, fine tuning registration algos, hand-writing filtering methods

Dependencies

Click to see dependencies
  • pcl 1.11
$ brew install pcl

Or compile from source

$ git clone https://github.com/PointCloudLibrary/pcl
$ cd pcl
$ mkdir build
$ cd build
$ cmake ..
$ sudo make install
  • opencv4
brew install opencv
  • librealsense
$ brew install librealsense

Or compile from source

$ git clone https://github.com/IntelRealSense/librealsense
$ cd librealsense
$ mkdir build
$ cd build
$ cmake ..
$ sudo make install
  • Qt
$ brew install qt
  • spdlog
$ brew install spdlog
  • feeling-blue-cpp
$ git clone https://github.com/seanngpack/feeling-blue-cpp
$ cd feeling-blue
$ mkdir build
$ cd build
$ cmake ..
$ sudo make install

GUI

SwagScanner has a GUI now!

GUI image

CLI Commands

SwagScanner can also be accessed through the commandline.

--scan --calibrate --process --move
--name (string) --name (string) --name (string) --to (int)
--deg (int) --deg (int) --by (int)
--rot (int) --rot (int) --home (int)

Examples:

Start a scan called "scan1" at 15 degree intervals.

--scan --name scan1 --deg 15

Run a calibration with an autogenerated name (because you didn't pass --name) at 8 degree intervals 12 times

--calibrate --deg 8 --rot 12

Authors

License

This project is licensed under the MIT License

swag-scanner-cpp's People

Contributors

seanngpack avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

swag-scanner-cpp's Issues

refactoring to-dos

  • CloudType -> Types folder
  • CameraTypes -> Types folder
  • Algorithms -> Algos folder
  • FileHandler -> determine if /utils folder is appropriate for it to stay

Hardware design framework

Big idea:

  • Low-cost, modular 3D scanner that allows for sensor swapping

Target Audiences:

  • Educators, Hobbyists, Makerspaces, Student Groups

Constraints:

  • not too big objects (weight+size limit for motor torque requirements)
  • accommodate sensors such as Kinect, Intel sensors, etc.

Components:

  • High-geared DC motors with encoders for high torque and low turn speed
    -- Motor controllers/drivers
    -- How to power the motors (sufficient current)
  • Arduino Nano
  • Bluetooth module (ideally separate from Arduino) or any other wireless comms

Design Choices:

  • Modular camera mount (adjustable, specific mounts for specific sensors)
  • Camera frame/arm/boom (fourbar vs. linear rod etc.)
  • Camera distance from turntable adjustable/modular vs. fixed (impacts software)
  • Electronics in base of camera mount or base of turntable
  • Location of Bluetooth module
  • How to control turntable (wireless vs. wired)
  • How to make a turntable (slim, stable, consistent, hidden motor vs. exposed motor)
  • Modular table surface (swap between calibration fixture, scanning surface, etc)
    -- Held by friction/screws vs. peg+hole vs. magnets
  • How to connect to computer (one cable solution best solution)
    -- Currently: Arduino goes to computer via Bluetooth and camera goes to computer via cable
  • Cable management

Stretch Goal:

  • High resolutions for small objects like D&D figures
  • Integrated motor control (remove Bluetooth, one direct cable for Arduino and sensor signals)
  • Replacing the Arduino with an even cheaper microcontroller (have to write the firmware for it)
    -- Make circuitboard Arduino

camera mounting system

The current design allows for camera to be moved on two axes. In the roadmap, automatic calibration for varying camera positions will be implemented allowing so ease of adjusting camera positions.

Problem: Current camera mounting system is kinda ugly with the 2020 fixture. It is also not stable. Bigger cameras such as the Kinect will probably break the system.

Proposal: Make a better camera mounting system.

Electronics housing & electronics rework

This enhancement is deeply linked to #24.
Currently, swagscanner has a stacked board design for the motor driver and Arduino:

It was designed this way for easy prototyping in case anything fried.

Problem: Vertical stackup is too tall for height-conscious housing design.

Proposal: Rework the electronics to make a horizontal platform. And also design housing for it. Housing should have a barrel plug built-in.

Considerations:

  • Make sure heat is not a problem.
  • Small footprint
  • add SD card feature (SD card for saving scanner information)

split project into more cmakelists

my computer begs for mercy when adding a variable to a file and CLion wants to inspect the entire project. add more cmakelists to the project to prevent this.

  • done

logging system

we need a logging system for swagscanner. it should display info such as bluetooth connecting, processing operations, where and which files are being saved, etc.

automatic calibration algorithm

swagscanner needs a way to find rotation axis, rotation point, and a way to determine bounds of the scanning box. We need the bounds of the scanning box to remove outside points. We can determine all this information using the calibration fixture.

Todo:

  • Figure out rotation axis, rotation point.
  • Figure out a way to use information from calibration to determine scanning box

MVC refactor

okay, this is a massive refactor. After having gone bestmode to improve scan quality and results, the architecture has been left a little neglected. The controllers are doing too much and MVC is being ignored because the model is a glorified utility class and the controller is some sort of superhero megalith.

Proposal:

export IO file saving/loading to model.

Give model member variables such as a map of pointclouds.

refactor the model into three distinct models: calibration, scanning, processing

refactor utility classes for registration, etc INTO the models

initialize file handlers with the models and set them as class members, and don't forget to make the file handlers unique ptrs. I think I want to leave file handling as their own objects for now because there is too much code that would be pretty irrelevant to the core of the models, which is pointcloud processing

turntable rework

issues with current design:

  • backlash -- this stems from poor gears and stepper motor placement.
  • too thicc -- the turntable's vertical height can be reduced greatly
  • noisy -- mostly hollow design in the base of the turntable exacerbates resonant frequencies. Plus stepper mounting position affects noise too.
  • expensive -- have to buy slew ring bearing.

okay things with current design:

  • No backdriving (because of worm gear)!!!!
  • Easy bottom-up assembly

Proposal:
Create a completely new turntable architecture that is quiet, low-profile, and robust. Also maintaining ease of assembly and aesthetics.

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.