leddartech / pioneer.das.api

BSD 3-Clause "New" or "Revised" License
10 stars 3 forks source link

radar data seems to not have velocities in it #8

Closed SM1991CODES closed 3 years ago

SM1991CODES commented 3 years ago

Hi,

I am trying to get a point cloud out of the radar data. However, I face the following problems: 1) The point cloud for radar is (Nx3), where z = 0 always. So, is it not 3D? 2) How do I get velocities for each point?

Also, please help with the documentation. the project seems very hard to follow along. Is there any better documentation of example how to use it to get frame by frame data and annotations for each sensor?

Best Regards Sambit

jeanlucdeziel-leddartech commented 3 years ago

Hi,

The radar is 2D (bird's eye view with z=0).

Here is an example how to get the data from all radar frames in a dataset, including velocities:

from pioneer.das.api.platform import Platform

dataset = '/media/jean-luc/storage/pixset/test/20200616_151155_part9_750_900'

pf = Platform(dataset)
radar_datasource = pf['radarTI_bfc_xyzvcfar']

for frame in range(len(radar_datasource)):

    radar_sample = radar_datasource[frame]
    raw_data = radar_sample.raw[0]
    velocities = raw_data['velocity']

    print(f"Frame {frame}: {raw_data.shape[0]} detections")
SM1991CODES commented 3 years ago

Hi,

Thank you so much for the help. I was able to get the points and velocities. However, the radar frames seem to be extremely sparse, just about 55-85 points per frame. Is this correct?

Also, I would like to do ego-motion compensation for N frames in radar and also get the boxes projected to radar. How may I do that.

Best Regards Sambit

SM1991CODES commented 3 years ago

I tried doing pf.extrinsics, but I see there is no info for radar

jeanlucdeziel-leddartech commented 3 years ago

Hi,

Yes, the radar data is quite sparse compared to the lidar data.

For extrinsics:

The path to the extrinsics directory is not provided in the configuration file (platform.yml) for the radar. It seems to be an error on our part, I will pass the information. In the meantime, you can add the path yourself. To do so, add: extrinsics: *extrinsics_folder under the line "radarTI_bfc:" in platform.yml. If you use multiple datasets, you need to do that for every platform.yml. I suggess you automate that with a script because there are a hundred of them.

For egomotion compensation

There is a error in the API with regards to the radar timestamps, so calling "radar_sample.point_cloud(undistort=True)" results in an error. I found a fix, however, it would not help because the radar doesn't have individual timestamps for each detection, which is necessary to perform motion compensation.

Hope this helps

SM1991CODES commented 3 years ago

Okay, that clarifies quite a few things. Unfortunately, I was mostly interested in working with radar data. That seems to be no longer possible given the sparsity and other problems. Nevertheless, great dataset, the Ouster point clouds look really amazing.

I wish you all the best.

Best Regards Sambit