-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.txt
156 lines (99 loc) · 4.63 KB
/
README.txt
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
GMHP-Pepper-Robot
This project is a Pepper Robot project that is designed to be used in a cafe environment to take orders from customers. The robot's
tablet will display an interactive javascript app that will allow the customer to order food and drinks. The app also has a voice
assistant button that when pressed will allow the customer to order by just talking to the robot.
Authors
Daniel Pulber
Giuseppe Marchuk
Kelly Green
Michelle Holgerson
Alvaro Huerta-Flores
How to run
Make sure you have NodeJs and npm installed on your device first.
Step 1: Open folder in terminal
Step 2: Run cd javascript to enter the javascript folder
Step 3: Run npm install to install the node_modules
Step 4: Run npm run build to run webpack and babel. This will build the bundled javascript file. The file will be
put in project/html/ as app.js
Step 5: Open the project.pml file in Choregraphe and click yes for any prompts that may appear
Step 6: Connect to the robot and run the behavior.xar file. This will run the behavior and open the index.html on the
robot tablet.
Important: If you make any changes to the code in the javascript folder you will need to run npm run build again to
build the bundled javascript file again and see the changes reflected.
How to setup menu items
Step 1: Open the menu.js file in the javascript/src/data/ folder and delete everything in it.
Step 2: Open the templateMenu.js file in the javascript/src/data/ folder and copy the contents of the file into the menu.js file.
Step 3: Now add the menu items to the menu.js file by following steps 1-5 in the code you copied from templateMenu.js.
Be sure to follow the Data Rules below. Use the exampleMenu.js file as a reference.
Data Rules
A menu Item should be and object with the following properties:
{
name: string;
variants: {
name: string;
price: number;
calories: number;
image: string;
}[];
}
name: The name of the menu item - type: String
variants: An array (min length is 1) of objects that contain the following properties:
name: The name of the variant. View the Variant Name Rules for more details - type: String
price: The price of the variant - type: Number
calories: The calories of the variant - type: Number
image: The image of the variant. View the Images Rules for more details - type: String
Example
{
name: 'Example Pizza',
variants: [
{
name: 'Small',
price: 4.0,
calories: 350,
image: 'menu/pizza.jpg',
},
{
name: 'Medium',
price: 6.0,
calories: 550,
image: 'menu/pizza.jpg',
},
{
name: 'Large',
price: 8.0,
calories: 750,
image: 'menu/pizza.jpg',
},
],
}
Variant Name Rules
The variant name should be a string that is the name of the variant. For example, if you have a chicken sandwich you could
have a regular variant and a no pickles variant. The regular variant name would be "Regular" and the no pickles variant
name would be "No Pickles".
If there is only one variant for a menu item then the variant name should an empty string ~ "".
If your variants are different size like small, medium, and large, don't put "S", "M", or "L" as the variant name.
Instead put the full name of the variant like "Small", "Medium", or "Large". This is because the robot won't be able to
understand the abbreviations. The item page will automatically convert small, medium, etc. to "S", "M", etc. for the buttons.
Heres a list of supported size values that will be converted to abbreviations:
'3X Small' => '3XS'
'2X Small' => 'XXS'
'Extra Small' => 'XS'
'Small' => 'S'
'Medium' => 'M'
'Large' => 'L'
'Extra Large' => 'XL'
'2X Large' => 'XXL'
'3X Large' => '3XXL'
Image Rules
The image property should be a string that is the path to the image starting with menu/ and ending with the image name and
type (Example: menu/pizza.png). The image should be in the project/html/resources/images/menu/ folder. Feel free to delete
any images you don't need from the folder. You can use the same image for multiple variants.
Other
Running on PC Browser
To open pepper webpage code on browser instead of pepper tablet, open http://pepper.local/apps/.lastUploadedChoregrapheBehavior/index.html in your browser.
Default Credentials
Username: "nao"
Password: "nao"
Running on Pepper without PC
After connecting and running the software, you can your change your PC's wifi connection and it will continue to run the app on its own. Then you can close
the choreograph app and now the app if fully self sufficient.