This is a standalone project to make viewing massive point clouds easy and convenient. It was build to serve the needs of the Cartographer project, but is useful in its own right.
The project consist of a root crate that can build and read octrees on disk and viewer binaries to visualize the data. For Mac OS X, we assume below that you've installed Homebrew.
- Install Rust:
curl https://sh.rustup.rs -sSf | sh
. See https://rustup.rs for details. - Install protobuf > 3.0. See ci/install_proto3.sh for Linux or run
brew install protobuf
on Mac OS X. - Install the rust protobuf plugin:
cargo install --vers 1.4.3 protobuf
and make sureprotoc-gen-rust
is in your$PATH
. The binary probably is in$HOME/.cargo/bin
. - Install the rust gRPC protobuf plugin:
cargo install grpcio-compiler
and make sure it is in your$PATH
. This has more dependencies, it requires cmake and go. On mac:brew install cmake go
.
In the root of the repo, run cargo build --release
.
Then use target/release/build_octree
to generate an octree out of a PLY file.
This is a native client using SDL2.
- Install SDL2. For example, on Mac
brew install sdl2
. - Change to the sdl viewer's directory:
cd sdl_viewer/
. - Build with
cargo build --release
. - Run with
../target/release/sdl_viewer <octree directory>
.
In the point cloud viewer, navigate with the keyboard and rotate with left-click + mouse drag or touchpad. The following keys are bound:
Key | Action |
---|---|
W | Move forward |
A | Move left |
S | Move backwards |
D | Move right |
Q | Move up |
Z | Move down |
0 | Increase points size |
9 | Decrease points size |
8 | Brighten scene |
7 | Darken scene |
The web_viewer
consists of TypeScript code running in the browser and a web server binary.
To build,
- Change into the web viewer's client directory:
cd web_viewer/client
. - Install npm. We strongly suggest using nvm. On Mac
brew install nvm
. - Install node version 8:
nvm install 8
. Change to the web viewer's client directory:cd client
, then set node version to 8:nvm use 8
. - Install javascript dependencies:
npm install
. - Build the client:
npm run build
.
Then build the server: cargo build --release
.
Serve up the octree using ../target/release/web_viewer <octree directory>
, open Chrome to http://localhost:5433, navigate with WASD and left-click-drag on the mouse.
The mouse wheel adjusts movement speed.
The client files (HTML and JavaScript) are embedded in the web_viewer
binary, so it is fully stand alone.
This work was inspired through the following projects.