public class ActionStringPublisher extends ActionPublisher.DirectActionPublisher
ActionPublisher that publishes to ROS a std_msgs/String containing the string representation
of the Action to be published. The publishAction(Action)
method will return a constant time delay specified by the constructor of this class.ActionPublisher.DirectActionPublisher| Modifier and Type | Field and Description |
|---|---|
protected int |
delayTime
The time delay to return
|
pub| Constructor and Description |
|---|
ActionStringPublisher(ros.Publisher pub,
int delayTime)
Initializes
|
ActionStringPublisher(String topic,
ros.RosBridge rosBridge,
int delayTime)
Initializes
|
| Modifier and Type | Method and Description |
|---|---|
int |
getDelayTime() |
int |
publishAction(burlap.mdp.core.action.Action a)
Takes a BURLAP
Action turns into a ROS message, and publishes it to ROS through this
object's ROS Bridge Publisher object. |
void |
setDelayTime(int delayTime) |
getPub, publish, setPubpublic ActionStringPublisher(String topic, ros.RosBridge rosBridge, int delayTime)
topic - the ROS topic which should be of type std_msgs/String to which actions will be published.rosBridge - the RosBridge connectiondelayTime - the delay time the publishAction(Action) method will return.public ActionStringPublisher(ros.Publisher pub,
int delayTime)
pub - the std_msgs/String message type publisher to usedelayTime - the delay time the publishAction(Action) method will return.public int getDelayTime()
public void setDelayTime(int delayTime)
public int publishAction(burlap.mdp.core.action.Action a)
ActionPublisherAction turns into a ROS message, and publishes it to ROS through this
object's ROS Bridge Publisher object. Note that when you implement this method, you must make the publish
call to ROSBridge yourself using a Publisher object.a - The BURLAP Action to turn into a ROS message and publish.Copyright © 2016. All rights reserved.