src/unity-ros-tcp-endpoint/ros_tcp_endpoint/service.py
def send(self, data):
        """
        Takes in serialized message data from source outside of the ROS network,
        deserializes it into it's class, calls the service with the message, and returns
        the service's response.

        Args:
            data: The already serialized message_class data coming from outside of ROS

        Returns:
            service response
        """
        message_type = type(self.req)
        message = deserialize_message(data, message_type)

        if not self.cli.service_is_ready():
            self.get_logger().error('Ignoring service call to {} - service is not ready.'.format(self.service_topic))
            return None
            
        self.future = self.cli.call_async(message)

        while rclpy.ok():
            if self.future.done():
                try:
                    response = self.future.result()
                    return response
                except Exception as e:
                    self.get_logger().info(f'Service call failed {e}')

                break

        return None

        Takes in serialized message data from source outside of the ROS network,
        deserializes it into it's class, calls the service with the message, and returns
        the service's response.

        Args:
            data: The already serialized message_class data coming from outside of ROS

        Returns:
            service response
        
Takes in serialized message data from source outside of the ROS network,
deserializes it into it's class, calls the service with the message, and returns
the service's response.
Takes in serialized message data from source outside of the ROS network deserializes it into it ' s class calls the service with the message and returns the service ' s response .
def send(self, data):
        message_type = type(self.req)
        message = deserialize_message(data, message_type)
        if not self.cli.service_is_ready():
            self.get_logger().error('Ignoring service call to {} - service is not ready.'.format(self.service_topic))
            return None
        self.future = self.cli.call_async(message)
        while rclpy.ok():
            if self.future.done():
                try:
                    response = self.future.result()
                    return response
                except Exception as e:
                    self.get_logger().info(f'Service call failed {e}')
                break
        return None
def send ( self , data ) : message_type = type ( self . req ) message = deserialize_message ( data , message_type ) if not self . cli . service_is_ready ( ) : self . get_logger ( ) . error ( 'Ignoring service call to {} - service is not ready.' . format ( self . service_topic ) ) return None self . future = self . cli . call_async ( message ) while rclpy . ok ( ) : if self . future . done ( ) : try : response = self . future . result ( ) return response except Exception as e : self . get_logger ( ) . info ( f'Service call failed {e}' ) break return None
Takes in serialized message data from source outside of the ROS network,
deserializes it into it's class, calls the service with the message, and returns
the service's response.
Takes in serialized message data from source outside of the ROS network deserializes it into it ' s class calls the service with the message and returns the service ' s response .
"""
        Takes in serialized message data from source outside of the ROS network,
        deserializes it into it's class, calls the service with the message, and returns
        the service's response.

        Args:
            data: The already serialized message_class data coming from outside of ROS

        Returns:
            service response
        """
None
self
data
The already serialized message_class data coming from outside of ROS
The already serialized message_class data coming from outside of ROS