PlantSimulationLab / Helios

The Helios simulation system is a versatile modeling framework that handles tasks such as managing geometry and associated data structures through a C++ API. Plug-ins build off of the Helios core engine, and access the geometry and data via the Helios context. The sytem comes with a visualization plug-in that can produce stunning renderings of model geometry and data with relatively little effort.
http://baileylab.ucdavis.edu/software/helios
GNU General Public License v2.0
61 stars 27 forks source link

Synthetic rays did not hit any primitives. #38

Open UQ-Raja-Ram-Aryal opened 7 months ago

UQ-Raja-Ram-Aryal commented 7 months ago

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:

x y z r255 g255 b255 target_count target_index timestamp 0 0 1.0 10000 12000 30 130 0 360 0.005 0.003

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.

bnbailey-psl commented 7 months ago

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]).