Skip to content

Commit

Permalink
Issue #1700: introduce Robocup Junior Rescue Simulation Robot RCJ and…
Browse files Browse the repository at this point in the history
… some general simulation features:

- importing simulation environment created with the RobCup Junior Map Editor
- introducing constant "FORWARD" next to "FOREWARD" in the interpreter
- close right views before importing (to make sure contents in the right view are updated)
- move "Touchkey" class from TXT4 to Robot project
  • Loading branch information
bjost2s committed Nov 4, 2024
1 parent b79c23f commit a84b474
Show file tree
Hide file tree
Showing 255 changed files with 5,932 additions and 1,724 deletions.
3 changes: 3 additions & 0 deletions OpenRobertaRobot/constantsSource.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ COLOR = "color"
COLOR_CONST = "COLOR_CONST"
CONDITIONAL = "conditional"
COLOUR = "colorValue"
COLOUR_HEX = "colorHex"
COMMENT = "comment"
COMPASS = "compass"
CONTINUE = "continue"
Expand Down Expand Up @@ -94,6 +95,7 @@ FOR = "FOR"
FOREVER = "FOREVER"
FOREVER_ARDU = "FOREVER_ARDU"
FOREWARD = "FOREWARD"
FORWARD = "FORWARD"
FOR_EACH = "FOR_EACH"
FREEFALL = "freefall"
FREQUENCY = "frequency"
Expand Down Expand Up @@ -123,6 +125,7 @@ IMAGE_CONST = "image"
IMAGE_INVERT_ACTION = "ImageInvertAction"
IMAGE_SHIFT_ACTION = "ImageShiftAction"
IN = "in"
INDUCTIVE = "inductive"
INFO = "info"
INFRARED = "infrared"
INITIATE_BLOCK = "INITIATE_BLOCK"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import de.fhg.iais.roberta.util.ast.BlocklyProperties;
import de.fhg.iais.roberta.util.dbc.Assert;

@NepoExpr(category = "EXPR", blocklyNames = {"naoColour_picker", "robColour_picker", "mbedColour_picker", "colour_picker_spike"}, name = "COLOR_CONST", blocklyType = BlocklyType.COLOR)
@NepoExpr(category = "EXPR", blocklyNames = {"naoColour_picker", "robColour_picker", "mbedColour_picker", "colour_picker_spike", "colour_picker_rcj"}, name = "COLOR_CONST", blocklyType = BlocklyType.COLOR)
public final class ColorConst extends Expr {
@NepoField(name = "COLOUR")
public final String hexValue;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package de.fhg.iais.roberta.syntax.sensor;
package de.fhg.iais.roberta.syntax.sensor.generic;

import de.fhg.iais.roberta.syntax.sensor.ExternalSensor;
import de.fhg.iais.roberta.transformer.forClass.F2M;
import de.fhg.iais.roberta.transformer.forClass.NepoExpr;
import de.fhg.iais.roberta.util.ast.BlocklyProperties;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public class C {
public static final String COLOR_CONST = "COLOR_CONST";
public static final String CONDITIONAL = "conditional";
public static final String COLOUR = "colorValue";
public static final String COLOUR_HEX = "colorHex";
public static final String COMMENT = "comment";
public static final String COMPASS = "compass";
public static final String CONTINUE = "continue";
Expand Down Expand Up @@ -97,6 +98,7 @@ public class C {
public static final String FOREVER = "FOREVER";
public static final String FOREVER_ARDU = "FOREVER_ARDU";
public static final String FOREWARD = "FOREWARD";
public static final String FORWARD = "FORWARD";
public static final String FOR_EACH = "FOR_EACH";
public static final String FREEFALL = "freefall";
public static final String FREQUENCY = "frequency";
Expand Down Expand Up @@ -126,6 +128,7 @@ public class C {
public static final String IMAGE_INVERT_ACTION = "ImageInvertAction";
public static final String IMAGE_SHIFT_ACTION = "ImageShiftAction";
public static final String IN = "in";
public static final String INDUCTIVE = "inductive";
public static final String INFO = "info";
public static final String INFRARED = "infrared";
public static final String INITIATE_BLOCK = "INITIATE_BLOCK";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public Response getSimulationVMCode(@OraData DbSession dbSession, FullRestReques
return UtilForREST.responseWithFrontendInfo(response, httpSessionState, this.robotCommunicator);
} catch ( Exception e ) {
LOG.info("getSimulationVMCode failed", e);
Statistics.info("SimulationRun", "LoggedIn", httpSessionState.isUserLoggedIn(), "success", true);
Statistics.info("SimulationRun", "LoggedIn", httpSessionState.isUserLoggedIn(), "error", true);
return UtilForREST.makeBaseResponseForError(Key.SERVER_ERROR, httpSessionState, this.robotCommunicator);
} finally {
if ( dbSession != null ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ 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 = 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.default = ev3lejosv1
# account activation / verification / reset
# server.iptocountry.dir path where the db is located, db name is fix: IpToCountry.cvs
Expand Down
Loading

0 comments on commit a84b474

Please sign in to comment.