Skip to content

Commit

Permalink
First full commit
Browse files Browse the repository at this point in the history
This should be all of the code and resources to build.
  • Loading branch information
seancUNC committed Oct 19, 2014
1 parent 50a761d commit 7e45a15
Show file tree
Hide file tree
Showing 886 changed files with 168,138 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
debug/
Exe/
release/
COPY.txt
*.scb
*.suo
build/
*.sdf
*.opensdf
ipch/
9 changes: 9 additions & 0 deletions examples/core/4square.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0"?>

<Project
scene="4square/4squareS.xml"
behavior="4square/4squareB.xml"
view="4square/4squareV.xml"
model="orca"
dumpPath="images/test"
/>
15 changes: 15 additions & 0 deletions examples/core/4square/4squareB.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0"?>

<BFSM>
<State name="Walk" final="0" >
<GoalSelector type="mirror" mirror_x="1" mirror_y="1"/>
<VelComponent type="goal" />
</State>
<State name="Stop" final="1" >
<GoalSelector type="identity" />
<VelComponent type="goal" />
</State>
<Transition from="Walk" to="Stop" >
<Condition type="goal_reached" distance="0.05" />
</Transition>
</BFSM>
111 changes: 111 additions & 0 deletions examples/core/4square/4squareS.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<?xml version="1.0"?>
<Experiment version="2.0">
<SpatialQuery type="kd-tree" test_visibility="false" />

<OpenSteer max_force="8" leak_through="0.1" reaction_time="0.5" />
<Common time_step="0.1" />
<GCF reaction_time="0.5" max_agent_dist="2" max_agent_force="3" agent_interp_width="0.1" nu_agent="0.35" />
<Helbing agent_scale="2000" obstacle_scale="4000" reaction_time="0.5" body_force="1200" friction="2400" force_distance="0.015" />
<Johansson agent_scale="25" obstacle_scale="35" reaction_time="0.5" force_distance="0.15" stride_time="0.5" />
<Karamouzas orient_weight="0.8" fov="200" reaction_time="0.4" wall_steepness="2" wall_distance="2" colliding_count="5" d_min="1" d_mid="8" d_max="10" agent_force="4" />
<Zanlungo agent_scale="2000" obstacle_scale="4000" reaction_time="0.5" force_distance="0.005" />
<Dummy stddev="1.0" />

<AgentProfile name="group1" >
<Common max_angle_vel="360" max_neighbors="10" obstacleSet="1" neighbor_dist="5" r="0.2" pref_speed="1.34" max_speed="2" max_accel="5" />
<OpenSteer tau="3" tauObst="6" />
<PedVO factor="1.57" buffer="0.9" tau="3" tauObst="0.1" turningBias="1.0" />
<GCF stand_depth="0.18" move_scale="0.53" slow_width="0.25" sway_change="0.05" orient_weight="0.75" />
<Helbing mass="80" />
<Johansson fov_weight="0.16" />
<Karamouzas personal_space="0.69" anticipation="8" />
<ORCA tau="3.0" tauObst="0.15" />
<Zanlungo mass="80" orient_weight="0.75" />
</AgentProfile>

<AgentProfile name="group2" inherits="group1" >
<Common class="2" />
</AgentProfile>

<AgentProfile name="group3" inherits="group1" >
<Common class="3" />
</AgentProfile>

<AgentProfile name="group4" inherits="group1" >
<Common class="4" r="0.35" >
<Property name="pref_speed" dist="c" value="0.75" />
</Common>
</AgentProfile>

<AgentGroup>
<ProfileSelector type="const" name="group1" />
<StateSelector type="const" name="Walk" />
<Generator type="rect_grid"
anchor_x="-7.3" anchor_y="-7.3"
offset_x="-1.333" offset_y="-1.333"
count_x="5" count_y="5"
displace_dist="u" displace_min="0.0" displace_max="0.25"
/>
</AgentGroup>

<AgentGroup>
<ProfileSelector type="const" name="group2" />
<StateSelector type="const" name="Walk" />
<Generator type="rect_grid"
anchor_x="7.3" anchor_y="-7.3"
offset_x="1.333" offset_y="-1.333"
count_x="5" count_y="5"
displace_dist="u" displace_min="0.0" displace_max="0.25"
/>
</AgentGroup>

