ros_sugar.io.publisher#

ROS Publishers

Module Contents#

Classes#

Publisher

Publisher.

API#

class ros_sugar.io.publisher.Publisher(output_topic, node_name: str = '')#

Publisher.

set_node_name(node_name: str) → None#

Set node name.

Parameters:

node_name (str)

Return type:

None

set_publisher(publisher: rclpy.publisher.Publisher, clock: Optional[rclpy.clock.Clock] = None) → None#

set_publisher.

Parameters:
  • publisher – Publisher

  • clock – Clock of the node owning the publisher, used to stamp messages. Without it a standalone ROS_TIME clock is used, which ignores use_sim_time

Return type:

None

add_pre_processors(processors: List[Union[Callable, ros_sugar.io.ipc.ExternalProcessorClient]])#

Add a pre processor for publisher message

Parameters:

method (List[Union[Callable, ExternalProcessorClient]]) – Pre processor methods or clients calling them in the launcher process

publish(output, frame_id: Optional[str] = None, **kwargs) → None#

Publish using the publisher

Parameters:

output (Any) – ROS message to publish