public class TwistBackend extends OnNewRosMessageSource implements Backend
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MYTYPE |
Constructor and Description |
---|
TwistBackend(java.lang.String topic,
java.lang.String type,
org.ros.node.ConnectedNode myRosNode,
boolean publish) |
Modifier and Type | Method and Description |
---|---|
float[] |
decodeMessage(org.ros.internal.message.Message mess)
Get message data (this receives arrays of ints, just cast them to floats).
|
int |
gedNumOfDimensions()
The data from ROS message are concatenated into one vector
of float values.
|
void |
publish(float[] data)
This thing gets data of given format and publishes them as a ROS message
to a specified topic.
|
void |
setReceivedRosMessage(geometry_msgs.Twist mess) |
addEventListener, fireOnNewMessage, removeEventListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addEventListener, fireOnNewMessage
removeEventListener
public static final java.lang.String MYTYPE
public TwistBackend(java.lang.String topic, java.lang.String type, org.ros.node.ConnectedNode myRosNode, boolean publish) throws MessageFormatException
MessageFormatException
public void publish(float[] data)
public void setReceivedRosMessage(geometry_msgs.Twist mess)
public float[] decodeMessage(org.ros.internal.message.Message mess)
decodeMessage
in interface Backend
public int gedNumOfDimensions()
Backend
gedNumOfDimensions
in interface Backend