Skip to content

Commit

Permalink
visualize cost of the frontiers
Browse files Browse the repository at this point in the history
  • Loading branch information
hrnr committed May 19, 2017
1 parent ad1ff0b commit ceb2f33
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions explore/src/explore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ void Explore::visualizeFrontiers(
m.frame_locked = true;

// weighted frontiers are always sorted
double min_cost = frontiers.empty() ? 0. : frontiers.front().size;
double min_cost = frontiers.empty() ? 0. : frontiers.front().cost;

m.action = visualization_msgs::Marker::ADD;
size_t id = 0;
Expand All @@ -156,8 +156,7 @@ void Explore::visualizeFrontiers(
m.id = int(id);
m.pose.position = frontier.initial;
// scale frontier according to its cost (costier frontiers will be smaller)
double scale = min_cost / frontier.size;
scale = 0.4;
double scale = min_cost / frontier.cost;
m.scale.x = scale;
m.scale.y = scale;
m.scale.z = scale;
Expand Down

0 comments on commit ceb2f33

Please sign in to comment.