Nav2 Navigation Stack - kilted  kilted
ROS 2 Navigation Stack
Public Member Functions | Protected Member Functions | List of all members
nav2_route::CornerArc Class Reference

A class used to smooth corners defined by the edges and nodes of the route graph. Used with path converter to output a corner smoothed plan. More...

#include <nav2_route/include/nav2_route/corner_smoothing.hpp>

Public Member Functions

 CornerArc (const Coordinates &start, const Coordinates &corner, const Coordinates &end, float minimum_radius)
 A constructor for nav2_route::CornerArc. More...
 
 ~CornerArc ()=default
 A destructor for nav2_route::CornerArc.
 
void interpolateArc (const float &max_angle_resolution, std::vector< geometry_msgs::msg::PoseStamped > &poses)
 interpolates the arc for a path of certain density More...
 
bool isCornerValid () const
 return if a valid corner arc (one that doesn't overrun the edge lengths) is generated More...
 
Coordinates getCornerStart () const
 return the start coordinate of the corner arc More...
 
Coordinates getCornerEnd () const
 return the end coordinate of the corner arc More...
 

Protected Member Functions

float getAngleBetweenEdges (const Coordinates &start, const Coordinates &corner, const Coordinates &end)
 find the signed angle between a corner generated by 3 points More...
 

Detailed Description

A class used to smooth corners defined by the edges and nodes of the route graph. Used with path converter to output a corner smoothed plan.

Definition at line 32 of file corner_smoothing.hpp.

Constructor & Destructor Documentation

◆ CornerArc()

nav2_route::CornerArc::CornerArc ( const Coordinates start,
const Coordinates corner,
const Coordinates end,
float  minimum_radius 
)
inline

A constructor for nav2_route::CornerArc.

Parameters
startstart coordinate of corner to be smoothed
cornercorner coordinate of corner to be smoothed
endend coordinate of corner to be smoothed
minimum_radiussmoothing radius to fit to the corner

Definition at line 42 of file corner_smoothing.hpp.

References getAngleBetweenEdges().

Here is the call graph for this function:

Member Function Documentation

◆ getAngleBetweenEdges()

float nav2_route::CornerArc::getAngleBetweenEdges ( const Coordinates start,
const Coordinates corner,
const Coordinates end 
)
inlineprotected

find the signed angle between a corner generated by 3 points

Parameters
startstart coordinate of corner to be smoothed
cornercorner coordinate of corner to be smoothed
endend coordinate of corner to be smoothed
Returns
signed angle of the corner

Definition at line 149 of file corner_smoothing.hpp.

Referenced by CornerArc().

Here is the caller graph for this function:

◆ getCornerEnd()

Coordinates nav2_route::CornerArc::getCornerEnd ( ) const
inline

return the end coordinate of the corner arc

Returns
end coordinate of the arc

Definition at line 139 of file corner_smoothing.hpp.

Referenced by nav2_route::PathConverter::densify().

Here is the caller graph for this function:

◆ getCornerStart()

Coordinates nav2_route::CornerArc::getCornerStart ( ) const
inline

return the start coordinate of the corner arc

Returns
start coordinate of the arc

Definition at line 133 of file corner_smoothing.hpp.

Referenced by nav2_route::PathConverter::densify().

Here is the caller graph for this function:

◆ interpolateArc()

void nav2_route::CornerArc::interpolateArc ( const float &  max_angle_resolution,
std::vector< geometry_msgs::msg::PoseStamped > &  poses 
)
inline

interpolates the arc for a path of certain density

Parameters
max_angle_resolutionResolution to interpolate path to
posesPose output

Definition at line 97 of file corner_smoothing.hpp.

Referenced by nav2_route::PathConverter::densify().

Here is the caller graph for this function:

◆ isCornerValid()

bool nav2_route::CornerArc::isCornerValid ( ) const
inline

return if a valid corner arc (one that doesn't overrun the edge lengths) is generated

Returns
if the a corner was able to be generated

Definition at line 127 of file corner_smoothing.hpp.

Referenced by nav2_route::PathConverter::densify().

Here is the caller graph for this function:

The documentation for this class was generated from the following file: