@@ -80,9 +80,9 @@ def send_ros_service_response(self, srv_id, destination, response):
8080 if self .queue is not None :
8181 command = SysCommand_Service ()
8282 command .srv_id = srv_id
83- serialized_bytes = ClientThread .serialize_command ("__response" , command )
84- self . queue . put ( serialized_bytes )
85- self .send_unity_message ( destination , response )
83+ serialized_header = ClientThread .serialize_command ("__response" , command )
84+ serialized_message = ClientThread . serialize_message ( destination , response )
85+ self .queue . put ( b"" . join ([ serialized_header , serialized_message ]) )
8686
8787 def send_unity_message (self , topic , message ):
8888 if self .queue is not None :
@@ -101,9 +101,9 @@ def send_unity_service_request(self, topic, service_class, request):
101101
102102 command = SysCommand_Service ()
103103 command .srv_id = srv_id
104- serialized_bytes = ClientThread .serialize_command ("__request" , command )
105- self . queue . put ( serialized_bytes )
106- self .send_unity_message ( topic , request )
104+ serialized_header = ClientThread .serialize_command ("__request" , command )
105+ serialized_message = ClientThread . serialize_message ( topic , request )
106+ self .queue . put ( b"" . join ([ serialized_header , serialized_message ]) )
107107
108108 # rospy starts a new thread for each service request,
109109 # so it won't break anything if we sleep now while waiting for the response
0 commit comments