38 #ifdef HAVE_SYS_TIME_H
52 ROS_INFO(
"Error, this implementation can only support up to 16 z values (%d)",
size_z_);
57 uint32_t unknown_col = ~((uint32_t)0)>>16;
58 uint32_t* col =
data_;
65 void VoxelGrid::resize(
unsigned int size_x,
unsigned int size_y,
unsigned int size_z)
79 ROS_INFO(
"Error, this implementation can only support up to 16 z values (%d)", size_z);
84 uint32_t unknown_col = ~((uint32_t)0)>>16;
85 uint32_t* col =
data_;
98 uint32_t unknown_col = ~((uint32_t)0)>>16;
99 uint32_t* col =
data_;
106 void VoxelGrid::markVoxelLine(
double x0,
double y0,
double z0,
double x1,
double y1,
double z1,
unsigned int max_length){
108 ROS_DEBUG(
"Error, line endpoint out of bounds. (%.2f, %.2f, %.2f) to (%.2f, %.2f, %.2f), size: (%d, %d, %d)", x0, y0, z0, x1, y1, z1,
117 void VoxelGrid::clearVoxelLine(
double x0,
double y0,
double z0,
double x1,
double y1,
double z1,
unsigned int max_length){
119 ROS_DEBUG(
"Error, line endpoint out of bounds. (%.2f, %.2f, %.2f) to (%.2f, %.2f, %.2f), size: (%d, %d, %d)", x0, y0, z0, x1, y1, z1,
124 ClearVoxel cv(
data_);
129 unsigned int unknown_threshold,
unsigned int mark_threshold,
unsigned char free_cost,
unsigned char unknown_cost,
unsigned int max_length){
137 ROS_DEBUG(
"Error, line endpoint out of bounds. (%.2f, %.2f, %.2f) to (%.2f, %.2f, %.2f), size: (%d, %d, %d)", x0, y0, z0, x1, y1, z1,
149 ROS_DEBUG(
"Error, voxel out of bounds. (%d, %d, %d)\n", x, y, z);
152 uint32_t full_mask = ((uint32_t)1<<z<<16) | (1<<z);
154 unsigned int bits =
numBits(result);
170 ROS_DEBUG(
"Error, voxel out of bounds. (%d, %d)\n", x, y);
176 unsigned int unknown_bits = uint16_t(*col>>16) ^ uint16_t(*col);
177 unsigned int marked_bits = *col>>16;
204 for(
unsigned int z = 0; z <
size_z_; z++){
205 printf(
"Layer z = %u:\n",z);
206 for(
unsigned int y = 0; y <
size_y_; y++){
207 for(
unsigned int x = 0 ; x <
size_x_; x++){
216 printf(
"Column view:\n");
217 for(
unsigned int y = 0; y <
size_y_; y++){
218 for(
unsigned int x = 0 ; x <
size_x_; x++){