00001
00002
00003 package ros.pkg.geometry_msgs.msg;
00004
00005 import java.nio.ByteBuffer;
00006
00007 public class Pose2D extends ros.communication.Message {
00008
00009 public double x;
00010 public double y;
00011 public double theta;
00012
00013 public Pose2D() {
00014 }
00015
00016 public static java.lang.String __s_getDataType() { return "geometry_msgs/Pose2D"; }
00017 public java.lang.String getDataType() { return __s_getDataType(); }
00018 public static java.lang.String __s_getMD5Sum() { return "938fa65709584ad8e77d238529be13b8"; }
00019 public java.lang.String getMD5Sum() { return __s_getMD5Sum(); }
00020 public static java.lang.String __s_getMessageDefinition() { return "# This expresses a position and orientation on a 2D manifold.\n" +
00021 "\n" +
00022 "float64 x\n" +
00023 "float64 y\n" +
00024 "float64 theta\n" +
00025 ""; }
00026 public java.lang.String getMessageDefinition() { return __s_getMessageDefinition(); }
00027
00028 public Pose2D clone() {
00029 Pose2D c = new Pose2D();
00030 c.deserialize(serialize(0));
00031 return c;
00032 }
00033
00034 public void setTo(ros.communication.Message m) {
00035 deserialize(m.serialize(0));
00036 }
00037
00038 public int serializationLength() {
00039 int __l = 0;
00040 __l += 8;
00041 __l += 8;
00042 __l += 8;
00043 return __l;
00044 }
00045
00046 public void serialize(ByteBuffer bb, int seq) {
00047 bb.putDouble(x);
00048 bb.putDouble(y);
00049 bb.putDouble(theta);
00050 }
00051
00052 public void deserialize(ByteBuffer bb) {
00053 x = bb.getDouble();
00054 y = bb.getDouble();
00055 theta = bb.getDouble();
00056 }
00057
00058 @SuppressWarnings("all")
00059 public boolean equals(Object o) {
00060 if(!(o instanceof Pose2D))
00061 return false;
00062 Pose2D other = (Pose2D) o;
00063 return
00064 x == other.x &&
00065 y == other.y &&
00066 theta == other.theta &&
00067 true;
00068 }
00069
00070 @SuppressWarnings("all")
00071 public int hashCode() {
00072 final int prime = 31;
00073 int result = 1;
00074 long tmp;
00075 result = prime * result + (int)((tmp = Double.doubleToLongBits(this.x)) ^ (tmp >>> 32));
00076 result = prime * result + (int)((tmp = Double.doubleToLongBits(this.y)) ^ (tmp >>> 32));
00077 result = prime * result + (int)((tmp = Double.doubleToLongBits(this.theta)) ^ (tmp >>> 32));
00078 return result;
00079 }
00080 }
00081