187 Commits

Author SHA1 Message Date
e0a898a422 optimal config 2026-08-26 09:31:42 +07:00
9ca43a3419 Add the cluster-filter keys to the detect handlers, off by default
action_core gained a majority-cluster filter that keeps a localization
correction mid-detection from stalling the sample window. The keys are added
here so the field config carries the current schema, all set to the values
that reproduce today's behaviour: jump_threshold 0 disables clustering
entirely and filter_enabled true keeps the full window filter.

The detect blocks are regrouped into the four sections the dev tree uses -
routing, mode switches, sampling time, quality gate - and the comments for
sample_window and timeout are corrected: the window slides and is re-evaluated
every tick until the timeout, so the timeout is the real deadline rather than
the moment the first window is judged.

No tuned value changed. detect_pallet carries a warning that its min_samples
of 1 puts min_cluster_samples out of its allowed [3, min_samples] range, so
min_samples has to be raised before jump_threshold can be turned on there.
2026-08-26 09:27:32 +07:00
476f00e9a9 Bump action_core: majority-cluster filter for the frame sampler 2026-08-26 09:19:15 +07:00
51df4e8884 feat(dock_planner): bump submodule và bổ sung schema động học vào config robot
Con trỏ dock_planner: a301987 -> 1f04a95 — thêm mô hình động học
differential/ackermann và maneuver straight-pivot-straight (kiểu đường 3:
thẳng + xoay tại chỗ + thẳng, điểm xoay nằm giữa robot và dock nên không lấn
thêm chỗ về phía xa dock như cusp).

config/runtime/dock_global_params.yaml nhận 4 khoá MỚI, mọi giá trị đã tune cho
robot giữ nguyên (max_steering_angle 0.7, maximum_forward_extension 3.0,
direct_entry_min_curve_room 0.4, straight_length 0.0 — không đụng vào):

  kinematics/model: ackermann          (robot có steer_link; bản sim để differential)
  kinematics/minimum_turning_radius: 0.0   (bỏ qua khi model=ackermann)
  maneuver/pivot_fallback_extension: 0.0   (TẮT — tính năng mới, chưa chạy trên xe)
  maneuver/pivot_safety_margin: 0.15       (chỉ có tác dụng khi kiểu 3 được dùng)

pivot_fallback_extension để 0 theo đúng quy ước đưa tính năng mới sang nhánh
robot ở trạng thái tắt. Robot này là Ackermann nên xoay tại chỗ phải do
StanleyControl thực hiện bằng chuỗi đánh lái, chưa xác nhận trên xe.

Comment đồng bộ theo bản dev: mô tả ba kiểu đường và thứ tự planner thử dựng,
bảng khoá nào có tác dụng với model nào, cộng hai ghi chú riêng của nhánh robot
về trạng thái bật/tắt của kiểu 1 và kiểu 3.

Kiểm chứng bằng parse YAML hai file: 4 khoá thêm mới, 0 khoá bị xoá, 0 giá trị
cũ bị đổi, tập khoá giờ khớp đúng bản dev.
2026-08-25 13:16:30 +07:00
e2e0991001 build: bump 5 submodule — dọn dependency PCL, cắt chuỗi kéo VTK
Sửa lỗi `cmake ..` gãy ở generate step trên robot aarch64:

  CMake Error at /usr/lib/aarch64-linux-gnu/cmake/vtk-9.1/VTK-targets.cmake:518
    The link interface of target "VTK::mpi" contains: MPI::MPI_C
    but the target was not found.

Chuỗi nhân quả: find_package(PCL) -> PCLConfig find_VTK() -> vtk-config.cmake
include VTK-targets.cmake. VTK 9.1 trên robot build kèm MPI nên khai VTK::mpi
trỏ vào MPI::MPI_C. VTK gọi find_package(MPI COMPONENTS C), thất bại với lý do
"MPI component 'C' was requested, but language C is not enabled" — root project
khai LANGUAGES CXX. Target không được tạo, generate step gãy.

Máy dev không tái hiện được vì không cài VTK cmake package: find_VTK() tìm
không thấy rồi bỏ qua trong im lặng.

Con trỏ:
  costmap_2d             3196a19 -> af66991
  data_convert           f23037b -> 6708cdf
  recovery_core          2a86844 -> c03d16f
  move_base2             b820763 -> ea02392
  stanley_local_planner  c6ea17b -> 5845ec2

