2021-05-13 08:38:20 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "sensors/data_source_camera_vshapedmirror.h"
|
2021-06-20 23:32:45 +02:00
|
|
|
#include "behaviour_control/complementary_filter.h"
|
2021-05-13 08:38:20 +02:00
|
|
|
#include "sensors/sensors.h"
|
|
|
|
#include "strategy_roles/game.h"
|
|
|
|
|
|
|
|
#define PS_ATTACK_DISTANCE 110
|
|
|
|
#define PS_TILT_STOP_DISTANCE 140
|
|
|
|
#define PS_PLUSANG 55
|
2021-05-13 20:40:15 +02:00
|
|
|
#define PS_PLUSANG_VISIONCONE 10
|
2021-05-13 08:38:20 +02:00
|
|
|
|
2021-06-20 23:32:45 +02:00
|
|
|
// There needs to be a little bit of space between the target point and the spot to be in
|
2021-06-22 14:55:12 +02:00
|
|
|
#define PS_SPINNER_OVERHEAD 7
|
2021-06-21 20:00:31 +02:00
|
|
|
|
2021-06-22 14:55:12 +02:00
|
|
|
#define KICK_LIMIT_TILT1 200
|
2021-06-21 20:00:31 +02:00
|
|
|
#define KICK_LIMIT_MAX 315
|
|
|
|
#define KICK_LIMIT_MIN 45
|
2021-06-20 23:32:45 +02:00
|
|
|
|
2021-05-13 08:38:20 +02:00
|
|
|
class PrecisionShooter : public Game{
|
|
|
|
|
|
|
|
public:
|
|
|
|
PrecisionShooter();
|
|
|
|
PrecisionShooter(LineSystem* ls, PositionSystem* ps);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void realPlay() override;
|
|
|
|
void init() override;
|
2021-06-20 23:32:45 +02:00
|
|
|
void catchBall();
|
2021-06-21 11:17:33 +02:00
|
|
|
void spinner(int);
|
2021-05-13 08:38:20 +02:00
|
|
|
int tilt();
|
2021-06-20 23:32:45 +02:00
|
|
|
|
|
|
|
private:
|
2021-05-13 08:38:20 +02:00
|
|
|
int atk_speed, atk_direction, atk_tilt;
|
|
|
|
float cstorc;
|
|
|
|
bool gotta_tilt;
|
2021-06-20 23:32:45 +02:00
|
|
|
ComplementaryFilter* ballAngleFilter;
|
2021-05-13 08:38:20 +02:00
|
|
|
};
|