public abstract static class ActionPublisher.DirectActionPublisher extends Object implements ActionPublisher
ActionPublisher and provides
a Publisher data member, constructors, and setters and getters for streamlining
the publishing of messages to ROS BRidge. Note that you still need to implement
the ActionPublisher.publishAction(Action) method
yourself and within that method you will need to publish the created message to this objects Publisher
pub data member or use this objects publish(Object) method to indirectly publish to the data member.ActionPublisher.DirectActionPublisher| Modifier and Type | Field and Description |
|---|---|
protected ros.Publisher |
pub
The Rosbridge
Publisher used to publish action messages. |
| Constructor and Description |
|---|
DirectActionPublisher(ros.Publisher pub)
Initializes with a
Publisher for publishing action messages to ROS. |
DirectActionPublisher(String topic,
String msgType,
ros.RosBridge rosBridge)
Initializes with a
Publisher for this action using the specified topic, message type, and RosBridge connection. |
| Modifier and Type | Method and Description |
|---|---|
ros.Publisher |
getPub()
Returns the
Publisher used to publish action messages to ROS |
void |
publish(Object msg)
Publishes a ROS message specified by the msg argument via this object's
Publisher pub data instances. |
void |
setPub(ros.Publisher pub)
Sets the
Publisher used to publish action messages to ROS |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublishActionprotected ros.Publisher pub
Publisher used to publish action messages.public DirectActionPublisher(String topic, String msgType, ros.RosBridge rosBridge)
Publisher for this action using the specified topic, message type, and RosBridge connection.topic - the ros topic to which messages will be publishedmsgType - the ros message type of th target topicrosBridge - the RosBridge connection to use.public DirectActionPublisher(ros.Publisher pub)
Publisher for publishing action messages to ROS.pub - the Publisher used to publish action messages to ROS.public ros.Publisher getPub()
Publisher used to publish action messages to ROSPublisher used to publish action messages to ROSpublic void setPub(ros.Publisher pub)
Publisher used to publish action messages to ROSpub - the Publisher used to publish action messages to ROSCopyright © 2016. All rights reserved.