Commit 23db3dca authored by Jean Meurice's avatar Jean Meurice
Browse files

CLI

parent eb767975
Pipeline #371757 passed with stage
in 58 seconds
{
"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
{
"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
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment