Commit Graph

11 Commits

Author SHA1 Message Date
robin dec1d85f9b change the controler 2026-08-19 14:44:25 +09:00
robin 6be30eb929 add doc 2026-08-19 13:56:22 +09:00
robin bb5a0adc0c Replace Xbox joystick control with RadioMaster Pocket + XR1 RC receiver
Migrates the 4WD control input from SDL2/Xbox gamepad to a serial RC
receiver per doc/joystick.md's functional spec: CH1 steering, CH2
throttle, CH5 emergency brake (highest priority), CH7 speed mode
(0.3/0.6 m/s), with a 200ms fail-safe that forces an immediate stop
on signal loss. Channel mapping, deadzones, port, and baudrate are
all configurable via --rc_* CLI flags. LiDAR avoidance, jerk-limited
motion profile, and wheel-fault detection are unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-19 12:44:51 +09:00
Dongubak dd77dbf1bb add manual of IMU
add manual of IMU
2026-08-18 10:27:13 +09:00
Dongubak 2f21d86193 Add ZLAC8015D driver docs, IMU integration plan, and reference resources
Documents the ZLAC8015D V4 dual-channel driver (hardware spec, RS485
Modbus register map, 4WD skid-steer system architecture, the
xbox_motor_control.cpp control loop, and error/troubleshooting) under
doc/, plus a phased plan for adding IMU-based heading/slip feedback
(doc/06) informed by Clearpath Husky's sensor fusion stack and
skid-steer ICR literature. QnA/ records the Q&A that refined that plan.
Also adds the underlying manual PDFs and reference links under
resource/ that the docs cite.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-16 00:17:24 +09:00
robin ed34e1c025 Snap wheel command to target immediately on landing after airborne
Previously, once a wheel's airborne flag cleared, its target reverted
to the normal drive command but the actual RPM still had to ramp up
through the gentle standstill-launch accel_rate/jerk profile. Since
the chassis is already moving at that point (unlike a stop-start),
the wheel spent several hundred ms unable to match ground speed,
dragging/grinding against the surface and occasionally landing on a
momentarily negative curve-turn target, making it spin backward.

Track the airborne->grounded transition per wheel and, on the tick it
clears, snap cmd directly to target and reset the jerk accel state
instead of ramping, so the wheel rejoins the other three immediately.

Verified working on hardware.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-13 13:22:29 +09:00
robin 19fb70d998 Fix curve-steering wheel-reversal at partial throttle
Steering angular velocity (omega) was scaled by the constant max
speed (max_v) instead of the actual current forward speed (v_x).
This decoupled turn tightness from throttle position: at low/medium
throttle, a moderate left-stick steering input already produced an
omega large enough to flip the inner wheel's commanded velocity
negative, causing the robot to spin/reverse/lurch forward instead of
smoothly curving. Scaling by abs(v_x) keeps turn radius proportional
to speed as intended, matching prior full-throttle behavior while
fixing the reversal at partial throttle.

Also drops the stale committed x86-64 binary (built before this fix,
so its behavior no longer matched source). Build fresh on an x86
machine via `make`; run_4wd.sh already rebuilds automatically when
the binary is missing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-13 10:56:33 +09:00
robin ae3f92f358 Add driver error code diagnostics and current limit query/set
Reads 0x20A5/0x20A6 error codes alongside existing feedback poll to
diagnose overcurrent/overload alarms, and adds rated/max current
query and max current write helpers.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-13 10:14:40 +09:00
robin 9f2ead2138 Improve outdoor traction control and raise top speed
Adds jerk-limited S-curve motion profiles, robust median-based
odometry to reject wheel-lift encoder spikes, per-wheel current-based
airborne/stall detection with pair-wise comparison to avoid false
positives during normal curve turns, curved-turn blending for spin
turns, and optional CSV telemetry logging. Fixes a bug where any
right-stick input while driving forward would override left-stick
curve steering. Raises max speed from 0.3 to 0.4 m/s.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-12 16:31:06 +09:00
robin 4fbe036427 upload previous file 2026-08-07 13:48:39 +09:00
robin 7b801d2721 Initial commit 2026-08-07 13:39:34 +09:00