Bốn gói bỏ hẳn PCL vì không include một header pcl/ nào. data_convert giữ PCL
nhưng thu về COMPONENTS common — pcl_convert.h chỉ dùng PCLPointCloud2,
PCLImage và conversions.h, đều thuộc pcl_common; component io mới là chỗ kéo
VTK vào.

stanley còn kèm hai lỗi ngầm lộ ra khi bỏ PCL, cả hai do gói ăn ké:
find_package(Eigen) sai tên chỉ chạy được nhờ FindEigen.cmake của PCL, và
include dir cho <Eigen/Dense> vốn đến từ PCL_INCLUDE_DIRS. Đã chuyển sang
Eigen3 và khai include dir tường minh.

Các submodule đi kèm commit khác đã push trước đó trên cùng nhánh, theo về do
fast-forward: costmap_2d thêm snapshot API và debug metrics updateMap;
move_base2 thêm chế độ snapshot costmap cho controller, local costmap 10 Hz và
loạt config sim cho priest.

Kiểm chứng: cmake -S . -B build cấu hình xong "All packages configured
successfully", generate xong, cmake --build hoàn tất 100% exit 0. Không còn
dòng PCL/VTK/OpenNI nào trong output configure.
2026-08-25 12:41:35 +07:00
437ef0416e Bump stanley_local_planner and move_base2
stanley trims trailing duplicate plan poses before reading plan geometry. A
repeated final pose ends the plan with a zero-length chord, so the direction
vote, the path tangent and the curvature all read atan2(0, 0) while the
cross-track error freezes and the law cannot see the robot leaving the goal.
The overshoot gate and the window builder now agree on where a segment ends,
which is what had left that recovery dead.

move_base2 carries config only: steer_bias_min_vel drops below the working
speed of the slow profiles so the steering-bias integrator actually runs, plus
the simulation dock offsets and the dock planner terminal length.
2026-08-18 11:06:46 +07:00
0d18f9e802 Tune the Stanley gains, the dock entry threshold and the straight-move distances
stanley: wheel_base pinned to the measured 1.3118 m instead of being derived
from TF, gain_max 1.8 -> 2.3, soft_min_vel 0.20 -> 0.15, heading_bias_clamp
0.023 -> 0.05 and steer_bias_min_vel 0.30 -> 0.15 so the bias estimators keep
integrating at docking speeds.

dock: direct_entry_min_curve_room 0.5 -> 0.4.

compound actions: UNDOCKFROMSTATION and GOSTRAIGHT both move 2.0 m.
2026-08-17 16:29:07 +07:00
2c6e309ec9 Drop the simulation-only handlers and the disabled observation sources
The robot profile no longer carries the NoopActionHandler stub: on a real robot
a PickUp routed through it reports success while the fork never moves, and the
fleet master then dispatches the next leg believing the load is aboard. The
waiter and reporter handlers go with it.

Also removes the observation sources and the virtual-walls layer that were only
present commented out, so the file lists what the robot actually runs.
2026-08-17 16:29:07 +07:00
8b90aa6b87 Bump stanley_local_planner
Restricts the nearest-plan-point search to the current segment so a cusp plan
no longer switches segments early.
2026-08-17 16:28:54 +07:00
2f160b7ace Tune the pallet dock anchor and the Stanley docking limits on the robot
maker_sources: the pallet goal is measured from the dock centre, so dock_anchor
moves to center and footprint_dock declares the measured pallet extents.

stanley_local_planner_params: raise max_steer_rate to the rate the servo was
measured at, lower the docking speed ceiling, and loosen the goal tolerances to
what the robot actually settles within.
2026-08-15 14:23:17 +07:00
2db951de09 Declare the new dock planner keys and rewrite the config comments in Vietnamese
dock_global_params gains direct_entry_min_curve_room and straight_length, which
the planner already reads. Every value that was already here is unchanged;
max_steering_angle stays at the measured 0.7.

Config files are what a field operator opens next to the robot, so each
parameter now documents its unit, what it does and what changes when it is
raised or lowered. Key, plugin, frame and topic names stay in English.
2026-08-15 14:23:17 +07:00
980b7d10c0 Bump submodule pointers and track costmap_2d on dev_cam_intel
move_base2, stanley_local_planner, dock_planner, costmap_2d, common_msgs,
geometry2, laser_geometry, robot_time and voxel_grid.

