Class JRosClientPublisher<T extends id.jrosmessages.Message>

java.lang.Object
edu.tufts.hrilab.ros2.ros2jrosclient.JRosClientPublisher<T>
Type Parameters:
T -
All Implemented Interfaces:
Ros2Publisher<T>

public class JRosClientPublisher<T extends id.jrosmessages.Message> extends Object implements Ros2Publisher<T>
Wrapper on JROSClient's TopicSubmissionPublisher. Both for convenience and interactions with the BaseNode class. May eventually be extracted to an interface for different ros2 java implementations.
See Also:
  • Field Details

    • log

      protected static org.slf4j.Logger log
    • publisher

      public id.jrosclient.TopicSubmissionPublisher<T extends id.jrosmessages.Message> publisher
  • Constructor Details

    • JRosClientPublisher

      public JRosClientPublisher(Class<T> messageType, String topic)
    • JRosClientPublisher

      public JRosClientPublisher(Class<T> messageType, String topic, T message)
  • Method Details

    • publish

      public void publish()
      Description copied from interface: Ros2Publisher
      Body of the publisher that is submitted every iteration.
      Specified by:
      publish in interface Ros2Publisher<T extends id.jrosmessages.Message>
    • getMessage

      public T getMessage()
      Specified by:
      getMessage in interface Ros2Publisher<T extends id.jrosmessages.Message>
      Returns:
      Returns the message object internal to this publisher. This object is mutable, and can be altered to change the published message.