Class base_force

Inheritance Relationships

Derived Types

Class Documentation

class base_force

Contains common functionality for all virtual forces.

Subclassed by cosm::apf2D::flocking::constant_speed_force, cosm::apf2D::nav::arrival_force, cosm::apf2D::nav::avoidance_force, cosm::apf2D::nav::path_following_force, cosm::apf2D::nav::phototaxis_force, cosm::apf2D::nav::polar_force, cosm::apf2D::nav::seek_force, cosm::apf2D::nav::wander_force

Public Functions

base_force(base_force&&) = delete
base_force(const base_force&) = delete
base_force(void) = default
virtual ~base_force(void) = default
base_force &operator=(base_force&&) = delete
base_force &operator=(const base_force&) = delete

Public Static Functions

static rmath::vector2d make_vel_floor(rmath::vector2d vel)

Modify velocity odometry to pe positive definition.

In order to have the some forces work properly, we need to have a velocity with a non-zero length and the correct heading angle at all times. So we report that we have velocity even though we do not, for the purposes of making those calculations work.

There probably is a better way to do this, but I don’t know what it is.