-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestLocMapFileNumParticlesTag.tcl
53 lines (34 loc) · 1.06 KB
/
testLocMapFileNumParticlesTag.tcl
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
source positionToFile.tcl
source rfidLocMap.tcl
set pi 3.1415
set home $env(HOME)
set path /simulation/results/
set fileName rfidPositionSet
set extension .txt
set fileTag tagPositionSet
set rfidPosFile $home$path$fileName
set tagPosFile $home$path$fileTag
rfidLocMap::SetNumberRobotParticles 1
rfidLocMap::SetTagInertia 0.9
for { set k 677} { $k <= 1000 } { set k [expr $k + 1] } {
set numParticles $k
puts "actual Iteration = $k"
rfidLocMap::ClearTags
rfidLocMap::SetNumberTagParticles $k
rfidLocMap::StartInput
rfidLocMap::StartRobotParticles 2 -0.25 1 ## n'import quois
rfidLocMap::StartOdometry 2 -0.25 1
set tagPosFile $home$path$fileTag$k$extension
clearFile $tagPosFile
set i 1
while { $i <= 323 } {
rfidLocMap::ActualizePositions
## getPositionRFIDLocMap positionRFID
getTagPosition positionTag
## set thetaRF [expr $positionRFID(theta)*180/$pi]
## position2File $i $rfidPosFile positionRFID
tagPosition2File $i $tagPosFile positionTag
## puts "RFID:\t$positionRFID(xRob)\t$positionRFID(yRob)\t$thetaRF"
incr i
}
}