nutonomy / nuscenes-devkit

The devkit of the nuScenes dataset.
https://www.nuScenes.org
Other
2.24k stars 617 forks source link

How can the measured radar doppler velocity be extracted? #924

Closed rs271 closed 1 year ago

rs271 commented 1 year ago

My question is related to #748 and https://forum.nuscenes.org/t/radar-vx-vy-and-vx-comp-vy-comp/283, but I didn't find a satisfying answer in either of them.

The radar data provides the velocities (vx, vy) and (vx_comp, vy_comp) for each detection. My main question is: How can the doppler velocity as measured by the radar sensor (i.e. the relative radial velocity in the radar frame of reference) be derived from those?

And some related follow up questions:

whyekit-motional commented 1 year ago

@rs271 let me see if I can clarify your various queries:

My main question is: How can the doppler velocity as measured by the radar sensor (i.e. the relative radial velocity in the radar frame of reference) be derived from those?

If you know the angle between the radar and the object you are measuring, you could resolve vx_comp and vy_comp to get the radial velocity

Does the radar also measure/estimate the tangential velocity components?

I believe you can can estimate the tangential velocity components in a similar manner as what I described above for estimating the radial velocity

So how exactly does the compensation work?

Unfortunately, we do not have access to the algorithm that the radar uses internally for compensation - vx_comp and vy_comp are simply taken from the output of the radar

rs271 commented 1 year ago

@whyekit-motional Thanks for your reply!

My main question is: How can the doppler velocity as measured by the radar sensor (i.e. the relative radial velocity in the radar frame of reference) be derived from those?

If you know the angle between the radar and the object you are measuring, you could resolve vx_comp and vy_comp to get the radial velocity

The radial component of (vx_comp, vy_comp) can't be the measured doppler velocity, because those are the compensated velocities; e.g., the doppler from stationary objects, when the ego vehicle is moving, are non-zero, whereas (vx_comp, vy_comp) is zero then.

It would be obvious to asume that instead, the doppler is the radial component of (vx, vy). But there are several problems with this assumption:

  1. (vx, vy) don't always point into the sensor direction, as would have to be the case if they only contained the measured doppler velocity, converted into a purely radial vector. (In principle, it could be that the radar signal processing actually also estimates the tangential velocities, but that's clearly not the case, as can be seen from the plot below.)
  2. Instead, for moving objects, (vx, vy) only has one nonzero cartesian component (namely the forward-direction in sensor coordinates), as can be seen from this example (a similar plot as in the tutorial, but using (vx, vy) instead of (vx_comp, vy_comp), for sample[200]; the ego vehicle is stopped at a crossing here): sample_200_uncomp sample_200_cam

One could then assume that vx (in sensor coordinates) is the doppler. For moving objects, this seems to work in general, as in this example (vx, vy for sample[20]): sample_20_vel_uncomp sample_20_cam

Note that for the moving car in front, again (vx, vy) only have one nonzero cartesian component (in sensor direction). But for the detections from stationary objects, that's obviously not the case. Apparently, they have some additional velocity components induced by the ego motion, which doesn't make sense to me, as that should only be the case for (vx_comp, vy_comp), and implies that neither the radial component nor the vx component (in sensor coordinates) can be the doppler.

So it is still unclear how to obtain the measured doppler from the data.

Unfortunately, we do not have access to the algorithm that the radar uses internally for compensation - vx_comp and vy_comp are simply taken from the output of the radar

But could you perhaps provide some more detailed documentation on the meaning of (vx, vy), (vx_comp, vy_comp) that the radar algorithm outputs? Even if you don't have access to the algorith, I expect there should be a more detailed interface documentation?

[Note: I wanted to re-open this issue, because it's not resolved yet, but wasn't able because @whyekit-motional had closed it.]

SimmyZhu commented 1 year ago

But could you perhaps provide some more detailed documentation on the meaning of (vx, vy), (vx_comp, vy_comp) that the radar algorithm outputs? Even if you don't have access to the algorith, I expect there should be a more detailed interface documentation?

Hi, I have the same problem as you. Does the following link help? https://forum.nuscenes.org/t/radar-vx-vy-and-vx-comp-vy-comp/283/5

rs271 commented 1 year ago

Hi, I have the same problem as you. Does the following link help? https://forum.nuscenes.org/t/radar-vx-vy-and-vx-comp-vy-comp/283/5

@SimmyZhu I already mentioned this link in my original post - it was not helpful.

nightrome commented 1 year ago

Hi. I'd like to chime in as one of the original authors of nuScenes. I have seen many radar experts discussing the nuScenes radar, but with no clear conclusions. I think we have the right understanding in general of how motion compensation works and how to convert between the x/y and radial representations. However, what we see in the data does not exactly match the theory. One possible explanation is that the radar received the raw ego motion data (e.g. from the IMU), whereas the nuScenes dataset comes with the highly processed / smoothed localization data that is a product of lidar localization and IMU. Thus the motion compensation is not exact. Alternatively the radar itself may also be doing something unexpected. Unfortunately the manufacturer's handbook does not provide any information on this topic. So unless somebody comes up with new convincing evidence on what may have happened, let us consider this topic closed.