Exemple #1
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 #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._lock:
         if rclpy_implementation.rclpy_ok(self._handle):
             rclpy_implementation.rclpy_shutdown(self._handle)
             self._call_on_shutdown_callbacks()
Exemple #3
0
def ok():
    # 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_ok()
Exemple #4
0
 def ok(self):
     # imported locally to avoid loading extensions on module import
     from rclpy.impl.implementation_singleton import rclpy_implementation
     with self._lock:
         return rclpy_implementation.rclpy_ok(self._handle)
Exemple #5
0
 def ok(self):
     """Check if context hasn't been shut down."""
     # imported locally to avoid loading extensions on module import
     from rclpy.impl.implementation_singleton import rclpy_implementation
     with self._lock:
         return rclpy_implementation.rclpy_ok(self._handle)
Exemple #6
0
def ok():
    return _rclpy.rclpy_ok()
Exemple #7
0
def ok():
    return _rclpy.rclpy_ok()