Commit e012fe0f authored by Benedikt Kleinmeier's avatar Benedikt Kleinmeier
Browse files

Merge branch 'master' into psychology

parents 6daae747 1a3fac8c
Pipeline #260570 passed with stages
in 153 minutes and 4 seconds
{
"name" : "Liddle_osm_v4_clone_1",
"description" : "",
"release" : "1.12",
"processWriters" : {
"files" : [ {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.EventtimePedestrianIdOutputFile",
"filename" : "postvis.traj",
"processors" : [ 1, 2 ]
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.TimestepPedestrianIdOverlapOutputFile",
"filename" : "overlap.csv",
"processors" : [ 3 ]
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.NoDataKeyOutputFile",
"filename" : "overlapCount.txt",
"processors" : [ 4 ]
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.TimestepPedestriansNearbyIdOutputFile",
"filename" : "pedsNearby.txt",
"processors" : [ 5 ]
} ],
"processors" : [ {
"type" : "org.vadere.simulator.projects.dataprocessing.processor.FootStepProcessor",
"id" : 1
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.processor.FootStepTargetIDProcessor",
"id" : 2
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.processor.PedestrianOverlapProcessor",
"id" : 3
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.processor.NumberOverlapsProcessor",
"id" : 4,
"attributesType" : "org.vadere.state.attributes.processor.AttributesNumberOverlapsProcessor",
"attributes" : {
"pedestrianOverlapProcessorId" : 3
}
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.processor.PedestriansNearbyProcessor",
"id" : 5,
"attributesType" : "org.vadere.state.attributes.processor.AttributesPedestrianNearbyProcessor",
"attributes" : {
"maxDistanceForANearbyPedestrian" : 1.5,
"sampleEveryNthStep" : 1,
"allowedAbsenceTimestepsIfContactReturns" : 2,
"minTimespanOfContactTimesteps" : 5,
"printContactTrajectories" : false,
"printForPostVis" : false
}
} ],
"isTimestamped" : true,
"isWriteMetaData" : false
},
"scenario" : {
"mainModel" : "org.vadere.simulator.models.osm.OptimalStepsModel",
"attributesModel" : {
"org.vadere.state.attributes.models.AttributesOSM" : {
"stepCircleResolution" : 4,
"numberOfCircles" : 1,
"optimizationType" : "NELDER_MEAD",
"varyStepDirection" : false,
"movementType" : "ARBITRARY",
"stepLengthIntercept" : 0.4625,
"stepLengthSlopeSpeed" : 0.2345,
"stepLengthSD" : 0.036,
"movementThreshold" : 0.0,
"minStepLength" : 0.1,
"minimumStepLength" : true,
"maxStepDuration" : 1.7976931348623157E308,
"dynamicStepLength" : true,
"updateType" : "EVENT_DRIVEN",
"seeSmallWalls" : false,
"targetPotentialModel" : "org.vadere.simulator.models.potential.fields.PotentialFieldTargetGrid",
"pedestrianPotentialModel" : "org.vadere.simulator.models.potential.PotentialFieldPedestrianCompactSoftshell",
"obstaclePotentialModel" : "org.vadere.simulator.models.potential.PotentialFieldObstacleCompactSoftshell",
"submodels" : [ ]
},
"org.vadere.state.attributes.models.AttributesPotentialCompactSoftshell" : {
"pedPotentialIntimateSpaceWidth" : 1.5,
"pedPotentialPersonalSpaceWidth" : 2.25,
"pedPotentialHeight" : 200.0,
"obstPotentialWidth" : 0.8,
"obstPotentialHeight" : 6.0,
"intimateSpaceFactor" : 1.2,
"personalSpacePower" : 1,
"intimateSpacePower" : 1
},
"org.vadere.state.attributes.models.AttributesFloorField" : {
"createMethod" : "HIGH_ACCURACY_FAST_MARCHING",
"potentialFieldResolution" : 0.1,
"obstacleGridPenalty" : 0.1,
"targetAttractionStrength" : 1.0,
"cacheType" : "NO_CACHE",
"cacheDir" : "",
"timeCostAttributes" : {
"standardDeviation" : 0.7,
"type" : "UNIT",
"obstacleDensityWeight" : 3.5,
"pedestrianSameTargetDensityWeight" : 3.5,
"pedestrianOtherTargetDensityWeight" : 3.5,
"pedestrianWeight" : 3.5,
"queueWidthLoading" : 1.0,
"pedestrianDynamicWeight" : 6.0,
"loadingType" : "CONSTANT",
"width" : 0.2,
"height" : 1.0
}
}
},
"attributesSimulation" : {
"finishTime" : 60.0,
"simTimeStepLength" : 0.4,
"realTimeSimTimeRatio" : 0.5,
"writeSimulationData" : true,
"visualizationEnabled" : true,
"printFPS" : false,
"digitsPerCoordinate" : 2,
"useFixedSeed" : false,
"fixedSeed" : 1,
"simulationSeed" : 0
},
"attributesPsychology" : {
"usePsychologyLayer" : false,
"psychologyLayer" : {
"perception" : "SimplePerceptionModel",
"cognition" : "CooperativeCognitionModel"
}
},
"topography" : {
"attributes" : {
"bounds" : {
"x" : 0.0,
"y" : 0.0,
"width" : 40.0,
"height" : 15.0
},
"boundingBoxWidth" : 0.5,
"bounded" : true,
"referenceCoordinateSystem" : null
},
"obstacles" : [ {
"shape" : {
"x" : 3.0,
"y" : 9.0,
"width" : 5.0,
"height" : 6.0,
"type" : "RECTANGLE"
},
"id" : 1
}, {
"shape" : {
"x" : 3.0,
"y" : 0.0,
"width" : 5.0,
"height" : 8.0,
"type" : "RECTANGLE"
},
"id" : 2
} ],
"measurementAreas" : [ {
"shape" : {
"x" : 8.5,
"y" : 6.0,
"width" : 1.0,
"height" : 3.0,
"type" : "RECTANGLE"
},
"id" : 1
}, {
"shape" : {
"x" : 8.0,
"y" : 5.6,
"width" : 2.0,
"height" : 4.0,
"type" : "RECTANGLE"
},
"id" : 2
} ],
"stairs" : [ ],
"targets" : [ {
"id" : 1,
"absorbing" : true,
"shape" : {
"x" : 1.0,
"y" : 6.8,
"width" : 1.4,
"height" : 1.4,
"type" : "RECTANGLE"
},
"waitingTime" : 0.0,
"waitingTimeYellowPhase" : 0.0,
"parallelWaiters" : 0,
"individualWaiting" : true,
"deletionDistance" : 0.1,
"startingWithRedLight" : false,
"nextSpeed" : -1.0
} ],
"targetChangers" : [ ],
"absorbingAreas" : [ ],
"sources" : [ {
"id" : 3,
"shape" : {
"x" : 19.0,
"y" : 1.0,
"width" : 20.0,
"height" : 13.0,
"type" : "RECTANGLE"
},
"interSpawnTimeDistribution" : "org.vadere.state.scenario.ConstantDistribution",
"distributionParameters" : [ 1.0 ],
"spawnNumber" : 70,
"maxSpawnNumberTotal" : -1,
"startTime" : 0.0,
"endTime" : 0.0,
"spawnAtRandomPositions" : true,
"spawnAtGridPositionsCA" : false,
"useFreeSpaceOnly" : true,
"targetIds" : [ 1 ],
"groupSizeDistribution" : [ 1.0 ],
"dynamicElementType" : "PEDESTRIAN",
"attributesPedestrian" : null
} ],
"dynamicElements" : [ ],
"attributesPedestrian" : {
"radius" : 0.195,
"densityDependentSpeed" : false,
"speedDistributionMean" : 1.34,
"speedDistributionStandardDeviation" : 0.26,
"minimumSpeed" : 0.01,
"maximumSpeed" : 5.0,
"acceleration" : 2.0,
"footstepHistorySize" : 4,
"searchRadius" : 1.0,
"walkingDirectionCalculation" : "BY_TARGET_CENTER",
"walkingDirectionSameIfAngleLessOrEqual" : 45.0
},
"teleporter" : null,
"attributesCar" : null
},
"stimulusInfos" : [ ]
}
}
\ No newline at end of file
...@@ -225,6 +225,8 @@ SettingsDialog.chbShowPedestrianIds.text=Show PedestrianIds ...@@ -225,6 +225,8 @@ SettingsDialog.chbShowPedestrianIds.text=Show PedestrianIds
SettingsDialog.chbShowPedestrianInOutGroup.text=Show Pedestrian In/Outgroup SettingsDialog.chbShowPedestrianInOutGroup.text=Show Pedestrian In/Outgroup
PostVis.chShowEvacTimeColor.text=Coloring by Evacuation Times PostVis.chShowEvacTimeColor.text=Coloring by Evacuation Times
PostVis.chShowCriteriaColor.text=Coloring by Predicate PostVis.chShowCriteriaColor.text=Coloring by Predicate
PostVis.ShowContactsErrorMessage.text=Contacts were not processed for this scenario. To process contacts for scenarios add PedestriansNearbyProcessor and a corresponding file contacts.txt to data output.
PostVis.additional.border.text=PostVis PostVis.additional.border.text=PostVis
PostVis.btnPlay.tooltip=Play (Space) PostVis.btnPlay.tooltip=Play (Space)
...@@ -311,6 +313,7 @@ SettingsDialog.chbLogo.text=Show the Vadere logo ...@@ -311,6 +313,7 @@ SettingsDialog.chbLogo.text=Show the Vadere logo
ProjectView.btnShowWalkingDirection.tooltip=Show the walking direction of all pedestrians ProjectView.btnShowWalkingDirection.tooltip=Show the walking direction of all pedestrians
ProjectView.btnShowGroupInformation.tooltip=Draw pedestrians within one group with same shape and color ProjectView.btnShowGroupInformation.tooltip=Draw pedestrians within one group with same shape and color
ProjectView.btnShowPedestrian.tooltip=Show Pedestrians ProjectView.btnShowPedestrian.tooltip=Show Pedestrians
ProjectView.btnShowContacts.tooltip=Show Contacts
ProjectView.btnShowPotentialfield.tooltip=Show Potential Field (only possible after adding potential field file) ProjectView.btnShowPotentialfield.tooltip=Show Potential Field (only possible after adding potential field file)
ProjectView.btnShowTrajectories.tooltip=Show Trajectories ProjectView.btnShowTrajectories.tooltip=Show Trajectories
ProjectView.btnShowGrid.tooltip=Show Grid ProjectView.btnShowGrid.tooltip=Show Grid
......
...@@ -33,6 +33,7 @@ public class DefaultSimulationConfig extends DefaultConfig { ...@@ -33,6 +33,7 @@ public class DefaultSimulationConfig extends DefaultConfig {
private boolean showStairs = true; private boolean showStairs = true;
private boolean showPedestrians = true; private boolean showPedestrians = true;
private boolean showContacts = true; private boolean showContacts = true;
private boolean contactsRecorded = false;
private boolean showWalkdirection = false; private boolean showWalkdirection = false;
private boolean showTargetPotentialField = false; private boolean showTargetPotentialField = false;
private boolean showTargetPotentielFieldMesh = false; private boolean showTargetPotentielFieldMesh = false;
...@@ -109,6 +110,13 @@ public class DefaultSimulationConfig extends DefaultConfig { ...@@ -109,6 +110,13 @@ public class DefaultSimulationConfig extends DefaultConfig {
return showContacts; return showContacts;
} }
public boolean isContactsRecorded() {
return contactsRecorded;
}
public void setContactsRecorded(boolean contactsRecorded) {
this.contactsRecorded = contactsRecorded;
}
public boolean isShowWalkdirection() { public boolean isShowWalkdirection() {
return showWalkdirection; return showWalkdirection;
......
...@@ -222,27 +222,22 @@ public class OnlineVisualisationWindow extends JPanel implements Observer { ...@@ -222,27 +222,22 @@ public class OnlineVisualisationWindow extends JPanel implements Observer {
mainPanel.addRendererChangeListener(generateINETenv); mainPanel.addRendererChangeListener(generateINETenv);
mainPanel.addRendererChangeListener(showPotentialField); mainPanel.addRendererChangeListener(showPotentialField);
// Pedestrian-related options
SwingUtils.addActionToToolbar(toolbar, paintPedestriansAction, SwingUtils.addActionToToolbar(toolbar, paintPedestriansAction, Messages.getString("ProjectView.btnShowPedestrian.tooltip"));
Messages.getString("ProjectView.btnShowPedestrian.tooltip")); SwingUtils.addActionToToolbar(toolbar, paintTrajectories, Messages.getString("ProjectView.btnShowTrajectories.tooltip"));
SwingUtils.addActionToToolbar(toolbar, paintTrajectories, SwingUtils.addActionToToolbar(toolbar, paintArrowAction, Messages.getString("ProjectView.btnShowWalkingDirection.tooltip"));
Messages.getString("ProjectView.btnShowTrajectories.tooltip")); SwingUtils.addActionToToolbar(toolbar, showGroupInformationAction, Messages.getString("ProjectView.btnShowGroupInformation.tooltip"));
SwingUtils.addActionToToolbar(toolbar, paintArrowAction,
Messages.getString("ProjectView.btnShowWalkingDirection.tooltip"));
SwingUtils.addActionToToolbar(toolbar, showGroupInformationAction,
Messages.getString("ProjectView.btnShowGroupInformation.tooltip"));
SwingUtils.addActionToToolbar(toolbar, drawVoronoiDiagram,
Messages.getString("ProjectView.btnDrawVoronoiDiagram.tooltip"));
SwingUtils.addActionToToolbar(toolbar, drawMesh,
Messages.getString("ProjectView.btnDrawMesh.tooltip"));
toolbar.addSeparator(); toolbar.addSeparator();
// "Measuring" tools
SwingUtils.addActionToToolbar(toolbar, drawVoronoiDiagram, Messages.getString("ProjectView.btnDrawVoronoiDiagram.tooltip"));
SwingUtils.addActionToToolbar(toolbar, drawMesh, Messages.getString("ProjectView.btnDrawMesh.tooltip"));
SwingUtils.addActionToToolbar(toolbar, paintGridAction, Messages.getString("ProjectView.btnShowGrid.tooltip")); SwingUtils.addActionToToolbar(toolbar, paintGridAction, Messages.getString("ProjectView.btnShowGrid.tooltip"));
SwingUtils.addActionToToolbar(toolbar, paintDensity, Messages.getString("ProjectView.btnShowDensity.tooltip")); SwingUtils.addActionToToolbar(toolbar, paintDensity, Messages.getString("ProjectView.btnShowDensity.tooltip"));
SwingUtils.addActionToToolbar(toolbar, showPotentialField, Messages.getString("OnlineVis.btnShowPotentialfield.tooltip"));
toolbar.addSeparator(); toolbar.addSeparator();
// Snapshot options
ArrayList<Action> imgOptions = new ArrayList<>(); ArrayList<Action> imgOptions = new ArrayList<>();
imgOptions.add(generatePNG); imgOptions.add(generatePNG);
imgOptions.add(generateSVG); imgOptions.add(generateSVG);
...@@ -253,16 +248,12 @@ public class OnlineVisualisationWindow extends JPanel implements Observer { ...@@ -253,16 +248,12 @@ public class OnlineVisualisationWindow extends JPanel implements Observer {
ActionOnlineVisMenu imgDialog = new ActionOnlineVisMenu( ActionOnlineVisMenu imgDialog = new ActionOnlineVisMenu(
"camera_menu", "camera_menu",
resources.getIcon("camera.png", iconWidth, iconHeight), imgOptions); resources.getIcon("camera.png", iconWidth, iconHeight), imgOptions);
JButton imgMenuBtn = JButton imgMenuBtn = SwingUtils.addActionToToolbar(toolbar, imgDialog, Messages.getString("ProjectView.btnSnapshot.tooltip"));
SwingUtils.addActionToToolbar(toolbar, imgDialog, Messages.getString("ProjectView.btnSnapshot.tooltip"));
imgDialog.setParent(imgMenuBtn); imgDialog.setParent(imgMenuBtn);
SwingUtils.addActionToToolbar(toolbar, showPotentialField, Messages.getString("OnlineVis.btnShowPotentialfield.tooltip"));
toolbar.add(Box.createHorizontalGlue()); toolbar.add(Box.createHorizontalGlue());
SwingUtils.addActionToToolbar(toolbar, openSettingsDialog, SwingUtils.addActionToToolbar(toolbar, openSettingsDialog, Messages.getString("ProjectView.btnSettings.tooltip"));
Messages.getString("ProjectView.btnSettings.tooltip"));
splitPaneForTopographyAndJsonPane = new JSplitPane(); splitPaneForTopographyAndJsonPane = new JSplitPane();
splitPaneForTopographyAndJsonPane.setResizeWeight(0.8); splitPaneForTopographyAndJsonPane.setResizeWeight(0.8);
......
...@@ -104,6 +104,7 @@ public class PostvisualizationModel extends SimulationModel<PostvisualizationCon ...@@ -104,6 +104,7 @@ public class PostvisualizationModel extends SimulationModel<PostvisualizationCon
this.simTimeStepLength = scenario.getAttributesSimulation().getSimTimeStepLength(); this.simTimeStepLength = scenario.getAttributesSimulation().getSimTimeStepLength();
this.trajectories = new TableTrajectoryFootStep(trajectories); this.trajectories = new TableTrajectoryFootStep(trajectories);
if (contactTrajectories != null) { if (contactTrajectories != null) {
this.config.setContactsRecorded(true);
this.contactData = new ContactData(contactTrajectories); this.contactData = new ContactData(contactTrajectories);
} }
this.visTime = 0; this.visTime = 0;
......
...@@ -2,42 +2,34 @@ package org.vadere.gui.postvisualization.view; ...@@ -2,42 +2,34 @@ package org.vadere.gui.postvisualization.view;
import org.vadere.gui.components.view.DefaultRenderer; import org.vadere.gui.components.view.DefaultRenderer;
import org.vadere.gui.components.view.SimulationRenderer; import org.vadere.gui.components.view.SimulationRenderer;
import org.vadere.gui.postvisualization.model.ContactData;
import org.vadere.gui.postvisualization.model.PostvisualizationModel; import org.vadere.gui.postvisualization.model.PostvisualizationModel;
import org.vadere.gui.postvisualization.model.TableTrajectoryFootStep; import org.vadere.gui.postvisualization.model.TableTrajectoryFootStep;
import org.vadere.gui.renderer.agent.AgentRender; import org.vadere.gui.renderer.agent.AgentRender;
import org.vadere.state.scenario.Pedestrian; import org.vadere.state.scenario.Pedestrian;
import org.vadere.state.simulation.FootStep; import org.vadere.state.simulation.FootStep;
import org.vadere.util.geometry.shapes.VPoint; import org.vadere.util.geometry.shapes.VPoint;
import org.vadere.util.logging.Logger; import tech.tablesaw.api.Row;
import org.vadere.util.visualization.ColorHelper; import tech.tablesaw.api.Table;
import java.awt.*; import java.awt.*;
import java.awt.geom.Path2D; import java.awt.geom.Path2D;
import java.util.*; import java.util.Collection;
import java.util.List; import java.util.HashMap;
import java.util.Map;
import tech.tablesaw.api.Row;
import tech.tablesaw.api.Table;
public class PostvisualizationRenderer extends SimulationRenderer { public class PostvisualizationRenderer extends SimulationRenderer {
private static final double MIN_ARROW_LENGTH = 0.1; private static final double MIN_ARROW_LENGTH = 0.1;
private static Logger logger = Logger.getLogger(PostvisualizationRenderer.class);
private PostvisualizationModel model; private PostvisualizationModel model;
private final Map<Integer, VPoint> lastPedestrianPositions; private final Map<Integer, VPoint> lastPedestrianPositions;
private final Map<Integer, VPoint> pedestrianDirections; private final Map<Integer, VPoint> pedestrianDirections;
private ColorHelper colorHelper;
public PostvisualizationRenderer(final PostvisualizationModel model) { public PostvisualizationRenderer(final PostvisualizationModel model) {
super(model); super(model);
this.model = model; this.model = model;
this.pedestrianDirections = new HashMap<>(); this.pedestrianDirections = new HashMap<>();
this.lastPedestrianPositions = new HashMap<>(); this.lastPedestrianPositions = new HashMap<>();
this.colorHelper = new ColorHelper(model.getStepCount());
} }
public PostvisualizationModel getModel() { public PostvisualizationModel getModel() {
...@@ -46,81 +38,40 @@ public class PostvisualizationRenderer extends SimulationRenderer { ...@@ -46,81 +38,40 @@ public class PostvisualizationRenderer extends SimulationRenderer {
@Override @Override
protected void renderSimulationContent(final Graphics2D g) { protected void renderSimulationContent(final Graphics2D g) {
this.colorHelper = new ColorHelper(model.getStepCount());
renderPedestrians(g, null);
}
private void renderPedestrians(final Graphics2D g, final Color color) {
if (!model.isEmpty()) { if (!model.isEmpty()) {
renderTrajectories(g); Color savedColor = g.getColor();
if (model.config.isShowContacts() && model.getContactData() != null) {
renderConnectingLinesByContact(g);
}
}
}
private void renderConnectingLinesByContact(Graphics2D g) {
if (!model.config.isShowAllTrajectories()) return;
Color color = g.getColor();
Stroke stroke = g.getStroke();
g.setStroke(new BasicStroke(getLineWidth() / 4.0f));
g.setColor(Color.red);
Collection<Pedestrian> agents = model.getPedestrians();
Map<Integer, VPoint> pedPositions = new HashMap<>();
agents.forEach(a -> pedPositions.put(a.getId(), a.getPosition()));
Table pairs = model.getContactData().getPairsOfPedestriansInContactAt(model.getSimTimeInSec());
for (Row row: pairs) {
int id1 = row.getInt(0);
int id2 = row.getInt(1);
VPoint ped1Pos = pedPositions.get(id1);
VPoint ped2Pos = pedPositions.get(id2);
Path2D.Double path = new Path2D.Double();
path.moveTo(ped1Pos.x, ped1Pos.y);
path.lineTo(ped2Pos.x, ped2Pos.y);
draw(path, g);
// paint agents in contact red
if (model.config.isShowPedestrians()) {
agents.stream().filter(a -> a.getId() == id1 || a.getId() == id2).forEach(a -> getAgentRender().render(a, Color.red, g));
}
}
g.setStroke(stroke); Table slice = (model.config.isShowAllTrajectories()) ? model.getAppearedPedestrians() : model.getAlivePedestrians() ;
g.setColor(color); Collection<Pedestrian> pedestrians = model.getPedestrians();
}
private void renderTrajectories(final Graphics2D g) { Map<Integer, Color> pedestrianColors = new HashMap<>();
Color color = g.getColor(); pedestrians.forEach(ped -> pedestrianColors.put(ped.getId(), getPedestrianColor(ped)));
AgentRender agentRender = getAgentRender();
// sorted (by ped id) agent table renderTrajectories(g, slice, pedestrianColors);
TableTrajectoryFootStep trajectories = model.getTrajectories(); renderPedestrians(g, pedestrians, pedestrianColors);
renderConnectingLinesByContact(g);
Table slice; g.setColor(savedColor);
if (model.config.isShowAllTrajectories()) {
slice = model.getAppearedPedestrians();
} else {
slice = model.getAlivePedestrians();
} }
}
Collection<Pedestrian> agents = model.getPedestrians(); private void renderTrajectories(Graphics2D g, Table slice, Map<Integer, Color> pedestrianColors) {
Map<Integer, Color> agentColors = new HashMap<>(); Color savedColor = g.getColor();
agents.forEach(agent -> agentColors.put(agent.getId(), getPedestrianColor(agent))); Stroke savedStroke = g.getStroke();
TableTrajectoryFootStep trajectories = model.getTrajectories();
Color c = g.getColor();
Stroke stroke = g.getStroke();
if (model.config.isShowTrajectories()) { if (model.config.isShowTrajectories()) {
for (Row row : slice) { for(Row row : slice) {
boolean isLastStep = row.getDouble(trajectories.endTimeCol) > model.getSimTimeInSec(); boolean isLastStep = row.getDouble(trajectories.endTimeCol) > model.getSimTimeInSec();
double startX = row.getDouble(trajectories.startXCol); double startX = row.getDouble(trajectories.startXCol);
double startY = row.getDouble(trajectories.startYCol); double startY = row.getDouble(trajectories.startYCol);
double endX = row.getDouble(trajectories.endXCol); double endX = row.getDouble(trajectories.endXCol);
double endY = row.getDouble(trajectories.endYCol); double endY = row.getDouble(trajectories.endYCol);
if (isLastStep && model.config.isInterpolatePositions()) { if(isLastStep && model.config.isInterpolatePositions()) {
VPoint interpolatedPos = FootStep.interpolateFootStep(startX, startY, endX, endY, row.getDouble(trajectories.startTimeCol), row.getDouble(trajectories.endTimeCol), model.getSimTimeInSec()); VPoint interpolatedPos = FootStep.interpolateFootStep(startX, startY, endX, endY, row.getDouble(trajectories.startTimeCol), row.getDouble(trajectories.endTimeCol), model.getSimTimeInSec());
endX = interpolatedPos.getX(); endX = interpolatedPos.getX();
endY = interpolatedPos.getY(); endY = interpolatedPos.getY();
...@@ -132,11 +83,11 @@ public class PostvisualizationRenderer extends SimulationRenderer { ...@@ -132,11 +83,11 @@ public class PostvisualizationRenderer extends SimulationRenderer {
g.setColor(Color.MAGENTA); g.setColor(Color.MAGENTA);
g.setStroke(new BasicStroke(getLineWidth() / 2.0f)); g.setStroke(new BasicStroke(getLineWidth() / 2.0f));
} else { } else {