The online racing simulator
The PACT Driving Assistant
(43 posts, started , go to first unread)
The PACT Driving Assistant
The PACT Driving Assistant was made to avoid collisions caused by not paying attention while cruising on TC...

What am I working on right now?
The lane departure warning will be supplemented with an adaptive cruise control later this year. That's what I am working on!

Internal Version 9.5.5 (released hopefully before December 2021)
Current Version: 8.2
Download, including installation guide:


If you have questions, suggestions or trouble installing, hit me up on discord!
Robert M.#6244

Collision Warning: The program will warn you if there is an emerging danger of collision with a car in front. The hazard lights will be activated automatically, the brakes will be preconditioned for a full emergency stop. In case you do not react the car will autonomously apply full braking force in order to avoid a collision or mitigate the severity of an impact.

Blind Spot Warning: The program will display a little "!" on the right or left side of the screen if there is a car in your blind spot or approaching from behind with high relative speed. When using the indicator, the "!" gets bigger and red. In case you steer towards a vehicle in your blind spot, the big, red warning will be displayed as well. If a collision with a car in your blind spot is imminent because of your steering angle, an audible warning tone will be issued.

Hazard Light Assist: While performing a full emergency stop, for example, because of an obstacle in your driving path, the car will automatically flash the taillights while braking and activate the hazard lights when stationary to alert the following vehicles.

Rear-End Collision Prevention: In case a car is approaching from behind and a collision is very likely as the speed of the approaching car is very high, the tail and hazard lights will be activated.

Pull out Warning: When pulling onto another street the program will display ">>" or "<<" on the side of your screen in case a car is approaching. If you start to accelerate or if your car begins to roll forward (for example when stationary on a gradient), an audible warning tone will remind you to apply the brakes again.

Cop Mode: The program will not give an audible warning when playing as a cop. It will recognize your role play status via your name. Other warnings, the HUD, etc. will work as usual.

Cross Traffic Warning: Works Up to 110 kph. It will display a warning at the side of the screen if a car is approaching from the left or right side and if it is about to cross your driving path. If a collision is imminent a warning sound will be issued.

Head-Up Display: Basically what it sounds like. It shows the speed, collision warnings, and current RPM. The head-up display which can be turned on or off in the driver assistance menu.

PDC (Park Distance Control):
Displays the distance to the cars around and beeps, just like you'd expect a PDC to do!

Heavy Impact Detection: When an impact with high forces is detected, the car will automatically apply the brakes until the car is at a standstill to avoid secondary collisions, for example with traffic ahead after being rear-ended.

Gearbox: This is exactly what it sounds like. This gearbox comes with a comfort and a sport setting. Unlike Live for Speeds gearbox, the car will shift down like a “normal” car would in real life. When suddenly flooring the throttle, kick down mode will be engaged and the car immediately shifts down into the gear that can deliver the most power at the current speed. Currently only working with 6-speed-cars.

Emergency Stop Assist: If set, the car will try to detect an inattentive driver. If a dangerous situation occurs while the driver is not paying attention, for example when fallen asleep, the car will take over, try to stay within the current lane, and slowly bring the vehicle to a standstill. Below approx. 40 kph, following traffic, is warned via hazard lights. Audible warning tones will sound until the driver reacts again. The car will try to move into the outer lane or toward the outer side of the current lane when coming to a standstill. The driver can override the system at any time.

Lane Departure Warning: If a road with lane lines is detected (only Westhill and Blackwood, more tracks supported soon), the car will warn you if you are slowly drifting out of the lane. If you do not pay attention, the car will apply a corrective steering input. This system might also trigger the Emergency Stop Assist if you do not react.

Advanced Cop Aid System: If your roleplay status is detected as "Cop" and you join or start a chase, the PACT Driving Assistant will determine the target and display helpful information such as their speed below the HUD. The siren will be turned on and off automatically.

Later (V9+):
Traffic-Aware Cruise Control: If engaged, the car will maintain the set speed. If a car in front is detected, the car will automatically slow down accordingly and accelerate back up to the set speed as soon as possible.

