Class EdgeAgentRobotSafety

Inheritance Relationships

Base Type

Class Documentation

class EdgeAgentRobotSafety : public hateb_local_planner::BaseTebBinaryEdge<1, double, VertexPose, VertexPose>

Edge defining a safety constraint between a robot and an agent (e.g., human) in the optimization graph.

This edge penalizes configurations where the robot and an agent come closer than a specified minimum distance. The cost is computed as a quadratic penalty if the distance between the robot (using its footprint model) and the agent (using its radius) is less than cfg_->hateb.min_agent_robot_dist. The edge is used to enforce social distancing or collision avoidance between the robot and agents.

Inherits from BaseTebBinaryEdge<1, double, VertexPose, VertexPose>.

Public Functions

inline EdgeAgentRobotSafety()

Construct edge and set measurement to zero (unused).

inline void computeError() override

Compute the error / cost for the edge.

Calculates the distance between the robot and agent, subtracts the agent radius, and applies a quadratic penalty if the result is below the minimum allowed agent-robot distance. The error is stored in _error[0].

Protected Attributes

Obstacle *obs_ = new PointObstacle()

Obstacle pointer used to represent the agent as a point obstacle for distance calculation.