<AgentGroup>
<ProfileSelector type="const" name="group3" />
<StateSelector type="const" name="Walk" />
<Generator type="rect_grid"
anchor_x="-7.3" anchor_y="7.3"
offset_x="-1.333" offset_y="1.333"
count_x="5" count_y="5"
displace_dist="u" displace_min="0.0" displace_max="0.25"
/>
</AgentGroup>

<AgentGroup>
<ProfileSelector type="const" name="group4" />
<StateSelector type="const" name="Walk" />
<Generator type="rect_grid"
anchor_x="7.3" anchor_y="7.3"
offset_x="1.333" offset_y="1.333"
count_x="5" count_y="5"
displace_dist="u" displace_min="0.0" displace_max="0.25"
/>
</AgentGroup>

<ObstacleSet type="explicit" class="1">
<Obstacle closed="1" >
<Vertex p_x = "1.333" p_y = "1.333"/>
<Vertex p_x = "5.333" p_y = "1.333"/>
<Vertex p_x = "5.333" p_y = "5.333"/>
<Vertex p_x = "1.333" p_y = "5.333"/>
</Obstacle>
<Obstacle closed="1" >
<Vertex p_x = "-5.333" p_y = "1.333"/>
<Vertex p_x = "-1.333" p_y = "1.333"/>
<Vertex p_x = "-1.333" p_y = "5.333"/>
<Vertex p_x = "-5.333" p_y = "5.333"/>
</Obstacle>
<Obstacle closed="1" >
<Vertex p_x = "-5.333" p_y = "-5.333"/>
<Vertex p_x = "-1.333" p_y = "-5.333"/>
<Vertex p_x = "-1.333" p_y = "-1.333"/>
<Vertex p_x = "-5.333" p_y = "-1.333"/>
</Obstacle>
<Obstacle closed="1" >
<Vertex p_x = "1.333" p_y = "-5.333"/>
<Vertex p_x = "5.333" p_y = "-5.333"/>
<Vertex p_x = "5.333" p_y = "-1.333"/>
<Vertex p_x = "1.333" p_y = "-1.333"/>
</Obstacle>
</ObstacleSet>

</Experiment>
16 changes: 16 additions & 0 deletions examples/core/4square/4squareV.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0"?>

<View width="640" height="480" >
<!-- Multiple cameras are mapped to a key from 1-9 in the order they are defined here -->
<Camera xpos="0" ypos="270.172" zpos="0.01" xtgt="0" ytgt="0" ztgt="0" far="600" near="0.01" fov="0.0" orthoScale="7.14431" />
<Camera xpos="-5.65128" ypos="9.79036" zpos="19.2892" xtgt="0" ytgt="0" ztgt="0" far="600" near="0.01" fov="45" />

<!-- Comment out lights for a constant-illuminated visualization -->
<Light x="1" y="0" z="-1" type="directional" diffR="1.0" diffG="0.8" diffB="0.8" space="camera"/>
<Light x="-1" y="0" z="-1" type="directional" diffR="0.8" diffG="0.8" diffB="1.0" space="camera"/>
<Light x="0" y="1" z="0" type="directional" diffR="0.8" diffG="0.8" diffB="0.8" space="world"/>

<Watermark file_name="mengeLogo.png" alignment="bottom_right" scale="0.5" opacity="0.25"/>


</View>
9 changes: 9 additions & 0 deletions examples/core/boolean.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0"?>

<Project
scene="boolean/booleanS.xml"
behavior="boolean/booleanB.xml"
view="boolean/booleanV.xml"
model="orca"
dumpPath="boolean/images"
/>
62 changes: 62 additions & 0 deletions examples/core/boolean/booleanB.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?xml version="1.0"?>

<BFSM>
<GoalSet id="0">
<Goal type="circle" id="0" x="0" y="0" radius="0.5" />
<Goal type="circle" id="1" x="10" y="0" radius="0.5" />
<Goal type="circle" id="2" x="10" y="5" radius="0.5" />
<Goal type="circle" id="3" x="10" y="-5" radius="0.5" />
</GoalSet>

