# Longitudinal Maneuvers Testing Tool Test your vehicle's longitudinal control tuning with this tool. The tool will test the vehicle's ability to follow a few longitudinal maneuvers and includes a tool to generate a report from the route.
Sample snapshot of a report.
## Instructions 1. Check out a development branch such as `master-mici` on your device. The toggle is hidden on release branches. 2. Locate either a large empty parking lot or road devoid of any car or foot traffic. Flat, straight road is preferred. The full maneuver suite can take 1 mile or more if left running, however it is recommended to disengage IQ.Pilot between maneuvers and turn around if there is not enough space. 3. Turn off the vehicle and enable "Longitudinal Maneuver Mode" in Settings > Developer. The toggle requires IQ.Pilot longitudinal control and only enables while offroad. Alternatively, set the parameter manually: ```sh echo -n 1 > /data/params/d/LongitudinalManeuverMode ``` 4. Turn your vehicle back on. You will see the "Longitudinal Maneuver Mode" alert: ![videoframe_6652](https://github.com/user-attachments/assets/e9d4c95a-cd76-4ab7-933e-19937792fa0f) 5. Ensure the road ahead is clear, as openpilot will not brake for any obstructions in this mode. Once you are ready, press "Set" on your steering wheel to start the tests. The tests will run for about 4 minutes. If you need to pause the tests, press "Cancel" on your steering wheel. You can resume the tests by pressing "Resume" on your steering wheel. **Note:** For GM cars, it is recommended to hold down the resume button for all low-speed tests (starting, stopping and creep) to avoid the car entering standstill. ![cog-clip-00 01 11 250-00 01 22 250](https://github.com/user-attachments/assets/c312c1cc-76e8-46e1-a05e-bb9dfb58994f) 6. When the testing is complete, you'll see an alert that says "Maneuvers Finished." Complete the route by pulling over and turning off the vehicle. ![fin2](https://github.com/user-attachments/assets/c06960ae-7cfb-44af-beaa-4dc28848e49d) 7. Visit https://connect.comma.ai and locate the route(s). They will stand out with lots of orange intervals in their timeline. Ensure "All logs" show as "uploaded." ![image](https://github.com/user-attachments/assets/cfe4c6d9-752f-4b24-b421-4b90a01933dc) 8. Gather the route ID and then run the report generator. The file will be exported to the same directory: ```sh $ python tools/longitudinal_maneuvers/generate_report.py 57048cfce01d9625/0000010e--5b26bc3be7 'pcm accel compensation' processing report for LEXUS_ES_TSS2 plotting maneuver: start from stop, runs: 4 plotting maneuver: creep: alternate between +1m/s^2 and -1m/s^2, runs: 2 plotting maneuver: gas step response: +1m/s^2 from 20mph, runs: 2 Report written to tools/longitudinal_maneuvers/longitudinal_reports/LEXUS_ES_TSS2_57048cfce01d9625_0000010e--5b26bc3be7.html ``` `generate_report.py` also takes a path to a local `rlog.zst` or a directory of them. ## Testing the tooling without a car `sim_maneuvers.py` runs `maneuversd` as a real process against a synthetic powertrain and writes an rlog that `generate_report.py` reads. Use it to verify the daemon and the report generator after changing either: ```sh $ python tools/longitudinal_maneuvers/sim_maneuvers.py --out /tmp/long/rlog.zst $ python tools/longitudinal_maneuvers/generate_report.py /tmp/long/rlog.zst ``` The full suite takes about 4 minutes of wall clock; `--max-maneuvers N` stops early.