Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Using the Webapp
Work in Progress...
- Overview Video
- Connecting to the Raspberry Pi
- Opening the Webapp in a Browser
- Restarting/Shutting down the Raspberry Pi
- Performing a Scan
- Scan Settings
- Managing Scan Files
- Viewing Scan Files
Connecting to the Raspberry Pi
- Turn on the Raspberry Pi by connecting it to the battery.
- Go to your computer/phone wifi settings and connect to the
Pi3-APnetwork using password
Note: If your Raspberry Pi is not connected to Ethernet, your WiFi settings might show a warning that the
Pi3-APnetwork 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-APnetwork 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
- Once you've connected to
Pi3-AP, open a web browser such as google chrome
- Navigate to http://172.24.1.1:8080 in the url field as you would a normal webpage
- You should be presented with the home page of the scanner web application
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.
- From the homepage, press the "Perform Scan" Button
- 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.
- Press the "Start Scan" Button to begin the scan.
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!
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-APaccess point and try again.
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 (
.csvfiles 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.
Note: The scanner only stores files in
.csvformat. 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
.csvfiles 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)
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.
The Sweep Visualizer can open any of the scanner's point cloud file formats directly, including
.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 an alternative viewing option (first person + Virtual Reality), checkout the Unity Viewer project.
If you require a file format that is not provided by the scanner, you can try opening the
.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.