motion-tools aims to provide a visualization interface for any spatial information using Viam's APIs. This typically means motion-related monitoring, testing, and debugging.
The easiest way to get started is using our automated setup script:
make setupThis single command will:
- Install and configure nvm (Node Version Manager)
- Install the latest Node.js LTS version via nvm
- Install pnpm package manager
- Install bun runtime
- Install all project dependencies
After setup completes, start the development server:
make upIf you prefer to install dependencies manually:
- Install nvm
- Install Node.js LTS:
nvm install --lts && nvm use --lts - Install pnpm
- Install bun
- Install dependencies:
pnpm i - Run local app server:
pnpm dev
make setup- Complete development environment setupmake up- Start the development servermake help- Show available commands
To visit the visualizer, go to http://localhost:5173/
Open the machine config page (bottom right) and enter in connection details to visualize a specific machine. You can also add machine configs from an env file (see below).
To add a list of connection configs in an .env.local file, use the following format:
VITE_CONFIGS='
{
"fleet-rover-01": {
"host": "fleet-rover-01-main.ve4ba7w5qr.viam.cloud",
"partId": "myPartID",
"apiKeyId": "myApiKeyId",
"apiKeyValue": "MyApiKeyValue",
"signalingAddress": "https://app.viam.com:443"
}
}
'
The visualizer includes a golang package that allows executing commands to the visualizer.
The list of available commands can be found here.
It is possible to programmatically move the viewer camera and even modify the camera settings during runtime.
To do this, open the Javascript console while using the visualizer and call methods or set properties on the cameraControls object.
The following APIs are available: https://github.com/yomotsu/camera-controls?tab=readme-ov-file#properties