Class JRosClientPublisher<T extends id.jrosmessages.Message>
java.lang.Object
edu.tufts.hrilab.ros2.ros2jrosclient.JRosClientPublisher<T>
- Type Parameters:
T- message type
- 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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJRosClientPublisher(Class<T> messageType, String topic) JRosClientPublisher(Class<T> messageType, String topic, T message) -
Method Summary
Modifier and TypeMethodDescriptionvoidpublish()Body of the publisher that is submitted every iteration.
-
Field Details
-
log
protected static org.slf4j.Logger log -
publisher
-
-
Constructor Details
-
JRosClientPublisher
-
JRosClientPublisher
-
-
Method Details
-
publish
public void publish()Description copied from interface:Ros2PublisherBody of the publisher that is submitted every iteration.- Specified by:
publishin interfaceRos2Publisher<T extends id.jrosmessages.Message>
-
getMessage
- Specified by:
getMessagein interfaceRos2Publisher<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.
-