-
Notifications
You must be signed in to change notification settings - Fork 15
CompositeTechniqueEntropy
The CompositeTechniqueEntropy benchmark based off the entropy metric in the paper "A Statistical Similarity Measure for Aggregate Crowd Dynamics" by Steven J Guy. This metric provides a robust method to compare the difference between a crowd simulator and real world data (traces of real people moving).
To implement the method the systems needs to support three functionalities. 1 Needs to initialize the simulation world 1 Needs to provide a method to estimate the first timestep 1 Needs to provide a function to allow the kalman filterter the ability to simulate timesteps of the simulation. 1 Your steering algorithm needs to be super solid to handle this metric.... 1 and 2 are pretty easy 3 is something else. From my experience working with the steering algorithms from that group (RVO and ORCA) they mostly use a very lightweight simulator environment and just is a kdTree to hold agents in the simulation. Our simulation framework is quite different and requires a little more finese to get this method working.
A new Benchmark Technique (CompositeTechniqueEntropy) was created to facilitate this.
The Technique has a function for initilizing the simulator. This is differnent then the current method used where an XML testcase is provided. In this case the simulation is controlled via a trace of realWorld data.
At the time there were two methods that could be used to initilize the simulation, provide a xml that matches the initial state of the real world data or have the Technique create these things from the real world data. It was choosen to go with the second option because the Technique is going to have to control the creation and destruction of Agents eitherway because agents only exsists for a portion of the total simulation. On that regaurd what the xml testcase does need to provide is a discpription of the obstacles in the environment.
The information that describes the position of agents at particular frames needs to be captured by the Technique. This could be captured using a Matrix with rows being frames and columns being positions or with two vectors one that for each agent holds the positions of the agent as another vector and an aditional vector that keeps track of the starting frames for the agents. The second option was choosen because it is a little more robust in that the provided realworld data should not be missing agent data for a frame and if this occurs the system will handle it well by moving to the next data point.
Data format
line1: agent# frame# x y z
line2: agent# frame# x y z
The final data should be a rectangular matrix. The input data will be filtered to find the largest rectangular region maximizing the longest time the most agents are active. This can be adjusted to have a lower bound on the number of desired agents as well.
Using the Entropy metric:
Example:
This is an example command used on Linux in the steerstats folder.
../build/bin/steersim -module scenario,scenarioAI=rvo2dAI,useBenchmark,benchmarkTechnique=compositeEntropy,benchmarkLog=data//0/test.log,checkAgentValid,reducedGoals,fixedSpeed,checkAgentRelevant,minAgents=3,ailogFileName=data//0/pprAI.log,maxFrames=2000,checkAgentInteraction,egocentric,scenarioSetPath=data/RealWorldData/ou-060-180-180/,scenarioSetInitId=0,numScenarios=50,dbName=steersuitedb,skipInsert=True,RealDataName=data/RealWorldData/uo-300-300-200_combined_MB.txt,replayData,perferedNumAgents=10 -config configs/Entropy-config.xml
Some key things to note. 1 scenarioSetPath=data/RealWorldData/ou-060-180-180/testcase-0.xml needs to be set to the proper number of agents in your simulation for SteerSuite to simulate the scenario properly.*
- For now the Entropy metric simulates according the number of agents in the realWorldData. However is the number of agents in the test case file is different from this SteerSuite will crash.
1 Currently to store the simulation the scenario module needs to be used. This can be done by including ,recFile=test_rec.rec on the end the other module arguments.
Command Line Parameter | Discription |
RealDataName | Path to the file that should be used to read the Real World Data from |
perferedNumAgents | Used to assist in computing the maximal rectangle for the RealWorld data |
perferedNumFrames | Used to assist in computing the maximal rectangle for the RealWorld data |
numEntropySamples | This is the number of EM steps the Entropy metric does. If this is less than 100 the Entropy metric might crash. This is because of a poor approximation and matrix operations start to give errors. |
replayData | Simply replays the realworld data. Every agent starts out active and does not move until its proper frame number. |