Commit 34729e0f authored by Stefan Schuhbaeck's avatar Stefan Schuhbaeck
Browse files

python based TraCI client for vadere.

main author hm-schuegra

[misc] apply styleguide to VadereManager module
[misc] autopep vadere-lauchner.py
[pythontraciwrapper] Added second start method to Py4jClient
[pythontraciwrapper] Adding PythonTraCIWrapper to tools with git subtree
[pythontraciwrapper] Extending pythontraciwrapper
[pythontraciwrapper] Implemented _polygonapi_wrapper
[pythontraciwrapper] Implemented a basic py4j client
[pythontraciwrapper] Implemented pytraci controll commands
[pythontraciwrapper] Improving py4j client
[pythontraciwrapper] Move Py4jClient to pythontraciwrapper
[pythontraciwrapper] Removing PythonTraCIWrapper from tools
[pythontraciwrapper] Skeleton py4j TraCI Wrapper
[pythontraciwrapper] apply code formatting
[pythontraciwrapper] set version to 0.2
[pythontraciwrapper] use list in subprocess instead of string. fix for
linux.
[TraCI] Adapt new createNew such that it uses the type of the peds in
the simulation when reading the minimal attributes from JSON
[TraCI] Add new start method to client to access sendFileFromPath via
the Py4j wrapper
[TraCI] Add processors to scenario
[TraCI] Added scenarios for ReinforcementLearning
[TraCI] Allow multiple py4j clients to interact with vadere via traci,
each client having its own manager
[TraCI] Annotated some methods of polygonapi
[TraCI] Automated start of manager and entrypoint in Py4jClient just for
developement.
[TraCI] Extending personapi on python side
[TraCI] Find explanation for redundant command identifier byte in
getVersion
[TraCI] Fix bug in createTargetChanger builder
[TraCI] Fix bug in poly.getIDList
[TraCI] Fix getVersion bug
[TraCI] Fix tests
[TraCI] Implement more tests
[TraCI] Implement pers.getMaximumSpeed
[TraCI] Implement pers.getVelocity
[TraCI] Implement poly.getTopographyBounds # Conflicts: #
Tools/PythonTraCIWrapper/pythontraciwrapper/_personapi_wrapper.py
[TraCI] Implement some tests for setters, extend tests for getters by
one check
[TraCI] Implemented createWaitingArea for traci, Example command from
TestClient sim.createWaitingArea 6 0.0 3.0 1 0.5 10.0 6.0 3.0 8.0 3.0
8.0 0.5 6.0 0.5
[TraCI] Implemented getSimTime for python wrapper
[TraCI] Implemented getter and setter for nextTargetListIndex to make a
workaround Issue #285 of possible
[TraCI] Implemented getter for hasNextTarget
[TraCI] Implemented poly.getCentroid, implemented poly.getDistance with
a workaround
[TraCI] Implemented py4j-wrapper for getter and setter of
nextTargetListIndex
[TraCI] Implemented setStimulusInfo, removed add/remove WaitingArea
[TraCI] Implemented some methods of traci polygonapi
[TraCI] Implemented some tests
[TraCI] Integrated VadereAPI
[TraCI] Kill entrypoint process when python program terminates with
atexit
[TraCI] Made py4j_client take either the parsed args or the raw args
from the command line from the instantiator.
[TraCI] Make createTargetChanger take json
[TraCI] Make sendFile more flexible
[TraCI] Make sendFileFromPath public to make API more flexible
[TraCI] Make test for process_getCacheHash platform independent
[TraCI] Move argParsing to py4j_client in the pythontraciwrapper
package.
[TraCI] Parameterised port of TraCIEntryPoint
[TraCI] Refactor tests, implement new tests
[TraCI] Refactored poly.getDistance
[TraCI] Refactoring
[TraCI] Refactoring & fixing a bug in client-side of removeTargetChanger
and removeWaitingArea
[TraCI] Refactoring VadereApi
[TraCI] Removed hard-coded path and port number, inserted a check into
test of process_getCacheHash
[TraCI] Removed hard-coded paths from TraCIEntryPoint
[TraCI] Resolving some problems in the python interface
[TraCI] Test process_getCacheHash
[TraCI] WIP reimplementing Polygon Api
[TraCI] Workaround for ctr.getVersion bug
[TraCI] Working on traci controll commands for python client
[TraCI] add generic Json compound object
[TraCI] create and add TargetChangerController process_addTargetChanger
[TraCI] wrote test for getAllStimulusInfos
[ReinforcementLearning] Adding scenarios with small crowd
[ReinforcementLearning] Increase number of targets.
[ReinforcementLearning]Add scenario as demo and test case for
parent 039a59e0
......@@ -5,6 +5,8 @@
bin/
swing-inspector-linux-1.2.3/
target/
javac.*.args
# C extensions
*.so
......
{
"name" : "DenseCrowd_withoutGroups_largeTargets_2_waiting",
"description" : "",
"release" : "1.7",
"processWriters" : {
"files" : [ {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.EventtimePedestrianIdOutputFile",
"filename" : "postvis.traj",
"processors" : [ ]
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.TimestepPedestrianIdOverlapOutputFile",
"filename" : "overlaps.csv",
"processors" : [ ]
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.NoDataKeyOutputFile",
"filename" : "overlapCount.txt",
"processors" : [ ]
} ],
"processors" : [ ],
"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" : true,
"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" : 0.45,
"pedPotentialPersonalSpaceWidth" : 1.2,
"pedPotentialHeight" : 50.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" : 75000.0,
"simTimeStepLength" : 0.4,
"realTimeSimTimeRatio" : 0.1,
"writeSimulationData" : true,
"visualizationEnabled" : true,
"printFPS" : false,
"digitsPerCoordinate" : 2,
"useFixedSeed" : true,
"fixedSeed" : 8308904834634447585,
"simulationSeed" : 0
},
"attributesPsychology" : {
"usePsychologyLayer" : false,
"psychologyLayer" : {
"perception" : "SimplePerceptionModel",
"cognition" : "CooperativeCognitionModel"
}
},
"topography" : {
"attributes" : {
"bounds" : {
"x" : 0.0,
"y" : 0.0,
"width" : 3.0,
"height" : 10.0
},
"boundingBoxWidth" : 0.5,
"bounded" : true,
"referenceCoordinateSystem" : null
},
"obstacles" : [ ],
"measurementAreas" : [ ],
"stairs" : [ ],
"targets" : [ {
"id" : 1,
"absorbing" : false,
"shape" : {
"x" : 0.6690997566909975,
"y" : 8.832116788321168,
"width" : 1.6909975669099757,
"height" : 0.5178832116788321,
"type" : "RECTANGLE"
},
"waitingTime" : 0.0,
"waitingTimeYellowPhase" : 0.0,
"parallelWaiters" : 0,
"individualWaiting" : true,
"deletionDistance" : 0.1,
"startingWithRedLight" : false,
"nextSpeed" : -1.0
}, {
"id" : 3,
"absorbing" : false,
"shape" : {
"x" : 1.9494584837545128,
"y" : 7.412755716004813,
"width" : 0.5505415162454872,
"height" : 0.5872442839951866,
"type" : "RECTANGLE"
},
"waitingTime" : 0.0,
"waitingTimeYellowPhase" : 0.0,
"parallelWaiters" : 0,
"individualWaiting" : true,
"deletionDistance" : 0.1,
"startingWithRedLight" : false,
"nextSpeed" : -1.0
}, {
"id" : 7,
"absorbing" : false,
"shape" : {
"x" : 1.9855595667870038,
"y" : 5.0,
"width" : 0.5144404332129962,
"height" : 0.5475330926594459,
"type" : "RECTANGLE"
},
"waitingTime" : 0.0,
"waitingTimeYellowPhase" : 0.0,
"parallelWaiters" : 0,
"individualWaiting" : true,
"deletionDistance" : 0.1,
"startingWithRedLight" : false,
"nextSpeed" : -1.0
}, {
"id" : 5,
"absorbing" : false,
"shape" : {
"x" : 0.5,
"y" : 6.0,
"width" : 0.4565217391304348,
"height" : 0.6787003610108302,
"type" : "RECTANGLE"
},
"waitingTime" : 0.0,
"waitingTimeYellowPhase" : 0.0,
"parallelWaiters" : 0,
"individualWaiting" : true,
"deletionDistance" : 0.1,
"startingWithRedLight" : false,
"nextSpeed" : -1.0
}, {
"id" : 2,
"absorbing" : false,
"shape" : {
"x" : 0.5,
"y" : 7.40072202166065,
"width" : 0.6191335740072204,
"height" : 0.5992779783393498,
"type" : "RECTANGLE"
},
"waitingTime" : 0.0,
"waitingTimeYellowPhase" : 0.0,
"parallelWaiters" : 0,
"individualWaiting" : true,
"deletionDistance" : 0.1,
"startingWithRedLight" : false,
"nextSpeed" : -1.0
}, {
"id" : 6,
"absorbing" : false,
"shape" : {
"x" : 0.5,
"y" : 5.0,
"width" : 0.4747292418772564,
"height" : 0.5234657039711186,
"type" : "RECTANGLE"
},
"waitingTime" : 0.0,
"waitingTimeYellowPhase" : 0.0,
"parallelWaiters" : 0,
"individualWaiting" : true,
"deletionDistance" : 0.1,
"startingWithRedLight" : false,
"nextSpeed" : -1.0
}, {
"id" : 4,
"absorbing" : false,
"shape" : {
"x" : 1.9253910950661854,
"y" : 6.0,
"width" : 0.5746089049338146,
"height" : 0.7027677496991576,
"type" : "RECTANGLE"
},
"waitingTime" : 0.0,
"waitingTimeYellowPhase" : 0.0,
"parallelWaiters" : 0,
"individualWaiting" : true,
"deletionDistance" : 0.1,
"startingWithRedLight" : false,
"nextSpeed" : -1.0
} ],
"targetChangers" : [ ],
"absorbingAreas" : [ ],
"sources" : [ {
"id" : 2,
"shape" : {
"x" : 0.6204379562043796,
"y" : 0.75,
"width" : 1.8004866180048662,
"height" : 0.5881995133819959,
"type" : "RECTANGLE"
},
"interSpawnTimeDistribution" : "org.vadere.state.scenario.ConstantDistribution",
"distributionParameters" : [ 1.0 ],
"spawnNumber" : 1,
"maxSpawnNumberTotal" : -1,
"startTime" : 0.0,
"endTime" : 0.0,
"spawnAtRandomPositions" : false,
"useFreeSpaceOnly" : true,
"targetIds" : [ 1 ],
"groupSizeDistribution" : [ 1.0 ],
"dynamicElementType" : "PEDESTRIAN"
} ],
"dynamicElements" : [ {
"attributes" : {
"id" : 2,
"radius" : 0.2,
"densityDependentSpeed" : false,
"speedDistributionMean" : 1.34,
"speedDistributionStandardDeviation" : 0.26,
"minimumSpeed" : 0.5,
"maximumSpeed" : 2.2,
"acceleration" : 2.0,
"footstepHistorySize" : 10,
"searchRadius" : 1.0,
"walkingDirectionCalculation" : "BY_TARGET_CENTER",
"walkingDirectionSameIfAngleLessOrEqual" : 45.0
},
"source" : null,
"targetIds" : [ ],
"nextTargetListIndex" : 0,
"isCurrentTargetAnAgent" : false,
"position" : {
"x" : 1.5999999999999999,
"y" : 5.5
},
"velocity" : {
"x" : 0.0,
"y" : 0.0
},
"freeFlowSpeed" : 1.5760893600169317,
"followers" : [ ],
"idAsTarget" : -1,
"isChild" : false,
"isLikelyInjured" : false,
"psychologyStatus" : {
"mostImportantStimulus" : null,
"selfCategory" : null
},
"groupIds" : [ 2 ],
"groupSizes" : [ ],
"trajectory" : {
"footSteps" : [ ]
},
"modelPedestrianMap" : null,
"type" : "PEDESTRIAN"
}, {
"attributes" : {
"id" : 3,
"radius" : 0.2,
"densityDependentSpeed" : false,
"speedDistributionMean" : 1.34,
"speedDistributionStandardDeviation" : 0.26,
"minimumSpeed" : 0.5,
"maximumSpeed" : 2.2,
"acceleration" : 2.0,
"footstepHistorySize" : 10,
"searchRadius" : 1.0,
"walkingDirectionCalculation" : "BY_TARGET_CENTER",
"walkingDirectionSameIfAngleLessOrEqual" : 45.0
},
"source" : null,
"targetIds" : [ ],
"nextTargetListIndex" : 0,
"isCurrentTargetAnAgent" : false,
"position" : {
"x" : 1.5,
"y" : 6.5
},
"velocity" : {
"x" : 0.0,
"y" : 0.0
},
"freeFlowSpeed" : 1.0636275796612462,
"followers" : [ ],
"idAsTarget" : -1,
"isChild" : false,
"isLikelyInjured" : false,
"psychologyStatus" : {
"mostImportantStimulus" : null,
"selfCategory" : null
},
"groupIds" : [ 2 ],
"groupSizes" : [ ],
"trajectory" : {
"footSteps" : [ ]
},
"modelPedestrianMap" : null,
"type" : "PEDESTRIAN"
}, {
"attributes" : {
"id" : 1,
"radius" : 0.2,
"densityDependentSpeed" : false,
"speedDistributionMean" : 1.34,
"speedDistributionStandardDeviation" : 0.26,
"minimumSpeed" : 0.5,
"maximumSpeed" : 2.2,
"acceleration" : 2.0,
"footstepHistorySize" : 10,
"searchRadius" : 1.0,
"walkingDirectionCalculation" : "BY_TARGET_CENTER",
"walkingDirectionSameIfAngleLessOrEqual" : 45.0
},
"source" : null,
"targetIds" : [ ],
"nextTargetListIndex" : 0,
"isCurrentTargetAnAgent" : false,
"position" : {
"x" : 0.8,
"y" : 6.3
},
"velocity" : {
"x" : 0.0,
"y" : 0.0
},
"freeFlowSpeed" : 1.565122045744473,
"followers" : [ ],
"idAsTarget" : -1,
"isChild" : false,
"isLikelyInjured" : false,
"psychologyStatus" : {
"mostImportantStimulus" : null,
"selfCategory" : null
},
"groupIds" : [ 2 ],
"groupSizes" : [ ],
"trajectory" : {
"footSteps" : [ ]
},
"modelPedestrianMap" : null,
"type" : "PEDESTRIAN"
} ],
"attributesPedestrian" : {
"radius" : 0.2,
"densityDependentSpeed" : false,
"speedDistributionMean" : 1.34,
"speedDistributionStandardDeviation" : 0.26,
"minimumSpeed" : 0.5,
"maximumSpeed" : 2.2,
"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
This diff is collapsed.
ReinforcementLearning
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
Markdown is supported
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