Space Engineers

Space Engineers

756 ratings
DAS - Driver Assisting System
9
4
13
7
3
2
2
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
99.970 KB
24 Jul, 2017 @ 6:50pm
4 Aug, 2019 @ 2:22pm
27 Change Notes ( view )

Subscribe to download
DAS - Driver Assisting System

Description
Description

DAS - Driver Assisting System - is a script focused on making suspension wheels based vehicles more controllable and more reliable. The script continuously processes vehicle speed, heading direction, orientation, altitude, and tweak suspensions, thrusters, and gyroscopes.

DAS subsystems

Traction Control Subsystem
TCS is a core subsystem which takes care of all suspension wheel's settings. This includes wheels on subgrids. TCS coroutines provide these functionalities:
  • Friction balancing. The script will provide maximum friction when a vehicle drives straight, and reduce it on turns. Additionally, the script detects when a vehicle starts to drift and rebalance friction across the wheels in a way that wheels don't bit surface and drift itself became more predictable. On braking, friction rebalances in a way that mutual drag point of all wheels stay behind the CoM (Center Of Masses), so the vehicle would not be turned around 180 degrees.
  • Torque adjusting. The script will ramp up and down torque to provide a smooth drive start. Maximum allowed acceleration could be changed in script settings. Script simulate electronic differential, and when the vehicle steer torque on inner wheels get reduced. The script also relays user control to wheels on subgrids, so pressing W or S wheels also apply propulsion override to these wheels.
  • Strength calculation. The script will calculate and apply the exact amount of strength each wheel needs depending on vehicle mass, local gravity magnitude, wheel size, and wheel position in the vehicle. Also, TCS has it's own Air Shok functionality. The script will boost strength on wheels when the vehicle falls, but then quickly restore original value once fall is over. This way vehicle will not bounce from the ground that much as with vanilla air shocks.
  • Speed limit variety. TCS offers analog control over speed. I.e. joysticks and alike controllers you can drive at any fraction of set speed limit (130 km/h by default). Also by pressing C key script will boost the speed limit to the maximum.
  • Adaptive steering & Ackermann steering. The Script implements Ackermann steering scheme. By this scheme maximum steer angle on each wheel recalculated, so all wheels follow it's own circular arc, and centers of turning of all wheels are in one place, forming one turning axel. By default, this main turning axel passes through the CoM. This could be changed in script settings. Also, TCS reduces steer angle depending on vehicle lateral speed. This reducement is harsher then vanilla one, but it's derived from the centrifugal force occurring from turning, therefore it more robust at preventing roll-overs. Adaptive steering could be turned off in script settings, also it temporarily turns off when pressing Spacebar+W(or S)+A(or D).
  • Hill Descent Control. When HDC is active script will use wheels propulsion override to decelerate if lateral velocity exceeds the speed limit. Could be useful when going own the hills.
  • Half-braking. The script will disengage brakes on rear wheels if pressed Spacebar+W or Spacebar+S.
  • Wheel adding. If suspension lost its wheel script will re-add it automatically.

Gyro Stabilisation & Assisting
GSA takes control over gyroscopes of a vehicle. The orientation of gyroscopes in a vehicle doesn't matter. Following functionality provided by GSA:
  • Aligning to the gravity vector, or surface curve. Surface curve evaluation requires a downward camera(s). In midair fall GSA will slightly tilt vehicle up to preact for landing.
  • Assistance in turns. When A or D key pressed script will apply appropriate turn force in gyros.
  • Auto-turtleflip. In the case of rover flip upside down GSA with use of advanced gyro manipulation algorithm will apply maximum torque to bring the rover upright.

Smart Dampeners Override
SDO will take control over all thrusters that faced forward, backward and sideward. The script will truncate user input to this thrusters, so main propulsion source would be wheels, and thrusters will serve as speed dampeners, and/or speed boosters.
  • For a speed boost and additional acceleration C+W or C+S.
  • Velocity dampening function may be switched on/off as you turn on/off vanilla dampening with Z key.

Fall Dampening System
FDS will take control over upward thrusters. Following functionalities provided by this subsystem:
  • Fall dampening. Its main purpose is to engage these thrusters when vehicle falling by any reason. For more precise altitude evaluation downward camera(s) required.
  • Thrust truncation. When vanilla dampeners are on thrusters will not provide thrust, so the rover will not hover over the ground. Also if jump jets disabled in the script pressing Spacebar will not fire these thrusters.
  • Jump jets. If jump jets enabled in script pressing Space key will engage upward thrusters.

