carla-simulator / ros-bridge

ROS bridge for CARLA Simulator
MIT License
510 stars 408 forks source link

Rviz flickering when lidar rotation frequency is 10 #664

Open oguzhanozfe opened 1 year ago

oguzhanozfe commented 1 year ago

When i spawned vehicle from roslaunch with Hz 10 it flickers however, when i make Hz 20 problem was gone. I tried different target fps for builds but it didn't worked.

https://youtu.be/4lBgJriuyn0

https://youtu.be/AEz-z_cdSB8

Any help ?

oliver-schumann commented 3 months ago

This is intended behaviour. The default server tick time is 0.05s. which means 20 Hz. Hence, every time the server ticks and data is published, your Laserscanner only travelled half a distance. Rviz is showing you only the best it could. There are two solutions:

  1. Set the lidar frequency to 20 Hz.

  2. For visualizing purposes, you can set the decay time in rviz to at least 0.05s. then the points of two half scans will be visible in rviz.