Open hh0rva1h opened 3 years ago
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.
@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.
It's been merged with some other stuff, @XGodina could you link the 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.
You need to update the content with UE closed, then just do make launch
and you'll have the latest content!
@hh0rva1h for simplicity just take the nightly build? http://carla-releases.s3.amazonaws.com/Linux/Dev/CARLA_Latest.tar.gz @XGodina could you confirm that these changes are present in the nightly build?
Hi, @hh0rva1h That improvement is already in the new Release 9.10.
@XGodina @jackbart94 I just downloaded 0.9.10 and ran my script, I could not observe different behavior unfortunately:
Please, make sure your content is actualized. There is clearly something wrong with that, since my graph is:
From the CARLA main folder, do ./Update.sh
@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 Update.sh
in the Carla main folder from the binary release though ...
@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, Thank you very much for your input. We will check this carefully.
@DSantosO Imho there are two problems here and imho the first problem is the more important one:
This affects every vehicle in Carla: After spawning a vehicle it takes a while until the car reacts to throttle, see https://github.com/carla-simulator/carla/issues/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):
There is a workaround for this behaviour, after spawning, manually shift gear to 1 and disable manual_gear_shift again:
vehicle.apply_control(carla.VehicleControl(manual_gear_shift=True, gear=1))
world.tick()
vehicle.apply_control(carla.VehicleControl(manual_gear_shift=False))
However with 0.9.12 this looks liks
Now there is a pretty bad negative spike down, which was not the case with Carla 0.9.11. And no, this is not a numeric error of the acceleration calculation, since the effect on the velocity plot can be seen clearly. That spike down should not happen. Would be great if you could root cause and address this.
In 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/).
The workaround "physics_control.damping_rate_zero_throttle_clutch_engaged=physics_control.damping_rate_zero_throttle_clutch_disengaged" given in the initial report has drawbacks however: for 20m/s the throttle values drops from 0.72 to 0.31, so this is not a good solution either.
@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 hello, is there any way to get these plot with respect to time? for my project this is really important thanks in advance
@sbv198 Sure, notice the line settings.fixed_delta_seconds = 0.045
, this says that one tick is 0.045 seconds of simulated time. So one unit in the plot is 0.045 seconds.
@hh0rva1h
Thanks for the quick response!
@hh0rva1h
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 come from this issue #3906 and I have the exactly same problem with the Toyota Prius. I am trying to stop the vehicle with an ackermann controller and I am unable to stop it in the right place without suffering from the huge brake thing. My workaround is to force the controller to not brake for speeds lower that 1.0m/s but depending on the simulation state this is not solving the problem always.
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:![Screenshot from 2020-09-03 00-58-32](https://user-images.githubusercontent.com/61889859/92045363-9f27bd80-ed80-11ea-8604-efe6c107d8cf.png)
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: