-
1:
functionSerial_Port_Enumeration(vector<string> &devices_name)
-
2:
▹ ROS serial lib is used
-
3:
-
4:
-
5:
while
is not ended do
-
6:
-
7:
if
then
-
8:
add
-
9:
end if
-
10:
end while
-
11:
return number of found devices
-
12:
end function
-
13:
proceduresensor_init
-
14:
-
15:
-
16:
-
17:
if
then
-
18:
return with error
-
19:
else
-
20:
for
to
do
-
21:
Open
-
22:
Write b on
-
23:
-
24:
if a valid is received then
-
25:
-
26:
-
27:
-
28:
-
29:
end if
-
30:
Close
-
31:
end for
-
32:
end if
-
33:
end procedure
-
34:
procedureuser_sensor_selection(SensorList)
-
35:
Print on screen the
-
36:
-
37:
Open Serial Port
-
38:
Write c on
-
39:
-
40:
if
is equal to 0 then
-
41:
return with error
-
42:
else
-
43:
-
44:
end if
-
45:
end procedure
-
46:
procedureMain
-
47:
Set ROS Node name, ROS Topics name and ROS Node rate
-
48:
Call
-
49:
Call
-
50:
MainLoop:
-
51:
Send a over
-
52:
-
53:
Send over ROS Topic
-
54:
Wait for next iteration
-
55:
goto
MainLoop
-
56:
end procedure