Lane Keeping Assist: The lane-keeping assist can be activated when traveling below 100 kph and on roads with corners having a maximum angle of 25°. The car will try to travel in the middle of the detected lane. This, however, can only be considered an assistant. The car will require you to put your hands onto your controller after 10 seconds if it doesn't detect your presence. The driver remains in control of the vehicle at all times.

Oncoming Traffic Warning: This warning will be issued if the car detects that you are heading towards oncoming traffic on the same street, for example when not paying attention.

Traffic Jam Assist: When traveling behind another car at speed of up to 40 kph, the car will stay in its lane and keep a safe distance. No driver intervention is required. As soon as higher speed is reached, the system will prompt you to take over within 5 seconds. If you do not react, the car will come to a complete standstill in its lane.

-Mayor Bugfixes
-New Light Assist now with automatic indicator turnoff.
-New Advanced Cop Aid System.

-Minor Bugfixes
-New Siren button when playing as a cop. No need for TC Lights anymore Smile.

-New warning distances
-Overhauled cross-traffic warning
-Added Lane Departure Warning
-Added Emergency Stop Assist
-Some changes to wheel support

-The preliminary warning will now precondition the brakes for a possible full emergency stop.
-The brakes can be applied autonomously, even when using a wheel as a controller.
-Warning distance when the car in front is braking is now much more accurate.

-Visual warnings look much better now
-The warning distance is now even more math, but you gut much less unnecessary warnings
-You can actually start the program together with lfs, you don't have to wait until your on track anymore: The program will restart automatically if the connection to lfs is lost; problem solved Smile

-Basically everything is a little better now.
-New warnings sounds, that aren't so annoying. (Old ones can still be used)
-New acute blind-spot warning, with a warning sound when you are steering towards a car in your blind spot and a collision is very likely.
-PDC is much better now.

-Added a tutorial at first start.
-Literally completely overhauled the collision warning.
-Some settings are now customizable via set.txt file.

V5.0 -> V5.2:
-Fixed an issue with the collision warning in V5.0
-You can now activate and deactivate the assistance systems via an assistance menu.

V4.0 -> V5.0:
-The System needs fewer data to determine if warnings are needed now. It's much more stable.
-Many fixes concerning the collision and cross-traffic warning.
-Beta PDC (Park distance control)

V3.5 -> V4.0:
-Many bugfixes and a more accurate collision warning
-New auto-gearbox with two shifting modes!

V3.2 -> V3.5:
-Added a preliminary warning. This is helpful to optimize your reaction time.
-The program now works much better on low-end PC's, because it needs much less data than before.

V3.1 -> V3.2:
-New Cop Mode, the car will now try to determine whether you are a cop and not give you collision warnings as a cop. All other warnings work as usual.

V2.5 -> V3.1:
-The program is now a .exe, not a .py anymore!

V2.4 -> V2.5:
-Fixed an issue with the indicators, causing them to not turn off after the rear-end collision prevention was triggered.
-Minor changes to the warning distance.

V2.3 -> 2.4:
-Fixed issues with the indicators.
-Fixed issues with false warnings for cars on bridges.
-Improvements to the rear end thing were made.
-Added the cross-traffic warning.
-Minor improvements to the blind spot warning were made.

V2 -> V2.3:
-Added the Rear-End Collision Prevention
-The program now considers the heading for the collision warning which means you don't get false warnings for oncoming traffic now anymore.
-Many false warnings caused by considering the false car were being fixed now.

V1 -> V2:
-Added the Blind Spot Warning.
-The program now considers more than one car for the warning
-Mayor improvements too the Collision warning were made.
-Several new warning sounds were added.

Something appears to be missing…
Isn't it better to use something like Dropbox?
What do you mean by missing? There is a MediaFire link though? Hmmmm
Umm now the link should work, thanks that u made me aware of that <3 O_O
Hey again.

I can't seem to make it work. I followed the instructions and got as far as where i needed to open the program. I have never used or even gotten close to python, so I'm assuming its that I'm suppose to open?

In the instructions it just says
Now start the Collsion warning program.

Where is that located exactly?


