-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathStartup_from_boot_without_parameter_names
More file actions
138 lines (62 loc) · 3.34 KB
/
Startup_from_boot_without_parameter_names
File metadata and controls
138 lines (62 loc) · 3.34 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
To run the code, procedure from bootup:
check that the arduino connects as /dev/ttyACM0
check the video devices that are connected and find out which ones they are.
Be sure that this corresponds to what is specified in the code.
Soon we will change these to parameters that are automatically set, but for now
test pan/tilt with
uvcdynctrl -d /dev/video1 -s "Pan/tilt Reset" -- 3
substituting the actual device name for video1. Do that for each camera.
sudo ln -s -f /dev/video1 /dev/video9
substitute the upper camera device name for video1
and enter the sudo password when that comes up. sudo is needed for camera device switching,
Trying to figure out how to make this automatic.
ls /dev/vid*
and make sure that /dev/video9 is there.
power up the create
start skype
check that skype video options are set to use video9 and test that there is a good video feed coming through
cd ~/arduino_projects/captureSkypeChat
gedit ROS_telebot_Skype_two_cams.py
go to lines 135 and 138 and 177
os.system('sudo ln -s -f /dev/video1 /dev/video9')
os.system('sudo ln -s -f /dev/video0 /dev/video9')
os.system('sudo ln -s -f /dev/video0 /dev/video9')
replace video0 with the camera that is on top, video1 with the camera that is on the bottom
save the file, update git (so that this version does not get ahead of the others and cause a conflict when updating later).
roscore
rosrun captureSkypeChat ROS_telebot_skype_two_cams.py
You will have to enter the sudo password to allow it to switch cameras
roslaunch createControl createcontrol.launch
now you need to launch cameraControl, but you need to know which video feeds the cameras are using.
If they are on video0 and video1, then use:
rosrun cameraControl cameraControl_vid0_vid1
If they are on video1 and video2 then use:
rosrun cameraControl cameraControl_vid1_vid2
look at
rostopic list
try rostopic echo SkypeChat
connect to skype with two accounts and
enter either
cam or Cam
and go to the terminal running
ROS_telebot_skype_two_cams.py
an enter the password. (working on automating this)
close the extra skype account
Now you are ready to go.
Skype commands:
move with WASD (w = forward, a = turn left, s = backward, d = turn right)
Z is a slow stop, X is stop
pan/tilt with UHJKNM (u = up, h = turn left, j = center, k = turn right, n = down, m = max down)
g = center pan, b = center tilt
cam or Cam = switch cameras, both for video and pan tilt
, this is the main way to change cameras
Sometimes it take a while to swap or fails. If that happens, just hangup and call back and it will work fine. Also, the small window on the bot that shows outgoing video freezes when the cameras are swapped. Again, this is fixed if you hang up and call back.
If the video and the pan/tilt get mixed up, you can change the camera that the pan/tilt is commanding, without changing which is sending video with these commands:
0 = swap cameras, just for pan - tilt, not for video
1 = use first video device for pan tilt
2 = use second video device for pan tilt
for WASD and UHKN:
a single character gets you a fast, short response.
multiple characters (e.g., aaa) gets you bigger responses and, in the case of moving forward or backward, a smooth acceleration and deceleration.
The first character can be capitalized and the subsequent ones lowercase.
Otherwise, use all uppercase or all lowercase.