Using the Webapp

dcyoung edited this page Sep 27, 2017 · 16 revisions

Work in Progress...


Overview Video:

Sweep 3D Scanner Video Tutorial


Connecting to the Raspberry Pi

  1. Turn on the Raspberry Pi by connecting it to the battery.
  2. Go to your computer/phone wifi settings and connect to the Pi3-AP network using password raspberry.

Note: If your Raspberry Pi is not connected to Ethernet, your WiFi settings might show a warning that the Pi3-AP network does not have internet access. This is expected. Using the scanner web application does NOT require internet access on either your device or the RaspberryPi. The Pi3-AP network is the Raspberry Pi's hosted WiFi access point and your device will communicate with the scanner over that local network without involving the internet.

Note: If the battery is low, you can charge it using a micro USB cable. You can run the scanner while charging ONLY if using a 2 amp or higher charger. Otherwise the scanner will not receive enough current to properly power the sweep and the Raspberry Pi. This is because the battery switches to a pass through power mode while charging. In this mode, the scanner only receives power from the charging source and not the battery itself.


Opening the Webapp in a browser

  1. Once you've connected to Pi3-AP, open a web browser such as google chrome
  2. Navigate to http://172.24.1.1:8080 in the url field as you would a normal webpage
  3. You should be presented with the home page of the scanner web application

homepage

Restarting/Shutting down the Raspberry Pi

Avoid unplugging the Raspberry Pi from power until it has shutdown properly. Failing to shutdown the Raspberry Pi before pulling power could result in a corrupted SD card, requiring a re-flash.

The scanner web application makes it easy to shutdown the pi. Simply navigate to the webapp's home page at http://172.24.1.1:8080 and hit the red button that says "Shutdown Pi". Once the LED on the pi has stopped blinking and turns a solid red, you can disconnect the pi from the battery.

Similarly, the scanner web application provides an easy button to restart the pi. This can be useful when you encounter an error or a failed scan that seems to have upset the system.


Performing a Scan

Note: Make sure the MotorHAT is plugged into the battery, and that the sweep sensor is plugged into the Raspberry Pi.

  1. From the homepage, press the "Perform Scan" Button
  2. From the Scan Page, enter a name for the file and select the desired scan settings. The default scan settings are recommended for a good balance of performance and speed. See the Scan Settings section for more details.
  3. Press the "Start Scan" Button to begin the scan.

scan settings

The scan process involves a few stages. The status of the scan will be conveyed in the GUI. You should see the following sequence:

  • Resetting device (~11 seconds)
  • Adjusting device settings (~2 seconds)
  • Waiting for calibration routine and motor speed to stabilize (~8 seconds)
  • Resetting base to home position (~10-30 seconds depending on the starting position)
  • Initiating scan... (~2 seconds)
  • Scan in Progress... (duration of scan)
  • Scan Complete!
Setup Progress Finished
scan progress 1 scan progress 2 scan progress 3

Note: The application might error in various places (underlying SDK, python bindings, python scanner script, node script etc.). Some of these errors are properly detected, and reported to the user via an error message on the front-end. However, in the early stages of development, occasionally an error slips through undetected and causes the script to hang. If the UI hasn't changed in a relatively long period of time, then it is likely some error occurred. If this is the case, the webapp should still receive routing requests. Simply navigate back to the homepage and reboot the Pi with the "Restart" button. Then connect to the Pi3-AP access point and try again.


Scan Settings

The scan settings allow users to balance resolution, accuracy and scan duration depending on their needs. Below is a table showing resolution and scan duration for various settings. The Sweep sensor is more accurate and works better in direct sunlight when operating at slower sample rates. So while a 1Hz/500Hz combo and a 2Hz/1000Hz combo yield the same final resolution, the former will be more accurate at the cost of a longer scan duration.

Note: The Sweep sensor uses a form of adaptive sampling, and therefore the sample rate is not fixed. These settings are average estimates. For more information, see this article.

Scan Type Motor Speed (Hz) Sample Rate (Hz) Final Resolution (samples/deg) Scan Duration (seconds)
Full Scan (360 Deg) 1 500 1.39 268
Full Scan (360 Deg) 1 750 2.08 402
Full Scan (360 Deg) 1 1000 2.78 535
Full Scan (360 Deg) 2 500 0.69 63
Full Scan (360 Deg) 2 750 1.04 90
Full Scan (360 Deg) 2 1000 1.39 134

Managing Scan Files

Once you've performed a scan, you can download or delete the file from the File Manager, which is accessible from the button on the home page.

  • Select a file format (.csv files will download instantly. Other formats will take a moment, as they are generated upon request)
  • Use the dropdown to select a scan file.
  • Press the blue download button to download the scan file to your computer or phone.
  • Press the red delete button to delete the scan file from the Raspberry Pi.

file manager

Note: The scanner only stores files in .csv format. If you select an alternate download format, the RaspberryPi has to convert the file to the new format before serving it. This can take a while depending on the file size (a medium density scan can take 5-10 seconds, while a high res scan can take almost 30 seconds to convert). You can always convert the .csv files from the SweepVisualizer desktop application as well.


Viewing Scan Files

Default File Format:

Try opening a .csv scan file in excel or any text editor. The format is incredibly simple.

  • X: the x coordinate of the 3d point
  • Y: the y coordinate of the 3d point
  • Z: the z coordinate of the 3d point
  • SIGNAL_STRENGTH: the signal strength of point (range 0:255)

Example:

X,Y,Z,SIGNAL_STRENGTH
-1,-89,498,183
-1,-84,493,191
-1,-79,495,191
....

It should be easy to integrate these scan files into your own software or pipeline. It wouldn't take much to parse the file in most major 3D software programs.

Viewing:

The Sweep Visualizer can open any of the scanner's point cloud file formats directly, including .csv, .ply, .ply (binary) and .xyz. The Visualizer provides a lot of useful features, including:

  • viewing multiple 3D scan files
  • transforming 3D scan files
  • merging transformed 3D scan files
  • exporting merged results in various formats
  • first person view to walk around your scans

For more information regarding these tools, see the article: Intro to the Map Tab, and the overview video.

For an alternative viewing option (first person + Virtual Reality), checkout the Unity Viewer project.

Converting:

If you require a file format that is not provided by the scanner, you can try opening the .xyz or .ply file formats in freely available programs such as meshlab or cloudcompare. From those programs you can export in a variety of other file formats which may be compatible with your software of choice.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.