carla-simulator / carla

Open-source simulator for autonomous driving research.
http://carla.org
MIT License
10.89k stars 3.5k forks source link

Unexpected values on agents' acceleration got by agent.get_acceleration() #7423

Open BoluoMonster opened 3 months ago

BoluoMonster commented 3 months ago

I am working on getting the ego-agent's acceleration by agent.get_acceleration(). However, I find the resulting values are unrealistic. Here is the data log: image All values in the image are with the unit $m/s^2$. The throttle is constantly 0.75, but the acceleration changes sharply, which is weird. By the way, the simulation is in synchronous mode.

glopezdiest commented 2 months ago

Could you provide more information about the exact experiment you are running? Are you going in a straight line or turning? which vehicle is it?

The only thing that I can say right now is that constant throttle doesn't mean constant acceleration. Current speed, aerodynamics, gears, motors... all these factors affect the vehicle differently, hence why I need more information about the experiment

BoluoMonster commented 2 months ago

@glopezdiest Thanks for replying! Here is the experimental setting: Vehicle: vehicle.audi.a2 Controller: PID controller from "PythonAPI" Testing scenario: a bend in Town02

微信图片_20240511120315

The vehicle is tracking a lookahead point that is 2.0m ahead. image Following is what will be observed when the vehicle is turning.

3ca487e89f9e43e15183ea250f31d31

We can find that the acceleration changes sharply. And it also happens when the car is moving straight forward.

9edd111eca14024edd3be46e366af56