This commit is contained in:
2025-12-30 10:25:25 +07:00
parent dad2726eb1
commit 82afc4c203
60 changed files with 162 additions and 162 deletions

Submodule src/Libraries/costmap_2d updated: 4246453ae6...72b2f3c639

View File

@@ -1,5 +1,5 @@
# robot_nav_2d_utils Polygons and Footprints
This library represents a replacement for [costmap_2d/footprint.h](https://github.com/ros-planning/navigation/blob/a2837b5a9dc6dd4b4da176fca7d899d6a3722bf8/costmap_2d/include/costmap_2d/footprint.h) and deals with manipulating polygons. Note that implicitly all polygons here are assumed to be [simple polygons](https://en.wikipedia.org/wiki/Simple_polygon) without "holes."
This library represents a replacement for [robot_costmap_2d/footprint.h](https://github.com/ros-planning/navigation/blob/a2837b5a9dc6dd4b4da176fca7d899d6a3722bf8/robot_costmap_2d/include/robot_costmap_2d/footprint.h) and deals with manipulating polygons. Note that implicitly all polygons here are assumed to be [simple polygons](https://en.wikipedia.org/wiki/Simple_polygon) without "holes."
## Polygons and the Parameter Server
There have historically been three primary ways to specify a polygon/footprint on the parameter server. The first is to simply specify a radius which is converted to a hexadecagon, i.e. polygon with sixteen sides. This can be read with
@@ -21,7 +21,7 @@ robot_nav_2d_msgs::Polygon2D polygonFromXMLRPC(XmlRpc::XmlRpcValue& polygon_xmlr
If the `XmlRpcValue` is a string, it will call the `polygonFromString` method.
The above are the traditional methods that were supported by the original `costmap_2d` code. However, we add a fourth method that requires two parallel arrays of x and y coordinates.
The above are the traditional methods that were supported by the original `robot_costmap_2d` code. However, we add a fourth method that requires two parallel arrays of x and y coordinates.
```
robot_nav_2d_msgs::Polygon2D polygonFromParallelArrays(const std::vector<double>& xs, const std::vector<double>& ys);

View File

@@ -44,7 +44,7 @@ namespace robot_nav_2d_utils
/**
* @brief Load the robot footprint either as a polygon from the footprint parameter or from robot_radius
*
* Analagous to costmap_2d::makeFootprintFromParams in that it will return an empty polygon if neither parameter
* Analagous to robot_costmap_2d::makeFootprintFromParams in that it will return an empty polygon if neither parameter
* is present.
*/
robot_nav_2d_msgs::Polygon2D footprintFromParams(robot::NodeHandle &nh, bool write = true);

View File

@@ -36,7 +36,7 @@
#include <robot_nav_2d_utils/tf_help.h>
#include <robot_nav_2d_msgs/Pose2DStamped.h>
#include <robot_nav_2d_utils/conversions.h>
#include <tf3_geometry_msgs/tf3_geometry_msgs.h>
#include <robot_tf3_geometry_msgs/tf3_geometry_msgs.h>
#include <string>
namespace robot_nav_2d_utils