We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
在grid_map.h文件中,定义了地图范围和xyz方向的voxel数量 Eigen::Vector3d map_min_boundary_, map_max_boundary_; // map range in position Eigen::Vector3i map_voxel_num_; // map range in index toAddress可以输入一个三维坐标来确定index inline int GridMap::toAddress(const Eigen::Vector3i& id) { return id(0) * mp_.map_voxel_num_(1) * mp_.map_voxel_num_(2) + id(1) * mp_.map_voxel_num_(2) + id(2); } 之后的boundIndex参数应该是各个方向的voxel数量,然后与map_voxel_num_进行比较。但是在isUnknow函数当中传入的是一个三维坐标,并用boundIndex对传入的坐标进行了修改,这一段的逻辑应该如何理解? inline void GridMap::boundIndex(Eigen::Vector3i& id){ Eigen::Vector3i id1; id1(0) = max(min(id(0), mp_.map_voxel_num_(0) - 1), 0); id1(1) = max(min(id(1), mp_.map_voxel_num_(1) - 1), 0); id1(2) = max(min(id(2), mp_.map_voxel_num_(2) - 1), 0); id = id1; } inline bool GridMap::isUnknown(const Eigen::Vector3i& id) { Eigen::Vector3i id1 = id; boundIndex(id1); return md_.occupancy_buffer_[toAddress(id1)] < mp_.clamp_min_log_ - 1e-3; }
Eigen::Vector3d map_min_boundary_, map_max_boundary_; // map range in position
Eigen::Vector3i map_voxel_num_; // map range in index
inline int GridMap::toAddress(const Eigen::Vector3i& id) {
return id(0) * mp_.map_voxel_num_(1) * mp_.map_voxel_num_(2) + id(1) * mp_.map_voxel_num_(2) + id(2);
}
inline void GridMap::boundIndex(Eigen::Vector3i& id){
Eigen::Vector3i id1;
id1(0) = max(min(id(0), mp_.map_voxel_num_(0) - 1), 0);
id1(1) = max(min(id(1), mp_.map_voxel_num_(1) - 1), 0);
id1(2) = max(min(id(2), mp_.map_voxel_num_(2) - 1), 0);
id = id1;
inline bool GridMap::isUnknown(const Eigen::Vector3i& id) {
Eigen::Vector3i id1 = id;
boundIndex(id1);
return md_.occupancy_buffer_[toAddress(id1)] < mp_.clamp_min_log_ - 1e-3;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
在grid_map.h文件中,定义了地图范围和xyz方向的voxel数量
Eigen::Vector3d map_min_boundary_, map_max_boundary_; // map range in position
Eigen::Vector3i map_voxel_num_; // map range in index
toAddress可以输入一个三维坐标来确定index
inline int GridMap::toAddress(const Eigen::Vector3i& id) {
return id(0) * mp_.map_voxel_num_(1) * mp_.map_voxel_num_(2) + id(1) * mp_.map_voxel_num_(2) + id(2);
}
之后的boundIndex参数应该是各个方向的voxel数量,然后与map_voxel_num_进行比较。但是在isUnknow函数当中传入的是一个三维坐标,并用boundIndex对传入的坐标进行了修改,这一段的逻辑应该如何理解?
inline void GridMap::boundIndex(Eigen::Vector3i& id){
Eigen::Vector3i id1;
id1(0) = max(min(id(0), mp_.map_voxel_num_(0) - 1), 0);
id1(1) = max(min(id(1), mp_.map_voxel_num_(1) - 1), 0);
id1(2) = max(min(id(2), mp_.map_voxel_num_(2) - 1), 0);
id = id1;
}
inline bool GridMap::isUnknown(const Eigen::Vector3i& id) {
Eigen::Vector3i id1 = id;
boundIndex(id1);
return md_.occupancy_buffer_[toAddress(id1)] < mp_.clamp_min_log_ - 1e-3;
}
The text was updated successfully, but these errors were encountered: