Skip to content

Software Requirements Drive System

Simran Cheema edited this page Jul 15, 2026 · 1 revision

3.2 Drive System

3.2.1 Objectives

  • Reliable tank-steering for new mechanical design.
  • Validate in simulation before hardware.
  • Intuitive control via Xbox controller.

3.2.2 Functional Requirements

FR-2.1 Simulation & Testing

  • FR-2.1.1 URDF/CAD loads in RViz/Gazebo.
  • FR-2.1.2 Validate tank-drive logic in simulation prior to hardware.
  • FR-2.1.3 Simulation Readiness Gate:
    • Scripted forward/turn/pivot sequences pass.
    • E-Stop ≤ 0.5 s (latched).
    • Watchdog: if no /drive/cmd_vel ≥ 0.2 s → zero + warning.
    • Apply small dead-zone + exponential response; ≤ 0.2 m/s starts/stops are smooth.

FR-2.2 Drive Control Logic

  • FR-2.2.1 Independent left/right motor groups (tank steering).
  • FR-2.2.2 HAL translates to PWM/CAN/sim back-ends.
  • FR-2.2.3 Configurable response curves (linear/exponential).

FR-2.3 Controller Integration

  • FR-2.3.1 Xbox controller as primary input.
  • FR-2.3.2 Mapping: Left stick → left motors; Right stick → right motors.
  • FR-2.3.3 On disconnect: immediate neutral; no last-value hold.
  • FR-2.3.4 Mappings/sensitivity defined in drive.yaml.

FR-2.4 Safety & Reliability

  • FR-2.4.1 E-Stop halts immediately; latched until ~/clear_estop.
  • FR-2.4.2 Clamp power within motor limits.
  • FR-2.4.3 Manual override mode for troubleshooting.
  • FR-2.4.4 Watchdog zeroes when command gap ≥ 0.2 s.

3.4 Non-Functional Requirements

ID Type Requirement
NFR-2.1 Performance Controller latency ≤ 1 s.
NFR-2.2 Reliability Operate ≥ 2 hours without faults.
NFR-2.3 Usability Complete a basic obstacle course after ≤ 20 minutes.
NFR-2.4 Testability Sim tests verify forward motion, turning radius, pivot.

3.5 Verification Criteria

See table below.

Test Condition Pass Criteria
Straight-Line Motion 5 m @ 0.3 m/s In odom: cross-track ≤ 0.25 m; heading error ≤ 5°.
Pivot in Place (±90°) ±90° @ ~30°/s (~0.52 rad/s) Final heading within ±5°;
Constant-Speed Cruise 0.3 m/s for 10 s Avg 0.27–0.33 m/s (t=1–9 s); no sample exceeds max speed.
Watchdog Stop /drive/cmd_vel ≥ 0.2 s Publishes zero + WARN.
E-Stop Trigger HW or /system/estop Immediate zero until ~/clear_estop.
Controller Disconnect Unplug during motion /drive/cmd_vel zero within ≤ 100 ms; no residual motion.

Pre/post test steps: flat surface, nominal tires, bag /drive/cmd_vel and /localization/odom_local; run each test twice and both must pass.

Clone this wiki locally