Space Engineers

Space Engineers

DAS - Driver Assisting System
此主题已被锁定
User5876 2021 年 2 月 25 日 上午 4:23
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.
< >
正在显示第 1 - 15 条,共 18 条留言
Wanderer_308  [开发者] 2021 年 2 月 27 日 下午 4:50 
Do you have gyros and bottom camera?
User5876 2021 年 2 月 28 日 上午 5:50 
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  [开发者] 2021 年 2 月 28 日 上午 9:14 
Does your rover have flat chassis or it's made with some incline?
User5876 2021 年 2 月 28 日 上午 10:07 
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 2021 年 2 月 28 日 上午 10:09 
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  [开发者] 2021 年 2 月 28 日 上午 11:20 
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 2021 年 3 月 1 日 上午 3:07 
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 2021 年 3 月 1 日 上午 3:11 
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  [开发者] 2021 年 3 月 1 日 上午 11:32 
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 2021 年 3 月 1 日 下午 2:16 
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 2021 年 3 月 1 日 下午 2:20 
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  [开发者] 2021 年 3 月 1 日 下午 3:12 
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.
最后由 Wanderer_308 编辑于; 2021 年 3 月 1 日 下午 3:13
User5876 2021 年 3 月 1 日 下午 3:58 
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.
最后由 User5876 编辑于; 2021 年 3 月 1 日 下午 4:03
Wanderer_308  [开发者] 2021 年 3 月 1 日 下午 8:46 
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 2021 年 3 月 2 日 上午 6:27 
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.
最后由 User5876 编辑于; 2021 年 3 月 2 日 上午 6:30
< >
正在显示第 1 - 15 条,共 18 条留言
每页显示数: 1530 50