Initial commit: scan_web integrated recording UI
FastAPI backend + vanilla JS frontend for LiDAR/camera startup, camera settings, and rosbag recording, unifying the previous scan_gui/scan_gui_dual/ scan_gui_triple desktop tools into one web app.
This commit is contained in:
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
# Launches scan_web: sources the ROS overlays the backend's ManagedProcess
|
||||
# commands need to be able to `ros2 launch`/`ros2 bag record` against, then
|
||||
# runs the FastAPI app with a single uvicorn worker (required — see
|
||||
# backend/app.py: the rclpy context + ProcessManager registry live in
|
||||
# process memory and must not be duplicated across workers).
|
||||
# NOTE: no `-u` (nounset) — ROS's setup.bash references unset variables
|
||||
# internally (e.g. AMENT_TRACE_SETUP_FILES) and isn't nounset-safe.
|
||||
set -eo pipefail
|
||||
|
||||
HOME_DIR="/home/gardentech"
|
||||
|
||||
source /opt/ros/humble/setup.bash
|
||||
# fast_ws deprecated (2026-08-05) — it was the pre-3-camera predecessor to
|
||||
# fast_dual_ws and never had its own livox_ros_driver2 build (only chained
|
||||
# to lidar2_ws/install as an underlay). Source lidar2_ws directly.
|
||||
source "${HOME_DIR}/lidar2_ws/install/setup.bash"
|
||||
source "${HOME_DIR}/camera2_ws/install/setup.bash"
|
||||
if [ -f "${HOME_DIR}/fast_dual_ws/install/setup.bash" ]; then
|
||||
source "${HOME_DIR}/fast_dual_ws/install/setup.bash"
|
||||
fi
|
||||
# rtk_ws intentionally not sourced yet — GPS/RTK integration is Phase 1
|
||||
# Milestone 2, unused until then.
|
||||
|
||||
cd "${HOME_DIR}/scan_web/backend"
|
||||
exec python3 -m uvicorn app:app --host 0.0.0.0 --port 8000 --workers 1
|
||||
Reference in New Issue
Block a user