MATLAB: Valid name-value pair arguments for LiDAR datatip

azimuth angledatatiplidarpointcloud

Hello,
As shown in this article, I would like to display Intensity, Azimuth Angle, etc., properties for each data point.
I tried the following code:
cmatrix = [1 1 0]
ptCloud = pointCloud([1.2 1.8 -1.5], 'Color', cmatrix, 'Azimuth Angle', 0.15)
this gives error message saying 'Azimuth Angle' must be a string scalar…
Can someone suggest me how to specify the name-value pair for datatips

Best Answer

There are no pointCloud properties that resemble 'Azimuth Angle'.
It is not possible to add arbitrary properties to objects using name/value pairs in order to have those displayed by datatips.
It is possible to add "dynamic properties" to some kinds of objects. However, pointcloud objects do not permit dynamic properties.
Many graphic objects have a "UserData" property that can be set to arbitrary values. However, pointcloud objects do not have that property. They do not have any fields (including hidden ones) that can be set to arbitrary values.
Therefore you cannot add information directly onto pointcloud objects. You will need to instead add the information to the datatip, For example, https://www.mathworks.com/help/matlab/ref/matlab.graphics.datatip.datatiptextrow.html
cmatrix = [1 1 0];
ptCloud = pointCloud([1.2 1.8 -1.5], 'Color', cmatrix);
pcsax = pcshow(ptCloud);
pcviewer = pcsax.Children;
r = dataTipTextRow('Azimuth Angle', 0.15);
pcviewer.DataTipTemplate.DataTipRows(end+1) = r;