Site Guide

Find your way around the Engineering Club.

Know what you need? Search for a component, concept or project.

Around the site

Start

Labs

TestingExperimental

Build

Club

LearnExperimental

Go a little deeper

Entry points to larger collections. Use Search for individual records.

Learning paths & reference

Inside PiCrawlerExperimental

Inside Inventory

PiCrawler / Networking & Remote Development

Networking & Remote Development

Verified SSH access, remote files, camera tunnels and future service boundaries.

Remote development from a Windows laptop

SSH provides an authenticated encrypted connection to a remote computer. Its simplest use opens a shell on the Pi: commands run there, with the permissions of the selected account. Remote SSH is VS Code's development layer on top of that connection. It installs a VS Code Server component on the remote OS and lets the laptop show editors, terminals, language tools and debugging connected to Pi-side files and processes.

First connect using plain SSH

Use the verified local account and host/IP. A historically recorded hostname is only a candidate, and is intentionally withheld here. Verify discovery and identity before connecting.

From Windows PowerShell, use the installed OpenSSH client:

Windows PowerShell · CONNECTION / PASSIVE INSPECTION · keep collected metadata private. prepared procedure · read the preceding gates; verify placeholders and actual installed paths

powershell reference
ssh <verified-user>@<verified-host>

Do not guess passwords or enable services remotely in this cloud session. If SSH is unavailable, use the locally available screen/keyboard for inspection and preserve the card before reconfiguration. A network reachability problem, an SSH service problem and an authentication problem require different fixes.

Then use VS Code Remote SSH

Install Microsoft's Remote-SSH extension on the laptop. Open the command palette, choose Remote-SSH: Connect to Host and select the same verified SSH destination. Choose Linux if asked for the remote platform. Open the Pi-side project folder, then verify pwd, hostname and Python executable in the remote terminal. Saving a file changes the Pi copy. A locally opened Windows folder with the same name is a different workspace.

Editor/user-interface extensions run locally; workspace tools can run on the remote host. Install Python language tooling into the SSH target as prompted and choose the exact Pi interpreter used for the experiment. Git operations in that remote workspace also execute against the Pi's repository. This means the old picrawler_old directory and local diffs must be preserved before treating the editor's Source Control panel as an opportunity to pull or reset.

The VS Code Server installation writes files to the Pi. Forensic recovery should therefore begin with plain SSH capture and backups. Opening Remote SSH afterward is a useful development step, not a strictly read-only first inspection. This distinction matters when trying to preserve an undocumented historical setup.

Python execution and debugging

Python executes source through an interpreter instead of uploading microcontroller firmware. Import resolution depends on interpreter, working directory, site directories, virtual environment, PATH and PYTHONPATH. sudo python3 can use a different executable/search path and home directory from python3. First reproduce the recovered workflow; only then design a cleaner future environment.

A virtual environment can isolate project Python packages, but camera libraries delivered by apt and GPIO/audio permissions require a deliberate integration strategy. --system-site-packages may expose apt-installed camera bindings; it does not make all binary dependencies compatible. Do not recommend a fresh isolated venv as a universal drop-in recovery fix for an installed system-wide HAT stack.

Debugging on the remote host is possible with the Python extension and an appropriate interpreter/launch configuration. Stop at a breakpoint only while the robot is supported and in a safe state: pausing the application does not remove servo power or stop the MCU from repeating its last PWM settings. Debug mathematical helpers offline before attaching a debugger to actuator control.

Camera in the laptop browser

The pinned Vilib source serves MJPEG at /mjpg on port 9000, bound to 0.0.0.0. With a verified trusted LAN, the direct URL is http://<verified-pi-IP>:9000/mjpg. Prefer an SSH tunnel on a shared network:

Windows PowerShell · CONNECTION / PASSIVE INSPECTION · keep collected metadata private. prepared procedure · read the preceding gates; verify placeholders and actual installed paths

powershell reference
ssh -L 9000:127.0.0.1:9000 <verified-user>@<verified-host>

Then the browser uses http://127.0.0.1:9000/mjpg on the laptop. VS Code's Ports view can forward the same remote port. If local port 9000 is occupied, choose another local port and retain remote 9000. A tunnel must be active and Vilib web display enabled; forwarding does not start the camera server.

Future networking versus stock functions

SSH and a Vilib camera stream are established software paths. A browser motion controller, WebSocket command protocol, MQTT telemetry broker, REST API and ROS graph are future projects. They need explicit implementation, timestamps, authenticated control access and a lost-connection policy. Wi-Fi latency and packet arrival do not define a reliable actuator clock. Video latency also means the operator sees the past; a browser emergency-stop button is not an independent hardware cutoff.

