@@ -77,76 +77,76 @@ def main():
7777
7878 if rclType == 'Bool' :
7979 node = rclpy .create_node ('py_bool_subscription' )
80- publisher = node .create_publisher (Bool , 'Bool_js_py_back_channel' )
81- subscription = node .create_subscription (Bool , 'Bool_js_py_channel' , callback )
80+ publisher = node .create_publisher (Bool , 'Bool_js_py_back_channel' , 10 )
81+ subscription = node .create_subscription (Bool , 'Bool_js_py_channel' , callback , 10 )
8282 elif rclType == 'Byte' :
8383 node = rclpy .create_node ('py_byte_subscription' )
84- publisher = node .create_publisher (Byte , 'Byte_js_py_back_channel' );
85- subscription = node .create_subscription (Byte , 'Byte_js_py_channel' , callback )
84+ publisher = node .create_publisher (Byte , 'Byte_js_py_back_channel' , 10 );
85+ subscription = node .create_subscription (Byte , 'Byte_js_py_channel' , callback , 10 )
8686 elif rclType == 'Char' :
8787 node = rclpy .create_node ('py_char_subscription' )
88- publisher = node .create_publisher (Char , 'Char_js_py_back_channel' )
89- subscription = node .create_subscription (Char , 'Char_js_py_channel' , callback )
88+ publisher = node .create_publisher (Char , 'Char_js_py_back_channel' , 10 )
89+ subscription = node .create_subscription (Char , 'Char_js_py_channel' , callback , 10 )
9090 elif rclType == 'String' :
9191 node = rclpy .create_node ('py_string_subscription' )
92- publisher = node .create_publisher (String , 'String_js_py_back_channel' )
93- subscription = node .create_subscription (String , 'String_js_py_channel' , callback )
92+ publisher = node .create_publisher (String , 'String_js_py_back_channel' , 10 )
93+ subscription = node .create_subscription (String , 'String_js_py_channel' , callback , 10 )
9494 elif rclType == 'Int8' :
9595 node = rclpy .create_node ('py_int8_subscription' )
96- publisher = node .create_publisher (Int8 , 'Int8_js_py_back_channel' )
97- subscription = node .create_subscription (Int8 , 'Int8_js_py_channel' , callback )
96+ publisher = node .create_publisher (Int8 , 'Int8_js_py_back_channel' , 10 )
97+ subscription = node .create_subscription (Int8 , 'Int8_js_py_channel' , callback , 10 )
9898 elif rclType == 'UInt8' :
9999 node = rclpy .create_node ('py_uint8_subscription' )
100- publisher = node .create_publisher (UInt8 , 'UInt8_js_py_back_channel' )
101- subscription = node .create_subscription (UInt8 , 'UInt8_js_py_channel' , callback )
100+ publisher = node .create_publisher (UInt8 , 'UInt8_js_py_back_channel' , 10 )
101+ subscription = node .create_subscription (UInt8 , 'UInt8_js_py_channel' , callback , 10 )
102102 elif rclType == 'Int16' :
103103 node = rclpy .create_node ('py_int16_subscription' )
104- publisher = node .create_publisher (Int16 , 'Int16_js_py_back_channel' )
105- subscription = node .create_subscription (Int16 , 'Int16_js_py_channel' , callback )
104+ publisher = node .create_publisher (Int16 , 'Int16_js_py_back_channel' , 10 )
105+ subscription = node .create_subscription (Int16 , 'Int16_js_py_channel' , callback , 10 )
106106 elif rclType == 'UInt16' :
107107 node = rclpy .create_node ('py_uint16_subscription' )
108- publisher = node .create_publisher (UInt16 , 'UInt16_js_py_back_channel' )
109- subscription = node .create_subscription (UInt16 , 'UInt16_js_py_channel' , callback )
108+ publisher = node .create_publisher (UInt16 , 'UInt16_js_py_back_channel' , 10 )
109+ subscription = node .create_subscription (UInt16 , 'UInt16_js_py_channel' , callback , 10 )
110110 elif rclType == 'Int32' :
111111 node = rclpy .create_node ('py_int32_subscription' )
112- publisher = node .create_publisher (Int32 , 'Int32_js_py_back_channel' )
113- subscription = node .create_subscription (Int32 , 'Int32_js_py_channel' , callback )
112+ publisher = node .create_publisher (Int32 , 'Int32_js_py_back_channel' , 10 )
113+ subscription = node .create_subscription (Int32 , 'Int32_js_py_channel' , callback , 10 )
114114 elif rclType == 'UInt32' :
115115 node = rclpy .create_node ('py_uint32_subscription' )
116- publisher = node .create_publisher (UInt32 , 'UInt32_js_py_back_channel' )
117- subscription = node .create_subscription (UInt32 , 'UInt32_js_py_channel' , callback )
116+ publisher = node .create_publisher (UInt32 , 'UInt32_js_py_back_channel' , 10 )
117+ subscription = node .create_subscription (UInt32 , 'UInt32_js_py_channel' , callback , 10 )
118118 elif rclType == 'Int64' :
119119 node = rclpy .create_node ('py_int64_subscription' )
120- publisher = node .create_publisher (Int64 , 'Int64_js_py_back_channel' )
121- subscription = node .create_subscription (Int64 , 'Int64_js_py_channel' , callback )
120+ publisher = node .create_publisher (Int64 , 'Int64_js_py_back_channel' , 10 )
121+ subscription = node .create_subscription (Int64 , 'Int64_js_py_channel' , callback , 10 )
122122 elif rclType == 'UInt64' :
123123 node = rclpy .create_node ('py_uint64_subscription' )
124- publisher = node .create_publisher (UInt64 , 'UInt64_js_py_back_channel' )
125- subscription = node .create_subscription (UInt64 , 'UInt64_js_py_channel' , callback )
124+ publisher = node .create_publisher (UInt64 , 'UInt64_js_py_back_channel' , 10 )
125+ subscription = node .create_subscription (UInt64 , 'UInt64_js_py_channel' , callback , 10 )
126126 elif rclType == 'Float32' :
127127 node = rclpy .create_node ('py_float32_subscription' )
128- publisher = node .create_publisher (Float32 , 'Float32_js_py_back_channel' )
129- subscription = node .create_subscription (Float32 , 'Float32_js_py_channel' , callback )
128+ publisher = node .create_publisher (Float32 , 'Float32_js_py_back_channel' , 10 )
129+ subscription = node .create_subscription (Float32 , 'Float32_js_py_channel' , callback , 10 )
130130 elif rclType == 'Float64' :
131131 node = rclpy .create_node ('py_float64_subscription' )
132- publisher = node .create_publisher (Float64 , 'Float64_js_py_back_channel' )
133- subscription = node .create_subscription (Float64 , 'Float64_js_py_channel' , callback )
132+ publisher = node .create_publisher (Float64 , 'Float64_js_py_back_channel' , 10 )
133+ subscription = node .create_subscription (Float64 , 'Float64_js_py_channel' , callback , 10 )
134134 elif rclType == 'Array' :
135135 node = rclpy .create_node ('py_array_subscription' )
136- publisher = node .create_publisher (ByteMultiArray , 'Array_js_py_back_channel' )
137- subscription = node .create_subscription (ByteMultiArray , 'Array_js_py_channel' , callback )
136+ publisher = node .create_publisher (ByteMultiArray , 'Array_js_py_back_channel' , 10 )
137+ subscription = node .create_subscription (ByteMultiArray , 'Array_js_py_channel' , callback , 10 )
138138 elif rclType == 'ColorRGBA' :
139139 node = rclpy .create_node ('py_colorrgba_subscription' )
140- publisher = node .create_publisher (ColorRGBA , 'ColorRGBA_js_py_back_channel' )
141- subscription = node .create_subscription (ColorRGBA , 'ColorRGBA_js_py_channel' , callback )
140+ publisher = node .create_publisher (ColorRGBA , 'ColorRGBA_js_py_back_channel' , 10 )
141+ subscription = node .create_subscription (ColorRGBA , 'ColorRGBA_js_py_channel' , callback , 10 )
142142 elif rclType == 'Header' :
143143 node = rclpy .create_node ('py_header_subscription' )
144- publisher = node .create_publisher (Header , 'Header_js_py_back_channel' )
145- subscription = node .create_subscription (Header , 'Header_js_py_channel' , callback )
144+ publisher = node .create_publisher (Header , 'Header_js_py_back_channel' , 10 )
145+ subscription = node .create_subscription (Header , 'Header_js_py_channel' , callback , 10 )
146146 elif rclType == 'JointState' :
147147 node = rclpy .create_node ('py_jointstate_subscrption' )
148- publisher = node .create_publisher (JointState , 'JointState_js_py_back_channel' )
149- subscription = node .create_subscription (JointState , 'JointState_js_py_channel' , callback )
148+ publisher = node .create_publisher (JointState , 'JointState_js_py_back_channel' , 10 )
149+ subscription = node .create_subscription (JointState , 'JointState_js_py_channel' , callback , 10 )
150150 while rclpy .ok ():
151151 rclpy .spin_once (node )
152152
0 commit comments