costmap_2d gets an explicit branch entry in .gitmodules so submodule updates
follow dev_cam_intel instead of leaving the working tree detached.
2026-08-15 14:22:49 +07:00
c796693c8e update 2026-08-13 22:56:32 +07:00
fbb41af0e3 Bump move_base2, stanley_local_planner and action_core, declare their new keys
move_base2            383a04f -> fd0249d
stanley_local_planner 567d08e -> 5eb4e06
action_core           643f63f -> 5d878a7

The detection handler now treats sample_window as a sliding window and keeps
sampling until the spread converges or timeout expires, instead of judging once
and aborting. Stanley can latch the plan-to-global transform for a leg so a
localisation correction mid-leg no longer shifts the path under the robot, and
its docking, go-straight and rotate variants are aliases of one planner.

Declared with values that leave this robot's behaviour exactly as it is:

  hold_time: 0.0            publish on the first good window, as before
  plan_tf_freeze: false     both blocks - the latch is off until a supervised
                            run confirms it; docking is the candidate to enable
                            first, being short, reversed, and centimetre-tolerant
  align_pivot_toward_curve  false in the position block only; the docking block
                            already carries true from field tuning

The freeze_settle_* values match the built-in defaults, so they change nothing
while making the knobs visible.

Untouched because they are this robot's settings, not missing schema:
detect_pallet keeps min_samples 1 and max_spread 0.1, the detect handlers stay
split into detect_charger and detect_pallet with real input frames, the
compound actions keep their uppercase names without device steps, recovery
stays commented out, and go_straight and rotate stay on StanleyLocalPlanner
rather than the dedicated aliases.

Verified with a fresh configure and full build of this tree from an empty build
directory, EXIT=0, dock_planner_test passing here, no undefined symbol in
libmove_base2.so, libstanley_local_planner.so or the frame sampler plugin, and
every new key resolving in the merged parameter tree.
2026-08-13 22:51:04 +07:00
a79360dd49 Bump action_core
action_core 60413b2 -> 643f63f  a rejected detection now logs the sample
                                count, deviation percentiles and bounding box,
                                so the next field run says where the stray
                                samples went instead of only how far

Pointer only; no file in this tree was touched. Built in this tree, EXIT=0.
2026-08-13 16:36:13 +07:00
a5ad4268a2 Declare footprint_dock for every docking marker
The key was documented here but left commented out. DockPlanner reads it as
the dock object's polygon and turns its centre-to-face extent into the point
where the robot starts its straight alignment run.

trolley and dock_station use dock_anchor: center, so the value takes effect
there: the approach now starts 0.583 m further out than with the key absent.
charger and pallet use dock_anchor: face, where DockPlanner ignores the key
entirely - the values are recorded so switching either marker to center does
not need a second measuring pass.

The numbers for trolley, charger and dock_station are the T800 robot footprint
copied across, not a measured dock. Only pallet carries its own dimensions.
Measuring each dock type along the approach axis is still open, and the header
comment says so at the point where someone would edit it.
2026-08-13 15:22:21 +07:00
4a832a1b70 update 2026-08-13 15:11:11 +07:00
9405be6653 Bump move_base2, stanley_local_planner and laser_geometry
move_base2            d10c240 -> 383a04f  an action failure now reports the
                                          handler's reason instead of a bare
                                          "action failed"
stanley_local_planner 41e0fde -> 567d08e  docking and rotation planners folded
                                          back into StanleyLocalPlanner
laser_geometry        7e70a03 -> 526c00a  projection test no longer links Boost
                                          targets this package never looks for

Pointers only; no file in this tree was touched. Verified with a fresh
configure and full build of this tree from an empty build directory, EXIT=0,
dock_planner_test passing here, and no undefined symbol in libmove_base2.so,
libstanley_local_planner.so or librobot_laser_geometry.so.
2026-08-13 15:07:19 +07:00
e75f164d02 Declare the new dock_planner and custom_planner parameters
The bumped planners read a config schema this tree did not have yet. Every new
key is optional and falls back to a built-in default, so nothing was failing to
load - but the values were invisible here and could not be tuned.

