-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestBogdanModelStatic.tcl
83 lines (56 loc) · 1.74 KB
/
testBogdanModelStatic.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
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
source pilo.tcl
source moveTools.tcl
#source mocap.tcl
source rfid.tcl
source positionToFile.tcl
source rfidPositioner.tcl
#source mocapRflex.tcl
set objective(x) 0
set objective(y) 0
set objective(theta) 0
#initMocap
#getPositionMocap position
#rfidPositioner::StartParticules $position(xRob) $position(yRob) $position(theta)
#rflex::SetPos $position(xRob) $position(yRob) 0 $position(theta)
rfidPositioner::StartParticules 0 0 0
rflex::SetPos 0 0 0 0
clearOdometryErr
clearFile rflexPositionSet.txt
clearFile mocapPositionSet.txt
clearFile rfidPositionSet.txt
clearFile detectionsBogdanTest.txt
#set step [expr $pi*2/180]
#set ang 0
proc getPosition { position } {
upvar $position pos
getPositionRFLEX pos
}
#for {set i 1} {$i <= 3600} {incr i} {
set i 1
# defineObjective objective ang
if {$i == 1} {
set objective(x) 0
set objective(y) 0
}
puts "----------------------Init Going to point"
puts "x = $objective(x)"
puts "y = $objective(y)"
puts "----------------------End Goint to point"
# moveXY objective
getPositionRFLEX positionRFLEX
set theta [expr $positionRFLEX(theta)*180/$pi]
puts "RFLEX:\t$positionRFLEX(xRob)\t$positionRFLEX(yRob)\t$theta"
position2File $i rflexPositionSet.txt positionRFLEX
# getPositionMocap positionMOCAP
# set theta [expr $positionMOCAP(theta)*180/$pi]
# puts "MOCAP:\t$positionMOCAP(xRob)\t$positionMOCAP(yRob)\t$theta"
# position2File $i mocapPositionSet.txt positionMOCAP
acquire detectionsBogdanTest.txt
rfidPositioner::TrackPosition
clearOdometryErr
getPositionRFID positionRFID
set theta [expr $positionRFID(theta)*180/$pi]
puts "RFID:\t$positionRFID(xRob)\t$positionRFID(yRob)\t$theta"
position2File $i rfidPositionSet.txt positionRFID
#set ang [expr $ang + $step]
#}