Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<<<<<<< HEAD
**/target
**/bin
**/*.class
Expand All @@ -23,3 +24,33 @@ OpenRobertaServer/db-*
dbIptoCountry/
**/notifications.json
**/data/test/output/*
mj_pick_and_place/venv
mj_pick_and_place/node_modules
mj_pick_and_place/__pychache__
=======
**/target
**/bin
**/*.class
**/dependency-reduced-pom.xml
**/phantomjsdriver.log
**/.classpath
**/.project
**/.settings
**/.pydevproject
**/.vscode
**/node_modules
OpenRobertaServer/db-*
.DS_Store
.idea
*.iml
**/*.log
**/*.log.zip
**/admin
**/*.pyc
**/*.py~
**/*.csv
**/*.map
dbIptoCountry/
**/notifications.json
**/data/test/output/*
>>>>>>> 19cec2fcb738346b9d7f6674287a52ddcc2c75c0
65 changes: 65 additions & 0 deletions AM.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
**Anne's New Notes**

### General notes about the system
The code found within /openroberta-lab covers the back-end logic of OpenRoberta.
The block declarations, UI and general front-end logic is defined in the blockly git (see section 'Changing the blockly front-end' further down).

OpenRoberta DOES actually have custom blocks! They're called 'functions' and are available in the expert-toolbox.

Most changes I've made in this code have the comment 'newmethod' over them. This is so it's easier to search for those changes within the code, if anyone wants to look at it.

### How to run the OpenRoberta-Lab project
**I use bash to run all commands!**
First, check the Prerequisites in the README.md in the root folder.

To (re)generate the server, run these two commands from root folder (SEE NOTES BELOW!):
rm -rf OpenRobertaRobot/target

mvn clean install -DskipTests

**IMPORTANT NOTES** Firstly, the 'mvn install' command skips all tests (with the -DskipTests flag). This is because it will run tests for ALL robot modes. Since we only build the system for the NAO robot, tests will fail and abort the build.
Also, we should likely think about creating tests for any new features we implement.

Secondly, you will likely experience errors when building. These errors are usually related to the 'target'-folders found within OpenRobertaRobot and OpenRobertaServer. If it complains that it failed to delete a file in the target folder, delete the file/folder manually and try the 'mvn install' command again, with the '-rf' flag provided in the terminal (this lets you avoid starting the build from scratch, and simply continues the build from a snapshot).

Then, we build the front-end:
cd OpenRobertaWeb
npm install && npm run build && npx gulp # build the frontend, check tsc and gulp, must succeed
cd ..
./ora.sh start-from-git # starts server, writes logging to the console

Our OpenRoberta can be accessed at http://localhost:1999/

### Changing the blockly front-end
Changes to the blockly front-end must be done in the blockly git code.
Firstly, check out the first part of this page:
https://github.com/OpenRoberta/blockly/blob/master/README.md

**We only care about the first part of the page (the closure-library and you need python version 2.7).**

Our fork of the OpenRoberta blockly can be found here:
https://github.com/VictoriousAnnro/blockly_openRoberta

When changes have been made to the blockly git code, run build.py with this command from the root folder of the blockly git:
python2.7 build.py

Replace the blockly_compressed.js in this code (OpenRobertaServer\staticResources\blockly\blockly_compressed.js), with the file from the blockly git.

**You DON'T need to re-generate the server after replacing the blocky_compressed.js file. Simply start the server**

### TO-DO
Overall, we're trying to do X things:
- Add feature that can locate code duplicates in the end-user's workspace
* We need to decide how we're gonna do this. Firstly, do we try to find duplicates in the python-code generated from the blocks? Or do we look at duplicate chunks of block UI elements? (As seen in the blockly git).
* Then, we need to figure out the algorithm/method to actually find the duplicates. Do we check for duplicates every time the user makes a change to the workspace? Every time they connect a new block to the stack?

- Add feature to highlight duplicate chunks of code (the hightlight color should NOT be the same for all duplicate code! It should be easy for user to see which chunks are related).
+ Add feature that explains why the chunks are being highlighted (let the user know why they should care about this).

- Add feature to let the end-user create a custom block with few clicks (They must specify block name, variables, and where the variables are used. The feature takes care of moving the duplicate chunk into a custom block, and replacing the chunks with the new block).

- Change the name from 'Functions' to something more user-friendly

- Connect our OpenRoberta to the cobot simulator
* We need to create blocks for the actions defined in the cobot-code.
* We should also ask the teacher whether it's ok for us to remove blocks from OpenRoberta which functionality we do not support (like the Sensors toolbox, as the cobot simulator doesn't have any sensor functionality).
12 changes: 6 additions & 6 deletions OpenRobertaServer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,27 +76,27 @@
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
</dependency>
<dependency>
<!--<dependency>
<groupId>de.fhg.iais.openroberta</groupId>
<artifactId>RobotArdu</artifactId>
</dependency>
</dependency>-->
<dependency>
<groupId>de.fhg.iais.openroberta</groupId>
<artifactId>RobotCyberpi</artifactId>
</dependency>
<dependency>
<!--<dependency>
<groupId>de.fhg.iais.openroberta</groupId>
<artifactId>RobotEV3</artifactId>
</dependency>
<dependency>
<groupId>de.fhg.iais.openroberta</groupId>
<artifactId>RobotMbed</artifactId>
</dependency>
</dependency>-->
<dependency>
<groupId>de.fhg.iais.openroberta</groupId>
<artifactId>RobotNAO</artifactId>
</dependency>
<dependency>
<!--<dependency>
<groupId>de.fhg.iais.openroberta</groupId>
<artifactId>RobotNXT</artifactId>
</dependency>
Expand All @@ -123,7 +123,7 @@
<dependency>
<groupId>de.fhg.iais.openroberta</groupId>
<artifactId>RobotFischertechnik</artifactId>
</dependency>
</dependency>-->
<dependency>
<groupId>de.fhg.iais.openroberta</groupId>
<artifactId>OpenRobertaRobot</artifactId>
Expand Down
4 changes: 3 additions & 1 deletion OpenRobertaServer/src/main/resources/openRoberta.properties
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ server.staticresources.dir = OpenRobertaServer/staticResources
# For instance, if your school offers nxt, calliope2017 and calliope2016 robots, use this white list:
# robot.whitelist = sim, nxt, calliope2017, calliope2016
# Usually overwritten by command line parameter -d
robot.whitelist = rcj, edisonv3, edisonv2, txt4, spike, spikePybricks, thymio, wedo, ev3lejosv1, ev3dev, ev3c4ev3, xNN, nxt, microbit, microbitv2, joycar, botnroll, nao, bob3, rob3rta, sensebox, mbot, mbot2, festobionic, festobionicflower, uno, nano, mega, nano33ble, calliope2017NoBlue, calliope2017, calliope2016, calliopev3, robotino
#robot.whitelist = rcj, edisonv3, edisonv2, txt4, spike, spikePybricks, thymio, wedo, ev3lejosv1, ev3dev, ev3c4ev3, xNN, nxt, microbit, microbitv2, joycar, botnroll, nao, bob3, rob3rta, sensebox, mbot, mbot2, festobionic, festobionicflower, uno, nano, mega, nano33ble, calliope2017NoBlue, calliope2017, calliope2016, calliopev3, robotino
robot.whitelist = nao

robot.default = ev3lejosv1
# account activation / verification / reset
# server.iptocountry.dir path where the db is located, db name is fix: IpToCountry.cvs
Expand Down
Loading