IMU results contain spikes


I’ve been trying to simulate some video and IMU data and have been noticing that every now and then the IMU acceleration vector contains values that are larger than 2000m/s^2 in all three axes.

I have been using synchronous_mode=True, set my world’s fixed_delta_seconds to 1/my_desired_world_frequency which is 400Hz -> 0.0025 seconds, spawned actors with carla.command.SpawnActor, I set the IMU’s sensor_tick to double the worlds fixed_delta_seconds (=0.005 seconds) and used the trafficmanager to control walkers and vehicles.
I did not touch the noise parameters of the IMU sensor, because the documentation says that all the noise parameters are 0 (zero) by default.

And it seems to work, most of the time, returning the acceleration of the vehicle and gravity. Just every view ticks (while the parent vehicle is in motion) the acceleration spikes way up high. If the vehicle is standing (e.g. at a traffic light) the acceleration does not spike.

I even pulled the latest code version from carla’s git master branch and rebuilt the binaries.

Can anybody suggest where to debug this behavior? Can anybody confirm this behavior? Is this maybe something known and/or wanted?

All the best

Ok, I solved it. The Problem was caused by the hybrid_physics TrafficManager.set_hybrid_phisics_mode(True) flag. I apparently have a mistake somewhere in the initialization of the ego vehicle. Anyways, when changing the flag to false, the physics engine seems to work for all vehicles. This makes the simulation very slow, but real time is not needed for my application.