Why PlatformIO is different

The club's MCU workflow builds C++ firmware in a reviewed PlatformIO environment and uploads it to a microcontroller. PiCrawler runs Python programs as Linux processes on an SBC. PlatformIO becomes useful only for a separately added ESP32/Pico that has its own firmware role, such as timestamped sensor acquisition. The Pi and the HAT MCU already form a divided system; another MCU should solve a measured problem, not be added merely to match the introductory labs.

Source evidence: ms-remote-ssh, pi-remote, vi-core, pc-readme, club-architecture, club-authoring. Prepared connection commands have not been executed against the physical Pi.

Networking and remote operation

SSH development edits/runs Pi-side code. Teleoperation delivers repeated control intent. The Vilib MJPEG service supplies video. A browser command server is a custom application. These are separate services and can fail independently. A Pi can run headlessly once the relevant access/configuration is qualified; a local monitor is not needed for ordinary scripts or a forwarded web preview.

Future web architecture

Browser → HTTP/WebSocket endpoint → authenticated input/session validation → one control lease → bounded command queue → local supervisor → single PiCrawler owner. Camera and telemetry feed read-only channels. A status endpoint can be built first with no actuator construction. Movement endpoints remain inactive until deliberate local/operator arming. A Flask/FastAPI-style server is an implementation option, not a dependency this pass installed.

The UI should show WASD/buttons, a bounded speed slider, approved poses/actions, live camera with age/frozen indication, current/queued action state, distance validity, battery volts, fault reason and a clearly labeled software STOP. Key-up, focus loss, tab backgrounding, disconnect and expired lease must stop sending permission. Key repeat should replace a short desired command or be rejected, not append unlimited gait cycles. Multiple clients can observe, but only one has control. Reconnection establishes a fresh session and cannot replay old commands.

Latency includes image capture/processing/encoding/transport/display, command transport/queueing, and active interpolation. Measure these separately. A WebSocket acknowledgment establishes receipt, not that a leg stopped. Browser and Pi clocks need a declared synchronization/error assumption for one-way timestamps; RTT alone does not give exact one-way delay. Keep logging outside motion's critical path and limit telemetry/frame buffering so clients see recent data rather than a long history backlog.

Access modes

ModePractical first arrangementLimits / next gate
SSH developmentVerified account/host, Remote SSH after preservationInstalls editor server; selected interpreter matters
Video previewVilib.display(local=False,web=True); tunnel remote9000 to laptopStream /mjpg; camera startup/lifecycle must work
LAN web controlTrusted network plus app authentication/control leaseLocal firewall/client isolation and disconnect policies
Script/API clientSame typed command supervisor as browserNo separate bypass directly commanding servo coordinates
Remote laptop inferenceExplicit limited result/intent transportFreshness, encryption/authentication and failure behavior
Internet operationDeliberately protected private access/tunnel and reviewed threat modelDo not expose robot's motion service or unauthenticated port9000 casually

For an actually verified host, an SSH local forward uses ssh -L 9000:127.0.0.1:9000 <verified-user>@<verified-host>; then view http://127.0.0.1:9000/mjpg. Placeholders are deliberate: this pass has not confirmed the old hostname, password, service or current IP. Forwarding does not start Vilib. If the browser motion server is added, its port/authentication/ownership is a separate contract.

Linux services and autostart

Good boot candidates are telemetry, a read-only health endpoint, passive logging and an idle controller. A service spec should declare absolute executable/interpreter, working directory, deliberate user/group permissions, environment/config references, restart limits, startup/stop timeout behavior and journal output. Start unarmed and avoid importing/constructing motion hardware merely to display status. Review privileged hardware needs rather than running the whole web interface as root by default. After editing a unit, deliberate daemon reload/restart is distinct from reboot.

Restart-on-failure can help a passive server, but repeated constructor calls can reset/move legs. Separate initialization from startup, cap restart attempts and test a crash loop with an inert adapter. SIGTERM handling can request stop, yet a blocked call or surviving thread may delay it and HAT outputs can remain active after process death. Keep logs accessible through service status/journal and maintain a local recovery access path. No production unit or service was installed.

Projects: p2-web-console, p2-network-benchmark, p2-boot-service, p2-mission-replay, p2-touch-console. Source evidence: vi-core, pc-core, hat-robot, systemd-service, ms-remote-ssh, pi-remote.

Continue

Meeting checklist · Source library · Modification atlas · All project proposals