balance_controller:
  ros__parameters:
    # Serial connection parameters
    port: "/dev/ttyUSB0"
    baudrate: 115200

    # VESC Balance PID Parameters
    # These are tuning parameters for the balance PID controller
    # P: Proportional gain (responds to current error)
    # I: Integral gain (corrects accumulated error)
    # D: Derivative gain (dampens oscillations)
    pid_p: 0.5
    pid_i: 0.1
    pid_d: 0.05

    # Tilt Safety Limits
    # Angle threshold in degrees (forward/backward pitch)
    tilt_threshold_deg: 45.0
    # Duration in milliseconds before triggering motor kill
    tilt_kill_duration_ms: 500

    # Startup Ramp
    # Time in seconds to ramp from 0 to full output
    startup_ramp_time_s: 2.0

    # Control loop frequency (Hz)
    frequency: 50
