Commit Graph

11 Commits

Author SHA1 Message Date
524939efeb config: priest sim — bật terminal_slide_max_dist 1.5 m (L1)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-28 23:42:29 +07:00
96df99fed2 config: priest — bật gate G1 + bao êm ái cho cây sim
10 khoá mới khớp priest_local_planner (gate theo khoảng cách, accel/decel/
jerk comfort, trần gia tốc góc, head slowdown slew) và bật
collision_check_enabled sau khi gate đổi sang phân mức dừng/giảm tốc.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-28 22:34:31 +07:00
c626c4d45d Retune the dev simulation config
Bench and Gazebo settings only; the robot trees are untouched.

Planners: the position profile moves to PriestLocalPlanner, and the three
docking profiles all point at HybridDockingLocalPlanner instead of the Stanley
instances. Loop drops to 20 Hz, command_semantics back to twist for the sim
drive, max_vel_x to 1.20, recovery behaviours and the path monitor off while
the docking chain is under test.

PRIEST runs cem 3 with performance_metrics off and debug_level 0, which is the
configuration the CPU measurements were taken at. Metrics have to stay off for
any further benchmark.

The SBPL primitive path pointed into rl_ws, a workspace that is not on this
machine; it now points at the copy in sbpl_lattice_planner. sensor_store's
report_period goes to 0 to stop the periodic dump. The sim launch defaults
robot_type to T800 and re-enables depth_image_proc.

The VDA5050 charger flow replaces the pallet fixture: DetectCharger and the
charger marker, with the trailing back-off commented out. The rotate compound
action is renamed to lowercase to match what the config reader looks up.
2026-08-27 13:22:26 +07:00
d0c8a0bcdc feat: gate the move_base2 diagnostic logs behind config switches
Seven [move_base2][debug] lines printed unconditionally on every cycle. On a
robot running a full shift that is noise: they describe the normal path, and
constant noise buries the one line that is actually abnormal.

Three switches, grouped by what they answer, all defaulting to on so turning
them off is a deliberate act rather than something that changes behind whoever
is relying on the log:

  debug/state  state machine transitions, printed on change, not per cycle
  debug/plan   controller accepting or rejecting a plan, recovery paths
  debug/skip   why the controller was skipped while CONTROLLING

The abort-detail line stays unconditional and loses its [debug] tag. It is the
reason a mission failed and prints once per abort; a config that can silence it
is a config in which the robot fails silently.

The read path runs YAML debug/{state,plan,skip} into MoveBase2Config, which
carries it to ControlLoopConfig. describe() prints the resulting state at boot
so nobody has to guess why a log went quiet.

Nothing computes differently: stripping every log statement from the old and
new control_loop.cpp leaves a three-line difference, and all three are comments.
The gated arguments are pure reads.
2026-08-27 13:21:58 +07:00
fd0249d3d0 Document the sliding-window detection and switch go_straight to Stanley
action_handlers_params now describes what sample_window means after the change:
it bounds the sliding window and sets when the first evaluation happens, while
timeout is the deadline the detection has to converge within. min_samples gates
whether a window is judged at all rather than failing the attempt outright, and
max_spread_* now reads "no window met this before the timeout".

hold_time is declared with its default of 0, which keeps publishing on the
first good window. Raising it to 0.5-1.0 s guards the case a single window
cannot catch: perception locking steadily onto the wrong object, where the
samples are tight but tight around the wrong place.

go_straight moves from PNKXGoStraightLocalPlanner to
StanleyGoStraightLocalPlanner, the alias the Stanley library exports for a
straight two-point leg, so the profile no longer depends on the old planner.
2026-08-13 22:47:00 +07:00
b3ca39cfdc Document the simulation Stanley profile parameter by parameter
stanley_local_planner_params.yaml carried a short header and bare values, so
tuning it meant reading the source to find out what each key did and which log
line showed whether it needed changing. Every parameter now states what it
controls, which direction to move it, and the symptom that calls for it, with
the diagnostic line to read named alongside.

The docking block keeps its own copy of the full parameter set rather than
inheriting: StanleyDockingLocalPlanner is a separate instance of the same
library reading the block that matches its alias, so a key missing there falls
back to the built-in default, not to the position profile's value.

Simulation values: max_vel_x raised to 1.20 m/s, and the detect handler's
simulated_offset_yaw sign corrected to +0.09 rad so the fake target sits on the
same side as the real one.

move_base2_sim.launch is deliberately left out: it currently carries a local
Gazebo experiment (robot_type APM, world include commented out).
2026-08-13 22:17:33 +07:00
383a04fe29 Report why an action failed instead of a bare "action failed"
FrameSamplerActionHandler already builds a precise reason for each way it can
fail: too few samples, detection too scattered, could not publish the output
frame, raw frame never appeared. All four reached the log as the same four
words, because control_loop read the tick, kept only the status, and dropped
the message, while the state machine passed a hard-coded string to finish().

Three field runs in a row could not be diagnosed for that reason: the detector
was healthy, the host confirmed pallet_raw was published and resolvable, and
the only thing navigation said was "action failed".

The handler message now travels through StateMachineInput into the terminal
reason, so it reaches the host feedback as well as the log, and control_loop
logs it directly - as an error when the action fails, as info when it succeeds,
where it carries the sample count worth comparing against the next failure.

StateMachineOutput::reason is a const char* and enter() stores the pointer
rather than copying, so the composed string lives in a StateMachine member.
Building it in a local would return a pointer into destroyed memory - every
other reason in that class is a string literal, so nothing had hit this before.
Two tests cover it: the message reaches the reason, and the reason survives the
StateMachineInput that carried it.

Config in this tree follows the same split as the robot: per-marker dock_anchor
and footprint_dock in maker_sources.yaml, detect handlers separated into
detect_charger and detect_pallet.
2026-08-13 15:01:48 +07:00
20ae52ea84 update 2026-08-09 19:17:02 +07:00
5375a9da9e update 2026-08-06 15:17:59 +07:00
701d25f952 optimal & fix file cmake 2026-08-03 22:41:32 +07:00
d8babff20b optimal 2026-07-30 09:24:47 +07:00