Commit Graph

14 Commits

Author SHA1 Message Date
61ed48c465 chore: bump move_base2 submodule pointer
8bc4895..8d9932c: emergency()/clearEmergency() propagation lên BaseNavigation,
10 config key trước đây rơi default âm thầm, tune runtime sim params.
2026-09-15 15:13:57 +07:00
f7398d9442 feat: navigation_get_component_status() + truthful PREEMPTING contract in the C API
Applies cleanly from T800_ws commit 2b0993b: this repo's nav_c_api_2.h/.cpp/
GUIDE.md were byte-identical to the pre-fix baseline (verified before
applying), so this is the same patch, not a manual reconstruction.

- NavComponentStatus struct + navigation_get_component_status(): lazy
  dlsym of the MoveBaseComponentStatus alias (see previous commit's two new
  headers); returns 0 rows if the loaded .so doesn't export it, so an old
  libmove_base2.so is not a crash, just no data.
- Doc: PREEMPTING is now a truthful "still winding down" state (see
  move_base2 commit 8bc4895, already pulled) — a host must poll to
  quiescence before resending, not resend on PREEMPTING as if it meant
  "acknowledged".

Kept for a future C# host per user request — the C API is the intended
integration point for that.
2026-09-12 22:26:41 +07:00
9095e58dec feat: bring the move_base2 cancel/pause/resume lifecycle fix onto new-1.0
Bumps 7 submodule pointers to the same fix already on T800_ws (branch
dev_recovery_and_manager_mission there, this repo is on new-1.0 — the two
branches share no common history, so this is a submodule pull + a manual
reapply of two new headers, not a merge or cherry-pick):

  sbpl                 ca1ba36 -> bd89924  (SBPLPlanner abort flag)
  sbpl_lattice_planner 9c1667e -> 7456e99  (Preemptable + shared search budget)
  recovery_core        c03d16f -> 254c7fc  (onCancelRequested + ABI guard)
  sbpl_recovery        8f9326b -> ea79686  (detour search on a worker thread)
  action_core          a6bc3df -> 669c3f7  (pause/resume + kCancelled + ABI guard)
  dock_pattern_action  302dd11 -> cc1ea74  (pause/resume)
  move_base2           7d00c5a -> 8bc4895  (the lifecycle contract itself)

pnkx_nav_core's own two new in-tree headers (robot_nav_core::Preemptable,
move_base_core::component_status_probe.h) are added here by hand, same
content as T800_ws commit 2b0993b — required for sbpl_lattice_planner and
move_base2 (now pulled above) to even compile; not a cherry-pick since
new-1.0 and dev_recovery_and_manager_mission have no common ancestor.

config/runtime/move_base_common_params.yaml: added the new keys only, every
existing value (planner_patience 2.0, max_planning_retries 0, twist
semantics, recovery_behavior_enabled false, ...) is untouched.
settle_timeout: 2.0 and the two stopped_measured_*_eps keys are on, same as
the dev tree — this is the correctness fix itself (cancel/pause now wait
for real quiescence instead of reporting done while a component is still
unwinding), and it changes report timing only, not any commanded velocity.
The watchdog block is added but left OFF (watchdog_period: 0.0, dev tree
has 0.1) — allocated_time: 10.0 in this tree's own sbpl_global_params.yaml
means a legitimate long search could trip a naive planner_timeout as a
false "hung"; leaving a brand-new diagnostic capability off until it's
calibrated against real search/recovery/action timing on this robot matches
the policy for new features in this config tree.

Not brought over (flagged for a separate decision, see chat):
nav_c_api_2.h/.cpp changes from T800_ws commit 2b0993b — this repo has no
config/move_base_common_params.yaml at the top level (only config/runtime/),
so it may not run the standalone c_api tree at all; and the two branches'
disjoint history makes a blind reapply of an EXISTING file's diff riskier
than the two brand-new headers above. Needs a decision, not a mechanical
pull.

