synchros2.node module
- class synchros2.node.Node[source]
Bases:
NodeAn 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.
- create_rate(frequency: float, clock: rclpy.clock.Clock | None = None) rclpy.timer.Rate[source]
Create a Rate object.
- Parameters:
frequency – The frequency the Rate runs at (Hz).
clock – The clock the Rate gets time from.
- property default_callback_group: rclpy.callback_groups.CallbackGroup
Get the default callback group.
- destroy_rate(rate: rclpy.timer.Rate) bool[source]
Destroy a Rate object created by the node.
- Returns:
Trueif successful,Falseotherwise.
- property waitables: Iterable[rclpy.waitable.Waitable]
Get patched node waitables.
Workaround for https://github.com/ros2/rclpy/issues/1284.
- synchros2.node.override(func)