Commit eaf7e059 authored by Robert Meyer's avatar Robert Meyer
Browse files

hardcoded config + bugfix

parent 8cf5820a
Pipeline #185664 failed with stage
in 32 seconds
This diff is collapsed.
This diff is collapsed.
......@@ -24,6 +24,12 @@ import java.time.Instant;
import java.util.*;
public class VehicleBuilder {
//hardcoded config
private final String AUTOPILOT_CONFIG = "autopilot=AutopilotAdapter\n"+
"os=windows\n" +
"no_time=true";
public static class VehicleTrajectory {
Point2D[] trajectory;
Point2D start;
......@@ -38,11 +44,6 @@ public class VehicleBuilder {
}
}
HardwareEmulatorInterface model_server;
SimulationResult result;
......@@ -60,7 +61,7 @@ public class VehicleBuilder {
EEVehicleBuilder eeVehicleBuilder = new EEVehicleBuilder(eeSim);
InstantBus bus = new InstantBus(eeSim);
eeVehicleBuilder.createAllSensorsNActuators(bus);
eeVehicleBuilder.createController(model_server, config.autopilot_config, bus).get();
eeVehicleBuilder.createController(model_server, AUTOPILOT_CONFIG, bus);
PhysicalVehicleBuilder physicalVehicleBuilder = getVehicleBuilder(config.physics_model);
Vehicle simVehicle = new Vehicle(physicalVehicleBuilder ,eeVehicleBuilder);
......@@ -81,7 +82,7 @@ public class VehicleBuilder {
StaticPlannedTrajectoryXSensor plannedX = (StaticPlannedTrajectoryXSensor) simVehicle.getEEVehicle().getSensorByType(BusEntry.PLANNED_TRAJECTORY_X).get();
plannedX.initializeTrajectory(trajectoryCoordinates.get("x"));
StaticPlannedTrajectoryXSensor plannedY = (StaticPlannedTrajectoryXSensor) simVehicle.getEEVehicle().getSensorByType(BusEntry.PLANNED_TRAJECTORY_Y).get();
StaticPlannedTrajectoryYSensor plannedY = (StaticPlannedTrajectoryYSensor) simVehicle.getEEVehicle().getSensorByType(BusEntry.PLANNED_TRAJECTORY_Y).get();
plannedY.initializeTrajectory(trajectoryCoordinates.get("Y"));
result.register_car(physicalVehicle.getId(), config.name, config.config, trajectory);
......
......@@ -60,7 +60,11 @@ public class VehicleConfig {
for (Map.Entry<String, JsonValue> entry : auto.entrySet()){
if (entry.getValue().getValueType() == JsonValue.ValueType.STRING){
autopilot_config += entry.getKey() + "=" + ((JsonString) entry.getValue()).getString() + "\n";
} else {
}
// else if(entry.getValue().getValueType() == JsonValue.ValueType.TRUE) {
// autopilot_config += entry.getKey() + "=true\n";
// }
else {
autopilot_config += entry.getKey() + "\n";
}
}
......
usage-2.png

6.51 KB

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