Class CornerArc

Class Documentation

class CornerArc

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.

Public Functions

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

A constructor for nav2_route::CornerArc.

Parameters:
  • start – start coordinate of corner to be smoothed

  • corner – corner coordinate of corner to be smoothed

  • end – end coordinate of corner to be smoothed

  • minimum_radius – smoothing radius to fit to the corner

~CornerArc() = default

A destructor for nav2_route::CornerArc.

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

interpolates the arc for a path of certain density

Parameters:
  • max_angle_resolution – Resolution to interpolate path to

  • poses – Pose output

inline bool isCornerValid() const

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

inline Coordinates getCornerStart() const

return the start coordinate of the corner arc

Returns:

start coordinate of the arc

inline Coordinates getCornerEnd() const

return the end coordinate of the corner arc

Returns:

end coordinate of the arc

Protected Functions

inline float getAngleBetweenEdges(const Coordinates &start, const Coordinates &corner, const Coordinates &end)

find the signed angle between a corner generated by 3 points

Parameters:
  • start – start coordinate of corner to be smoothed

  • corner – corner coordinate of corner to be smoothed

  • end – end coordinate of corner to be smoothed

Returns:

signed angle of the corner