Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
simulators
basic-simulator
Commits
23db3dca
Commit
23db3dca
authored
Dec 05, 2020
by
Jean Meurice
Browse files
CLI
parent
eb767975
Pipeline
#371757
passed with stage
in 58 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
install/cli_test.json
0 → 100644
View file @
23db3dca
{
"name"
:
"cli_test"
,
"map_name"
:
"maps/aachen"
,
"max_duration"
:
[
60
,
0
],
"tick_duration"
:
[
0
,
10000000
],
"cars"
:
[
{
"start_pos"
:
[
-123.09
,
21.64
],
"start_orientation"
:
-30.0
,
"task"
:
{
"goals"
:
[
{
"type"
:
"path"
,
"ltl_operator"
:
"eventually"
,
"path"
:
[
[
-63.83
,
-171.96
]
],
"range"
:
5
}
]
},
"components"
:
[
{
"type"
:
"constant_bus"
},
{
"type"
:
"actuator"
,
"name"
:
"SteeringActuator"
,
"physical_value_name"
:
"steering"
,
"change_rate"
:
60.0
,
"sensor"
:
{
"type"
:
"sensor"
}
},
{
"type"
:
"actuator"
,
"name"
:
"BrakingActuator"
,
"physical_value_name"
:
"braking"
,
"change_rate"
:
10.0
,
"sensor"
:
{
"type"
:
"sensor"
}
},
{
"type"
:
"actuator"
,
"name"
:
"GasActuator"
,
"physical_value_name"
:
"gas"
,
"sensor"
:
{
"type"
:
"sensor"
}
},
{
"type"
:
"sensor"
,
"name"
:
"TrueVelocitySensor"
,
"physical_value_name"
:
"true_velocity"
},
{
"type"
:
"sensor"
,
"name"
:
"TruePositionSensor"
,
"physical_value_name"
:
"true_position"
},
{
"type"
:
"sensor"
,
"name"
:
"TrueCompassSensor"
,
"physical_value_name"
:
"true_compass"
},
{
"type"
:
"navigation"
},
{
"type"
:
"java_autopilot"
,
"maxVehicleAccel"
:
7.460690450979396
}
]
}
]
}
\ No newline at end of file
install/cli_test_fail.json
0 → 100644
View file @
23db3dca
{
"name"
:
"cli_test_fail"
,
"map_name"
:
"maps/aachen"
,
"max_duration"
:
[
5
,
0
],
"tick_duration"
:
[
0
,
10000000
],
"cars"
:
[
{
"start_pos"
:
[
-123.09
,
21.64
],
"start_orientation"
:
-30.0
,
"task"
:
{
"goals"
:
[
{
"type"
:
"path"
,
"ltl_operator"
:
"eventually"
,
"path"
:
[
[
-63.83
,
-171.96
]
],
"range"
:
5
}
]
},
"components"
:
[
{
"type"
:
"constant_bus"
},
{
"type"
:
"actuator"
,
"name"
:
"SteeringActuator"
,
"physical_value_name"
:
"steering"
,
"change_rate"
:
60.0
,
"sensor"
:
{
"type"
:
"sensor"
}
},
{
"type"
:
"actuator"
,
"name"
:
"BrakingActuator"
,
"physical_value_name"
:
"braking"
,
"change_rate"
:
10.0
,
"sensor"
:
{
"type"
:
"sensor"
}
},
{
"type"
:
"actuator"
,
"name"
:
"GasActuator"
,
"physical_value_name"
:
"gas"
,
"sensor"
:
{
"type"
:
"sensor"
}
},
{
"type"
:
"sensor"
,
"name"
:
"TrueVelocitySensor"
,
"physical_value_name"
:
"true_velocity"
},
{
"type"
:
"sensor"
,
"name"
:
"TruePositionSensor"
,
"physical_value_name"
:
"true_position"
},
{
"type"
:
"sensor"
,
"name"
:
"TrueCompassSensor"
,
"physical_value_name"
:
"true_compass"
},
{
"type"
:
"navigation"
},
{
"type"
:
"java_autopilot"
,
"maxVehicleAccel"
:
7.460690450979396
}
]
}
]
}
\ No newline at end of file
src/main/java/de/rwth/montisim/basic_simulator/App.java
View file @
23db3dca
...
...
@@ -97,7 +97,12 @@ public class App
// Run simulation
SimulationLoop
simLoop
=
new
SimulationLoop
(
simulator
,
config
);
TaskStatus
res
=
simLoop
.
run
();
if
(
res
==
TaskStatus
.
FAILED
)
throw
new
IllegalStateException
(
"Not all tasks were completed."
);
if
(
res
==
TaskStatus
.
SUCCEEDED
)
{
System
.
out
.
println
(
"Simulation SUCCEEDED."
);
}
else
{
System
.
out
.
println
(
"Simulation FAILED."
);
System
.
exit
(-
1
);
}
}
catch
(
Exception
e1
)
{
e1
.
printStackTrace
();
return
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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