Indiana to Key West! Not only the longest road trip I’ve been on, but the longest trip I’ve had with OpenPilot! This is Part 1, as we will be driving back to Indiana in a few days.
I am running my highly customized 0.6.2 fork that is available here:
This trip wouldn’t of have been nearly as comfortable, or possible without my custom steer angle sensor (ZSS – Zorro Steer Sensor). Stock Toyota steer angle sensor on TSS1 cars is garbage. Not only is it only 0.5 degrees precise, but also can be up to 2.5 degrees lagged per any tilmestep due to torsional effects and backlash in the steering column between the sensor and the EPS assembly.
jsh348 has designed a custom PCB and he just so happens to live down the road from me. Small world! It’s absolutely insane that something like this is being manufactured based on such humble beginnings.
On to the random observations (on 0.6.2)!
- The stock MPC costs are fine. Rate cost of lower than 1.0 on Toyota is uncomfortable on the interstate (even 0.7). Same for Path, Heading and Lane costs
- INDI always oversteers in curves. You can fix this with my desired angle hack, but even then it needs more work as 3 degree longer curves are still ridden (especially left, for whatever reason)
- CAMERA_OFFSET may be a factor in riding curves. I have mine set to 0.0 which is comfortable in two lane opposed traffic (further right), but may be a contributor to curve hugging
- Static, factual steer ratios are critical for good lat perf, if you have a static ratio rack! Most do since EPS torque is modulated on speed and angle. Why? OP needs to know how much steering wheel angle for tire angle, stock OP values massively oversteer in curves due to invalid MPC estimation/vehicle model curvature planning. This has also been verified on 2020 Corolla on 0.6.3
- The stock INDI values are fine, but you can drop timeConstant to 0.1 if running with ZSS (4,3,0,1). I’d imagine on TSS1.5/2 vehicles with 0.056 precise sensors, you could also run with a lower timeConstant
- My fixes for lane width and right exit diving on 0.6.2 still works better than 0.6.3 exit diving
- 0.6.3’s lane-less model can lead to erratic behavior when lane confidence is low. I’m not too hard on it as it is the first release of the path planning/laneless model
- Road camber handling is still a problem. Maybe this’ll be enhanced soon
- Camera focus in heavy rain can be an issue as it focuses on the rain droplets on the windshield instead of the road, leading to vision failure/disengagement
- My battery less setup of 3.8v slowly “discharged” over the course of 13 hours, leading to a “Low Battery” disengagement for the last hour of the drive. Power cycling reset the “timer”. Higher voltage may be needed
- Openpilot’s long control leaves much to be desired. Stop and go, even with pedal, is unusable. Much effort in rewriting some of the long code led to good results, but then stopped far too close for comfort in some instances. I’m running stock long (DSU connected) and you should, too. (Apart from the extremely irritating Cruise Fault regression which requires a full reboot of Eon, and that Automatic Emergency Braking is disabled with DSU disconnected)
- Use deadzone, or round the desired angle (and steering angle, if using ZSS) to two decimal places. If using deadzone, set to your steering sensor factor. Desired angles that are several decimal places long just act as noise to the torque controller (PID, INDI, LQR)
I look forward to getting my hands on 0.6.3 in depth once I return, especially to see if my static steerRatio hacks still hold water, as apart from good angle data, has proven to be the greatest enhancement for OpenPilot.
I have plans to get my hands on a 2018 C-HR actuator assembly to compare the differences, and see if I can dump firmware to bring good stock angle to Priuses. The part numbers are the same, at the least I’ll perform a swap of the units and writeup my experiences.