PlantSimulationLab/Helios

Synthetic rays did not hit any primitives.

Opened this issue · 1 comments

I tried to generate synthetic TLS data.

I prepare main.cpp file:
#include "Context.h"
#include "LiDAR.h"

using namespace helios;

int main( void ){

 Context context;

 context.addPatch(); // create some model geometry here

 LiDARcloud pointcloud; //Initialize the LiDAR point cloud

 pointcloud.loadXML("/home/uqrarya1/Helios/plugins/lidar/xml/tls.xml");  //Load the XML file
 
 int rays_per_pulse = 100;
 float pulse_distance_threshold = 0.02; 
 
 pointcloud.syntheticScan( &context, rays_per_pulse, pulse_distance_threshold );  //generate synthetic data

 pointcloud.exportPointCloud( "/home/uqrarya1/Helios/samples/tls/file.xyz");  //write to ASCII file

This is my pointcloud.xml file:

<scan>
  <ASCII_format> x y z r255 g255 b255 target_count target_index timestamp </ASCII_format>
  <origin> 0 0 1.0 </origin>
  <size> 10000 12000 </size>
  <thetaMin> 30 </thetaMin>
  <thetaMax> 130 </thetaMax>
  <phiMin> 0 </phiMin>
  <phiMax> 360 </phiMax> 
  <exitDiameter> 0.005 </exitDiameter>
  <beamDivergence> 0.003 </beamDivergence>
</scan>

I am getting warning:
(base) uqrarya1@SENV-FT8YRQ3:~/Helios/samples/tls/build$ /home/uqrarya1/Helios/samples/tls/build/tls
Reading XML file: /home/uqrarya1/Helios/plugins/lidar/xml/tls.xml...done.
Successfully read 1 scan(s), which contain 0 total hit points.
Performing full-waveform synthetic LiDAR scan...
WARNING: Synthetic rays did not hit any primitives.

I am developing Leaf Area Density using Ray Cloud Tools and want to validate with reference data from Helios .... Is this possible ? Is there any guideline to do that ? I am very new in this field.

I would guess it is because you are only adding a 1x1 m patch that is directly below the scanner, so based on your scan pattern with a theta range from 30 to 130 degrees, no points hit that patch. Try either changing your thetaMax value to something larger like 170 degrees, or better yet add a sphere or voxel or some 3D object at some distance away from the scanner (say, at [2,0,1]).