synchros2.node module

class synchros2.node.Node[source]

Bases: Node

An rclpy.node.Node subclass that:

  • changes the default callback group to be non-reentrant

  • wraps its logger with a memoizing one for improved efficiency

__init__(*args: Any, default_callback_group: rclpy.callback_groups.CallbackGroup | None = None, **kwargs: Any) None[source]

Initializes the node.

Parameters:
  • args – positional arguments for a ros Node

  • default_callback_group – optional callback group to use as default for all subsequently created entities, such as subscriptions and clients.

  • kwargs – keyword arguments for a ros Node

See rclpy.node.Node documentation for further reference on available arguments.

property default_callback_group: rclpy.callback_groups.CallbackGroup

Get the default callback group.

destroy_node() None[source]

Overrides node destruction API.

property destruction_requested: bool

Checks whether destruction was requested or not.

property waitables: Iterable[rclpy.waitable.Waitable]

Get patched node waitables.

Workaround for https://github.com/ros2/rclpy/issues/1284.

synchros2.node.suppressed(exception: Type[BaseException], func: Callable) Callable[source]

Suppress the given exception type from func invocations