1#ifndef BITSIM_CONTROL_INFRARED_LINE_FOLLOWER_H
2#define BITSIM_CONTROL_INFRARED_LINE_FOLLOWER_H
65 bool is_lost() const noexcept {
return lost_for_ > 0.0; }
70 bool has_given_up() const noexcept {
return lost_for_ > p_.lost_time; }
The basic types of bitsim. Code outside this file names Eigen's matrix and vector types only through ...
bool has_given_up() const noexcept
True when no element has seen the line for longer than lost_time.
Definition infrared_line_follower.h:70
InfraredLineFollower(const Parameters ¶meters)
Definition infrared_line_follower.h:55
const Parameters & parameters() const noexcept
Definition infrared_line_follower.h:72
DiffDriveCommand command(const sensors::InfraredSensor &ir, real_t dt)
The command for the elements' last reading, dt [s] after the last command.
Definition infrared_line_follower.cpp:11
InfraredLineFollower()=default
bool is_lost() const noexcept
True when no element saw the line at the last command.
Definition infrared_line_follower.h:65
An array of infrared reflectance elements that looks at the floor, to tell its colour: light paper or...
Definition infrared_sensor.h:33
Controllers: PID controllers, line following, a quadrotor flight controller, a fixed wing autopilot,...
Definition control_module.h:18
Definition infrared_line_follower.h:9
Definition dc_motor_backend_base.h:9
double real_t
real_t
Definition bitsim_types.h:20
What a differential drive robot is told to do: drive at v [m/s] and turn at omega [rad/s],...
Definition infrared_line_follower.h:22
real_t v
Definition infrared_line_follower.h:23
real_t omega
Definition infrared_line_follower.h:24
Definition infrared_line_follower.h:47
real_t cruise_speed
[m/s] with the line under the middle
Definition infrared_line_follower.h:48
real_t search_turn_rate
[rad/s] while looking for the line
Definition infrared_line_follower.h:50
real_t line_turn_rate
[rad/s] with only an outer element on the line
Definition infrared_line_follower.h:49
real_t lost_time
[s] without the line before giving up
Definition infrared_line_follower.h:51