Program Listing for File phototaxis_force.hpp
↰ Return to documentation for file (cosm/apf2D/nav/phototaxis_force.hpp
)
#pragma once
/*******************************************************************************
* Includes
******************************************************************************/
#include <vector>
#include "cosm/hal/sensors/colored_blob_camera_sensor_reading.hpp"
#include "cosm/hal/sensors/light_sensor_reading.hpp"
#include "cosm/apf2D/boid.hpp"
#include "cosm/apf2D/base_force.hpp"
/*******************************************************************************
* Namespaces/Decls
******************************************************************************/
namespace cosm::apf2D::nav {
namespace config {
struct phototaxis_force_config;
}
/*******************************************************************************
* Class Definitions
******************************************************************************/
class phototaxis_force : public capf2D::base_force {
public:
using light_sensor_readings = std::vector<hal::sensors::light_sensor_reading>;
using camera_sensor_readings =
std::vector<hal::sensors::colored_blob_camera_sensor_reading>;
explicit phototaxis_force(const config::phototaxis_force_config* config);
rmath::vector2d operator()(const light_sensor_readings& readings) const;
rmath::vector2d operator()(const camera_sensor_readings& readings,
const rutils::color& color) const;
private:
/* clang-format off */
const double mc_max;
/* clang-format on */
};
} /* namespace cosm::apf2D::nav */