replaced printf -> robot::console

This commit is contained in:
2026-01-10 11:38:19 +07:00
parent b66bd7c751
commit b18aeb39ab
14 changed files with 65 additions and 80 deletions

View File

@@ -255,8 +255,6 @@ void Costmap2D::worldToMapEnforceBounds(double wx, double wy, int& mx, int& my)
{
my = (int)((wy - origin_y_) / resolution_);
}
// printf("CHECK FUNCTION: %f | %f\n",wx,wy);
// printf("CHECK FUNCTION: resolution_: %f\n",resolution_);
}
void Costmap2D::updateOrigin(double new_origin_x, double new_origin_y)
@@ -473,15 +471,12 @@ bool Costmap2D::saveMap(std::string file_name)
return false;
}
fprintf(fp, "P2\n%u\n%u\n%u\n", size_x_, size_y_, 0xff);
for (unsigned int iy = 0; iy < size_y_; iy++)
{
for (unsigned int ix = 0; ix < size_x_; ix++)
{
unsigned char cost = getCost(ix, iy);
fprintf(fp, "%d ", cost);
}
fprintf(fp, "\n");
}
fclose(fp);
return true;