You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @bigsuperZZZX@USTfgaoaa ,
my understanding of functions such as GridMap::globalIdx2BufIdx and GridMap::globalIdx2InfBufIdx, is that it converts 3D point to 1D representation for a 1D buffer, correct me If I am wrong
I want to understand the working of the function mentioned below
inline int GridMap::globalIdx2BufIdx(const Eigen::Vector3i &id)
{
int x_buffer = (id(0) - md_.ringbuffer_origin3i_(0)) % md_.ringbuffer_size3i_(0);
int y_buffer = (id(1) - md_.ringbuffer_origin3i_(1)) % md_.ringbuffer_size3i_(1);
int z_buffer = (id(2) - md_.ringbuffer_origin3i_(2)) % md_.ringbuffer_size3i_(2);
if (x_buffer < 0)
x_buffer += md_.ringbuffer_size3i_(0);
if (y_buffer < 0)
y_buffer += md_.ringbuffer_size3i_(1);
if (z_buffer < 0)
z_buffer += md_.ringbuffer_size3i_(2);
return md_.ringbuffer_size3i_(0) * md_.ringbuffer_size3i_(1) * z_buffer + md_.ringbuffer_size3i_(0) * y_buffer + x_buffer;
}
I want to understand the working of this function, how you convert a 3D to 1D, and what's the intuition.
The text was updated successfully, but these errors were encountered:
Hi @bigsuperZZZX @USTfgaoaa ,
my understanding of functions such as
GridMap::globalIdx2BufIdx
andGridMap::globalIdx2InfBufIdx
, is that it converts 3D point to 1D representation for a 1D buffer, correct me If I am wrongI want to understand the working of the function mentioned below
I want to understand the working of this function, how you convert a 3D to 1D, and what's the intuition.
The text was updated successfully, but these errors were encountered: