feat: tiep nhan route graph (Voronoi) cho global planner + anytime ARA* schema, don doc EnvMonitor

- navigation_server: them addRouteGraph(topic, RouteGraph), day vao sensor_store cung namespace
  addStaticMap; consumer (SBPLLatticePlanner) tu doi chieu map_hash.
- PlannerRunner: them setSensorReader()/attachSensors() - trao SensorReader cho global planner
  nao ke thua robot_sensor_ports::SensorConsumer, goi TRUOC initialize() (dynamic_cast, giong co
  che ControllerRunner dang dung).
- sensor_store_params.yaml: khai topic /route_graph (data_type RouteGraph, capacity 1).
- sbpl_global_params.yaml (config/runtime): dong bo schema initial_epsilon/final_epsilon/
  eps_step/repair_time/return_first_solution + khoi voronoi_corridor (xem pnkx_nav_core
  c52cbe5, Test/sbpl_lattice_planner cho code doc cac khoa nay).
- launch: them arg launch_prefix (vd "stdbuf -oL" - robot::log_* dung printf khong flush, qua
  `| tee` bi block-buffer 8 KB lam log dung o dong cu du node con chay); them
  route_graph_maps_dir/route_graph_topic cho amr_node doc file voronoi.json theo map dang kich hoat.
- docs: xoa PLAN_LIFECYCLE_CANCEL_PAUSE_RESUME.md (don sang Test/docs/move_base2/), sua duong dan
  ENV_MONITOR_PLAN.md trong comment cac header EnvMonitor lien quan.
This commit is contained in:
2026-09-22 15:31:43 +07:00
parent 1e8abf2ce4
commit f4f99650df
20 changed files with 247 additions and 903 deletions

View File

@@ -17,6 +17,10 @@
<arg name="global_plan_msg_type" default="vda5050_msgs::Order" doc="nav_msgs::Path | vda5050_msgs::Order" />
<arg name="primitive_filename" default="$(find amr_startup)/config/mprim/unicycle_highcost_5cm.mprim" />
<arg name="prefix" default="" doc="Prefix cho tf frame của robot" />
<!-- Bọc lệnh chạy node. robot::log_* in bằng printf không flush: đi qua pipe (`| tee`) thì stdout bị
block-buffer 8 KB, log dừng ở dòng cũ dù node vẫn chạy. Soi log lúc treo/chậm thì đặt
launch_prefix:="stdbuf -oL" (từng dòng); gdb: "gdb -ex run -args". Rỗng = như cũ. -->
<arg name="launch_prefix" default="" doc="vd. 'stdbuf -oL' để stdout ra từng dòng khi tee" />
<!--
ĐIỂM KHÁC BIỆT DUY NHẤT của cả đường chạy: nav core đọc config từ đây.
@@ -31,7 +35,8 @@
<!-- subst_value: mqtt_general.yaml dung $(find amr_startup) cho duong dan factsheet -->
<rosparam file="$(find amr_startup)/config/mqtt_general.yaml" command="load" subst_value="true" />
<node pkg="amr_control" type="amr_control_node" respawn="false" name="amr_node" output="screen" clear_params="true">
<node pkg="amr_control" type="amr_control_node" respawn="false" name="amr_node" output="screen" clear_params="true"
launch-prefix="$(arg launch_prefix)">
<rosparam param="footprint" if="$(eval robot_type == 'imr')">
[[0.412, -0.304], [0.412, 0.304], [-0.412, 0.304], [-0.412, -0.304]]
</rosparam>
@@ -65,6 +70,16 @@
nơi có timer phát cmd_vel 20 Hz). 1 = tuần tự như cũ nhưng vẫn tách queue. -->
<param name="sensor_spinner_threads" value="4" />
<!-- Route graph (Voronoi) biên dịch sẵn, SensorConverter đẩy vào nav core ngay sau /map
(`addRouteGraph`). Thư mục map hiện hành = <route_graph_maps_dir>/<tên trong
activated_map.txt>/ — cùng quy ước với loc_base; file cần có là voronoi.json (sinh bằng
voronoi_route_compile, đã có cho sehc_factory). Không có file = planner chạy full như cũ.
Consumer: SBPLLatticePlanner, khối `voronoi_corridor` trong sbpl_global_params.yaml của
cây config/runtime; khoá kho `/route_graph` khai trong sensor_store_params.yaml.
route_graph_dir (nếu đặt) chỉ đích danh một thư mục, bỏ qua activated_map.txt. -->
<param name="route_graph_maps_dir" value="$(find managerments)/maps" />
<param name="route_graph_topic" value="/route_graph" />
<!-- maker_sources is loaded by robot::NodeHandle from this launch's move_base2 runtime
overlay. Do not also load amr_startup's legacy copy: its contents diverge. -->
<rosparam file="$(find amr_startup)/config/move_base_common_params.yaml" command="load" />

View File

@@ -25,6 +25,7 @@
CPU và kéo RTF của Gazebo xuống, mà chính RTF thấp mới làm buffer quá hạn.
► Chỉ bật khi chuyển sang `use_depth_image_input: false` và đã cấu hình nó cho 2 camera. -->
<arg name="depth_proc" default="false" doc="Bật khi dùng use_depth_image_input:=false" />
<arg name="launch_prefix" default="" doc="Truyền xuống amr_node, vd. 'stdbuf -oL' khi tee log" />
<!-- 1. Gazebo + model robot T800 + world -->
<!-- <include file="$(find amr_startup)/launch/robot_maze_world.launch" if="$(eval world == 'maze')">
@@ -55,5 +56,6 @@
<!-- 4 + 5. Nav stack trên move_base2 (tự đặt PNKX_NAV_CORE_CONFIG_DIR) -->
<include file="$(find move_base2)/launch/move_base2_control.launch">
<arg name="robot_type" value="$(arg robot_type)" />
<arg name="launch_prefix" value="$(arg launch_prefix)" />
</include>
</launch>