Exemple #1
0
 def shutdown(self):
     """Shutdown this context."""
     # imported locally to avoid loading extensions on module import
     from rclpy.impl.implementation_singleton import rclpy_implementation
     with self._lock:
         rclpy_implementation.rclpy_shutdown(self._handle)
     self._call_on_shutdown_callbacks()
Exemple #2
0
 def try_shutdown(self):
     """Shutdown this context, if not already shutdown."""
     # imported locally to avoid loading extensions on module import
     from rclpy.impl.implementation_singleton import rclpy_implementation
     with self._handle as capsule, self._lock:
         if rclpy_implementation.rclpy_ok(capsule):
             rclpy_implementation.rclpy_shutdown(capsule)
             self._call_on_shutdown_callbacks()
Exemple #3
0
def try_shutdown():
    """Shutdown rclpy if not already shutdown."""
    # imported locally to avoid loading extensions on module import
    from rclpy.impl.implementation_singleton import rclpy_implementation
    with g_shutdown_lock:
        if rclpy_implementation.rclpy_ok():
            return rclpy_implementation.rclpy_shutdown()
Exemple #4
0
def shutdown():
    # imported locally to avoid loading extensions on module import
    from rclpy.impl.implementation_singleton import rclpy_implementation
    with g_shutdown_lock:
        return rclpy_implementation.rclpy_shutdown()
Exemple #5
0
def shutdown():
    return _rclpy.rclpy_shutdown()
Exemple #6
0
def shutdown():
    return _rclpy.rclpy_shutdown()