Skip to content

Commit b401969

Browse files
committed
Use costmap instead of static map
1 parent 6fed446 commit b401969

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/full_coverage_path_planner.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,12 @@ bool FullCoveragePathPlanner::parseCostmap(costmap_2d::Costmap2D* costmap_grid_,
229229
{
230230
for (nodeCol = 0; (nodeCol < nodeSize) && ((ix + nodeCol) < nCols); ++nodeCol)
231231
{
232-
double mx = grid_origin_.x + ix + nodeCol;
233-
double my = grid_origin_.y + iy + nodeRow;
232+
double mx = ix + nodeCol;
233+
double my = iy + nodeRow;
234234
if (costmap_grid_->getCost(mx, my) > costmap_2d::INSCRIBED_INFLATED_OBSTACLE)
235235
{
236236
nodeOccupied = true;
237-
ROS_INFO("(%f, %f) marked occupied", mx, my);
237+
// ROS_INFO("(%f, %f) marked occupied", mx, my);
238238
break;
239239
}
240240
}

src/spiral_stc.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ std::list<gridNode_t> SpiralSTC::spiral(std::vector<std::vector<bool> > const& g
191191
}
192192
}
193193
// Log
194-
printPathNodes(pathNodes);
194+
// printPathNodes(pathNodes);
195195
return pathNodes;
196196
}
197197

@@ -313,9 +313,8 @@ bool SpiralSTC::makePlan(const geometry_msgs::PoseStamped& start, const geometry
313313
}
314314
ROS_INFO("grid recieved!!");
315315

316-
//parseCostmap(costmap_, grid, robot_radius_ * 2, tool_radius_ * 2, start, startPoint)
317316
ROS_INFO("Parsing grid to internal representation...");
318-
if (!parseGrid(grid_req_srv.response.map, grid, robot_radius_ * 2, tool_radius_ * 2, start, startPoint))
317+
if (!parseCostmap(costmap_, grid, robot_radius_ * 2, tool_radius_ * 2, start, startPoint))
319318
{
320319
ROS_ERROR("Could not parse retrieved grid");
321320
return false;

0 commit comments

Comments
 (0)