<State name="Start" final="0">
Walk to the action box
<GoalSelector type="explicit" goal_set="0" goal="0" />
<VelComponent type="goal"/>
</State>
<State name="ChangeSpeed" final="0">
Walk to the action box
<Action type="set_property" property="pref_speed" dist="u" min="0.5" max="1.5" exit_reset="1" />
<GoalSelector type="explicit" goal_set="0" goal="1" />
<VelComponent type="goal" />
</State>
<State name="Slow" final="0">
Walk the slow direction
<GoalSelector type="explicit" goal_set="0" goal="2" />
<VelComponent type="goal"/>
</State>
<State name="Fast" final="0">
Walk the fast direction
<GoalSelector type="explicit" goal_set="0" goal="3" />
<VelComponent type="goal"/>
</State>
<State name="Done" final="1"/>

<Transition from="Start" to="ChangeSpeed" >
<Condition type="goal_reached" distance="0.2" />
</Transition>
<Transition from="ChangeSpeed" to="Fast" >
First of two transitions out of ChangeSpeed
If I've reached the goal AND the timer has NOT reached at least 10 seconds, transition to fast
<Condition type="and">
<Condition type="goal_reached" distance="0.2" />
<Condition type="not">
<Condition type="timer" per_agent="0" dist="c" value="10" />
</Condition>
</Condition>
</Transition>
<Transition from="ChangeSpeed" to="Slow" >
Second transtion out of ChangeSpeed
- it is evaluated after the previous (because it is defined second).
- If the previous condition was NOT met, it is either because the goal wasn't reached, or it
wasn't reached fast enough.
- If it was a case of timing, this condition will be met (at goal), the agent will be filtered
in the slow direction.
<Condition type="goal_reached" distance="0.2" />
</Transition>
<Transition from="Fast" to="Done">
<Condition type="goal_reached" distance="0.2"/>
</Transition>
<Transition from="Slow" to="Done">
<Condition type="goal_reached" distance="0.2"/>
</Transition>
</BFSM>
36 changes: 36 additions & 0 deletions examples/core/boolean/booleanS.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0"?>
<Experiment version="2.0">
<SpatialQuery type="kd-tree" />

<OpenSteer max_force="8" leak_through="0.1" reaction_time="0.5" />
<Common time_step="0.1" />
<GCF reaction_time="0.5" max_agent_dist="2" max_agent_force="3" agent_interp_width="0.1" nu_agent="0.35" />
<Helbing agent_scale="2000" obstacle_scale="4000" reaction_time="0.5" body_force="1200" friction="2400" force_distance="0.015" />
<Johansson agent_scale="25" obstacle_scale="35" reaction_time="0.5" force_distance="0.15" stride_time="0.5" />
<Karamouzas orient_weight="0.8" fov="200" reaction_time="0.4" wall_steepness="2" wall_distance="2" colliding_count="5" d_min="1" d_mid="8" d_max="10" agent_force="4" />
<Zanlungo agent_scale="2000" obstacle_scale="4000" reaction_time="0.5" force_distance="0.005" />
<Dummy stddev="1.0" />

<AgentProfile name="group1" >
<OpenSteer tau="3" tauObst="6" />
<Common max_angle_vel="360" max_neighbors="10" obstacleSet="1" neighbor_dist="5" r="0.19" class="1" pref_speed="1.04" max_speed="2" max_accel="5" />
<PedVO factor="1.57" buffer="0.9" tau="3" tauObst="0.1" turningBias="1.0" />
<GCF stand_depth="0.18" move_scale="0.53" slow_width="0.25" sway_change="0.05" orient_weight="0.75" />
<Helbing mass="80" />
<Johansson fov_weight="0.16" />
<Karamouzas personal_space="0.69" anticipation="8" />
<ORCA tau="3" tauObst="0.15" />
<Zanlungo mass="80" orient_weight="0.75" />
</AgentProfile>

<AgentGroup>
<ProfileSelector type="const" name="group1" />
<StateSelector type="const" name="Start" />
<Generator type="rect_grid"
anchor_x="0" anchor_y="3.0"
offset_x="0" offset_y="2.0"
count_x="1" count_y="10"
/>
</AgentGroup>

</Experiment>
14 changes: 14 additions & 0 deletions examples/core/boolean/booleanV.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0"?>

