public class ActionMessagePublisher extends ActionPublisher.DirectActionPublisher
ActionPublisher that publishes to ROS a fixed ROS message every time
publishAction(Action) is called. 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
|
protected Object |
msg
The ROS message to publish
|
pub| Constructor and Description |
|---|
ActionMessagePublisher(ros.Publisher pub,
Object msg,
int delayTime)
Initializes
|
ActionMessagePublisher(String topic,
String msgType,
ros.RosBridge rosBridge,
Object msg,
int delayTime)
Initializes
|
| Modifier and Type | Method and Description |
|---|---|
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. |
getPub, publish, setPubprotected Object msg
protected int delayTime
public ActionMessagePublisher(String topic, String msgType, ros.RosBridge rosBridge, Object msg, int delayTime)
topic - the ROS topic to publish tomsgType - the ROS message type of the ROS topicrosBridge - the RosBridge connectionmsg - the constant ROS message that will always be publisheddelayTime - the delay time the publishAction(Action) method will return.public ActionMessagePublisher(ros.Publisher pub,
Object msg,
int delayTime)
pub - the Publisher used to publish action messages.msg - the constant ROS message that will always be publisheddelayTime - the delay time the publishAction(Action) method will return.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.