I am having an issue getting any data from the Range-Doppler Heat Map when using the obstacle detection demo. I have changed the guiMonitor line in the configuration file appropriately to get a range doppler heat map. I am using the getRangeDopplerHeatMap function that is provided in the MATLAB code.
Here is the section of code that I call the function and try to plot the heatmap:
[rangeDoppler, byteVecIdx] = getRangeDopplerHeatMap(bytevec_cp, ... byteVecIdx, ... Params.dataPath.numRangeBins, ... Params.dataPath.numDopplerBins); range = (0:Params.dataPath.numRangeBins-1) * Params.dataPath.rangeResolutionMeters; doppler = (-Params.dataPath.numDopplerBins/2:Params.dataPath.numDopplerBins/2)*Params.dataPath.dopplerResolutionMps; figure(1) cLim = [0, Inf]; imagesc(range, doppler, rangeDoppler, cLim); set(gca,'YDir','normal') ylabel('Doppler [m/s]'); xlabel('Range [m]'); colorbar;
Here is the provided getRangeDopplerHeatMap function:
function [rangeDoppler, idx] = getRangeDopplerHeatMap(bytevec, idx, numDopplerBins, numRangeBins) len = numDopplerBins * numRangeBins * 2; rangeDoppler = bytevec(idx+(1:len)); idx = idx + len; rangeDoppler = rangeDoppler(1:2:end) + rangeDoppler(2:2:end)*256; rangeDoppler = reshape(rangeDoppler, numDopplerBins, numRangeBins); rangeDoppler = fftshift(rangeDoppler,1); return
Here is what my output looks like:
Everything else seems to work fine. I've tested the demo and the range-azimuth heat map without any problems, but I can't figure out what is going wrong with the range-doppler heat map.
Thanks,
-AJ