38 #ifndef NAV2_COSTMAP_2D__FOOTPRINT_HPP_
39 #define NAV2_COSTMAP_2D__FOOTPRINT_HPP_
44 #include "rclcpp/rclcpp.hpp"
45 #include "geometry_msgs/msg/polygon.hpp"
46 #include "geometry_msgs/msg/polygon_stamped.hpp"
47 #include "geometry_msgs/msg/point.hpp"
48 #include "geometry_msgs/msg/point32.hpp"
49 #include "nav2_util/lifecycle_node.hpp"
62 const std::vector<geometry_msgs::msg::Point> & footprint,
63 double & min_dist,
double & max_dist);
68 geometry_msgs::msg::Point
toPoint(geometry_msgs::msg::Point32 pt);
73 geometry_msgs::msg::Point32
toPoint32(geometry_msgs::msg::Point pt);
78 geometry_msgs::msg::Polygon
toPolygon(std::vector<geometry_msgs::msg::Point> pts);
84 geometry_msgs::msg::Polygon::SharedPtr polygon);
95 double x,
double y,
double theta,
96 const std::vector<geometry_msgs::msg::Point> & footprint_spec,
97 std::vector<geometry_msgs::msg::Point> & oriented_footprint);
108 double x,
double y,
double theta,
109 const std::vector<geometry_msgs::msg::Point> & footprint_spec,
110 geometry_msgs::msg::PolygonStamped & oriented_footprint);
115 void padFootprint(std::vector<geometry_msgs::msg::Point> & footprint,
double padding);
129 const std::string & footprint_string,
130 std::vector<geometry_msgs::msg::Point> & footprint);
void transformFootprint(double x, double y, double theta, const std::vector< geometry_msgs::msg::Point > &footprint_spec, std::vector< geometry_msgs::msg::Point > &oriented_footprint)
Given a pose and base footprint, build the oriented footprint of the robot (list of Points)
bool makeFootprintFromString(const std::string &footprint_string, std::vector< geometry_msgs::msg::Point > &footprint)
Make the footprint from the given string.
void calculateMinAndMaxDistances(const std::vector< geometry_msgs::msg::Point > &footprint, double &min_dist, double &max_dist)
Calculate the extreme distances for the footprint.
void padFootprint(std::vector< geometry_msgs::msg::Point > &footprint, double padding)
Adds the specified amount of padding to the footprint (in place)
std::vector< geometry_msgs::msg::Point > makeFootprintFromRadius(double radius)
Create a circular footprint from a given radius.
std::vector< geometry_msgs::msg::Point > toPointVector(geometry_msgs::msg::Polygon::SharedPtr polygon)
Convert Polygon msg to vector of Points.
geometry_msgs::msg::Point32 toPoint32(geometry_msgs::msg::Point pt)
Convert Point to Point32.
geometry_msgs::msg::Polygon toPolygon(std::vector< geometry_msgs::msg::Point > pts)
Convert vector of Points to Polygon msg.
geometry_msgs::msg::Point toPoint(geometry_msgs::msg::Point32 pt)
Convert Point32 to Point.