public class TwistWithCovariance extends Message
| Modifier and Type | Field and Description |
|---|---|
static int |
COVARIANCE_COLUMNS
The number of columns in the covariance matrix.
|
static int |
COVARIANCE_ROWS
The number of rows in the covariance matrix.
|
static int |
COVARIANCE_SIZE
The size of the covariance matrix.
|
static String |
FIELD_COVARIANCE
The name of the covariance field for the message.
|
static String |
FIELD_TWIST
The name of the twist field for the message.
|
static String |
TYPE
The message type.
|
EMPTY_MESSAGEEMPTY_JSON| Constructor and Description |
|---|
TwistWithCovariance()
Create a new TwistWithCovariance with all 0 values.
|
TwistWithCovariance(Twist twist)
Create a new TwistWithCovariance with the given twist.
|
TwistWithCovariance(Twist twist,
double[] covariance)
Create a new TwistWithCovariance with the given twist and covariance
matrix.
|
| Modifier and Type | Method and Description |
|---|---|
TwistWithCovariance |
clone()
Create a clone of this TwistWithCovariance.
|
static TwistWithCovariance |
fromJsonObject(javax.json.JsonObject jsonObject)
Create a new TwistWithCovariance based on the given JSON object.
|
static TwistWithCovariance |
fromJsonString(String jsonString)
Create a new TwistWithCovariance based on the given JSON string.
|
static TwistWithCovariance |
fromMessage(Message m)
Create a new TwistWithCovariance based on the given Message.
|
double[] |
getCovariance()
Get the covariance matrix of this twist as an array.
|
double[][] |
getCovarianceMatrix()
Get the covariance matrix of this twist as a 2d-array.
|
Twist |
getTwist()
Get the twist value of this twist.
|
getMessageType, setMessageTypeequals, hashCode, toJsonObject, toStringpublic static final String FIELD_TWIST
public static final String FIELD_COVARIANCE
public static final String TYPE
public static final int COVARIANCE_ROWS
public static final int COVARIANCE_COLUMNS
public static final int COVARIANCE_SIZE
public TwistWithCovariance()
public TwistWithCovariance(Twist twist)
twist - The twist value of the twist.public TwistWithCovariance(Twist twist, double[] covariance)
twist - The twist value of the twist.covariance - The covariance matrix as an array.public Twist getTwist()
public double[] getCovariance()
public double[][] getCovarianceMatrix()
public TwistWithCovariance clone()
public static TwistWithCovariance fromJsonString(String jsonString)
jsonString - The JSON string to parse.public static TwistWithCovariance fromMessage(Message m)
m - The Message to parse.public static TwistWithCovariance fromJsonObject(javax.json.JsonObject jsonObject)
jsonObject - The JSON object to parse.Copyright © 2014. All rights reserved.