# saltybot_bridge parameters
# Used by both serial_bridge_node (RX-only) and saltybot_cmd_node (bidirectional)

# ── Serial ─────────────────────────────────────────────────────────────────────
# Use /dev/stm32-bridge if udev rule from jetson/docs/pinout.md is applied.
serial_port:      /dev/ttyACM0
baud_rate:        921600
timeout:          0.05   # serial readline timeout (seconds)
reconnect_delay:  2.0    # seconds between reconnect attempts on serial disconnect

# ── saltybot_cmd_node (bidirectional) only ─────────────────────────────────────

# Heartbeat: H\n sent every heartbeat_period seconds.
# STM32 reverts steer to 0 after JETSON_HB_TIMEOUT_MS (500ms) without heartbeat.
heartbeat_period: 0.2    # seconds (= 200ms)

# Twist → ESC command scaling
#   speed = clamp(linear.x  * speed_scale, -1000, 1000)  [m/s → ESC units]
#   steer = clamp(angular.z * steer_scale, -1000, 1000)  [rad/s → ESC units]
#
# Tune speed_scale for max desired forward speed (1 m/s → 1000 ESC units at default).
# steer_scale is negative because ROS2 +angular.z = CCW but ESC positive steer
# may mean right-turn — verify on hardware and flip sign if needed.
speed_scale:  1000.0
steer_scale:  -500.0
