38 float target_x = 500.0;
39 float target_y = 500.0;
48 std::cout <<
"スピード(100ms), forword値, Target値, turn値, 前進値" << std::endl;
101 std::random_device rnd;
102 std::mt19937 mt(rnd());
103 std::uniform_int_distribution<int> rand50(0,50);
104 double r_forword = rand50(mt) * 0.1;
void isLeftsideLine(bool b)
std::int32_t calculateSpeedForPid(std::int32_t curAngleL, std::int32_t curAngleR)
std::int8_t calculateTurnForPid(std::int8_t forward, std::int8_t light_value)
void setPid(double _p_gain, double _i_gain, double _d_gain, double _target)
void update(std::int32_t left_motor_sl, std::int32_t right_motor_sl)
bool is_below_target_line_of_x(float target_x)
float calculate_between_ev3_and_border(float _start_x, float _start_y, float _goal_x, float _goal_y, float _current_x, float _current_y)
bool is_below_target_line_of_y(float target_y)
std::int16_t getSpeed100ms()
bool is_over_target_line_of_x(float target_x)
bool is_over_target_line_of_y(float target_y)
SpeedControl speedControl