예제 #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()
예제 #2
0
파일: context.py 프로젝트: InigoMonreal/rcc
 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()
예제 #3
0
파일: utilities.py 프로젝트: sloretz/rclpy
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()
예제 #4
0
파일: utilities.py 프로젝트: sloretz/rclpy
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()
예제 #5
0
파일: __init__.py 프로젝트: erlerobot/rclpy
def shutdown():
    return _rclpy.rclpy_shutdown()
예제 #6
0
def shutdown():
    return _rclpy.rclpy_shutdown()