Browse Source

Cap rotation speed to ~45 deg/s (was ~230 deg/s)

Full stick range now maps to 0-45 deg/s for fine control.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
main
Joe DiPrima 4 weeks ago
parent
commit
910a850441
  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

@ -518,7 +518,7 @@ class GamepadManager : public InputInterface {
// Analog sticks - facing and movement direction
if (std::abs(rx_) > dead_zone_ || std::abs(ry_) > dead_zone_) {
planner_facing_angle_ = planner_facing_angle_ - 0.02 * rx_;
planner_facing_angle_ = planner_facing_angle_ - 0.004 * rx_; // ~45°/s max at full stick
if constexpr (DEBUG_LOGGING) {
std::cout << "[GamepadManager DEBUG] Right stick - Facing angle: " << planner_facing_angle_ << " rad" << std::endl;
}

Loading…
Cancel
Save