Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Update
Java version: 1.8.0_181
Run in development mode using mvn jetty:run
Fixed static websocket issue
Corrected POM dependencies for servlet version
# Collection of mBot APIs and Documentation
+ no connectivity over the Internet -> seems no to go beyond the router
+ port configuration should be done externally, or by recognizing things.
+ investigate into JavaScript based implementation
-> http://www.instructables.com/id/Interactive-mBot-with-JavaScript/
+ fix java code to handle cases, where the operation of the mBot did not result in the proper behavior; this would mean to handle the Result object on the client implementation properly and return something meaningful
-> currently the return is always true
+ check and test the singleton implementation of the client in the interface definition, only used for the status operation to not break any existing logic
+ javadoc can be found in doc folder
+ code can be found in src folder
+ logging details can be found in logs folder
+ documentation of the device tests can be found in the TEST.md file
# mBot
+ IP: 10.0.6.31
+ internal IP for InnovationLAB network: http://192.168.75.25:8080/
+ raspberry data, IP, ... can be read on label of raspberry
+ mbot build with original package by Makeblock
# Configuration for CLASSIC and ROVER
All of the following configuration hints are for both robots (CLASSIC and ROVER).
The raspberry pies are set up in the same way.
### Prerequisites
- tomcat and maven are already installed and configured
- git is configured and first project initialization pull is already conducted
### Turn on device
- plug in everything (mbot, raspberry, ...)
- turn on mbot device
- turn on raspberry battery
### Connect to raspberry with putty (InnovationLab wlan)
- use login data on raspberry
- change to API folder with cd correctName
~API
- change to project folder with cd correctName
~API/mbotAPI
- update the code in the project folder by getting changes from git
~API/mbotAPI: git pull
- clean the old package in the project folder
~API/mbotAPI: mvn clean install
- package the new code from git in the project folder
~API/mbotAPI: mvn package
- remove the old package deployed on the tomcat
~API/mbotAPI: sudo rm /opt/tomcat/latest/webapps/mBot.war
- optional: check whether the last version was deleted correctly (folder contains no mBot.war and not deployed version)
~API/mbotAPI: cd /opt/tomcat/latest/webapps
- move the .war file from the project folder (basis) to the tomcat webapps folder
~API/mbotAPI: sudo mv target/mBot.war /opt/tomcat/latest/webapps
- conduct some minor changes in the xml file for enabling the swagger interface
~API/mbotAPI: sudo nano /opt/tomcat/latest/webapps/mBot/WEB-INF/web.xml
-> file opens, navigate to line with swagger.api.basepath and change localhost to the correct IP in the URL
-> STR+X for exit and J for saving
- restart the tomcat with the new project .war file
~API/mbotAPI: sudo service tomcat restart
- optional: check the logging file for the tomcat (expecially for debugging)
~API/mbotAPI: sudo tail -f /opt/tomcat/latest/logs/catalina.out
# Test with SWAGGER for CLASSIC and ROVER
All in all the testing environment for CLASSIC and ROVER look the same, it is likely that not all methods are completely the same.
For instance, the ROVER does have more sensors than the CLASSIC.
- open browser (preferred: Chrome)
- go to URL: IP:8080/mBot
-> choose UI for getting to the swagger interface
- choose any method and expand it
- use the "Try out" button at the right side
- if necessary fill in values for attributes
-> easier behavior test: use a minimum of 5 seconds in case of time attributes
-> easier behavior test: use a minimum of 3000 milliseconds in case of time attributes
-> a speed of about 100 to 200 makes sense
-> herzt of around 440 (440 should be standard tone A)
- use the execute button to start the operation