Can RVIZ read lidar data directly?
No.
The 'only' thing RViz does is visualise dataflows that publishers are already publishing.
If you want to visualise your lidar data, you'll have to write a node that reads in the CSVs, transforms the data into the appropriate ROS msg (typically a sensor_msgs/LaserScan
or sensor_msgs/PointCloud2
) and then publishes those. In RViz, add the corresponding display (for laser scans or pointclouds), select your topic and you should see the scans visualised.
Another approach could be to convert the CSV files into rosbags (using the Python API fi) and use rosbag play ..
to publish everything. That way you wouldn't have to write a node, but only a (small?) conversion script. You would still use the same messages, but only write them out to the bag file.