ros_sugar.io.publisher#

ROS Publishers

Module Contents#

Classes#

Publisher

Publisher.

API#

class ros_sugar.io.publisher.Publisher(output_topic, node_name: Optional[str] = None)#

Publisher.

set_node_name(node_name: str) None#

Set node name.

Parameters:

node_name (str)

Return type:

None

set_publisher(publisher: rclpy.publisher.Publisher) None#

set_publisher.

Parameters:

publisher – Publisher

Return type:

None

add_pre_processors(processors: List[Union[Callable, socket.socket]])#

Add a pre processor for publisher message

Parameters:

method (Callable) – Pre processor methods or sockets

publish(output: Any, *args, frame_id: Optional[str] = None, time_stamp: Optional[builtin_interfaces.msg.Time] = None, **kwargs) None#

Publish using the publisher

Parameters:

output (Any) – ROS message to publish