Open crabiner opened 2 years ago
I have worked around the two issues encountered at the post above.
as seen in the picture above now all RGB cameras sensor listen arrive at the same tick however RGB frames will still be dropped due to a second issue since the timestamp is a float number the number 9 places after the decimal point is wrong and as a result a frame can arrive a tick late for example next expected is 1.88499331772327 but the expected tick timestamp is 1.88499331660569 so the frame will be assigned to the next tick
self.next_data_expected_time < timestamp + 1e-8
this results in all frames being processed although sometime they may arrive in a different frame than expected,
After the two fixes I am able to get all the RGB frames in a sync manner
I think that Carla should change the timestamp to int sec+nanosec instead of double since it leads to innacurate timingsI only got one warning per sensor (that has no real effect) and after that no more warnings :)
Getting warning of skipping frames
I am running carla ros bridge with the following parameters: fixed_delta_seconds = 0.005 (200hz) synchronous_mode = True synchronous_mode_wait_for_vehicle_control_command = False Imu sensor "sensor_tick": 0.01 (100hz) RgbCamera x4 "sensor_tick": 0.05 (20hz)
thus I expect that for simulation running at 200fps I should get IMU reading every 2 frames and RGB reading every 10 frames
when runing carla-ros-bridge I see the following
[carla_ros_bridge]: RgbCamera(381): skipping old frame 32, expected 33
btw: I found that if I run the simulation in a higher rate this issue disappears (for example fixed_delta_seconds = 0.001 (1000hz)
In the image below you also see a print I added to _callback_sensor_data printing the carla_sensor_data.frame