PJLab-ADG / PCSim

PCSim: LiDAR Point Cloud Simulation and Sensor Placement! Code of [ICRA 2023] "Analyzing Infrastructure LiDAR Placement with Realistic LiDAR Simulation Library" and [ICCV 2023] "Optimizing the Placement of Roadside LiDARs for Autonomous Driving".

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

about the lidar data

DarrenWong opened this issue · comments

Hey I have a question about the lidar data generation. I am able to get the horizon and the pandar64 data. Anything is ok if I use 10hz with synchronous_mode=True, but if I use 100hz then only part of the custom lidar data is received, as attached. Did I miss any config for this custom lidar? It is fine if I use the default lidar in 10hz as well as in 100hz.

Tried to set "points_per_second" and "rotation_frequency" but no useful for the custom lidar.

The code is based on the synchronous_mode.py of the carla 0.9.14

        # new lidar
        lidar_location = carla.Location(-0.5,0,2.095)
        lidar_rotation = carla.Rotation(0,0,0)
        lidar_transform = carla.Transform(lidar_location,lidar_rotation)
        pandar64_bp = world.get_blueprint_library().find('sensor.lidar.ray_cast')
        pandar64_bp.set_attribute("lidar_type","Surround") # choose lidar_type as mechanical
        pandar64_bp.set_attribute("name","pandar64") # choose lidar name as pandar64
        pandar64_bp.set_attribute('points_per_second',str(9000000))
        pandar64_bp.set_attribute('rotation_frequency',str(100))
        lidar_pandar = world.spawn_actor(pandar64_bp,lidar_transform,attach_to=vehicle)
        lidar_pandar.listen(lambda data: lidar_callback(data, '/home/darren/Documents/test/pandar64_1', 1))
    
        actor_list.append(lidar_pandar)
      # old  lidar
        lidar_location = carla.Location(-0.5,0,2.095)
        lidar_rotation = carla.Rotation(0,0,0)
        lidar_transform = carla.Transform(lidar_location,lidar_rotation)
        lidar_bp = world.get_blueprint_library().find('sensor.lidar.ray_cast')
        lidar_bp.set_attribute('channels',str(32))
        lidar_bp.set_attribute('points_per_second',str(9000000))
        lidar_bp.set_attribute('rotation_frequency',str(100))
        lidar_bp.set_attribute('range',str(50))
        lidar_sen = world.spawn_actor(lidar_bp,lidar_transform,attach_to=vehicle)
        lidar_sen.listen(lambda data: lidar_callback(data, '/home/darren/Documents/test/normal_lidar', 1))
    
        actor_list.append(lidar_sen)

10hz horizon ok,
image

10hz pandar ok,
image

100hz horizon only part
image

pandar
image