All Projects → curtismuntz → witness

curtismuntz / witness

Licence: Apache-2.0 license
An API controllable webcam project

Programming Languages

C++
36643 projects - #6 most used programming language
Starlark
911 projects
python
139335 projects - #7 most used programming language
shell
77523 projects
rust
11053 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to witness

sparkar-pixelate-shader
simple script-only pixelate shader with Facebook SparkAR.
Stars: ✭ 35 (+169.23%)
Mutual labels:  webcam
rules antlr
ANTLR rules for Bazel
Stars: ✭ 24 (+84.62%)
Mutual labels:  bazel
rebazel
🍃 tool for expediting bazel build workflows
Stars: ✭ 22 (+69.23%)
Mutual labels:  bazel
rules proto grpc
Bazel rules for building Protobuf and gRPC code and libraries from proto_library targets
Stars: ✭ 201 (+1446.15%)
Mutual labels:  bazel
rules ocaml
A Bazel Language Support Package for OCaml
Stars: ✭ 24 (+84.62%)
Mutual labels:  bazel
SkunkBooth
Text based command line webcam photobooth app
Stars: ✭ 45 (+246.15%)
Mutual labels:  webcam
Fake-Stream
Allows infinite streaming of a video as webcam output for different applications like Zoom, Skype etc.
Stars: ✭ 15 (+15.38%)
Mutual labels:  webcam
UniCam
A cross-platform open-source webcam viewer
Stars: ✭ 23 (+76.92%)
Mutual labels:  webcam
android-projects
Android benchmark projects for Bazel and Gradle
Stars: ✭ 29 (+123.08%)
Mutual labels:  bazel
rules dart
Dart rules for Bazel
Stars: ✭ 35 (+169.23%)
Mutual labels:  bazel
Bazel bin
Bazel's pre-built binaries for armv7l / aarch64 / x86_64.
Stars: ✭ 23 (+76.92%)
Mutual labels:  bazel
bazel-action
A GitHub action to run @bazelbuild commands
Stars: ✭ 18 (+38.46%)
Mutual labels:  bazel
bazel-latex
Bazel build system rules for LaTeX
Stars: ✭ 67 (+415.38%)
Mutual labels:  bazel
bazel-emscripten
C++ to WASM or JS using Bazel and Emscripten
Stars: ✭ 40 (+207.69%)
Mutual labels:  bazel
Tensorflow-binaries
Tensorflow GNU/Linux, MacOS binaries compiled with SSE4.1, SSE4.2 and AVX
Stars: ✭ 14 (+7.69%)
Mutual labels:  bazel
bazel-maven-proxy
A local (read-only) proxy for Bazel to access Maven resources behind a secure repository or from the local Maven repository
Stars: ✭ 22 (+69.23%)
Mutual labels:  bazel
bazel clang tidy
Run clang-tidy on Bazel C++ targets directly, efficiently, with caching enabled
Stars: ✭ 63 (+384.62%)
Mutual labels:  bazel
camera
Camera app designed for elementary OS
Stars: ✭ 63 (+384.62%)
Mutual labels:  webcam
monogon
The Monogon Monorepo. May contain traces of peanuts and a ✨pure Go Linux userland✨
Stars: ✭ 54 (+315.38%)
Mutual labels:  bazel
rules ocaml
OCaml build rules for Bazel
Stars: ✭ 38 (+192.31%)
Mutual labels:  bazel

Witness: An API callable webcam project.

Actions Status

An api callable webcam project. Read about it in my blog post on https://murt.is/articles/2019-03/witness.html.

I work a lot in robotics. Sometimes testing robots outside of simulators can result in hardware damaging incidents. Debugging these incidents is a combination of digging through log files and relying on witness accounts. Witnesses are imperfect, as they can be biased or perhaps they see the whole incident.

Typically, witness cameras are used to combat this problem. It becomes part of the operational practice to always start a camera recording when you start a test. The problem with recording every test, is if it’s not automated, eventually you’ll forget to do it. This led me to develop the concept of an unbiased robotic witness. The idea is to have an API callable webcam that is scalable to however many witnesses I want to have.

Using this project, you can now integrate the API calls into your usual robotics testing procedures. Any time you're about to test a new feature, the witnesses can be told to start recording sessions with the same filename (the software prepends hostname to filename). Then, all witness accounts can be downloaded upon test completion. This automates the process of synchronizing tests with witness accounts, as well as ensures a video is always recorded.

Usage

See the protobuf definition for supported features and more information.

Running the service on x86 (local builds)

Run server locally:

bazel run //witness/server:server -- -media_dir /tmp

Run server in a container:

bazel run //deploy:container_amd64
docker run --rm -it --device=/dev/video1:/dev/video0:rwm bazel/deploy:container_amd64

Running the service on an IoT device

This project has tooling to develop aarch64 and armv7hf containers for use on Raspberry Pi and Nvidia Jetson (Nano, TX1, TX2, and Xavier) computers. These containers can be pushed to dockerhub and pulled onto each device, or you could use balena to manage a fleet of witnesses.

Their structure follows:

  • murtis/witness_armv7hf -> works on raspberrypi products
  • murtis/witness_aarch64 -> works on nvidia jetson products

Each witness architecture has two tags:

  • base -> the base image that bazel pulls down to apply layers on top (see //docker/base_images)
  • service -> the compiled service layer that sits on top of the base layer

Build them for a device:

# Note, you could push via the run command using the :push_witness_aarch64 target
bazel build --config=aarch64 //deploy:container_aarch64

Run them on a device:

docker run --rm -it --network=host --device=/dev/video0:/dev/video0:rwm murtis/witness_aarch64:service

Example clients

Run simple cli client:

bazel run witness/client/endpoint_scripts:shell

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].