Not pushed to origin/new-1.0 — local commit only, pending confirmation.
2026-09-12 22:20:57 +07:00
418686ff29 fix(nav_2d): xoá UB trong TwoPointsPlanner và pointer hoang trong tf_help
Sửa tay theo commit 37e44eb (T800_ws pnkx_nav_core, branch
dev_recovery_and_manager_mission) thay vì cherry-pick, theo yêu cầu.

- two_points_planner.cpp: nhánh suy biến (start == goal, ca quay tại chỗ)
  đọc theta chưa khởi tạo trước khi dùng trong cos()/sin(). Khởi tạo bằng
  yaw hiện tại của start.

- tf_help.cpp: canTransform() nhận std::string *error_msg chưa khởi tạo —
  tf3 ghi qua con trỏ đó khi transform thất bại, tức ghi vào vùng nhớ bất
  kỳ. Đổi sang std::string thật + log tên hai frame khi thất bại.

- tf_help.cpp: transformPose() gọi transform() rồi return true vô điều
  kiện ở cả nhánh chính lẫn nhánh ExtrapolationException — lookup hỏng để
  lại out_pose mặc định (yaw 0) mà vẫn báo thành công. Trả thẳng kết quả
  của transform().

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-11 13:36:53 +07:00
71852880cc chore: bump move_base2 submodule pointer
Đưa relative_yaw trong resolveDeferredGoal + đổi binding rotate sang
HybridRotateLocalPlanner từ T800_ws (180c0e1..7d00c5a).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-11 11:39:31 +07:00
ad140e965b chore: bump mission_adapters + hybrid_local_planner submodule pointers
Đưa tính năng HybridRotateLocalPlanner (quay tại chỗ) từ T800_ws sang:
- mission_adapters ab0bed7: đọc angle_deg từ actionParameters, quy sang relative_yaw
- hybrid_local_planner d5a4bf0: thêm HybridRotateLocalPlanner core + adapter

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-11 11:34:26 +07:00
bd026b94c8 sync: cập nhật con trỏ submodule common_msgs lên bản bỏ ROS traits
Đưa common_msgs từ b68545e lên b3e0857. Hai commit đó bỏ khối
ros::message_traits / ros::serialization / ros::message_operations khỏi
Accel.h và Imu.h, rồi vá lại Imu.h cho tự đứng được: bỏ operator<< còn gọi
Printer đã xoá, include thẳng <boost/array.hpp> cho các trường covariance.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-09 14:33:41 +07:00
8b45d3af4c sync: cập nhật con trỏ submodule move_base2 và common_msgs lên main mới nhất
move_base2 2a8e416..180c0e1
  - feat(sensor_gateway): đẩy static map sang PreferredLayer và UnpreferredLayer
  - config: cây sim dùng lại f_scan + b_scan, tắt logger, viết lại doc route recovery
    (chỉ đổi comment/schema đồng bộ với dev tree — không đụng
    rb_ws/pnkx_nav_core/config/runtime, cây giá trị đã tune hiện trường)

