Utilities¶
-
rclpy.utilities.
get_default_context
(*, shutting_down=False)¶ Return the global default context singleton.
-
rclpy.utilities.
get_rmw_implementation_identifier
()¶
-
rclpy.utilities.
ok
(*, context=None)¶
-
rclpy.utilities.
remove_ros_args
(args=None)¶
-
rclpy.utilities.
shutdown
(*, context=None)¶
-
rclpy.utilities.
timeout_sec_to_nsec
(timeout_sec)¶ Convert timeout in seconds to rcl compatible timeout in nanoseconds.
Python tends to use floating point numbers in seconds for timeouts. This utility converts a python-style timeout to an integer in nanoseconds that can be used by rcl_wait.
Parameters: timeout_sec (float or None) – Seconds to wait. Block forever if None or negative. Don’t wait if < 1ns Return type: int Returns: rcl_wait compatible timeout in nanoseconds
-
rclpy.utilities.
try_shutdown
(*, context=None)¶ Shutdown rclpy if not already shutdown.