carla-simulator / carla

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

Feature request: Simulate point cloud skew from the LiDAR when in motion #4032

Closed heethesh closed 1 year ago

heethesh commented 3 years ago

When the LiDAR is under motion, a real-world point cloud would have a skew or a rolling-shutter effect (behavior would vary among static and dynamic objects in the scene) due to the small delay between the scan sweep start and end. Looks like the current LiDAR plugin freezes the scene and then performs ray-casting. Is there a way this skew could be simulated? This is similar to the Compensated flag in LGSVL simulator (see).

corkyw10 commented 3 years ago

Hi @heethesh thank you for the input. @DSantosO could you have a look at this please?

DSantosO commented 3 years ago

Hello @heethesh, Thank you for your comment. This feature can be very interesting to add. Although it is not currently in our roadmap, we will consider it. I am not sure how the LGSVL simulator does it but you are right about how it works in CARLA. One possible implementation of this can be modifying the origin of the raycast for each ray. As we are doing several rays of each channel for the whole circular section that we need to cover in the last dt, we can actually modify the starting point based on the movement of the car during this last timestep.

heethesh commented 3 years ago

@DSantosO Shifting the ray-cast origin based on the vehicle motion model is a great idea! The implementation would also be computationally efficient avoiding simulation at very small time steps and would also allow parallel ray-casting. However, the ray-cast returns and skew observed on dynamic objects in the environment would be incorrect in this case. I wonder if UE4 has a way to step through the motion model of only some objects such as vehicles at really small time-steps to obtain better ray-cast results with the dynamic objects. This also poses an issue for parallelization of ray-casting as it now would have to be sequential.

DSantosO commented 3 years ago

Hello @heethesh, That's true, the dynamic objects will be frozen in the current position. There is also another possibility. Right now, between two steps we perform a configurable number of substeps for physical computations. There is a way of adding logic in these substeps but I don't know if we can do raycasting there.

stale[bot] commented 3 years ago

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.