AUV-Coop-Assembly
Master Thesis for Robotics Engineering. Cooperative peg-in-hole assembly with two underwater vehicles guided by vision
defines.h
1 #ifndef DEFINES_H
2 #define DEFINES_H
3 
4 #define PI_TORI 3.141592654
5 
6 #define VEHICLE_DOF 6 // these are the DOF considering the 3d space movement, are not
7  // the real vehicle dof
8 #define ARM_DOF 4 //CSIP ARM5E has actually 4dof (the 5th is open/close gripper)
9 #define TOT_DOF 10
10 
12 //threshold the threshold value for the SVD regularization; if the singular value
13 //is above this threshold, no regularization is performed on that singular value.
14 // default one, another can be choosen when construct the task object
15 #define THRESHOLD_DEFAULT 0.01 //0.01 original
16 //lambda the lambda value determines how "strong" is the regularization;
17 //it should be chosen accordingly with the threshold value
18 //(usually one order of magnitude smaller)
19 // default one, another can be choosen when construct the task object
20 #define LAMBDA_DEFAULT 0.0001 //0.0001 original
21 
24 #define JLIM1_MIN -PI_TORI/2
25 #define JLIM1_MAX 0.5488
26 #define JLIM2_MIN 0
27 #define JLIM2_MAX 1.58665
28 #define JLIM3_MIN 0
29 #define JLIM3_MAX 2.15294
30 //not in urdf file, probably they are default value
31 //find this one with keyboard command, the jaw stops rotating at these values
32 #define JLIM4_MIN -PI_TORI
33 #define JLIM4_MAX PI_TORI
34 
35 //longest dimension of the vehicle (for avoid crash between two robot)
36 #define VEH_DIM 1.5 //meters, according to datasheet of real robo, check if in the simul is the same
37 
38 // usato per ee avoid obstacle (avoid seafloor)
39 //TODO usare il laser di profondità invece?
40 #define SEAFLOOR_DEPTH 9 //i.e. "object" terrain position plus high (considering z axis of world pointing down
41 
42 // decide the control point (end effector or tool) that is the one which will reach the goal
43 enum ControlPoint {ee, tool};
44 
45 //log
46 #define LOG 1 //0-1 logging (printing matrix on files) not activated or activated
47 
48 
49 #define MS_CONTROL_LOOP 100 //millisecond for the control loops
50 
51 //simulation things, should be true always
52 #define COLLISION_PROPAGATOR true //to set if collision with peg and hole cause disturbances to arm
53 #define GRASP_CONSTRAINER true //to firm grasp constrain, which bring ee towards the correspondent point of the other robot peg
54 
56 #define CHANGE_GOAL true //to change the goal accordingly to the force arrives
57 #define VISION_ON true //to say if coordinator must take hole pose from Vision Robot
58 //WARNING: with Vision_ON true also the change goal must be active, for how the code is structured
59 //deal with vision without change goal is a future ideal "TODO": other method must be added to pass updated goal
60 //(from vision) from coordinator to the two robots
61 
62 //vision thing
63 #define DETECT_METHOD 1 //0: init click, 1: find squares, 2: template match
64 #define TRACK_METHOD 1 //0: mono cameras, 1:Stereo camera
65 #define USE_DEPTH false //use depth or not. It has meaning only if Track method is 1 (stereo)
66 
67 
68 #endif // DEFINES_H