Browse Source

Slow acceleration ramp to ~2s (was 0.4s)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
main
Joe DiPrima 4 weeks ago
parent
commit
fa591e24e9
  1. 2
      gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/gamepad_manager.hpp

2
gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/gamepad_manager.hpp

@ -709,7 +709,7 @@ class GamepadManager : public InputInterface {
double normalized = std::min((planner_stick_magnitude_ - dead_zone_) / (1.0 - dead_zone_), 1.0);
double target_speed = normalized * 0.8; // 0.0 at dead zone edge, 0.8 at full stick
// Rate-limit acceleration only (decel is instant)
constexpr double max_accel_per_frame = 0.01; // ~0.4s ramp 0→0.8 at 200Hz
constexpr double max_accel_per_frame = 0.002; // ~2s ramp 0→0.8 at 200Hz
if (target_speed > smoothed_speed_) {
smoothed_speed_ = std::min(target_speed, smoothed_speed_ + max_accel_per_frame);
} else {

Loading…
Cancel
Save