Lights handling
A small cherry on top of a DAS cake. A lot of things controlled by this script, so I decided, why not put a little bit more. The script can handle lights as stoplights and turn lights.

Features

Autopilot
DAS has built-in autopilot system working with suspension wheels. A user can set itinerary waypoints in the Remote Control block, and then toggle DAS autopilot on. Autopilot parameters:
  • Accuracy. This parameter determines how close to waypoint vehicle should be to consider this waypoint is reached.
  • Wait time. Autopilot can wait a given amount of time in each waypoint before driving to the next one. Handbrakes will be engaged while the autopilot is waiting.
  • Drive mode. There are three drive modes: One Way - autopilot will drive from waypoints A to B, C, D... etc, and once the last waypoint reached autopilot will be turned off, and handbrakes will be engaged; Patrol - autopilot will drive from waypoint A to B, C, D..., and once the last waypoint reached autopilot will drive in reverse itinerary, i.e. D, C, B, A, then again revers; Circle - autopilot will drive from waypoint A to B, C, D..., and once the last waypoint reached autopilot will drive to waypoint A, then B, C, D... etc.
The autopilot has its own speed limit, which could be changed at script settings, and when it's active will engage HDC function of TCS.
Important note: the autopilot does not have any collision detection features, and if there is any obstacle on the way to waypoint autopilot will ram it without any hesitation.

Cruise Control
DAS has a built-in Cruise Control system. CC once turned on it will keep lateral velocity and travel direction that was on the moment of engagement. A user can correct velocity and travel direction with WASD and Spacebar keys without disengaging CC.

Automatic handbrakes
Will engage hand brakes when there is no one in the cockpit/control seat. Can be toggled in the script.

Back-up beeper
Remember these heavy lifter cars that making a beeping sound when driving backward? Now you can do it too! Well, not exactly the same way, because the game doesn't have this particular sound, but still you can place a sound block, choose the sound of your taste and script will play this sound when you driving backward.

Standby mode
The script watches for connector blocks state, and if vehicle connected to something via such connector it will suspend all its subroutines. Once disconnected script ill run itself again.
Note though, if you running something like mobile base with connectors designated to carry smaller vehicles then you need to add a 'DAS_IGNORE' keyword to connector's Custom Data, so the script will not halt itself unintentionally.
Popular Discussions View All (26)
96
1
14 Apr @ 3:17pm
PINNED: Script setup
Wanderer_308
83
30 Mar @ 4:34pm
Feature/Improvement Suggestions
Rubezagel
4
23 Oct, 2023 @ 4:57am
Auomations update auto pilot
NineTailedWitch
1,169 Comments
SAS1819 23 Jun @ 1:12pm 
All remotes facing into the right direction...guess its not about the setup (I used that script like 30 times w/o problems...) has to be something about the wheels being on subgrids
SAS1819 23 Jun @ 12:56pm 
Guess screenshots wont help, its a closed system. I've put remotes onto the wheel subgrids aswell for handbraking. Do they have to face the right direction aswell?
Wanderer_308  [author] 22 Jun @ 4:46pm 
RC block orientation is correct? Maybe some screenshots would shine the light on the problem.
SAS1819 22 Jun @ 11:43am 
I know that...
Wanderer_308  [author] 21 Jun @ 7:55pm 
" I've edited the Subgrid Wheels Name"
You need to make a group with these subgrid wheel and name the group, not the wheels itself. Maybe that is the issue.
SAS1819 21 Jun @ 2:15pm 
Hi, I've got a huge problem with that script. I've used it many times and it always worked. For a new vehicle, which does have it's wheels on subgrids, this script does not work. It does not control the friction correctly. The vehicle starts to drift very easily and it doesn't break softly. (Yeah, I've edited the Subgrid Wheels Name). What can I do about it?
Wanderer_308  [author] 2 Jun @ 12:47pm 
It's fine. No matter how much hinges, rotors and pistons separates grids, they still considered as a single construct. Only connector block separate constructs.
Paladin Fox 30 May @ 12:32am 
Having a tough time telling if the script is working on my mobile base rover, so I'm back to ask if anyone knows for sure if the DAS script Subgrid wheels need to be connected via a single connection. I have a 2 part hinge between the 2 segments to allow for better bumpy terrain control, but I wonder if that throws off the Script given the Main Grid is separated from the other wheels by 2 hinges. I would be very appreciative if i could get clarification and if I'm not just being a bit of a Dunce, maybe a fix for the situation.
[I.L]Methidox 29 Apr @ 10:45am 
i must of over looked that. ty
Wanderer_308  [author] 20 Apr @ 5:37pm 
@[I.L]Methidox Script setup