-
Notifications
You must be signed in to change notification settings - Fork 1
/
image_adaptor - List of stuff for Unit Testing.txt
237 lines (165 loc) · 7.89 KB
/
image_adaptor - List of stuff for Unit Testing.txt
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
List of stuff for unit testing
** the "is_published" method and the ones that use it are not really reliable right now
** Functions inside of the code??
class img_interface_node
changeSelfParameters(self, dynConfiguration, avoidPropagation=True)
This method is responsible for changing the node's own dynamic reconfigure parameters
from its own code ***but avoiding a chain of uncontrolled callbacks!!.
It returns True if everything went as expected.
dynServerCallback(self, dynConfiguration, levelCode)
Handler for the changes in the Dynamic Reconfigure server
Must return a configuration in the same format as received.
getAnyProperty(self, propertyName)
Generic getter in order to redirect to the type-specific getter method.
getBoolProperty(self, srvMsg)
getDispImage(self, srvMsg)
getFixedTypeProperty(self, propertyName, valueType)
Main property getter receiving the property name and the value type
and returning the current value from the low level driver.
getFloatProperty(self, srvMsg)
getImage(self, srvMsg)
getIntProperty(self, srvMsg)
getStringProperty(self, srvMsg)
# Generic getter in order to redirect to the appropriate method
#Specific fixed type property getters
get_property_list(self)
Auxiliary method for receiving the list of properties known by the translator.
listenToRequests(self)
Main services creator method in order to remain listening for requests.
It receives nothing and returns true just for future needs.
publishDispImages(self, srvMsg)
Specific purpose method meant to retransmit a disparity image topic on a specific topic
path receiving the original path, the new path and the amount of messages. It returns a
message telling if it worked.
publishImages(self, srvMsg)
Specific purpose method meant to retransmit an image topic on a specific topic
path receiving the original path, the new path and the amount of messages. It returns
a message telling if it worked.
setAnyProperty(self, propertyName, newValue)
Generic setter in order to redirect to the type-specific setter method.
setBoolProperty(self, setIntMsg)
setFixedTypeProperty(self, propertyName, newValue, valueType)
Main property setter receiving the property name, the value to assign and its type
and returning the response from the "setParameter" method from the low level driver.
setFloatProperty(self, setIntMsg)
setIntProperty(self, setIntMsg)
setStrProperty(self, setStrMsg)
setTopicLocation(self, setStrMsg)
class manager3D
callService(service, arguments, valueType=<class 'image_adaptor.srv._stringValue.stringValue'>)
dynClientCallback(self, dynConfiguration)
getParameter(self, paramName)
getTopic(self, topicName, data_type=<type 'str'>)
relocateTopic(self, oldAddress, newAddress)
This very important method is meant to change the topics from one name (or address) to another in runtime.
Since that not possible in a literal way; "mux" tool is used to repeat them under the new name/address.
## TODO: Watch Out: in the first version, each change becomes a new node
##while it should change the existing when possible.
### Here's a next step when they complete there project >>> callService("rosspawn/start", "")
retransmitTopic(self, times, source_topic, output_topic, data_type=<class 'std_msgs.msg._UInt16.UInt16'>)
Method meant to be executed in a different thread in order
to repeat a number of messages received from a topic to another one.
sendByTopic(self, topic, value, data_type=<class 'std_msgs.msg._UInt16.UInt16'>)
setParameter(self, paramName, newValue)
Static methods defined here:
topicExists(topicName)
class propertyTranslator
canGet(self, propertyName)
Receives the name of a property and decides weather if it can be Getted or not.
canSet(self, propertyName)
Receives the name of a property and decides whether if it can be Setted or not.
change(self, propertyName, newValue)
getTopicPath(self, topicName)
Method to get the path of a certain topic.
If the given name exists as a topic; the name is returned,
otherwise, the name is translated with the dictionary.
get_param_relative(propName)
Translation utility for getting the relative path to a property (without the local namespace).
get_property_list(self)
Method that returns the complete list of properties.
interpret(self, propertyName)
Receives the fixed name of the property and
translates it into the needed data to read it.
list_of_dynamic_servers(self)
Method that returns the complete list of servers in
which the parameters are distributed.
readYAMLConfig(self, file_name)
This method receives a file_name in which to read the properties.
Returned Value MUST be a tuple of two lists with strings and
dictionaries respectively.
reverseInterpret(self, reverseProperty)
****************************************************************
****************************************************************
****************************************************************
****************************************************************
****************************************************************
****************************************************************
****************************************************************
**Parameters that should work:
( In the form:
'camera/driver/':
parameter_generic_name:
- parameter/COMPLETE/name ## (Inside of the driver and including the path which is needed for finding it)
- int ## Type
- dynParam ## Kind
Name:
name
name/
path/subname/name
path/subname/name/
Type:
int
float
string
...
Kind:
parameter (dynParam)
topic (name)
topic (parameter to change???)
service???
**Parameters read from files:
The ones included above
Plus the changing topics
Virtual parameters?!
**Available services from the interface:
/robot1/kinect1/get/TopicLocation
/robot1/kinect1/getBoolProperty
/robot1/kinect1/getDispImage
/robot1/kinect1/getFloatProperty
/robot1/kinect1/getImage
/robot1/kinect1/getIntProperty
/robot1/kinect1/getStringProperty
/robot1/kinect1/set/TopicLocation
/robot1/kinect1/setBoolProperty
/robot1/kinect1/setFloatProperty
/robot1/kinect1/setIntProperty
/robot1/kinect1/setStrProperty
/robot1/kinect1/publishDispImages
/robot1/kinect1/publishImages
***** NON of my bussiness but can be important *****
nodelets used by the driver:
[
'/robot1/kinect1/camera/depth/metric',
'/robot1/kinect1/camera/depth/metric_rect',
'/robot1/kinect1/camera/depth/points',
'/robot1/kinect1/camera/depth/rectify_depth',
'/robot1/kinect1/camera/depth_registered/metric',
'/robot1/kinect1/camera/depth_registered/metric_rect',
'/robot1/kinect1/camera/depth_registered/rectify_depth',
'/robot1/kinect1/camera/disparity_depth',
'/robot1/kinect1/camera/disparity_depth_registered',
'/robot1/kinect1/camera/driver',
'/robot1/kinect1/camera/ir/rectify_ir',
'/robot1/kinect1/camera/points_xyzrgb_depth_rgb',
'/robot1/kinect1/camera/register_depth_rgb',
'/robot1/kinect1/camera/rgb/debayer',
'/robot1/kinect1/camera/rgb/rectify_color',
'/robot1/kinect1/camera/rgb/rectify_mono'
]
services from the driver:
/robot1/kinect1/camera/ir/set_camera_info
/robot1/kinect1/camera/rgb/set_camera_info
/robot1/kinect1/camera_nodelet_manager/list
/robot1/kinect1/camera_nodelet_manager/load_nodelet
/robot1/kinect1/camera_nodelet_manager/tf_frames
/robot1/kinect1/camera_nodelet_manager/unload_nodelet