dock_global_params.yaml
  Add approach/* and sampling/*. Drop MyGlobalPlanner and global_costmap:
  nothing in dock_planner ever read them.

custom_global_params.yaml
  Add the eleven keys CustomPlannerConfig reads. Drop the twelve SBPL-era keys
  (environment_type, planner_type, allocated_time, ...); grep over this tree
  finds no reader for any of them, and the real SBPL parameters live in
  sbpl_global_params.yaml.

maker_sources.yaml
  Add dock_anchor per marker. footprint_dock is deliberately left commented
  out: this file drives the real robot, and declaring a dock size nobody has
  measured moves the stopping point by half that length. Absent means the dock
  contributes 0 m, which is exactly what this robot does today. dock_anchor
  center-without-footprint and face are both 0 m contributions, so behaviour is
  unchanged either way.

Kept as-is because they are field settings, not missing schema: the allow-list
still carries undock_station / dock_station_2 / undock_station_2,
local_planner stays StanleyLocalPlanner, and every marker stays on DockPlanner.
action_handlers, compound_actions and recovery_behaviors are untouched - their
differences are this robot's tuning, not stale schema.

Verified: all three files parse, the merged parameter tree resolves each new
key, and no new root-key collision is introduced.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-12 22:23:20 +07:00
4f5b94a58f Bump move_base2, dock_planner and custom_planner
move_base2   a2a2ea2 -> d10c240  per-marker docking parameters reach the
                                 global planner; instance is rebuilt when the
                                 marker changes
dock_planner 91ba7b1 -> 539fc5d  typed config, validated footprint_dock, and
                                 the fix for the undefined footprintFromParams
                                 symbol that aborted docking at runtime
custom_planner 49ea9fe -> 6eed3d8  refactor merged with main, keeping main's
                                 field tuning in merge_path_calc

Pointers only; no file in this tree was touched. Verified with a full
cmake --build of this tree (EXIT=0), dock_planner_test passing here, and
ldd -r reporting no undefined symbols in libdock_planner.so.

config/runtime here still carries the previous schema. Every new dock_planner
key is optional and falls back to its built-in default, so nothing fails to
load, but the tuned values are not in effect yet.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-12 22:16:39 +07:00
6c7c1f7fb1 update 2026-08-11 16:54:52 +07:00
ec1bc2611d update 2026-08-11 16:08:16 +07:00
f349ff5568 update move_base2 2026-08-10 22:43:17 +07:00
75078db589 optimal vitural function 2026-08-10 21:42:52 +07:00
771ee5d5e7 add new file 2026-08-10 13:21:31 +07:00
ad28a413cc add new file nav_c_api2 and function 2026-08-06 19:50:46 +07:00
565e18bfb8 Add recovery and mission manager structure 2026-07-03 17:37:39 +07:00
33d6537947 Tạm bỏ 2026-04-27 15:09:17 +07:00
62a2fed488 fix lỗi xoay khi về đích 2026-04-27 14:24:40 +07:00
1a19e38b2d update 2026-04-25 16:26:12 +07:00
0d10ec2208 update config 2026-04-25 15:35:10 +07:00
270bbcc0c4 update 2026-04-25 15:29:44 +07:00
dbbda958a2 update logic xoay 2026-04-24 15:01:37 +07:00
875db4ba1e Hiep sử custom và thông số rotate 2026-04-24 14:52:11 +07:00
9c14054d3f update reduce speed 2026-04-24 12:32:47 +07:00
498a85a199 update lan 1 2026-04-24 11:23:35 +07:00
d681201698 update 2026-04-23 20:10:57 +07:00
5812542eaf uodate lần 3 2026-04-23 18:26:13 +07:00
0c65a5b6ba update xoay 2026-04-23 17:57:31 +07:00
1616ac8d7b uodate 2026-04-23 17:26:51 +07:00
5d4d77155b update khi lui 2026-04-23 17:11:47 +07:00
274d3dd858 update rotation 2026-04-23 10:29:19 +07:00
251c741dd9 update phan di thang 2026-04-23 10:28:28 +07:00
a9c56261ea Dương update custom 2026-04-18 08:32:14 +02:00
cac2343d47 Thuat toan 2026-04-18 08:31:50 +02:00
HiepLM
9f0bd9f485 update custom 2026-04-06 12:19:31 +07:00
HiepLM
ef76c43029 test rotate 2026-04-06 04:46:09 +07:00
HiepLM
d88e547676 fix direction 2026-04-06 04:36:23 +07:00
01e278befb update 2026-03-27 13:05:23 +07:00
7df2365d96 fix 2026-03-27 12:58:40 +07:00