Viam provides an open source robot architecture that provides robotics functionality via simple APIs
Website: viam.com
Documentation: docs.viam.com
Cloud App: app.viam.com
- Discord: https://discord.gg/viam
- Support: https://support.viam.com
If you have a bug or an idea, please open an issue here.
- Install
make
. - Run
make setup
to install dev environment requirements.- This also installs some client side git hooks.
- Build:
make server
. Then run./bin/<your architecture>/server [parameters]
- Run without building:
go run web/cmd/server/main.go [parameters]
Example with a dummy configuration: go run web/cmd/server/main.go -config etc/configs/fake.json
. Then visit http://localhost:8080 to access remote control.
- SimpleServer - example for creating a simple custom server.
- MySensor - example for creating a custom sensor.
- MyComponent - example for creating a custom resource API.
Multiple SDKs are available for writing client applications that interface with the Viam RDK.
- Go: Provided by this repository here. Documentation can be found here
- Python: Docs, Repository
- Typescript: Docs, Repository
- C++: Docs, Repository
- Rust: Repository
Environment Variable | Behavior | Default Value |
---|---|---|
VIAM_RESOURCE_CONFIGURATION_TIMEOUT | Duration for which resources are allowed to (re)configure. | 1 minute |
VIAM_MODULE_STARTUP_TIMEOUT | Duration for which modules are allowed to startup. | 5 minutes |
ENV | If set to "development", runs the frontend development server. | Server runs normally |
Sign the Contribution Agreement before submitting pull requests.
The API is defined with Protocol Buffers/gRPC which can be found at https://github.com/viamrobotics/api.
- Write tests!
- Follow this Go Style Guide.
- Run
make lint
andmake test
. - Run
make build
and commit resulting frontend artifacts. - Use imperative mood for commits (see Git Documentation).
- Prefer metric SI prefixes where possible (e.g. millis) https://www.nist.gov/pml/weights-and-measures/metric-si-prefixes. The type of measurement (e.g. meters) is not necessary if it is implied (e.g. rulerLengthMillis).
- Follow git's guidance on commit messages:
Describe your changes in imperative mood, e.g. "make xyzzy do frotz" instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy to do frotz", as if you are giving orders to the codebase to change its behavior. Try to make sure your explanation can be understood without external resources. Instead of giving a URL to a mailing list archive, summarize the relevant points of the discussion.
See documentation in Frontend Readme.
To start the client development environment, first run the same go run
command mentioned in Building and Using, but with the environmental variable ENV=development
(e.g. ENV=development go run web/cmd/server/main.go -debug -config etc/configs/fake.json
).
If you are in the web/frontend
directory this is aliased as npm run server
.
You will additionally need to start a development server for client assets. To do this, navigate to web/frontend
and run npm start
(and npm install
if doing this for the first time) in a new terminal tab. Visit localhost:8080
to view the app, not localhost:5173
. The latter is the above-mentioned hot module replacement server that rebuilds frontend asset changes.
See documentation in Direct Remote Control.
We run LicenseFinder in CI to verify 3rd-party libraries have approved software licenses.
If you add a 3rd-party library to this project, please run make license-check
to verify that it can be used.
For maintainers, here is how to make some common license policy changes:
https://github.com/pivotal/LicenseFinder#permitting-licenses
license_finder permitted_licenses add MIT
https://github.com/pivotal/LicenseFinder#setting-licenses
license_finder licenses add my_new_dependency MIT
https://github.com/pivotal/LicenseFinder#approving-dependencies
license_finder approvals add my_new_dependency --why="valid reason"
Please refer to the README at https://github.com/pivotal/LicenseFinder for information on how to make other license policy changes.
Windows 10 22H2 and up.
- bash (from https://gitforwindows.org/ is good)
- gcc (from https://www.msys2.org/
mingw-w64-x86_64-toolchain
is good)
Support is not well tested yet.
- motion planning is not supported yet (https://viam.atlassian.net/browse/RSDK-1772).
- video streaming is not supported yet (https://viam.atlassian.net/browse/RSDK-1771).
- rpc: ICE between local connections found via ICE mDNS appear to be flaky in the establishment phase.
Copyright 2021-2023 Viam Inc.
AGPLv3 - See LICENSE file