-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathros.tcl
More file actions
executable file
·49 lines (40 loc) · 1.08 KB
/
ros.tcl
File metadata and controls
executable file
·49 lines (40 loc) · 1.08 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
#!/usr/bin/expect -f
log_user 1
set timeout 10;
set dir {~/barzin_catkin_ws/src/path_tracking/scripts}
set ip {192.168.4.11}
proc authenticate {} {
expect {
"assword:" {
send -- "[read [open "../Husky_password.txt" r]]\r"
}
"No route to host" {
puts {ERROR: Check the communication}
}
timeout {
puts "\nError: timed out.\n"
exit
}
}
}
send "\n"
spawn bash -c "scp -r administrator@$ip:$dir/experimental_results/*.npy ./src/experimental_results/"
authenticate
send "\n"
spawn bash -c "scp -r ./src/Modules/*.py administrator@$ip:$dir"
authenticate
send "\n"
spawn bash -c "scp -r ./src/*.py administrator@$ip:$dir"
authenticate
send "\n"
spawn ssh administrator@$ip
authenticate
expect "administrator"
send "rm $dir/experimental_results/*.npy\r"
send "chmod +x $dir/*.py\r"
send "cd ~/barzin_catkin_ws\r"
send "catkin_make\r"
send "source devel/setup.bash\r"
#### send "rosrun path_tracking path_tracker_experiment.py\r"
send "rosrun path_tracking tracking_performance_analysis.py"
interact