-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Controlling vehicle actuation with road wheel angle and acceleration. #224
Comments
Thanks Jesse, We can consider it. Regarding the first point, you could get the two front road wheel angles (RWA) with something like this in Lua:
you also know the steering wheel angle (STWA) in the range [-1, 1], since it is whatever you set it to. On the second point regarding acceleration, though, I am not sure it is completely clear how to do this well. It sounds like some kind of PID or similar. We can either supply a gas pedal value in [0, 1] or supply the propulsion torques directly, but it sounds like we would need some kind of feedback thing where we monitor the acceleration value and adjust accordingly, which will be pretty laggy. We would need to investigate how the drive-by-wire systems do it, then. The relationship between acceleration and pedal/torques would be complicated, so you cant just do a look-up or have some formula, I guess. Best regards, |
Hi Dave, The lua code is really useful thank you, it would be really nice if this was integrated natively so we can get the road wheel angles through As for the second point, yeah ultimately real drive by wire systems will be using PID (or potentially LQR or MPC) controllers. The main thing is dealing with wheel slip under heavy acceleration or low friction surfaces, so no a lookup table doesn't cut it really. But you mentioned you can control via propulsion torque, again this would be really useful to expose via the Python interface as torque is far less tied to the vehicle than gas pedal position and it's one step further to controlling acceleration directly (if you assume no tyre slip). Thanks, |
Controlling the vehicle through torques (drive and brake) alone is something we already do through Simulink, eg see https://github.com/BeamNG/BeamNG-Simulink_generic_interface, Best, |
That would be super super useful thank you. Road wheel angle control is my biggest concern just because it's so important when making stable and accurate motion control algorithms. I've just spotted this method for the vehicle class, velocity over dt is literally acceleration, so assuming it already handles wheel slip, an acceleration interface basically already exists, it's a bit of a weird method. Would be nice if it was simply made available via |
I have had trouble with that function before, but maybe you will have better luck. I would be sure to test it out carefully first. |
The fact that it's not yet possible to control the steering angle directly is a big issue. Together with #273, the steering wheel angle is cumbersome to retrieve and due to #195 it's not even clear what is currently being reported (is it just visual, like this comment seems to report?). |
Hi, the steering wheel angle is just visual, as reported in the comment. Support for RWA to control the vehicle is on our backlog, but with no ETA. |
I assume steering_input is just visual, too? |
Hi, https://documentation.beamng.com/modding/vehicle/vehicle_system/electrics/ |
Hello,
Currently the only way to control the actuation of a vehicle is using a steering wheel, throttle and brake interface. This type of interface is very much tied to the exact make and model of car you're using:
A more common interface (found on drive-by-wire systems on a real car) is to control using:
Any chance we could get this interface type of interface? I think it's a really important issue personally.
The text was updated successfully, but these errors were encountered: