Skip to content

Commit

Permalink
fix code not building
Browse files Browse the repository at this point in the history
  • Loading branch information
Nisarg236 committed Jan 8, 2025
1 parent a1a78a3 commit e621d5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nav2_costmap_2d/include/nav2_costmap_2d/footprint.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ void transformFootprint(
* @param footprint A vector of points (type geometry_msgs::Point) representing a 2D polygon (footprint).
* @return The centroid of the footprint as a geometry_msgs::Point.
*/
geometry_msgs::Point calculateCentroid(const std::vector<geometry_msgs::Point>& footprint);
geometry_msgs::msg::Point calculateCentroid(const std::vector<geometry_msgs::msg::Point>& footprint);

/**
* @brief Given a pose and base footprint, build the oriented footprint of the robot (PolygonStamped)
Expand Down
4 changes: 2 additions & 2 deletions nav2_costmap_2d/src/footprint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ void transformFootprint(
}
}

geometry_msgs::Point calculateCentroid(const std::vector<geometry_msgs::Point>& footprint)
geometry_msgs::msg::Point calculateCentroid(const std::vector<geometry_msgs::msg::Point>& footprint)
{
geometry_msgs::Point center;
double sum_x = 0.0, sum_y = 0.0;
Expand All @@ -163,7 +163,7 @@ geometry_msgs::Point calculateCentroid(const std::vector<geometry_msgs::Point>&

void padFootprint(std::vector<geometry_msgs::msg::Point> & footprint, double padding)
{
geometry_msgs::Point footprint_center = calculateCentroid(footprint);
geometry_msgs::msg::Point footprint_center = calculateCentroid(footprint);

for (auto& point : footprint)
{
Expand Down

0 comments on commit e621d5f

Please sign in to comment.