Roblocks
An introduction to the configuration protocol
Dustin Hendriks
May 11, 2021
Document History
Version |
Date |
State |
Adjustments |
Commentary |
1.0 |
Release |
Release |
None |
|
|
|
|
|
|
1
1Introduction to Roblocks
Roblocks is a
Roblocks reads a configuration file (JSON), and uploads a single JSON file containing different blocks (a sequence) that can be used to control the robot.
This document describes how support for Roblocks can be implemented for your robot / project, so that your robot or device may perform
Advantages of using Roblocks:
•A Graphical User Interface has already been made for you and your users.
•Using JSON you can easily add new actions and commands.
•Roblocks does not have any alternative.
•Accessible and fun after implementation (especially for people other than programmers).
•Any implementation of the outgoing
Disadvantages of using Roblocks:
•Can be
•Roblocks is not able to listen to and receive responses, therefor sensordata can not be utilized. Roblocks can only control your robot.
•Working with arguments takes longer to implement than using
Get the latest Roblocks from: https://github.com/jetspiking/Roblocks
2
2Protocol
Roblocks reads a configuration file on startup. This file lists all actions (usable blocks) in the program. All arguments except "name" are optional, however, it is recommended to include atleast a description and image.
Every component (block) should look exactly like the following, to prevent reading errors.
1{
2"name": "Movement",
3"image": "move.png",
4"attributes": ["move_forward", "move_backward", "move_left"],
5"description": "Move your robot",
6"tags": ["Movement"]
7}
Listing 1: JSON example
The components (blocks) need to be wrapped inside a components object, which is displayed below.
1{
2{
3"components":[{"your_object_1"}, {"your_object_2"}]
4}
5}
Listing 2: JSON example
A full example can be viewed on the next page.
3
1{
2{
3"components":
4[
5{
6 |
"name": "Movement", |
7 |
"image": "move.png", |
8 |
"attributes": ["move_forward", "move_backward", "move_left"], |
9 |
"description": "Move your robot", |
10 |
"tags": ["Movement"] |
11},
12
13{
14"name": "Audio",
15"image":
16"attributes": ["filename", "volume", "url"],
17"description":"Play audio on robot",
18"tags":["Audio", "Music", "MP3"]
19},
20
21{
22"name":"Camera",
23"image":"eye.png",
24"attributes":["view_cam"],
25"description":"Spy on your robot",
26"tags":["Monitoring","Camera","Cam"]
27},
28
29{
30"name":"AI",
31"image":"cpu.png",
32"attributes":["Walk_until_obj"],
33"description":"AI",
34"tags":["AI", "ML", "Smart"]
35},
36
37{
38"name":"Settings",
39"image":"settings.png",
40"attributes":["Perform_sys_check"],
41"description":"Robot settings",
42"tags":["Settings"]
43}
44]
45}
46
47}
Listing 3: JSON example
4
In the application the layout (right window) will look like the following, using only a few more components than displayed in the example.
5
3Outgoing JSON
The outgoing
A full example can be viewed below. The text between the quotes (attributes) are whatever you want them to be, since you can set them to any text you would like.
1{
2"components": [
3{
4"operations": [
5{
6 |
"name": "Commands", |
7 |
"attributes": [ |
8 |
{ |
9 |
"Stop": "" |
10 |
} |
11 |
] |
12}
13],
14"name": "Node"
15},
16{
17"operations": [
18{
19"name": "Connectivity",
20"attributes": [
21{
22 |
"WiFi": "" |
23 |
}, |
24 |
{ |
25 |
"Bluetooth": "" |
26 |
} |
27 |
] |
28}
29],
30"name": "Node"
31}
32]
33}
Listing 4: JSON example
6
4Icons
The following list displays all icons that can be used by default, by referring to each name. These icons are Open Source and are copied from https://github.com/feathericons/feather and have been converted to .pngles.
•activity.png
•airplay.png
•
•
•
•
•
•
•
•anchor.png
•aperture.png
•archive.png
•
•
•
•
•
•
•
•
•
•
•
•
•
•award.png
•
•
•battery.png
7
•
•bell.png
•
•bluetooth.png
•bold.png
•book.png
•
•bookmark.png
•box.png
•briefcase.png
•calendar.png
•camera.png
•
•cast.png
•check.png
•
•
•
•
•
•
•
•
•
•
•chrome.png
•circle.png
•clipboard.png
•clock.png
•cloud.png
•
•
•
8
•
•
•code.png
•codepen.png
•codesandbox.png
•coffee.png
•columns.png
•command.png
•compass.png
•copy.png
•
•
•
•
•
•
•
•
•cpu.png
•
•crop.png
•crosshair.png
•database.png
•delete.png
•disc.png
•divide.png
•
•
•
•download.png
•
•dribbble.png
•droplet.png
9
•edit.png
•
•
•
•eye.png
•
•facebook.png
•
•feather.png
•figma.png
•file.png
•
•
•
•film.png
•filter.png
• ag.png
•folder.png
•
•
•framer.png
•frown.png
•gift.png
•
•
•
•
•github.png
•gitlab.png
•globe.png
•grid.png
•
•hash.png
10
•headphones.png
•heart.png
•
•hexagon.png
•home.png
•image.png
•inbox.png
•info.png
•instagram.png
•italic.png
•key.png
•layers.png
•layout.png
•
•link.png
•
•linkedin.png
•list.png
•loader.png
•lock.png
•
•
•mail.png
•map.png
•
•maximize.png
•
•meh.png
•menu.png
•
•
•mic.png
•
11
•minimize.png
•
•minus.png
•
•
•monitor.png
•moon.png
•
•
•
•move.png
•music.png
•navigation.png
•
•octagon.png
•package.png
•paperclip.png
•pause.png
•
•
•percent.png
•phone.png
•
•
•
•
•
•
•
•play.png
•
•plus.png
•
12
•
•pocket.png
•power.png
•printer.png
•radio.png
•
•
•repeat.png
•rewind.png
•
•
•rss.png
•save.png
•scissors.png
•search.png
•send.png
•server.png
•settings.png
•share.png
•
•shield.png
•
•
•
•shuffle.png
•sidebar.png
•
•
•slack.png
•slash.png
•sliders.png
•smartphone.png
•smile.png
13
•speaker.png
•square.png
•star.png
•
•sun.png
•sunrise.png
•sunset.png
•tablet.png
•tag.png
•target.png
•terminal.png
•thermometer.png
•
•
•
•
•tool.png
•trash.png
•
•trello.png
•
•
•triangle.png
•truck.png
•tv.png
•twitch.png
•twitter.png
•type.png
•umbrella.png
•underline.png
•unlock.png
•upload.png
•
14
•user.png
•
•
•
•
•users.png
•video.png
•
•voicemail.png
•volume.png
•
•
•
•watch.png
•wifi.png
•
•wind.png
•x.png
•
•
•
•youtube.png
•zap.png
•
•
•
15