-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Electric cars (Tesla Model 3): vehicle dynamics seem inaccurate #3256
Comments
Hi, @hh0rva1h Thanks for that accurate test. I will test these new values. |
We have applied and tested the changes, let us know if it looks better now! |
@jackbart94 Thanks very much, where has this been applied? Could you link the commit? |
You need to update the CARLA content, it's all explained in the documentation! |
@jackbart94 Thanks, but still I'd like to understand what has been done, https://bitbucket.org/carla-simulator/carla-content/ has version control too, so it would be nice if you could link a commit. Also imho it's not clear in https://carla.readthedocs.io/en/latest/build_update/#get-development-assets whether there is need to recompile Carla afterwards? My intuition tells me no, but ultimately I'm note sure. |
It's been merged with some other stuff, @XGodina could you link the commit?
You need to update the content with UE closed, then just do |
@hh0rva1h for simplicity just take the nightly build? http://carla-releases.s3.amazonaws.com/Linux/Dev/CARLA_Latest.tar.gz |
Hi, @hh0rva1h |
@XGodina @jackbart94 I just downloaded 0.9.10 and ran my script, I could not observe different behavior unfortunately: |
@jackbart94 Thanks for the reply, however I did not compile from source, I do not have the hardware resources for that currently. All I did is fetch the binary release 0.9.10 and run the script. There is no |
@XGodina @jackbart94 @germanros1987 I just tried the nightly build, this issue is not fixed in the nightly build. As noted before I do not currently have the resources to build from source. Could you look into it again? |
@hh0rva1h I've checked the values and they're there. Have you downloaded the last content? |
This issue is of high interest to me as well. I will share my results when I can, but one of the things that I am going to investigate is changing the torque curve to be a flat line. This might also improve the performance of electirc vehicles in sim using PhysX in general. See: https://forums.unrealengine.com/development-discussion/c-gameplay-programming/64888-vehicle-with-no-drive. |
@XGodina I just downloaded and extracted https://carla-releases.s3.eu-west-3.amazonaws.com/Linux/CARLA_0.9.10.1.tar.gz as well as the nightly build, both do not contain the fix ... How would I fetch the latest Content with the prebuilt binaries? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@jackbart94 @XGodina @germanros1987 With Carla 0.9.12 things are imho worse: Those extreme accelerations and decelerations are pretty unrealistic. Could you consider reopening this issue? |
Are you using synchronous mode? |
@jackbart94 Yes I am, I am using the script from the original report. |
Then probably @DSantosO can tell you more about this once he comes back from holidays. |
@jackbart94 Thanks, could you reopen and assign him in the meantime? |
Hello @hh0rva1h, |
@DSantosO Imho there are two problems here and imho the first problem is the more important one: Problem 1This affects every vehicle in Carla: After spawning a vehicle it takes a while until the car reacts to throttle, see #1640 This results in the insane spike in the beginning of my plot and has got even worse with Carla 0.9.12 (in 0.9.11 the spike only went up to 15):
However with 0.9.12 this looks liks Problem 2In Carla 0.9.12 deceleration of the Tesla vehicle with throttle 0 is around 0.6g at 20m/s, this is to much even for regnerative braking when no throttle is given (this should be around 0.2 - 0.3 g, see https://electrek.co/2018/10/25/tesla-model-3-regenerative-braking-software-update/). |
@DSantosO Whats the progress of this? With Carla 0.9.13 the plot looks like the following (just changed 0.82 to 0.7): The deceleration of almost 1g at throttle = brake = 0 is still way to extreme imho. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@jackbart94 @glopezdiest @germanros1987 Could you be so kind to share whether someone is working on this? |
@hh0rva1h |
@sbv198 Sure, notice the line |
Thanks for the quick response! |
I tried to plot velocity curve with respect to time but it was un succesfull but could you please help me or if you have plotted it before can you share that piece of the code that would be of great help thanks in advance |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hello! I will appreciate some feedback, Thanks in advance! |
Actual behavior
In the following code we spawn a Tesla Model 3, accelerate it until approx 20 m/s, then we try to hold that speed and afterwards we set throttle to zero.
The plot looks as follows:
Expected behavior
Looking at the plot there are two issues for us:
Rootcause and workaround
We found out that the spike in the beginning is due to the gear switch that Carla is doing: It goes from gear 0 to gear 1 with a preconfigured gear shift time. This just feels wrong to us. An electric car is not doing any gear switch and thus the simulation of a gear shift here is clearly unrealistic.
Therefore we came up with the following workaround to make the vehicle dynamics saner:
This changes the vehicle dynamics of course, so the throttle value to hold the speed as before is now around 0.475 as compared to 0.82 before. However the vehicle dynamics looks a lot saner to us now (the deceleration is a little over 0.2g which seems ok):
The acceleration behavior in the beginning is still not perfect as you can see, but it's a lot saner. It would be nice if there were no clutch effect at all for eletric cars.
For easier reproducibility the full code of the plot above:
The text was updated successfully, but these errors were encountered: