-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrcssserver3d.rb
More file actions
executable file
·84 lines (67 loc) · 1.87 KB
/
rcssserver3d.rb
File metadata and controls
executable file
·84 lines (67 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#
# rcssserver3d.rb
#
# toggle log file recording
$recordLogfile = true
# toggle the internal monitor
$enableInternalMonitor = false
# toggle the real time mode
$enableRealTimeMode = true
sparkSetupServer()
if ($enableInternalMonitor)
sparkSetupRendering()
end
sparkSetupInput()
if ($enableRealTimeMode)
sparkSetupTimer()
end
# sparkAddFPSCamera($scenePath+'camera',
# -10,-10,5,15,248,4,false,2,10,10)
# let spark create a default camera
if ($enableInternalMonitor)
sparkAddFPSCamera(
$scenePath+'camera',
x = 0,
y = -4,
z = 0.6,
vAngle = 10.0,
hAngle = 10.0,
maxSpeed = 1.5,
accel = 40.0,
drag = 4,
addCollider = false,
colliderRadius = 2.0
)
end
# setup default input bindings
run "scripts/bindings.rb"
# setup default materials common to all simulations
run "scripts/materials.rb"
#
# uncomment for logging setup (see spark.rb for reference)
#
sparkResetLogging()
sparkLogErrorToCerr()
#sparkLogAllToCerr()
#sparkLogAllToFile('spark.txt')
#sparkLogDebugToCerr()
#
# uncomment any of the following to run a simulation
#
# create an arena with a bunch of boxes and spheres
# scene = get($scenePath)
# scene.importScene('rsg/boxspheres/simspark.rsg')
# create an arena to test various joint bodies
# scene = get($scenePath)
# scene.importScene('rsg/jointtest/simspark.rsg')
# source soccersim.rb to run the soccer simulation
#run "soccersim.rb"
run "naosoccersim.rb"
# setup the integrated agent
#sparkSetupTrain()
#addIntegratedAgent('SoccerbotBehavior',1)
# setup game state info rendering for the internal monitor
# source soccersim.rb to run the soccer simulation
if ($enableInternalMonitor)
run "internalsoccermonitor.rb"
end