EEROS  1.0.0.0
API for the EEROS Real-Time Robotics Framework
MouseInput.hpp
Go to the documentation of this file.
1 #ifndef ORG_EEROS_CONTROL_MOUSEINPUT_HPP_
2 #define ORG_EEROS_CONTROL_MOUSEINPUT_HPP_
3 
4 #include <string>
5 #include <thread>
7 #include <eeros/core/System.hpp>
8 #include <eeros/hal/Mouse.hpp>
9 #include <eeros/math/Matrix.hpp>
10 
11 using namespace eeros::math;
12 using namespace eeros::hal;
13 
14 namespace eeros {
15  namespace control {
16 
17  class MouseInput: public Block1o<Vector4> {
18  public:
19  MouseInput(std::string dev);
20  virtual ~MouseInput();
21 
22  Output<Matrix<3,1,bool>>& getButtonOut();
23  virtual void run();
24  virtual void setInitPos(double x, double y, double z, double r);
25  virtual void setInitPos(Vector4 pos);
26  virtual void reset(double x, double y, double z, double r);
27 
28  double axisScale_x = 0.0001;
29  double axisScale_y = 0.0001;
30  double axisScale_z = 0.001;
31  double axisScale_r = 0.2;
32  double min_x = -0.03;
33  double max_x = 0.045;
34  double min_y = -0.03;
35  double max_y = 0.03;
36  double min_z = -0.053;
37  double max_z = -0.015;
38  double min_r = -2.8;
39  double max_r = 2.8;
40 
41  protected:
43  double x, y, z, r;
44  bool first;
46  };
47  };
48 };
49 
50 #endif /* ORG_EEROS_CONTROL_MOUSEINPUT_HPP_ */
bool first
Definition: MouseInput.hpp:44
double z
Definition: MouseInput.hpp:43
Definition: Block1o.hpp:12
Definition: Config.hpp:14
Definition: Output.hpp:11
Definition: Mouse.hpp:30
Definition: HAL.hpp:16
Definition: Matrix.hpp:16
Output< Matrix< 3, 1, bool > > buttonOut
Definition: MouseInput.hpp:42
Definition: CoordinateSystem.hpp:9
Definition: MouseInput.hpp:17
Mouse mouse
Definition: MouseInput.hpp:45