Isaac Sim Version
4.5.0
@wp.kernel
def bin_bbox_process(bbox_corners: wp.array(ndim=3, dtype=wp.float32),
x_offset: wp.float32,
y_offset: wp.float32,
x_res: wp.float32,
y_res: wp.float32,
# bbox_corners_bin_idx: wp.array(ndim=2, dtype=wp.vec2ui),
aligned_bbox_corners_idx: wp.array(ndim=2, dtype=wp.uint32)
):
i, j = wp.tid()
bbox_corner_spher = cartesian_to_spherical(wp.vec3(bbox_corners[i,j,0],
bbox_corners[i,j,1],
bbox_corners[i,j,1]))
x_bin_idx = wp.uint32((bbox_corner_spher[0] - x_offset) / x_res)
y_bin_idx = wp.uint32((bbox_corner_spher[1] - y_offset) / y_res)
# This line gives an error.
wp.atomic_min(aligned_bbox_corners_idx, wp.uint32(0), wp.uint32(0), x_bin_idx)
Gives an kernel compilation error saying
no instance of overloaded function "wp::atomic_min" matches the argument list
argument types are: (wp::uint32 *, wp::uint32)
detected during instantiation of "T wp::atomic_min(const A<T> &, int, int, T) [with A=wp::array_t, T=wp::uint32]"
The weird thing is If replace atomic_min with atomic_add, this kernel can run without any problem.
But atomic_min and atomic_add has exactly same syntax, please correct if I am wrong.
Thanks