14 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
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
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
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
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
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
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
ec1bc2611d update 2026-08-11 16:08:16 +07:00
f349ff5568 update move_base2 2026-08-10 22:43:17 +07:00