Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synthetic rays did not hit any primitives. #38

Open
UQ-Raja-Ram-Aryal opened this issue Apr 4, 2024 · 1 comment
Open

Synthetic rays did not hit any primitives. #38

UQ-Raja-Ram-Aryal opened this issue Apr 4, 2024 · 1 comment

Comments

@UQ-Raja-Ram-Aryal
Copy link

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.

@bnbailey-psl
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants