Skip to content

Future foot steps in (new) PedestrianPositionProcessor

@BZoennchen @hm-kleinmei

There seems to be an issue with syncing FootStep events and simulation time in "OSM+Events" and "BHM".

For tests that currently fail, see https://gitlab.lrz.de/vadere/vadere/-/jobs/612770) with branch !83 (merged) : In the new way to interpolate the agent position exceptions like these occur:

java.lang.IllegalArgumentException: Requested time 0.4 outside of FootSteps [start=0.955911741965755, end=1.5118234839315101] time (no extrapolation!).

This means: the simulation state has a time (in seconds) of 0.4 (i.e. when the data processor collects data), but the pedestrian has already a future foot step with starting time 0.95 and end time at 1.51. I suspect that also a "getPosition()" (old way and not interpolating positions) would get such a future position (i.e. wrong for time 0.4) of the agent?

On the branch:

  • in PedstrianPositionProcessor
double simTime = state.getSimTimeInSec();

for (Pedestrian pedestrian : pedestrians){
	VPoint interpolatedPoint = pedestrian.getInterpolatedFootStepPosition(simTime);
	this.putValue(new TimestepPedestrianIdKey(timeStep, pedestrian.getId()), interpolatedPoint);
}
  • in Pedestrian
public VPoint getInterpolatedFootStepPosition(double time){
	if(currentFootStep == null){
		return getPosition();
	}else{
		if(time > currentFootStep.getEndTime()){
			// This happens for example if a pedestrian is waiting (see Events)
			// TODO: check with Bene K. if this is okay, or a better way?
			return currentFootStep.getEnd();
		}else{
			return FootStep.interpolateFootStep(currentFootStep, time);
		}
	}
}
  • in FootStep.interpolateFootStep() where error is raised:
if(startTime > time || endTime < time){
	throw new IllegalArgumentException("Requested time " + time + " outside of FootSteps [start=" + startTime +
			", end=" + endTime + "] time (no extrapolation!).");

}

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information