Class phototaxis_force

Inheritance Relationships

Base Type

Class Documentation

class phototaxis_force : public cosm::apf2D::base_force

A force pushing the robot away from light sources.

Public Types

using camera_sensor_readings = std::vector<hal::sensors::colored_blob_camera_sensor_reading>
using light_sensor_readings = std::vector<hal::sensors::light_sensor_reading>

Public Functions

explicit phototaxis_force(const config::phototaxis_force_config *config)
rmath::vector2d operator()(const camera_sensor_readings &readings, const rutils::color &color) const

Calculate force vector to the average location of objects of the specified color.

rmath::vector2d operator()(const light_sensor_readings &readings) const