|
Nav2 Navigation Stack - rolling
main
ROS 2 Navigation Stack
|
#include <nav2_map_server/include/nav2_map_server/vector_object_shapes.hpp>


Public Member Functions | |
| Polygon (const nav2::LifecycleNode::WeakPtr &node) | |
| int8_t | getValue () const |
| Gets the value of the shape. More... | |
| std::string | getFrameID () const |
| Gets frame ID of the shape. More... | |
| std::string | getUUID () const |
| Gets UUID of the shape. More... | |
| bool | isUUID (const unsigned char *uuid) const |
| Checks whether the shape is equal to a given UUID. More... | |
| bool | isFill () const |
| Whether the shape to be filled or only its borders to be put on map. More... | |
| bool | obtainParams (const std::string &shape_name) |
| Supporting routine obtaining ROS-parameters for the given vector object. More... | |
| nav2_msgs::msg::PolygonObject::SharedPtr | getParams () const |
| Gets Polygon parameters. More... | |
| bool | setParams (const nav2_msgs::msg::PolygonObject::SharedPtr params) |
| Tries to update Polygon parameters. More... | |
| bool | toFrame (const std::string &to_frame, const std::shared_ptr< tf2_ros::Buffer > tf_buffer, const double transform_tolerance) |
| Transforms shape coordinates to a new frame. More... | |
| void | getBoundaries (double &min_x, double &min_y, double &max_x, double &max_y) |
| Gets shape box-boundaries. More... | |
| bool | isPointInside (const double px, const double py) const |
| Is the point inside the shape. More... | |
| void | putBorders (nav_msgs::msg::OccupancyGrid::SharedPtr map, const OverlayType overlay_type) |
| Puts shape borders on map. More... | |
Public Member Functions inherited from nav2_map_server::Shape | |
| Shape (const nav2::LifecycleNode::WeakPtr &node) | |
| Shape basic class constructor. More... | |
| virtual | ~Shape () |
| Shape destructor. | |
| ShapeType | getType () |
| Returns type of the shape. More... | |
| bool | obtainShapeUUID (const std::string &shape_name, unsigned char *out_uuid) |
| Supporting routine obtaining shape UUID from ROS-parameters for the given shape object. More... | |
Protected Member Functions | |
| bool | checkConsistency () |
| Checks that shape is consistent for further operation. More... | |
Protected Attributes | |
| nav2_msgs::msg::PolygonObject::SharedPtr | params_ |
| Input polygon parameters (could be in any frame) | |
| geometry_msgs::msg::Polygon::SharedPtr | polygon_ |
| Polygon in the map's frame. | |
Protected Attributes inherited from nav2_map_server::Shape | |
| ShapeType | type_ |
| Type of shape. | |
| nav2::LifecycleNode::WeakPtr | node_ |
| VectorObjectServer node. | |
Polygon shape class.
Definition at line 167 of file vector_object_shapes.hpp.
|
protected |
Checks that shape is consistent for further operation.
Definition at line 278 of file vector_object_shapes.cpp.
References getUUID(), nav2_map_server::Shape::node_, and params_.
Referenced by setParams().


|
virtual |
Gets shape box-boundaries.
| min_x | output min X-boundary of shape |
| min_y | output min Y-boundary of shape |
| max_x | output max X-boundary of shape |
| max_y | output max Y-boundary of shape |
Implements nav2_map_server::Shape.
Definition at line 225 of file vector_object_shapes.cpp.
References polygon_.
|
virtual |
Gets frame ID of the shape.
Implements nav2_map_server::Shape.
Definition at line 96 of file vector_object_shapes.cpp.
References params_.
| nav2_msgs::msg::PolygonObject::SharedPtr nav2_map_server::Polygon::getParams | ( | ) | const |
Gets Polygon parameters.
Definition at line 177 of file vector_object_shapes.cpp.
References params_.
|
virtual |
Gets UUID of the shape.
Implements nav2_map_server::Shape.
Definition at line 101 of file vector_object_shapes.cpp.
References params_.
Referenced by checkConsistency(), and putBorders().

|
virtual |
Gets the value of the shape.
Implements nav2_map_server::Shape.
Definition at line 91 of file vector_object_shapes.cpp.
References params_.
|
virtual |
Whether the shape to be filled or only its borders to be put on map.
Implements nav2_map_server::Shape.
Definition at line 111 of file vector_object_shapes.cpp.
References params_.
|
virtual |
Is the point inside the shape.
| px | X-coordinate of the given point to check |
| py | Y-coordinate of the given point to check |
Implements nav2_map_server::Shape.
Definition at line 240 of file vector_object_shapes.cpp.
References polygon_.
|
virtual |
Checks whether the shape is equal to a given UUID.
| uuid | Given UUID to check with |
Implements nav2_map_server::Shape.
Definition at line 106 of file vector_object_shapes.cpp.
References params_.
|
virtual |
Supporting routine obtaining ROS-parameters for the given vector object.
| shape_name | Name of the shape |
Implements nav2_map_server::Shape.
Definition at line 116 of file vector_object_shapes.cpp.
References nav2_map_server::Shape::node_, nav2_map_server::Shape::obtainShapeUUID(), params_, and polygon_.

|
virtual |
Puts shape borders on map.
| map | Output map pointer |
| overlay_type | Overlay type |
Implements nav2_map_server::Shape.
Definition at line 245 of file vector_object_shapes.cpp.
References getUUID(), nav2_map_server::Shape::node_, params_, and polygon_.

| bool nav2_map_server::Polygon::setParams | ( | const nav2_msgs::msg::PolygonObject::SharedPtr | params | ) |
Tries to update Polygon parameters.
Definition at line 182 of file vector_object_shapes.cpp.
References checkConsistency(), params_, and polygon_.

|
virtual |
Transforms shape coordinates to a new frame.
| to_frame | Frame ID to transform to |
| tf_buffer | TF buffer to use for the transformation |
| transform_tolerance | Transform tolerance |
Implements nav2_map_server::Shape.
Definition at line 199 of file vector_object_shapes.cpp.