Nav2 Navigation Stack - rolling
main
ROS 2 Navigation Stack
|
Basic class, other vector objects to be inherited from. More...
#include <nav2_map_server/include/nav2_map_server/vector_object_shapes.hpp>
Public Member Functions | |
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... | |
virtual int8_t | getValue () const =0 |
Gets the value of the shape. Empty virtual method intended to be used in child implementations. More... | |
virtual std::string | getFrameID () const =0 |
Gets frame ID of the shape. Empty virtual method intended to be used in child implementations. More... | |
virtual std::string | getUUID () const =0 |
Gets UUID of the shape. Empty virtual method intended to be used in child implementations. More... | |
virtual bool | isUUID (const unsigned char *uuid) const =0 |
Checks whether the shape is equal to a given UUID. Empty virtual method intended to be used in child implementations. More... | |
virtual bool | isFill () const =0 |
Whether the shape to be filled or only its borders to be put on map. Empty virtual method intended to be used in child implementations. More... | |
virtual bool | obtainParams (const std::string &shape_name)=0 |
Supporting routine obtaining ROS-parameters for the given vector object. Empty virtual method intended to be used in child implementations. More... | |
virtual bool | toFrame (const std::string &to_frame, const std::shared_ptr< tf2_ros::Buffer > tf_buffer, const double transform_tolerance)=0 |
Transforms shape coordinates to a new frame. Empty virtual method intended to be used in child implementations. More... | |
virtual void | getBoundaries (double &min_x, double &min_y, double &max_x, double &max_y)=0 |
Gets shape box-boundaries. Empty virtual method intended to be used in child implementations. More... | |
virtual bool | isPointInside (const double px, const double py) const =0 |
Is the point inside the shape. Empty virtual method intended to be used in child implementations. More... | |
virtual void | putBorders (nav_msgs::msg::OccupancyGrid::SharedPtr map, const OverlayType overlay_type)=0 |
Puts shape borders on map. Empty virtual method intended to be used in child implementations. More... | |
Protected Attributes | |
ShapeType | type_ |
Type of shape. | |
nav2::LifecycleNode::WeakPtr | node_ |
VectorObjectServer node. | |
Basic class, other vector objects to be inherited from.
Definition at line 46 of file vector_object_shapes.hpp.
|
explicit |
Shape basic class constructor.
node | Vector Object server node pointer |
Definition at line 37 of file vector_object_shapes.cpp.
|
pure virtual |
Gets shape box-boundaries. Empty virtual method intended to be used in child implementations.
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 |
Implemented in nav2_map_server::Circle, and nav2_map_server::Polygon.
|
pure virtual |
Gets frame ID of the shape. Empty virtual method intended to be used in child implementations.
Implemented in nav2_map_server::Circle, and nav2_map_server::Polygon.
ShapeType nav2_map_server::Shape::getType | ( | ) |
Returns type of the shape.
Definition at line 44 of file vector_object_shapes.cpp.
References type_.
|
pure virtual |
Gets UUID of the shape. Empty virtual method intended to be used in child implementations.
Implemented in nav2_map_server::Circle, and nav2_map_server::Polygon.
|
pure virtual |
Gets the value of the shape. Empty virtual method intended to be used in child implementations.
Implemented in nav2_map_server::Circle, and nav2_map_server::Polygon.
|
pure virtual |
Whether the shape to be filled or only its borders to be put on map. Empty virtual method intended to be used in child implementations.
Implemented in nav2_map_server::Circle, and nav2_map_server::Polygon.
|
pure virtual |
Is the point inside the shape. Empty virtual method intended to be used in child implementations.
px | X-coordinate of the given point to check |
py | Y-coordinate of the given point to check |
Implemented in nav2_map_server::Circle, and nav2_map_server::Polygon.
|
pure virtual |
Checks whether the shape is equal to a given UUID. Empty virtual method intended to be used in child implementations.
uuid | Given UUID to check with |
Implemented in nav2_map_server::Circle, and nav2_map_server::Polygon.
|
pure virtual |
Supporting routine obtaining ROS-parameters for the given vector object. Empty virtual method intended to be used in child implementations.
shape_name | Name of the shape |
Implemented in nav2_map_server::Circle, and nav2_map_server::Polygon.
bool nav2_map_server::Shape::obtainShapeUUID | ( | const std::string & | shape_name, |
unsigned char * | out_uuid | ||
) |
Supporting routine obtaining shape UUID from ROS-parameters for the given shape object.
Definition at line 49 of file vector_object_shapes.cpp.
References node_.
Referenced by nav2_map_server::Polygon::obtainParams(), and nav2_map_server::Circle::obtainParams().
|
pure virtual |
Puts shape borders on map. Empty virtual method intended to be used in child implementations.
map | Output map pointer |
overlay_type | Overlay type |
Implemented in nav2_map_server::Circle, and nav2_map_server::Polygon.
|
pure virtual |
Transforms shape coordinates to a new frame. Empty virtual method intended to be used in child implementations.
to_frame | Frame ID to transform to |
tf_buffer | TF buffer to use for the transformation |
transform_tolerance | Transform tolerance |
Implemented in nav2_map_server::Circle, and nav2_map_server::Polygon.