Function autoware_utils::calc_azimuth_angle

Function Documentation

double autoware_utils::calc_azimuth_angle(const geometry_msgs::msg::Point &p_from, const geometry_msgs::msg::Point &p_to)

calculate azimuth angle of two points.

This function returns the azimuth angle of the position of the two input points with respect to the origin of their coordinate system. If x and y of the two points are the same, the calculation result will be unstable.

Parameters:
  • p_from – source point

  • p_to – target point

Returns:

-pi < azimuth angle < pi.