Class LoSCollisionChecker

Class Documentation

class LoSCollisionChecker

Public Functions

inline explicit LoSCollisionChecker(std::shared_ptr<nav2_costmap_2d::Costmap2D> costmap)

Constructor.

Parameters:

costmap – Costmap to check

~LoSCollisionChecker() = default

Destructor.

inline bool worldToMap(const geometry_msgs::msg::Point &start, const geometry_msgs::msg::Point &end)

Find the line segment in cosmap frame.

Parameters:
  • start – Start point

  • end – End point

Returns:

True if the line segment is on the costmap, false otherwise

inline bool isInCollision()

Check if the line segment is in collision with the costmap.

Returns:

True if the line segment is in collision, false otherwise

Protected Attributes

std::shared_ptr<nav2_costmap_2d::Costmap2D> costmap_
unsigned int x0_
unsigned int x1_
unsigned int y0_
unsigned int y1_