rosros 0.2.5
Simple unified interface to ROS1 / ROS2 Python API
Loading...
Searching...
No Matches
rosros.rospify.topics.Publisher Class Reference

Stand-in for `rospy.Publisher`, wrapping the creation of ROS2 publisher. More...

Inheritance diagram for rosros.rospify.topics.Publisher:
Inheritance graph

Public Member Functions

 __new__ (cls, name, data_class, subscriber_listener=None, tcp_nodelay=None, latch=False, headers=None, queue_size=None)
 Constructor.
 
 __subclasshook__ (cls, C)
 Returns true if C is a ROS2 publisher class, else `NotImplemented`.
 

Detailed Description

Stand-in for `rospy.Publisher`, wrapping the creation of ROS2 publisher.

Definition at line 37 of file topics.py.

Member Function Documentation

◆ __new__()

rosros.rospify.topics.Publisher.__new__ (   cls,
  name,
  data_class,
  subscriber_listener = None,
  tcp_nodelay = None,
  latch = False,
  headers = None,
  queue_size = None 
)

Constructor.

Parameters
nameresource name of topic, e.g. 'laser'.
data_classmessage class for serialization
subscriber_listenerignored (ROS1 compatibility stand-in)
tcp_nodelayignored (ROS1 compatibility stand-in)
latchif True, the last message published is 'latched', meaning that any compatible subscribers will be sent that message immediately upon connection
headersignored (ROS1 compatibility stand-in)
queue_sizethe queue size used for asynchronously publishing messages from different threads. A size of zero means an infinite queue, which can be dangerous. When the keyword is not being used or when None is passed, all publishing will happen synchronously and a warning message will be printed.
Exceptions
ROSExceptionif parameters are invalid

Definition at line 58 of file topics.py.

◆ __subclasshook__()

rosros.rospify.topics.Publisher.__subclasshook__ (   cls,
  C 
)

Returns true if C is a ROS2 publisher class, else `NotImplemented`.

Definition at line 66 of file topics.py.


The documentation for this class was generated from the following file: