Space Engineers

Space Engineers

DAS - Driver Assisting System
This topic has been locked
User5876 25 Feb, 2021 @ 4:23am
Rover won't stop doing wheelies on its rear wheels.
What the title says. The blasted thing just keeps hopping up on its back wheels for a second or two, before dropping back down, and doing it all over again a second later.
< >
Showing 1-15 of 18 comments
Wanderer_308  [developer] 27 Feb, 2021 @ 4:50pm 
Do you have gyros and bottom camera?
User5876 28 Feb, 2021 @ 5:50am 
Yeah, I do. The script is using the gyros to flip the rover onto its rear wheels. I also made sure the remote control block was oriented the right way.
Wanderer_308  [developer] 28 Feb, 2021 @ 9:14am 
Does your rover have flat chassis or it's made with some incline?
User5876 28 Feb, 2021 @ 10:07am 
The wheels and bottom of the chassis are all flat with each other, yes. Is that what that setting in the script config means? I thought it meant the incline the rover was designed to climb, not the angle at which the wheels on the rover were built. That was a little confusing. I will double check my rover, and make sure I have that setting set to zero.
User5876 28 Feb, 2021 @ 10:09am 
BTW, is there a way to adjust the rate at which the script adjusts the maximum steering angle as speed changes up or down? Whenever I enable the automatic steering angle adjustment feature of the script, it makes my rover nearly undrivable at speeds above 12 m/s. It will barely turn.
Wanderer_308  [developer] 28 Feb, 2021 @ 11:20am 
Tweaking this part would be pretty much meaningless. It calculates the maximum angle from centrifugal force, with some adjustments for SE "magic" physics. You can turn it off and have vanilla build-in-game steering truncation. It's just slightly less restrictive than mine.
User5876 1 Mar, 2021 @ 3:07am 
Slightly is relative, then. When I turn on your adaptive steering, at any speed over 15 m/s, the maximum steering angle on the front wheels gets set to 1deg. 1! I am not joking. Yet, when I turn it off, my rover drives just fine, with out flipping. Does the script take into account the width of the track as well as the height of the CoM of the rover, to calculate the amount of torque induced by turning the rover can safely endure, or does it simply assume that any value over Constant_In_Script * Value_Derived_From_Height_&_Mass_of_CoM_of_Rover is "too much"? My rover has a five small block separation between the wheel suspension mount points, unlike the typical 1 or sometimes 3 block separation, and it can handle quite a lot of torque, which means that when it is empty (ie: has no cargo,) like it has been while I have been testing it, it can actually corner quite aggressively, and at high speeds, for a rover of its size.
User5876 1 Mar, 2021 @ 3:11am 
I fixed the "wheelie" thing, BTW. It was the "incline angle" setting in the script. I set it back to zero, and no more wheelies! Thanks again!
Wanderer_308  [developer] 1 Mar, 2021 @ 11:32am 
Oh, you hurt my science feelings. The basic formula is
safeTurnRadius = lateral_velocity ^ pow / (g * cos(atan(comHeight / min(leftHalfWidth, rightHalfWidth)) - currentRollAngle))

where pow = 2 when driving over large grid blocks, and = 1.5 in any other cases (because said SE magic). With that value calculated new Ackermann angles for each wheel to re-focus them at a new turn radius, for left turns and right turns individually. If your rover behaves normally without all of it then just turn this off. The Clang seems to be pleased with your rover.
User5876 1 Mar, 2021 @ 2:16pm 
Maybe if the script dynamically adjusted a constant added to/subtracted from the "atan(comHeight / min(leftHalfWidth, rightHalfWidth)) - currentRollAngle" terms depending on how far the rover rolls left or right, while it is turning at speed, versus how far the script expected it to lean from the formulas built-in, the DAS script could "learn" the intricacies of each rover at say, four or five different lateral speeds distributed between zero and the user-specified safe max speed, then do linear interpolation between those speeds to compensate at intermediate speeds. This way, if a rover isn't rolling in a turn as much, the minimum safe turning radius can be decreased, or viceversa if the rover is rolling more than usual. The modifying factor/parameter could also be a multiplicitive/additive&subtractive factor on the "pow" constant before used as an exponent, to make something like "lateral_velocity ^ (pow + adjustingConstant)" or "lateral_velocity ^ (pow * adjustingConstant)", again with four different values representing the maximum safe adjusting factors at four speeds evenly spaced between zero and the desired safe speed limit. (Two different sets of values should probably be kept for left and right turns, just in case the players build asymmetric rovers that turn differently depending on which direction you are turning.

Thanks for the insight into how your script works, Wanderer_308!
User5876 1 Mar, 2021 @ 2:20pm 
Maybe the script could adjust the turning radius down for each lateral speed until a point at which the CoM moves horizontally towards the outside of the turn by a set percentage of the track width, or in other words, the rover rolls a set amount out of the turn. That way, the better the rover is at counteracting roll, the better the rover will be allowed to turn.
Wanderer_308  [developer] 1 Mar, 2021 @ 3:12pm 
atan(comHeight / min(leftHalfWidth, rightHalfWidth)) - currentRollAngle
Those are not constants, it's actual physical properties of a vehicle.
comHeight - height of CoM in meters;
leftHalfWidth - lenght from CoM to most left tip of the wheel in meters;
rightHalfWidth - lenght from CoM to most right tip of the wheel in meters;
currentRollAngle - vehicle current roll angle relative to gravity vector.
The only constant here is pow, and in real life physics it equals 2, it's just happens tере Keen added "things" to Havoc so 1.5 is kinda fine.

As for learning mechanics, it's a really bad idea. Simply because while the script will learn what are safe parameters it will crash people's rovers multiple times. And ере while the motto of my script is safety and reliability. I can see how they came to my page all blazing with anger and asking wtf is wrong with my script. It's just killing the whole concept of the script. Imagine in real-world cars drive without a driver (which is an actual thing nowadays), but to not drive over people on zebra cars need to learn what people look like. "It ok folks, our car would be the safest and reliable in the world, they just need a bit of a time and a couple of dead bodies to learn". Yeah...

I know my turn angle limitation may not be mandatory for every single rover, but that is why you put an option to turn it off.

BTW script already uses values separately for left and right turns for a case of asymmetrical rovers.
Last edited by Wanderer_308; 1 Mar, 2021 @ 3:13pm
User5876 1 Mar, 2021 @ 3:58pm 
Lol. I only mean that the rover experiments with SLIGHTLY more aggressive turn angles, until the roll of the vehicle relative to the gravity vector reaches a maximum safe value, IF the set formula you gave above does not already reach that value. If the formula you gave causes the rover to exceed that value, then the rover should dial up the turning radius, until the roll rate of the rover reaches an acceptable level. I of course do not mean "turn more aggressively until you do a barrel roll, then dial it back a few notches." And you hurt MY science and computer science feelings! Of course I knew those parameters were not constants, but were determined from the real properties of the vehicle; it was obvious from both the text and the context of your post. I understand that the script would not work if they were static values. I knew pow was the only real constant in the formula you gave; you said so in your earlier post! I am not unintelligent, after all. I am sorry if I ever implied that you were.
Last edited by User5876; 1 Mar, 2021 @ 4:03pm
Wanderer_308  [developer] 1 Mar, 2021 @ 8:46pm 
The problem is that when the rover starts to roll there isn't much time to counter it. The script will drop the friction in order to turn roll into a slide, but depending on a terrain it might be to late. And I can't measure the centrifugal force, just calculate and hope SE physics is somewhat the same as real life (which appears to be not when it comes to wheels). So it pretty risky game, and for practicality I choosed to play safe.
User5876 2 Mar, 2021 @ 6:27am 
I think you and I are using different definitions of "roll." Whenever I say roll, I mean "any amount of rotation around the axis of forward motion traversed when the wheels are all in a forward direction, with no steering input." IE: the rover tilting slightly towards the outside of a turn under normal and safe circumstances, I classify as "roll". Never have I ever implied the script do anything to counter a "roll" where the rover loses ground contact on the wheels on the inside of the turn, ie: a "flip." I always have meant for the script to measure roll, ie: "lateral rotation," if you will, with all 4,6,8,etc... wheels still on the ground, before the rover flips, to accurately predict the minimum safe turn radius. And I understand; not everyone needs the adaptive steering calculations. I just have found it useful, and a good safety feature for my rovers in the past, and would like to improve it to be applicable and useful for more rovers in the future. I don't want to have to turn on adaptive steering when my rover is loaded up with cargo, recompile the script, then turn it off after I unload my cargo, recompile the script, etc...It would get annoying. I want it to work and be helpful all the time.
Last edited by User5876; 2 Mar, 2021 @ 6:30am
< >
Showing 1-15 of 18 comments
Per page: 1530 50