Skip to content

Instantly share code, notes, and snippets.

@curds01
Created April 6, 2019 02:44
Show Gist options
  • Save curds01/521636510df851204f8982927c159283 to your computer and use it in GitHub Desktop.
Save curds01/521636510df851204f8982927c159283 to your computer and use it in GitHub Desktop.
Alternative roundabout
<?xml version="1.0"?>
<BFSM>
<GoalSet id="1">
<Goal id="0" type="point" x="0" y="0"/>
</GoalSet>
<State name="Walk" final="0" >
<GoalSelector type="random" goal_set="1" per_agent="1" />
<VelComponent type="nav_mesh" file_name="untitled.nav" heading_threshold="5"/>
<Action type="offset_property" property="priority" dist="c" value="0.0" exit_reset="0"/>
</State>
<State name="Arrive" final="0">
<VelComponent type="zero"/>
<Action type="offset_property" property="priority" dist="c" value="1.0" exit_reset="0"/>
</State>
<State name="Decide" final="0">
<VelComponent type="zero"/>
</State>
<State name="Happy" final="0">
<VelComponent type="zero"/>
</State>
<State name="Angry" final="0">
<VelComponent type="zero"/>
</State>
<Transition from="Walk" to="Arrive" >
<Condition type="goal_reached" distance="0.4" />
</Transition>
<Transition from="Arrive" to="Decide" >
<Condition type="timer" dist="u" min="2" max="4" seed="5" per_agent="1" />
</Transition>
<Transition from="Decide" >
<Condition type="auto" />
<Target type="prob">
<State name="Happy" weight="1.0" />
<State name="Angry" weight="1.0" />
</Target>
</Transition>
<Transition from="Happy" to="Walk" >
<Condition type="timer" dist="u" min="4" max="6" seed="6" per_agent="1" />
</Transition>
<Transition from="Angry" to="Walk" >
<Condition type="timer" dist="u" min="1" max="2" seed="7" per_agent="1" />
</Transition>
</BFSM>
<?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" >
<OpenSteer tau="3" tauObst="6" />
<Common max_angle_vel="180" max_neighbors="10" obstacleSet="1" neighbor_dist="5" r="0.19" class="4" pref_speed="1.04" max_speed="2" max_accel="5" external="0" />
<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>
<AgentProfile name="robot" inherits="group1" >
<ORCA tau="3" tauObst="0.15" />
<Common class="3" r="0.3" external="1"/>
<Helbing mass="320"/>
</AgentProfile>
<AgentGroup>
<ProfileSelector type="const" name="robot" />
<StateSelector type="const" name="Walk" />
<Generator type="explicit">
<Agent p_x="22.00" p_y="-20.00"/>
</Generator>
</AgentGroup>
<AgentGroup>
<ProfileSelector type="const" name="group1" />
<StateSelector type="const" name="Walk" />
<Generator type="explicit">
<Agent p_x="22.3" p_y="-12.375" />
<Agent p_x="22.6625" p_y="-16.98125" />
</Generator>
</AgentGroup>
<ObstacleSet type="explicit" class="1">
<Obstacle closed="1" >
<Vertex p_x="1.819505" p_y="-4.075475" />
<Vertex p_x="1.819505" p_y="-2.075475" />
<Vertex p_x="-0.180495" p_y="-2.075475" />
<Vertex p_x="-0.180494" p_y="-4.075476" />
</Obstacle>
</ObstacleSet>
</Experiment>
8
-0.18049 -2.07547
1.81950 -2.07547
1.81950 -4.07547
-0.18049 -4.07548
-28.86103 -33.65389
31.13897 -33.65389
31.13897 26.34611
-28.86103 26.34611
4
0 7 0 1
1 6 1 2
3 4 0 3
2 5 2 3
8
0 1 1 1
1 2 2 6
7 4 0 5
6 7 1 2
5 6 2 3
4 5 3 4
2 3 3 7
3 0 0 0
unnamed_object3_default
4
-14.52076 -3.36468
4 0 7 4 3
0.00000 0.00000 0.00000
2 0 2
6 0 7 6 2 5 3
0.97924 12.13532
4 1 6 7 0
0.00000 0.00000 0.00000
2 0 1
6 0 7 1 3 4 2
16.47924 -3.36468
4 2 5 6 1
0.00000 0.00000 0.00000
2 1 3
6 0 1 6 4 5 3
0.97924 -18.86468
4 3 4 5 2
0.00000 0.00000 0.00000
2 2 3
6 1 6 7 2 5 4
# Exported from Wings 3D 2.1.7
mtllib untitled.mtl
o unnamed_object3
#8 vertices, 4 faces
v -0.18049500 0.0000000e+0 -2.07547500
v 1.81950500 0.0000000e+0 -2.07547500
v 1.81950500 0.0000000e+0 -4.07547500
v -0.18049400 0.0000000e+0 -4.07547600
v -28.86102626 0.0000000e+0 -33.65388890
v 31.13897374 0.0000000e+0 -33.65388890
v 31.13897374 0.0000000e+0 26.34611110
v -28.86102626 0.0000000e+0 26.34611110
g unnamed_object3_default
usemtl default
s 1
f 1// 8// 5// 4//
f 2// 7// 8// 1//
f 3// 6// 7// 2//
f 4// 5// 6// 3//
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment