You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
trajectory_planner: support a separate max reverse linear velocity #852
TrajectoryPlanner has a single max_linear_velocity, used symmetrically for forward and reverse. Powered wheelchair controllers like the R-Net run reverse slower than forward, and users expect it. Today the only way to get that is to scale negative joystick input before set_target(), which puts chassis-level behaviour outside the planner whose job it is. Thanks to @finger563 for pointing that out on our PR.
Proposal
Add an optional reverse limit to Config:
float max_reverse_linear_velocity = 0.0f; /**< Linear speed at full reverse stick (m/s). 0 = use max_linear_velocity. */
set_target() would scale negative linear input by this value instead of max_linear_velocity, so full reverse stick maps to the reverse limit. The clamp in update() would use [-max_reverse, +max_linear]. With the default of 0 nothing changes, so it's backwards compatible.
Data
We fitted the planner to a recording of an R-Net wheelchair: Luci joystick input against wheel velocities, 71 s.
Reverse speed: full reverse ran at 71% of full forward (10.4 vs 14.5 rad/s at the wheel).
With a reverse limit (applied as input scaling), the planner matched the R-Net to 0.72 rad/s RMS on linear wheel speed.
Without it, the error was 1.35 rad/s.
Turn reduction isn't needed: we also tried easing the turn rate at speed. The existing max_centripetal_acceleration already covers it, within 0.03 rad/s, so the reverse limit is the only gap we found.
Related
#850 (stale acceleration with trapezoidal stopping) is in the same update() code, if it's convenient to handle both together. Happy to open a PR for either if that helps.
Activity
feat(trajectory_planner): separate maximum reverse linear velocity
Address review: drop deadband and turn reduction, replay against real…
Use espp trajectory_planner 1.3.9: reverse limit and jerk-limited dri…