Skip to content

Commit

Permalink
use correct size for clearing window
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeferguson committed Jun 7, 2015
1 parent aeceb24 commit 36aa4df
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions move_base/src/move_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,19 +280,19 @@ namespace move_base {
geometry_msgs::Point pt;

pt.x = x - size_x / 2;
pt.y = y - size_x / 2;
pt.y = y - size_y / 2;
clear_poly.push_back(pt);

pt.x = x + size_x / 2;
pt.y = y - size_x / 2;
pt.y = y - size_y / 2;
clear_poly.push_back(pt);

pt.x = x + size_x / 2;
pt.y = y + size_x / 2;
pt.y = y + size_y / 2;
clear_poly.push_back(pt);

pt.x = x - size_x / 2;
pt.y = y + size_x / 2;
pt.y = y + size_y / 2;
clear_poly.push_back(pt);

planner_costmap_ros_->getCostmap()->setConvexPolygonCost(clear_poly, costmap_2d::FREE_SPACE);
Expand All @@ -305,19 +305,19 @@ namespace move_base {
y = global_pose.getOrigin().y();

pt.x = x - size_x / 2;
pt.y = y - size_x / 2;
pt.y = y - size_y / 2;
clear_poly.push_back(pt);

pt.x = x + size_x / 2;
pt.y = y - size_x / 2;
pt.y = y - size_y / 2;
clear_poly.push_back(pt);

pt.x = x + size_x / 2;
pt.y = y + size_x / 2;
pt.y = y + size_y / 2;
clear_poly.push_back(pt);

pt.x = x - size_x / 2;
pt.y = y + size_x / 2;
pt.y = y + size_y / 2;
clear_poly.push_back(pt);

controller_costmap_ros_->getCostmap()->setConvexPolygonCost(clear_poly, costmap_2d::FREE_SPACE);
Expand Down

0 comments on commit 36aa4df

Please sign in to comment.