deep-sea-tactics / robot

robot source code
https://deep-sea-tactics.github.io/robot/
3 stars 0 forks source link

robot

GitHub branch check runs

Source for the main Deep Sea Tactics ROV.

This is a Cargo / PNPM & Nx monorepo.

Task Pipelines

[!NOTE] To run any of these tasks, do pnpm run <task>. The robot task must be run as root if µStreamer is not installed.

There are two different task categories:

Development

Production

Architecture

/packages/* serve as general utilities.

Non-mocking

robot hosts a TRPC server that web connects to for bi-directional communication. video runs µStreamer.

Mocking

Same components as above, but:

Setting up Physical Robot

This assumes the running system is a Raspberry PI. For more information, go to deep-sea-tactics/rpi-setup

source <(curl -s https://raw.githubusercontent.com/deep-sea-tactics/rpi-setup/main/rov.sh)

Instead of using :mock, use dev and robot directly.

Configure .env to point to the proper RPI IP address.

Utilities

Troubleshooting

Remove the PNPM global content addressable store if PNPM is causing issues:

rm -rf $(pnpm store path)

Q&A

Why TypeScript & Rust instead of Python?

TypeScript is a language that can make good UI, but it isn't Rust (I'm not subjecting the high school programming team all to Rust), and it still has reasonable hardware control. It is also incredibly compatible with cloud IDEs (given the web nature).

Why Rust?

I could not resist the temptations.

Why PNPM?

I like saving storage locally.

Why tRPC?

It's like socket.io but with type-safety embedded, not as an afterthought.

Why Nx?

Initially, this repository used Turbo, but it didn't support ARM.

Why µStreamer?

Incredible out-of-the-box support for Raspberry PIs.

Why the random patches?

https://github.com/dimforge/rapier.js/pull/264 https://github.com/kelvinsjk/mathlified/pull/7