470 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
96
views
Having references in the collision-detection struct (etc.) to Vec items that represents collision objects (etc.)
What if we want to store objects in a Vec, and reference (or index maybe) to a data structure, while maintaining the ability to mutate from the Vec?
Take a look at the brief example below:
// think ...
0
votes
0
answers
59
views
KDTree buildBalancedTree infinite recursion issue
I tried to speed up my KD tree by implementing balancing and bounding boxes, but now it can't even build the tree, and I don't understand why.
Input Example
Here's how I provide the input:
n and dim = ...
1
vote
1
answer
280
views
"pcl::KdTreeFLANN" is extremely slow
I am using ROS2-Iron on Ubuntu 22.04 to filter points in a LiDAR point cloud from a rosbag, based on the following criteria: (1) points with intensity values below a certain threshold, and (2) points ...
0
votes
0
answers
57
views
KD-Tree implementation with all data in leaves
Before I implement it myself, I would like to ask if there is any KD-Tree implementation that allows to have all actual data in leaves (even if it means duplication of some data for KD-Tree structure ...
0
votes
1
answer
47
views
Verify whether new particles overlap with other particles
I am trying to generate non-overlapping particles in n-dimensional space.
Currently, I generate a new position and check whether it overlaps with existing particles. This process takes a lot of time ...
2
votes
1
answer
297
views
Significant difference in KD-Tree density computation times with two similar point clouds in Open3D
I'm working with two different point clouds using Open3D, both containing 50,000,000 points. I'm calculating the point cloud density by building a KD-Tree and then querying the nearest neighbors. ...
0
votes
2
answers
114
views
Calculate the number of points in a given radius by X and Y coordinates
I have a python code where, when given a list of points (X and Y coordinate pairs) in a dataframe and a specified circle radius I would like the code to go through each point, treat it as the the ...
1
vote
1
answer
638
views
Jax jitting of kd-tree code taking an intractably long amount of time
I've written myself into a corner with the following situation:
I'm running an optimiser which requires smooth gradients to work, and I'm using Jax for automatic differentiation. Since this code is ...
1
vote
1
answer
403
views
Execution of conditional branches causing errors in Jax (kd-tree implementation)
I'm writing a kd-tree in Jax, and using custom written Node objects for the tree elements. Each Node is very simple, with a single data field (for holding numeric values) and left and right fields ...
0
votes
1
answer
254
views
Using scipy kdtree for a 2D range search
Some context
Suppose a binary space partitioning on the unit square (like the cells of a k-d tree), represented as a numpy array of shape (n,4), where n denotes the number of (axis aligned, non-...
0
votes
1
answer
174
views
While finding count of points inside some shape using KD-Tree, do we need to check areas intersection, or just compare depth-appropriate properties?
Let's say we have to find count of points inside some shape in 2D plane.
We can use KD-Tree to solve this. The KD-Tree will partition 2D plane into rectangles, and then we can check intersections ...
2
votes
2
answers
241
views
Calculate Distance to the nearest object
I need to make a map of distances to the nearest object.
I have a solution where i am looping over every point of a map, and every object, calculating the distance to all of them, and then leaving ...
1
vote
0
answers
181
views
How to create a vector of nanoflann's KDTrees in C++?
I have several sets of points and I want to quickly compute distances to these sets. In the case of only one set I have been successfully using nanoflann for the task. But when trying to define a ...
0
votes
1
answer
622
views
Efficiently find k-nearest points from a K-d tree to a line using the Point Cloud Library
Using the Point Cloud Library (PCL), I have created a K-d tree from a point cloud. I would like to find the k-nearest points from the K-d tree to a line. Is there a way to do this efficiently using ...
0
votes
1
answer
33
views
Remove empty outputs from scikit-learn KDtree.query_radius() and get unique values
I'm trying to flatten the output of a scikit-learn KDtree. I'd also like to call np.unique() on the flattened array.
The call I'm making is:
kd_tree = KDTree(X)
idxs = kd_tree.query_radius(Y, r=0.2)
...