Hello, I like the options of BeamNG.tech and I miss them in BeamNG.drive. So I improved the existing ADAS mod and added LiDAR (12-phase LFO for vehicles and another for aerial scanning, for example from a helicopter), with the possibility of exporting point-cloud data in PCD format (for subsequent processing in standard PCD programs like CloudCompare), experimental lane centering assistant and autopilot. It's definitely not in the quality of BeamNG.tech, but it's better than nothing and also it could be improved. I implemented it with help of OpenAI Codex, the source code is here (the mod itself is still waiting for approval in beamng mod repository, so the released mod and PCD client for grabbing data is published on GitHub too): https://github.com/KRtkovo-eu-AI/BeamNG-ADAS-plus - Both LiDARs have drift proximity function in all axes to take the car/helicopter movement in account (so there is no ghosting or cloud points in invalid position), the vehicle 12-phase LFO is also attached to the traffic cars position stream and shows their bounding boxes (so not their real silhouette). - Obstacle Collision Assist is attached to the front vehicle sensor (which was already present in the original ADAS mod), but when the vehicle is equipped also with LiDAR, Obstacle Collision Assist will use it for calculation refinement. However after LiDAR refactoring, there is some bug and the assist is unable to detect an obstacle far than 9 meters. Before, it was able to safely stop the car 5-12 meters (according to the conditions) in front of the wall from the speed around 90 km/h. - Lane Centering Assist is currently implemented by forcing the "AI traffic" mode driving the vehicle (it needs the AI path calculated). If the vehicle is equipped with the LiDAR sensor, Lane Centering Assist is using its data (and also special Lane Detect Sensor) and tries to calculate the center of lane just from the scanned data in a real time. It still have sometimes a tendency to choose not-direct route on crossroads, so I recommend to control the steering wheel all the time. Once you take the steering wheel and turns it, Lane Centering Assist will automatically deactivate itself. - Autopilot needs to set the destination on the map, then it calculates the route path (just like the AI) and then it drives to the that location. If you activate the Autopilot with the Lane Centering Assist active before and the calculated route fails when driving, Lane Centering Assist would take the action and will try to continue driving the vehicle. The mod itself is still waiting for the approval in BeamNG repository, so meanwhile I am making this thread. You may need to reload Lua (press Ctrl + L) if the mod is not working for you. Advanced Driver Assistance Systems Plus (ADAS+) This mod adds advanced driver assistance systems (ADAS) commonly found in modern vehicles. It allows these systems to be installed on any vehicle in BeamNG (vanilla or modded). It is an extended version of ADAS mod from Angelo234, so it is recommended to have only one of the modes installed and allowed simultaneously. ADAS+ 2.00 expands the suite with obstacle-collision automatic braking, a 12-phase LiDAR pack with point-cloud export/streaming, lane-centering steering support, and full autopilot on top of the existing assists. Mod Showcase KRtekTM WhyBeAre BeamDriver Current Features (refer to "Usage Instructions" section below for usage) Automatic Emergency Braking (AEB) Automatic Emergency Braking (AEB) applies full braking power when it detects a possible collision with another vehicle. It is designed to mitigate or even prevent a collision from occurring. The system will first alert the driver of a possible collision with an audible tone before applying the brakes. The system uses the road markings (AI paths) to determine if an oncoming vehicle is in our vehicle's path. Disclaimer: System will only work effectively if lane markings are present (technically if there are AI paths mapped). Rear Automatic Emergency Braking (Rear AEB) Rear Automatic Emergency Braking (Rear AEB) is just like AEB except it applies the brakes when it detects a collision with both static objects and vehicles in reverse gear up to 25 km/h (15 mph). The system works without the need for lane markings. Audible Rear Parking Sensors This system provides an audible alert as the vehicle approaches an obstacle in reverse. The faster the warning tone is played, the closer the vehicle is to the obstacle. Adaptive Cruise Control (ACC) Adaptive Cruise Control works like a traditional cruise control system to maintain a set speed. The difference is when it detects a vehicle ahead, it will slow down to adapt to its speed and maintain a safe following distance apart. The minimum target speed you may select is 30 km/h (20 mph) but the system can stop and accelerate the vehicle if the vehicle in front comes to a stop and accelerates afterward. Back-up Camera The camera is attached to the rear of the vehicle with a wide FOV to allow the driver to see what is directly behind them. Depending on the vehicle, the camera can display guiding lines to show where the vehicle is relative to other objects (e.g. curb, wall) and where it will go in a straight line. And trajectory lines can also be displayed to show where the car will head with the current steering input. Hill Start Assist When the driver takes their foot off the brakes to switch over to the gas pedal, the vehicle may roll back depending on the incline. This system eliminates this issue by holding the brakes until the driver hits the gas pedal. If the user is off the brake pedal for 3 seconds, the system will release the brakes. Automatic Headlight Dimming This system automatically dims the high beams if it detects a vehicle up ahead. When no vehicles are in sight, the high beams will turn back on. Obstacle Collision Automatic Emergency Braking This module fuses the forward radar array with the virtual LiDAR sweep to recognize static hazards in your lane. It escalates audible warnings, flashes the hazard lights, drops the throttle and then applies maximum braking when a collision is imminent, holding the brakes once stopped until you intervene. 12-phase LFO LiDAR Equip the dedicated sensor pack to add a 12-phase virtual LiDAR that continuously scans the surroundings, improving object recognition for the Obstacle Collision system and Lane Centering Assist. The scan also powers point-cloud capture for external tools. UI APP for debug view available. Airborne Survey LiDAR Downward-facing LiDAR pod tailored for aerial mapping from helicopters and other aircraft. It sweeps detailed multi-phase passes over terrain and rooftops while sharing the same drift-stabilized coordinates as the road-going sensor so both point clouds align. Virtual LiDAR – PCD export & streaming View attachment 1257989 Capture the environment as a point cloud that you can either write to disk or stream over TCP. The export throttles itself to roughly four frames per second to reduce drive wear, and each point includes an intensity tag for easier filtering in external applications. Lane Centering Assist Lane Centering Assist tracks the lane geometry and AI navigation data to blend gentle steering corrections. It arms when toggled on, automatically engages once lane data and speed conditions are met, and warns you when you drift toward the edge or override it with steering. UI APP for debug view available. Autopilot Autopilot hands full control to the BeamNG AI once you set a navigation destination. It maintains the route, disengages if prerequisites are no longer met, and automatically yields to Lane Centering Assist when that system is active. Usage Instructions 1a. Use the included vehicle configs to use the ADAS systems This mod adds vehicle configs with these ADAS installed on modern vehicles. The config names added are postfixed with "w/ ADAS". Example: 1b. Or install the systems manually Open the Vehicle Customization UI and click on the "License Plate Design" slot. Find the "Driver Assistance System Plus" part and click on that. All systems are added by default. You can choose the systems to add/remove by clicking on the appropriate slots. 2. Using the systems After installing the systems, the core assists will be active (except Adaptive Cruise Control, Autopilot, Lane Centering Assist, Obstacle Collision AEB toggles, LiDAR output, and the back-up camera which require input). To toggle the systems on/off and use them with the default keybindings, refer to the "Controls" section. Forward AEB No action is required until the system completely stops the vehicle, in which case the driver must press either the gas or brake pedal. Rear AEB No action is required until the system completely stops the vehicle, in which case the driver must press the brake pedal. Audible Rear Parking Sensors No action is required here. Adaptive Cruise Control Two ways to engage: Increment/decrement ACC target speed Set following distance Enable ACC system Bring vehicle up to desired speed Set ACC target speed Set following distance Enable ACC system Deactivate by toggling the system off or pressing the brake pedal. Back-up Camera Put vehicle in neutral or reverse, then press the '8' key (or '9' for bus). When leaving reverse/neutral, camera switches back to last camera used. Hill Start Assist Stop on incline (≥4°), car in 1st gear or Drive (Reverse if facing uphill), press brakes until message appears "Hill Start Assist Activated". Brakes release after throttle or 3s. Automatic Headlight Dimming Toggle with "Toggle Auto Headlight Dimming" key. After enabling, switch to high beams – system auto-changes between low/high when traffic is detected. Obstacle Collision Automatic Emergency Braking Toggle the assist via its Vehicle control binding. Once the sensor suite is installed it continuously watches for static obstacles, sounding escalating warnings, flashing hazards, cutting throttle and braking when impact is imminent. 12-phase LFO LiDAR & Virtual LiDAR output Please follow the information on our Github pages README and also check the virtual-lidar-pcd.md documentation. Lane Centering Assist Requires the dedicated lane sensor hardware. Toggle the assist via its Vehicle control binding—once armed it engages automatically when lane data and speed criteria are met, and it disengages if you steer past the lane edge, leave the road, signal a maneuver or remove the hardware. Be aware that this assistance is designed for use on highways and expressways. Always keep the vehicle under control when passing through the intersection. Autopilot Requires the Autopilot hardware slot and an active navigation target. Activate it via the Vehicle control binding and the AI will take control, automatically disengaging if the route is cleared, unresolved, hardware is removed or Lane Centering Assist is active.
For some reason, I can’t get the auto dimming headlights to work, the keybind for it isn’t in the controls menu. I’ve tried reloading lua but everything else works fine. Could this be a bug or a conflicting mod issue?
@Zepplinnn Hi, sorry this is bug - the original mod had bug in the automatic headlight dimming system so it was disabled (and obviously the key bind was removed). I fixed the issue in my code, so the Automatic headlight dimming is enabled by default and forgot to add the key bind. So basically, all you need is equip your car with that system, turn on the light, switch to high beams and whenever another car will appear in front of your vehicle, high beams will dim to low beams and after you pass the car, it will switch back to high beams.
I’ve tried that, the car will just stay on high beams even with oncoming traffic cars. I’ve tried the Roamer, 800, SBR4, K series, and Vivace. Roamer had just the auto dimming and rear cam added but the others had everything equipped. I’ve tried both ADAS configs and equipping everything myself. I’ve also tried with just this mod installed with the same result, I originally thought I had a conflicting mod. I’m attempting to use this with the realistic headlights mod.
I don't know if this is a not-fixable bug or something, but when you toggle AP and toggles AEB the car just reverse nonstoply. And when you need to make a U-turn when toggling AP, it doesn't do that in an intersection, but reverse on the road to do one
I need to investigate that.. The first issue is definitely a bug. The second one is unfortunately due to the game implementation of the AI mode used for driving the autopilot.
I could’ve possibly found a bug, or I’m just really stupid lol. Only thing I can think of is do you think mine is toggled off with no way to turn it on since there is no keybind option? Regardless of what it is, thanks for looking into it and I’m enjoying everything else!
I think that at this moment, you can open the beamng console (with "~" key) and use this command to toggle the Automatic Lights Dimming System without the keybind: Code: scripts_driver__assistance__angelo234_extension.toggleAutoHeadlightSystem()