public class Pose2D extends Message
| Modifier and Type | Field and Description |
|---|---|
static String |
FIELD_THETA
The name of the theta field for the message.
|
static String |
FIELD_X
The name of the x field for the message.
|
static String |
FIELD_Y
The name of the y field for the message.
|
static String |
TYPE
The message type.
|
EMPTY_MESSAGEEMPTY_JSON| Constructor and Description |
|---|
Pose2D()
Create a new Pose2D with all 0s.
|
Pose2D(double x,
double y,
double theta)
Create a new Pose2D with the given values.
|
| Modifier and Type | Method and Description |
|---|---|
Pose2D |
clone()
Create a clone of this Pose2D.
|
static Pose2D |
fromJsonObject(javax.json.JsonObject jsonObject)
Create a new Pose2D based on the given JSON object.
|
static Pose2D |
fromJsonString(String jsonString)
Create a new Pose2D based on the given JSON string.
|
static Pose2D |
fromMessage(Message m)
Create a new Pose2D based on the given Message.
|
double |
getTheta()
Get the theta value of this pose.
|
double |
getX()
Get the x value of this pose.
|
double |
getY()
Get the y value of this pose.
|
getMessageType, setMessageTypeequals, hashCode, toJsonObject, toStringpublic static final String FIELD_X
public static final String FIELD_Y
public static final String FIELD_THETA
public static final String TYPE
public Pose2D()
public Pose2D(double x,
double y,
double theta)
x - The x value of the pose.y - The y value of the pose.theta - The theta value of the pose.public double getX()
public double getY()
public double getTheta()
public static Pose2D fromJsonString(String jsonString)
jsonString - The JSON string to parse.public static Pose2D fromMessage(Message m)
m - The Message to parse.public static Pose2D fromJsonObject(javax.json.JsonObject jsonObject)
jsonObject - The JSON object to parse.Copyright © 2014. All rights reserved.