Class avoidance_force

Inheritance Relationships

Base Type

Class Documentation

class avoidance_force : public cosm::apf2D::base_force

A force pushing the robot away from perceived obstacles. Only active when threatening obstacles are detected.

Public Functions

explicit avoidance_force(const config::avoidance_force_config *config)
rmath::vector2d operator()(const boid&, const rmath::vector2d &closest) const

Calculate the avoidance force that should be applied to the robot. Avoidance force will point from the robot away from the cloest obstacle.

Parameters:

closest – The closest known obstacle to the robot.