Space Engineers
Оцінок: 764
DAS - Driver Assisting System
9
4
13
7
3
2
2
2
   
Нагородити
До улюбленого
В улюблених
Прибрати
Розмір файлу
Додано
Оновлено
99.970 KB
24 лип. 2017 о 18:50
4 серп. 2019 о 14:22
Змін 27 ( перегляд )

Підпишіться, аби завантажити
DAS - Driver Assisting System

Опис
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.
Популярні обговорення Переглянути всі (27)
11
13 верес. о 19:42
Suspension strentgth offset
Into
97
1
16 лип. о 5:57
ЗАКРІПЛЕНО: Script setup
Wanderer_308
84
13 верес. о 8:16
Feature/Improvement Suggestions
Rubezagel
Коментарів: 1 178
Xenosch 30 верес. о 2:28 
alright, seems like I managed to edit it the way I wanted by replacing:

return block.CustomData.Equals("DAS_IGNORE",StringComparison.OrdinalIgnoreCase);

with

return block.CustomName.Contains("DAS_IGNORE");
Xenosch 30 верес. о 1:25 
absolute love the script but got a problem when using it together with other scripts, in my case SCAM.
Got a large grid rover that I want to use as a mining carrier for drones.
SCAM uses the custom data to handle docking of drones.

so my problem is that I cannot disable Standby mode by using "DAS_IGNORE" on the connectors, or else drones will have dtrouble docking or they will just delete the custom data.

so would it be possible to handle the IGNORE-feature by writing it into the name of the connector like other scripts do, or simply disable it completely?
AvaAvari 26 верес. о 16:01 
Well thanks for the help anyway! thats good info to know in the future but now I'm dealing with it happening on vehicles that don't even have connectors or sub-grids so I guess my game might just be fucked our something
Wanderer_308  [автор] 21 верес. о 2:42 
Only if your custom turret connected with connector block. Subgrids on rotors, hinges and pistons are totally fine. Also to make the script ignore certain connector blocks just put in said connector block 'Custom Data' property DAS_IGNORE, and it will skip such blosk. Also [2], you can put DAS_IGNORE in any other block Custom Data to make the script ignore it.
AvaAvari 21 верес. о 0:05 
Wait... that wouldnt happen to possible include a small custom turret? probaly is we have a custom turret on top, im not surprised as larger rovers i used always had issues with docking so makes sense sub-grids might get a little iffy, if this is that case i would ask if theres any possible fix but if there isnt i completely understand
Wanderer_308  [автор] 16 верес. о 18:40 
Do you by chance have anything connected via connector block to your over when it happens? Like drone, or cargo container, or cart/trailer? The script goes into standby mode when it sees the rover is docked to something.
AvaAvari 16 верес. о 16:47 
Genuine question, im having problems with DAS in my game randomly just stopping, not completely the script is still running but it stops dealing with friction power anything and only fixes when I either remove the PB block and replace it load the script again and then it works, or if I completely delete the vehicle and respawn it, I've tried the start-stop command and one weird way that fixes it is docking and undocking the vehicle it's a small large rover with 4 wheels when this happens its basically uncontrollable as one side gets more friction then the other, the entire craft starts strafing I cant steer cause the frictions so high that it just forces it to stop as soon as singular wheel turns and my acceleration feels anemic, its probably my fault in some way but just wishing to know if there's a fix
Into 8 верес. о 7:57 
Like to use Wheels Auto Strength, but it picks a too high default value (40%). Tried to set it to -14, -100, -1, but this doesn't seem to make a difference, setting it to 14 works, but turns off automation. Is there a solution?
Sunflower 31 серп. о 11:32 
Volkswagen DAS auto
SAS1819 23 черв. о 13:12 
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