upload
This commit is contained in:
51
libs/vslam_web/include/vslam/web_config.h
Normal file
51
libs/vslam_web/include/vslam/web_config.h
Normal file
@@ -0,0 +1,51 @@
|
||||
#ifndef VSLAM_WEB_CONFIG_H
|
||||
#define VSLAM_WEB_CONFIG_H
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
namespace vslam {
|
||||
|
||||
struct WebConfig {
|
||||
// --- Mang -------------------------------------------------------------
|
||||
std::string bind_address = "0.0.0.0";
|
||||
uint16_t port = 8080;
|
||||
int io_threads = 1; // 1 la du: moi viec nang deu o luong khac
|
||||
|
||||
// --- Bao mat ----------------------------------------------------------
|
||||
// Neu dat: moi POST /api/* can header X-Auth-Token, WS upgrade can ?token=
|
||||
// Neu bo trong: log WARN to luc khoi dong.
|
||||
//
|
||||
// BAT DOI XUNG CO Y (xem web_server.cc):
|
||||
// BAT e-stop -> luon duoc phep, khong can token (fail-safe)
|
||||
// GO e-stop -> BAT BUOC co token
|
||||
// reset bumper -> BAT BUOC co token
|
||||
// Mot endpoint e-stop khong xac thuc tren WiFi LAN nghia la bat ky ai trong
|
||||
// mang deu e-stop duoc; nhung te hon nhieu la GO duoc e-stop cua nguoi khac.
|
||||
std::string auth_token;
|
||||
|
||||
// --- Tan so gui -------------------------------------------------------
|
||||
double state_hz = 10.0; // JSON: pose, safety, slam, health
|
||||
double scan_hz = 10.0; // giam mau tu 25 Hz cua LiDAR
|
||||
double cloud_hz = 2.0;
|
||||
double path_hz = 1.0;
|
||||
// MAP khong co tan so: chi gui khi map_version doi.
|
||||
|
||||
// --- Giam bang thong --------------------------------------------------
|
||||
uint32_t cloud_max_points = 4000; // voxel-stride truoc khi ma hoa
|
||||
float cloud_quant_m = 0.01f; // luong tu hoa i16 -> dai +-327 m
|
||||
double path_min_step_m = 0.1; // thua hoa quy dao
|
||||
|
||||
// Hang doi gui moi phien. Day thi drop khung CU NHAT khong phai MAP.
|
||||
// MAP khong bao gio bi drop -- thay vao do bat co map_pending.
|
||||
size_t max_queued_frames = 4;
|
||||
|
||||
// --- Asset ------------------------------------------------------------
|
||||
// Rong = dung asset nhung trong binary (mac dinh, va la cach .deb chay).
|
||||
// Co gia tri = doc tu dia, che do dev: sua CSS khong phai build lai.
|
||||
std::string asset_dir;
|
||||
};
|
||||
|
||||
} // namespace vslam
|
||||
|
||||
#endif // VSLAM_WEB_CONFIG_H
|
||||
Reference in New Issue
Block a user