Rob contacted me on discord and sorted out the issue, i was using the wrong python version. He agreed to put a download to the right one in the next update.
After showing me and demonstrating the features, I'm impressed by how well this insim works.
Good job, Rob.

Note: I'm using Python 2.7.15

Edit: Moved to LFS Programming Libs and Tools.
Hello guys!

Since I really try to listen to you when it comes to suggestions here is an update with .exe files... NO difficult installation needed anymore, only thing you still have to do is configure outgauge Smile!

Thanks to Huski for the suggestion. If you have any, let me know!

Download Link:

Have fun with the update!

Spoiler alert:
With the next update there will be an option for cops to turn off the collision warning Smile!

I wish there was some workaround for autobrake on wheels.

AEB would be an amazing feature on lfs.
Update to Version 3.5!
The new update is here. Check out the explaination video or changelogs to see the changes!

Have fun guysSmile!
Attached files
Version 3.5.1.rar - 13.1 MB - 242 views
New Update is out now guys Smile Enjoy the new gearbox and the other fixes!
Attached files
Version 4 release.rar - 13.2 MB - 258 views
Hey! New Version 5 is out now! I hope you all have a great Easter Time! It contains many bugfixes and some new features!
PDC (Park Distance Control is also included as a beta! Next update will improve it!)

Guide Video Link:
Attached files
PACT Driving Assistant V5.rar - 13.3 MB - 174 views
Little Bugfix V5.2 out now. It also provides a new assistance menu which you can use to activate and deactivate some assistance systems.
Attached files
PACT Driving Assistant V5.2.rar - 15.4 MB - 251 views
Bam ba da da!
The new patch (V7.2) is out now. Some convenience improvements and so on.
PDC got better, warnings got better, visuals look better, but most important, you dont have to wait to start the program until your on track anymore. You can just start it at the same time as lfs Smile

If you have questions, or suggestions, let me know Smile))))
Have fun!
Holy crap, you've made a bunch of changes since last time I tried this.
I think it was v2.

Looks promising, I'll get back to this post later when I've tested it.
Thanks - Will try your program asap. Looks interesting!

BTW: The program reports version 7.5 and not 7.2?! Big grin
Quote from Pasci :Thanks - Will try your program asap. Looks interesting!

BTW: The program reports version 7.5 and not 7.2?! Big grin

Ehm yea, first of all thank you for trying and well yea, my initial plan was to make even more changes and improvements with this version, but with exams and stuff i didnt manage that, so i figured i am just gonna call it V7.2... because its not that much of a difference to V7. Smile But obviously I forgot that i already put the V7.5 string as a start up thingy, whoops Smile
Quote from kristofferandersen :Holy crap, you've made a bunch of changes since last time I tried this.
I think it was v2.

Looks promising, I'll get back to this post later when I've tested it.

Thanks, yea I remember you trying it for the first time back in the day (only one year ago but whatever). Have fun and if you have questions, let me know Smile
(Rob2003) DELETED by Rob2003
Quote from Rob2003 :Thanks, yea I remember you trying it for the first time back in the day (only one year ago but whatever). Have fun and if you have questions, let me know Smile

Yea, thankfully we got it working.

The PACT seems to be working alright for me. But i was rolling down the street in like 30 or 40 kmh and did SHIFT+G to change to sequential transmission mode, and i spectated myself. Since i was using the comfort transmission thing you made, it made me spectate. But i guess i shouldn't do that!

I don't have LFS open right now so don't know exactly what it said, but there was a menu that allowed me to toggle on the autobrake thing, to prevent people from slamming into walls. Well i slammed into a bunch of walls.
One big feature I'm here to request, is an automatic update feature. That'd just be the best. I don't know the options though for Python programs.
Quote from kristofferandersen :One big feature I'm here to request, is an automatic update feature. That'd just be the best. I don't know the options though for Python programs.

I know that updating the program all the time can be a pain. That's why I was working on that for the last week's, though I didn't manage to finish it in time for this update. From the next update on there will be an automatic update feature thing Smile.

Thanks for your suggestion though, that's always appreciated.

The PACT Driving Assistant
(43 posts, started )