Space Engineers
Оценок: 795
DAS - Driver Assisting System
9
4
14
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.
Популярные обсуждения Просмотреть все (28)
118
1
29 мар в 23:31
ЗАКРЕПЛЕНО: Script setup
Wanderer_308
11
13 сен. 2024 г. в 19:42
Suspension strentgth offset
Into
84
13 сен. 2024 г. в 8:16
Feature/Improvement Suggestions
Rubezagel
Комментариев: 1 201
Ferro 12 апр в 7:51 
I got a problem with DAS, it keeps setting wheel friction to 100% which causes my vehicle to keep fighting itself when I try to turn. is there a way to stop DAS from adjusting the friction or at least clamp the max value it can set?
Iron_Fiore 7 апр в 7:12 
Oh, I see that now, thank you. sorry for the stupid question
Wanderer_308  [создатель] 6 апр в 18:52 
That's because it goes to standby mode thinking it's docked to a base/carrier. Put "DAS_IGNORE" (w/o quotes) to the connector's Custom Data property.
Iron_Fiore 6 апр в 18:19 
DAS is not running subgrid wheels as soon as I dock anything to my connector. Anyone have any ideas?
Wanderer_308  [создатель] 3 мар в 12:46 
@Amumu the Remote Control block is required for the script to understand where is up & front sides of a vehicle. It won't work without it. DisplayScheduler failure means you don't have LCD screens dedicated for the script, you can ignore it.
Amumu 3 мар в 6:43 
i loaded the script in my rover, getting message DAS.DisplaySchedular failure Das GridDynamics Watcher and Critical failure during boot. No remote control block found. i dont have a remote control not planing to so can i turn this all off somehow seens im only after the suspension helping part or am i all wrong into this =D first time trying scripts
Red Leicester Cheese 25 янв в 9:00 
After some time (seemingly random) my wheels will just lock up when turning I'm not sure if this is a vanilla issue but I've only ever encountered it when using this script so any input would be appreciated
Volg 7 янв в 7:19 
@fraoud. A work around i have found is to get some armor blocks positions in the right spot so the blocks would make the road you want. then just drive along the blocks and they will keep you level. then grind out the blocks you pass, and replace in the front, so you are continuously moving the armor blocks you drive on. it is a pain but you get a perfectly level road in the end. Just keep in mind the carved road surface will be a bit lower than the top of the blocks... so plan for this in the block positioning.
Fake 7 янв в 2:18 
@Wanderer_308 Okay newbie mistake, I didnt know you had to put LEFT or RIGHT into Custom Data per light. Its not initially present here on the homepage. I had to go to the "Popular Discussions" part and look for the Pinned for the set up. Most guides have a hyperlink on its own guide.
Wanderer_308  [создатель] 7 янв в 0:58 
@Fake group naming is correct? "LEFT" and "RIGHT" keywords are put into Custom data? Ownership is same as PB?