Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
JastAdd
ros3rag
Commits
cd5729b8
Commit
cd5729b8
authored
May 23, 2022
by
René Schöne
Browse files
submission version
parent
5c1918e1
Pipeline
#13686
passed with stage
in 1 minute and 35 seconds
Changes
6
Pipelines
2
Expand all
Hide whitespace changes
Inline
Side-by-side
cloc/run-cloc.sh
View file @
cd5729b8
...
...
@@ -24,10 +24,13 @@ $CLOC_CMD --report-file=common-01-input-result.txt ../ros3rag.common/src/main/re
$CLOC_CMD
--report-file
=
placeA-01-input-result.txt ../ros3rag.placeA/src/main/ja
*
2>>cloc-errors.log
$CLOC_CMD
--report-file
=
placeB-01-input-result.txt
--categorized
=
cats.txt
--ignored
=
ignored.txt ../ros3rag.placeB/src/main/ja
*
2>>cloc-errors.log
$CLOC_CMD
--report-file
=
static-02-ragconnect-result.txt static-Ragconnect.jadd 2>>cloc-errors.log
$CLOC_CMD
--report-file
=
placeA-02-ragconnect-result.txt ../ros3rag.placeA/src/gen/jastadd/
*
.relast ../ros3rag.placeA/src/gen/jastadd/RagConnect.jadd 2>>cloc-errors.log
$CLOC_CMD
--report-file
=
placeB-02-ragconnect-result.txt ../ros3rag.placeB/src/gen/jastadd/
*
.relast ../ros3rag.placeB/src/gen/jastadd/RagConnect.jadd 2>>cloc-errors.log
# $CLOC_CMD --report-file=base-gen-result.txt ../ros3rag.base/src/gen 2>>cloc-errors.log
$CLOC_CMD
--report-file
=
placeA-0
2
-gen-result.txt ../ros3rag.placeA/src/gen 2>>cloc-errors.log
$CLOC_CMD
--report-file
=
placeB-0
2
-gen-result.txt ../ros3rag.placeB/src/gen 2>>cloc-errors.log
$CLOC_CMD
--report-file
=
common-0
2
-gen-result.txt ../ros3rag.common/build/generated/source/proto/main/java/de 2>>cloc-errors.log
$CLOC_CMD
--report-file
=
placeA-0
3
-gen-result.txt ../ros3rag.placeA/src/gen 2>>cloc-errors.log
$CLOC_CMD
--report-file
=
placeB-0
3
-gen-result.txt ../ros3rag.placeB/src/gen 2>>cloc-errors.log
$CLOC_CMD
--report-file
=
common-0
3
-gen-result.txt ../ros3rag.common/build/generated/source/proto/main/java/de 2>>cloc-errors.log
# CFC_CMD='grep -o 'if'\|'for'\|'return''
...
...
cloc/static-Ragconnect.jadd
0 → 100644
View file @
cd5729b8
This diff is collapsed.
Click to expand it.
ros3rag.placeB/src/main/jastadd/WorldModelB.connect
View file @
cd5729b8
...
...
@@ -26,19 +26,20 @@ ParseCommand maps byte[] bytes to de.tudresden.inf.st.ceti.Command {:
:}
ConvertCommand maps de.tudresden.inf.st.ceti.Command command to Operation {:
WorldModelB model = (WorldModelB) this;
if (command.hasPickAndPlace()) {
return new PickAndPlace()
.setObjectToPick(
worldM
odel
B()
.getMyScene().getLogicalScene().resolveLogicalObjectOfInterest(command.getPickAndPlace().getIdPick()).asLogicalMovableObject())
.setTargetLocation(
worldM
odel
B()
.getMyScene().resolveObjectOfInterest(command.getPickAndPlace().getIdPlace()).asDropOffLocation())
.setRobotToExecute(
worldM
odel
B()
.findRobot(command.getPickAndPlace().getIdRobot()).get());
.setObjectToPick(
m
odel.getMyScene().getLogicalScene().resolveLogicalObjectOfInterest(command.getPickAndPlace().getIdPick()).asLogicalMovableObject())
.setTargetLocation(
m
odel.getMyScene().resolveObjectOfInterest(command.getPickAndPlace().getIdPlace()).asDropOffLocation())
.setRobotToExecute(
m
odel.findRobot(command.getPickAndPlace().getIdRobot()).get());
} else if (command.hasConfigChange()) {
return new ConfigChange()
.setCollaborationZone(
worldM
odel
B()
.getMyScene().resolveObjectOfInterest(command.getConfigChange().getIdCollaborationZone()).asDropOffLocation().asCollaborationZone())
.setRobotToExecute(
worldM
odel
B()
.findRobot(command.getConfigChange().getIdRobotNewOwner()).get());
.setCollaborationZone(
m
odel.getMyScene().resolveObjectOfInterest(command.getConfigChange().getIdCollaborationZone()).asDropOffLocation().asCollaborationZone())
.setRobotToExecute(
m
odel.findRobot(command.getConfigChange().getIdRobotNewOwner()).get());
} else if (command.hasEvacuate()) {
return new Evacuate()
.setCollaborationZone(
worldM
odel
B()
.getMyScene().resolveObjectOfInterest(command.getEvacuate().getIdCollaborationZone()).asDropOffLocation().asCollaborationZone())
.setRobotToExecute(
worldM
odel
B()
.findRobot(command.getEvacuate().getIdRobot()).get());
.setCollaborationZone(
m
odel.getMyScene().resolveObjectOfInterest(command.getEvacuate().getIdCollaborationZone()).asDropOffLocation().asCollaborationZone())
.setRobotToExecute(
m
odel.findRobot(command.getEvacuate().getIdRobot()).get());
}
return new ErrorOperation().setErrorMessage("Could not parse operation " + command);
:}
...
...
ros3rag.placeB/src/main/jastadd/WorldModelB.jadd
View file @
cd5729b8
...
...
@@ -567,3 +567,13 @@ aspect Resolving {
// // do not resolve real regions and real locations (send by site-A)
// refine RefResolverStubs eq LogicalMovableObject.resolveMyLocationByToken(String name) = null;
}
aspect RagConnectAddOn {
public void WorldModelB.ragconnectResetEvaluationCounter() {
_ragconnect_evaluationCounter.reset();
}
class EvaluationCounter {
public void reset() {
counters = new java.util.HashMap<>();
}
}
}
ros3rag.placeB/src/main/java/de/tudresden/inf/st/placeB/MainB.java
View file @
cd5729b8
...
...
@@ -109,6 +109,7 @@ public class MainB extends SharedMainParts<MqttHandler, WorldModelB> {
@Override
protected
WorldModelB
createWorldModel
()
{
WorldModelB
result
=
new
WorldModelB
();
result
.
ragconnectResetEvaluationCounter
();
result
.
addOtherScene
(
new
LogicalScene
());
return
result
;
}
...
...
@@ -145,8 +146,8 @@ public class MainB extends SharedMainParts<MqttHandler, WorldModelB> {
"OtherScene"
);
checkSuccess
(
model
.
connectNextOperation
(
mqttUri
(
config
.
forB
.
topicCommand
,
config
),
false
),
"NextOperation"
);
//
checkSuccess(model.connectExecutedOperation(mqttUri(config.forB.topicCommand, config)),
//
"OperationHistory");
checkSuccess
(
model
.
connectExecutedOperation
(
mqttUri
(
config
.
forB
.
topicCommand
,
config
)),
"OperationHistory"
);
for
(
Robot
robot
:
model
.
getRobotList
())
{
// self-loop
checkSuccess
(
robot
.
connectOwnedCollaborationZoneNames
(
mqttUri
(
config
.
forB
.
topicCommand
,
config
)),
...
...
settings.gradle
View file @
cd5729b8
...
...
@@ -10,7 +10,7 @@ include 'ros3rag.placeA'
include
'ros3rag.placeB'
include
'ros3rag.common'
include
'ros3rag.altPlaceB'
//
include 'ros3rag.altPlaceB'
include
'ros3rag.scaling.a'
include
'ros3rag.scaling.b'
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment