SmartVehicle-Basis
SmartFactory
Vision.h
Go to the documentation of this file.
1
// /**
2
// * @file Vision.h
3
// * @brief TODO Library for mechatronic component vision.
4
// *
5
// * The vision module consists of a pixy-cam and a servo motor.
6
// * The cam searches for target-objects and adjusts its position to that direction.
7
// * Afterwarts it sends information for course adaption.
8
// *
9
// * @author Glenn Huber (glenn.patrick.huber@hsr.ch)
10
// *
11
// * @version 1.1 - Added Doxygen-Documentation - Luca Mazzoleni (luca.mazzoleni@hsr.ch) - 2019-03-20
12
// * @version 1.0 - BA FTS FS 2018
13
// *
14
// * @date 2019-03-20
15
// * @copyright Copyright (c) 2019
16
// *
17
// */
18
19
// #ifndef vision_h
20
// #define vision_h
21
22
// #include "Arduino.h"
23
// #include "Configuration.h"
24
// #include "LogConfiguration.h"
25
// #include "Modular.h"
26
// #include "PixyI2C.h"
27
// #include "Servo.h"
28
// #include "Wire.h"
29
30
// /**
31
// * @brief
32
// *
33
// */
34
// struct VisionState {
35
// int target; ///<
36
// int servoAngle; ///<
37
// bool targetDetected = false; ///<
38
// bool reset = false; ///<
39
// };
40
41
// /**
42
// * @brief
43
// *
44
// */
45
// class Vision : public Component {
46
// public:
47
// /**
48
// * @brief Construct a new Vision object
49
// *
50
// * @param startAngle -
51
// * @param servoPin -
52
// * @param dddelay -
53
// * @param toleranceL -
54
// * @param toleranceR -
55
// */
56
// Vision(int startAngle, int servoPin, int dddelay, int toleranceL, int toleranceR);
57
58
// /**
59
// * @brief
60
// *
61
// * @param state -
62
// */
63
// void loop(VisionState *state);
64
65
// /**
66
// * @brief
67
// *
68
// * @param angle - right(0 degree)-staight(90 degree)-left(180 degree)
69
// *
70
// * @todo this is the same servo as in Sonar.. but somehow with other parameter?
71
// *
72
// */
73
// void turnVision(int angle);
74
75
// /**
76
// * @brief Testfunction for Vision-Class
77
// *
78
// * 0 - run all tests \n
79
// * 1 - run turnVision-Servo test right(0 degree)-staight(90 degree)-left(180 degree)-turn \n
80
// *
81
// * @param test - Choose which test to run
82
// */
83
// void Test(const int test);
84
85
// /**
86
// * @brief reset Vision
87
// *
88
// */
89
// void reset(VisionState *state);
90
91
// VisionState visionState; ///<
92
93
// protected:
94
// Servo visionServo; ///<
95
// PixyI2C pixy; ///<
96
97
// int toleranceLeft; ///<
98
// int toleranceRight; ///<
99
100
// int target1; ///<
101
// int target2; ///<
102
// int target3; ///<
103
// int target4; ///<
104
// int target5; ///<
105
// int target6; ///<
106
// int target7; ///<
107
// int target8; ///<
108
// int targetFound; ///<
109
// int targetFound1; ///<
110
// int targetFound2; ///<
111
// int targetFound3; ///<
112
// int targetFound4; ///<
113
// int ddelay; ///<
114
// int failCounter; ///<
115
// int _servoPin; ///<
116
// };
117
118
// #endif
src
EnvironmentDetection
Vision
Vision.h
Generated by
1.8.15