<View width="640" height="480" >
<!-- Multiple cameras are mapped to a key from 1-9 in the order they are defined here -->
<Camera xpos="4.67002" ypos="9.1298" zpos="0.230371" xtgt="4.67002" ytgt="-0.000197559" ztgt="0.220371" far="400" near="0.01" fov="0.0" orthoScale="0.571561" />

<!-- Comment out lights for a constant-illuminated visualization -->
<Light x="1" y="0" z="-1" type="directional" diffR="1.0" diffG="0.8" diffB="0.8" space="camera"/>
<Light x="-1" y="0" z="-1" type="directional" diffR="0.8" diffG="0.8" diffB="1.0" space="camera"/>
<Light x="0" y="1" z="0" type="directional" diffR="0.8" diffG="0.8" diffB="0.8" space="world"/>

<Watermark file_name="../mengeLogo.png" alignment="bottom_right" scale="0.5" opacity="0.25"/>

</View>
9 changes: 9 additions & 0 deletions examples/core/bottleneck.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0"?>

<Project
scene="bottleneck/bottleneckS.xml"
behavior="bottleneck/bottleneckB.xml"
view="bottleneck/bottleneckV.xml"
model="orca"
dumpPath="images/bottleneck"
/>
21 changes: 21 additions & 0 deletions examples/core/bottleneck/bottleneckB.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0"?>

<BFSM>
<GoalSet id="0">
<Goal type="AABB" id="0" min_x="-20" min_y="6" max_x="-10" max_y="8" />
</GoalSet>

<State name="Walk" final="0" >
<GoalSelector type="explicit" goal_set="0" goal="0" />
<VelComponent type="road_map" file_name="bottleneckMap.txt" />
</State>
<State name="Wait" final="1">
<GoalSelector type="identity" />
<VelComponent type="zero" />
</State>

<Transition from="Walk" to="Wait" >
<Condition type="goal_reached" distance="0.25" />
</Transition>

</BFSM>
18 changes: 18 additions & 0 deletions examples/core/bottleneck/bottleneckMap.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
6
4 -0.5 -3.0
4 0.5 -3.0
4 -0.5 3.0
4 0.5 3.0
2 1.0 -6
2 1.0 6
10
0 1
0 2
0 3
1 2
1 3
2 3
0 4
1 4
2 5
3 5
41 changes: 41 additions & 0 deletions examples/core/bottleneck/bottleneckS.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0"?>
<Experiment version="2.0">
<SpatialQuery type="kd-tree" test_visibility="false" />

<Common time_step="0.1" />
<Helbing agent_scale="2000" obstacle_scale="4000" reaction_time="0.5" body_force="1200" friction="2400" force_distance="0.015" />
<Dummy stddev="0.05" />

<AgentProfile name="group1" >
<Common max_angle_vel="360" max_neighbors="10" obstacleSet="1" neighbor_dist="5" r="0.19" pref_speed="1.04" max_speed="2" max_accel="5" priority="0.0"/>
<PedVO factor="1.57" buffer="0.9" tau="3" tauObst="0.1" turningBias="1.0" />
<Helbing mass="80" />
<ORCA tau="3.0" tauObst="0.15" />
</AgentProfile>

<AgentGroup>
<ProfileSelector type="const" name="group1" />
<StateSelector type="const" name="Walk" />
<Generator type="rect_grid"
anchor_x="-18" anchor_y="-6"
offset_x="1" offset_y="0"
count_x="5" count_y="1"
/>
</AgentGroup>

<ObstacleSet type="explicit" class="1">
<Obstacle closed="1" >
<Vertex p_x="-30" p_y="-5" />
<Vertex p_x="-1" p_y="-5" />
<Vertex p_x="-1" p_y="5" />
<Vertex p_x="-30" p_y="5" />
</Obstacle>

<Obstacle closed="1" >
<Vertex p_x="30" p_y="-5" />
<Vertex p_x="30" p_y="5" />
<Vertex p_x="1" p_y="5" />
<Vertex p_x="1" p_y="-5" />
</Obstacle>
</ObstacleSet>
</Experiment>
Loading

0 comments on commit 7e45a15

Please sign in to comment.