README.md 2.47 KB
Newer Older
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
1
# Steps to setup the robot and the simulator
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
2

Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
3
------------------------------------------
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
4
1-Clone the repository
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
5
------------------------------------------
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
6

Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
7 8 9 10 11 12 13 14
```
git clone https://aak@gitsvn-nt.oru.se/aak/AIMR_source_code.git
```
------------------------------------------
2-Real robot
------------------------------------------

2.1-epuck-computer connection:
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
15

Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
16
- Turn on the robot
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
17

Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
18 19
- Pairing epuck with computer:
  - Go to: Bluetooth manager -> search -> select epuck -> custom PIN (write the four digit number written on epuck)
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
20

Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
21
- Connecting epuck with computer:
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
22
  - Go to Device -> serial service (Note down the number of rfcomm provided at the bottom of the window e.g., Serial port connected to /dev/rfcomm8, here the number is "8") 
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
23

Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
24
- If everything works fine, an orange light will trun on the robot.
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
25

Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
26

Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
27
2.2-Compile library and run sample program:
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
28

Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
29
- Open a new terminal
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
30
- cd into AIMR_source_code/real_robot/src
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
31

Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
32 33 34
```
make clean
```
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
35

Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
36 37 38
```
make
```
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
39

Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
40 41 42 43
- cd into AIMR_source_code/run
- open main.c
- Assign the value of rfcomm number to ROBOT_NUMDER in Line 3 e.g., ROBOT_NUMDER = 8

Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
44 45 46
```
cd ../../run/
```
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
47

Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
48
```
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
49
make clean_real 
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
50 51 52
```

```
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
53
make real 
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
54 55 56
```

```
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
57
sudo ./real
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
58
```
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
59

Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
60 61
- Enter your login password

Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
62
- If everything works fine, the ring of leds on the epuck will turn on
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
63 64 65 66 67 68 69 70 71 72 73 74 75 76

- For more test examples remove the lines (/* remove this line , remove this line*/) from the main.cpp.

```
make clean_real 
```

```
make real
```

```
sudo ./real
```
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
77

Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
78
------------------------------------------
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
79
3-Simulator
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
80
------------------------------------------
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
81

Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
82
3.1-Compile the simulator:
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
83

Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
84
- cd into AIMR_source_code/simulator/src/
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
85 86 87 88

```
make clean_lin
```
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
89

Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
90 91 92
```
make sim_lin
```
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
93 94


Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
95
- Run the simulator:
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
96

Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
97 98 99 100 101 102 103 104 105 106 107 108 109
```
cd ../bin/
```

```
./sim_lin
```

- Run the simulator by clicking "run" button (simulator should be running while testing your code)

- Compile and run sample program:

- Open a new terminal
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
110
- cd into AIMR_source_code/run/
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
111 112 113 114 115 116 117 118 119 120 121 122

```
make clean_sim 
```

```
make sim
```

```
./sim
```
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
123
------------------------------------------
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
124
4-Documentation of library related to the course: 
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
125
------------------------------------------
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
126

Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
127
- Go to AIMR_source_code/doc/doxygen/html and double click on index.html
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
128
- Documentation will appear in your browser (Google Chrome or Firefox).
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
129 130 131 132 133 134 135
- Click on "Files"
- The files related to AIMR course are:
  - epuck.hpp
  - fuzzy.h
  - lists.h
  - maps.h

Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
136 137
- Go through the documentation and write your own code into "main.c"

Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
138
------------------------------------------
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
139
5-enjoy!
Ali Abdul Khaliq's avatar
Ali Abdul Khaliq committed
140
------------------------------------------