common_msgs a07145a..b68545e
  - refactor: drop the ROS message traits and serializers from Accel and Imu

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-09 13:50:25 +07:00
c9636168bb fix(costmap_2d): lùi con trỏ về a63c084 — a5be6f9 chạy tệ, T800 đã revert
Lượt đồng bộ 09d9ea9 hôm nay kéo costmap_2d lên a5be6f9 ("body_clearance — một
nguồn hình học thân duy nhất cho cả stack") vì lúc đó đó là đỉnh origin/main.
Nhưng cây T800 KHÔNG chạy commit đó: local `main` bên T800 đang dừng ở a63c084
do commit body_clearance làm robot chạy tệ. Trỏ cây phát hành vào một commit mà
cây phát triển đã bỏ là đưa lên robot đúng thứ vừa bị loại.

Không gói nào ở đây phụ thuộc a5be6f9: priest_local_planner đang ở f2839dc, bản
này KHÔNG dùng body_clearance (đã kiểm bằng grep trên cây commit) và cây file
của nó TRÙNG KHỚP bit-đối-bit với priest đang chạy ở T800.

a63c084 là tổ tiên của a5be6f9 nên đây là lùi thẳng, không rẽ nhánh. Khi nào
body_clearance được sửa và T800 nhận lại thì kéo tiếp bằng pull --ff-only.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013rayqed51UoUzE7QDRmM9K
2026-09-06 21:46:37 +07:00
09d9ea9ed2 sync: 5 submodule lên main mới nhất, config theo schema move_base2 hiện tại
Submodule (fast-forward, không đổi nhánh):
  move_base2             c626c4d -> 2a8e416  EnvMonitor thay PathMonitor; trigger
                                             collision riêng; ngân sách recovery
                                             theo dịch chuyển; bỏ hai công tắc
                                             mission_layer_enabled và
                                             docking_requires_marker
  sbpl_recovery          d1fd723 -> 8f9326b  bỏ mô hình detour, lập lại cả đường
  sbpl_lattice_planner   6fbc29f -> 9c1667e  log eps/cost thật + mprim R=1.06 m
  priest_local_planner   86be89f -> f2839dc  đồng bộ nhánh dev
  costmap_2d             a63c084 -> a5be6f9  body_clearance

Config — CHỈ đổi schema, không đổi một giá trị nào đang có:
  bỏ  move_base_common_params.yaml: mission_layer_enabled, docking_requires_marker
      (hai khoá vừa bị xoá khỏi move_base2), và cả khối path_monitor (PathMonitor
      đã bị gỡ khỏi mã, EnvMonitor thay chỗ — khối này không còn ai đọc; nó vốn
      cũng đang enabled: false nên hành vi không đổi).
  bỏ  recovery_behaviors_params.yaml: planning_distance / sample_step /
      rejoin_clearance / max_rejoin_distance — bốn khoá của mô hình detour cũ,
      plugin không đọc từ 2/9.
  thêm move_base_common_params.yaml: recovery_reset_min_travel: 0.10
  thêm recovery_behaviors_params.yaml: routes.collision (trigger va chạm giờ có
      route riêng; rỗng là guard không được vũ trang) và detour_path.lock_costmap
      (bằng đúng mặc định C++, khai tường minh).
  thêm env_monitor_params.yaml — cây config của EnvMonitor. Khác cây dev đúng một
      chỗ: logger.enabled false (ghi JSONL mỗi tick là công cụ replay/ML, không
      chạy thường trực ngoài hiện trường).

CHƯA đồng bộ, cố ý: 27 khoá mới của PriestLocalPlanner, các instance action
(dev có reporter/sim_noop/waiter, đây có detect_pallet) và observation_sources
(dev dùng point cloud, đây dùng f_scan) — đó là hiệu chỉnh hiện trường và cấu
hình phần cứng, không phải schema.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013rayqed51UoUzE7QDRmM9K
2026-09-06 21:23:04 +07:00
367ea4313b Point costmap_2d at main
It was the one submodule of twenty-nine still pinned to a development branch,
af66991 on dev_cam_intel, left there while main was six weeks stale and held a
different clearing design.

main now carries that same work as a63c084, and the two commits share a tree
hash - 144a9bb - so this moves the pointer without changing a byte of source.
The release tree tracks release branches again.
2026-08-27 14:09:58 +07:00
f8506300d2 Follow the sensor key rename to topic in the navigation contract
The add, get and remove sensor functions spelled their first argument five
different ways - map_name, laser_scan_name, point_cloud_name,
point_cloud2_name, odometry_name - each reading like a free-form label. It is
not one. It is the key that has to match the topic a costmap layer names in
observation_sources and the entry in sensor_store_params.yaml, and a key that
matches nothing is accepted in silence: an empty costmap with no error
anywhere. The parameter is now called topic everywhere, and addStaticMap
carries the note about what silence costs.

addDepthCameraData keeps its ConstPtr and gains the reasoning, because the
asymmetry invites being tidied up. Every other sensor is reduced by the host
first - a scan is 5.5 KB, a depth cloud is voxel-filtered from 3.26 MB to 24 KB
- and copying all of them measures about 25 microseconds per second of runtime.
A depth image arrives whole at 398 KB because the voxel layer needs the full
frame for its clearing frustum, which costs roughly 250 times the other four
together. That is what earns a pointer, and the price is a contract nothing
enforces: the caller must not touch the data afterwards.

Parameter names and documentation only. No signature, no behaviour, no ABI;
this header now matches the one in the development tree byte for byte.
2026-08-27 14:03:11 +07:00
3a1502f147 Take the move_base2 debug switches onto the robot config
move_base2 advances five commits, three of which matter here: the sensor key
argument renamed to topic, the dead terminal_direction key dropped from the
docking allow-list, and the diagnostic logs put behind switches.

Only the switches need a config key, and they are added rather than tuned. All
three default to true, which is exactly what this tree does today: every
[move_base2][debug] line printed unconditionally, so nothing about the running
robot changes until somebody deliberately turns a group off.

The abort-detail line is not among them and cannot be silenced. Values tuned on
the robot are untouched; this commit only adds keys.
2026-08-27 13:45:15 +07:00
256d280b71 pnkx_nav_core 1.0 — every package with a remote is a submodule, and the root CMake builds them all
A single commit on an orphan branch: the whole tree as it should land on a
robot, with no history from the branch it grew out of.

The rule applied: a package that has its own remote becomes a submodule; a
package that only ever lived inside this repository stays as ordinary files.
That comes to 29 submodules, 18 registered here for the first time. They were
sitting in the tree as plain clones, which looks right locally and is empty on
the robot - a clone of this repository would have carried the directory names
and none of the contents.

.gitignore is fixed at the source rather than patched per path. The rule
**/[Pp]ackages/* comes from the Visual Studio template and targets NuGet's
generated packages/ folder; here Packages/ is a SOURCE directory, so it hid
whole packages from git status - and a missing package then becomes invisible
to exactly the command you would use to look for one. It cost move_base2,
dock_pattern_action and sbpl_recovery, and sbpl_recovery surfaced only by
walking the tree for .git directories and diffing against .gitmodules. The
exception now re-includes src/*/Packages/** wholesale, placed immediately after
the NuGet rule so the build-artifact rules further down still win. Listing
paths one by one is what let one slip in the first place.

The root CMakeLists.txt described a tree that no longer exists. Its second half
was a migration shim that looked for a sibling Test/ directory from AMR_T800
and added packages out of it; PNKX_NAV_CORE_BUILD_TEST_PACKAGES defaults to ON,
so with the migration finished it would have hit FATAL_ERROR at configure time.
That is gone, and every package is added in dependency order at its real
in-tree path.

Three guard names are traps worth naming, because a guard that never matches
adds the subdirectory twice on a re-entrant configure:
  - src/Libraries/angles is project robot_angles_prv, and a DIFFERENT package
    called angles lives at src/Algorithms/Libraries/angles. Both are in the
    tree; guarding on `angles` would silently skip the first.
  - dock_pattern_action's library target is dock_pattern_action_handler.
  - move_base2's is move_base2_core.

sbpl_recovery and dock_pattern_action had no standalone branch - catkin was
required at top level, so a build without it died at configure time pointing at
packages that are present. Both now detect the mode and name their CMake
targets directly in standalone, and both drop their plugin at the top of the
build tree, because boost::dll loads by filename and PluginLoaderHelper
resolves that against the build directory: left in a subdirectory a plugin
builds and is then invisible at runtime.

grid_map_core and image_geometry were added because hybrid_local_planner and
depth_image_proc link robot_grid_map_core and robot_image_geometry, and neither
was in the tree - found by scanning every CMakeLists for internal library names
and diffing against the targets the tree defines, then confirmed by the build.

Every submodule points at the tip of the branch it was already pinned to, not
blindly at main. costmap_2d stays on dev_cam_intel; that branch exists for a
reason, and this tree carries field calibration that does not belong on main.

config/ is flattened into config/runtime/, matching the layout the nav core
reads. The .zip snapshots of old package states are gone - manual backups, not
build inputs.

Verified: cmake configure returns 0 and a full standalone build returns 0,
producing 48 shared libraries with nothing gated off.
2026-08-27 10:54:54 +07:00