I have a 3d points world. I have point in it a [x,y,z]
and direction (azimuthal angle θ
, and polar angle ) I want to get point b [x2,y2,z2]
where my ray (sent from my point a
into direction) would stop. (only from one point and only for one direction). How to do such thing in pcl, is it possible (I see a ray caster class but it seems to work on whole world not point to point)?
Asked
Active
Viewed 1,325 times
0

ergosys
- 47,835
- 5
- 49
- 70

myWallJSON
- 9,110
- 22
- 78
- 149
1 Answers
1
I think that the OctreePointCloudSearch
class might help you a little bit more. Have a quick look at the OctreePointCloudSearch::getIntersectedVoxelIndices
method: once your point cloud is organized in an octree, it allows you to specify the origin and a direction for the ray to be used for raycasting. In your case, the origin would be the point a and the direction would be obtained from the azimuthal and polar angles (see this)
The function returns the indices to the point within the intersected voxels.
If you google for that class name you can easily find a good number of working examples (this example casts a ray from each point of the cloud toward the camera and checks for occlusions).

Dexter
- 2,482
- 27
- 40