Project: engagement_generation License: BSD Dependencies:
Used by:
None |
engagement_generation/msg_gen/java/ros/pkg/bml_msgs/msg/EntityPosition.javaGo to the documentation of this file.00001 /* Auto-generated by genmsg_java.py for file /home/mel/workspace/ros_stacks/bml/bml_msgs/msg/EntityPosition.msg */ 00002 00003 package ros.pkg.bml_msgs.msg; 00004 00005 import java.nio.ByteBuffer; 00006 00007 public class EntityPosition extends ros.communication.Message { 00008 00009 public ros.pkg.bml_msgs.msg.Entity entity = new ros.pkg.bml_msgs.msg.Entity(); 00010 public float x; 00011 public float y; 00012 public float z; 00013 public float rotation; 00014 00015 public EntityPosition() { 00016 } 00017 00018 public static java.lang.String __s_getDataType() { return "bml_msgs/EntityPosition"; } 00019 public java.lang.String getDataType() { return __s_getDataType(); } 00020 public static java.lang.String __s_getMD5Sum() { return "3cab9f9847524385c8b525d5c92664e7"; } 00021 public java.lang.String getMD5Sum() { return __s_getMD5Sum(); } 00022 public static java.lang.String __s_getMessageDefinition() { return "# an entity position is the entiy itself, its location in space, and the\n" + 00023 "# rotation of the entity in degrees\n" + 00024 "bml_msgs/Entity entity\n" + 00025 "float32 x\n" + 00026 "float32 y\n" + 00027 "float32 z\n" + 00028 "float32 rotation\n" + 00029 "================================================================================\n" + 00030 "MSG: bml_msgs/Entity\n" + 00031 "#The following constants represent all possible salient objects\n" + 00032 "uint8 OBJECT=0\n" + 00033 "uint8 HAND=1\n" + 00034 "uint8 FACE=2\n" + 00035 "uint8 QUADRANT=3\n" + 00036 "uint8 UNKNOWN=4\n" + 00037 "\n" + 00038 "# Constants for the upper quadrants\n" + 00039 "string UP_LEFT=UP_LEFT\n" + 00040 "string UP_FRONT=UP_FRONT\n" + 00041 "string UP_RIGHT=UP_RIGHT\n" + 00042 "\n" + 00043 "# Constants for the middle quadrants\n" + 00044 "string STRAIGHT_LEFT=STRAIGHT_LEFT\n" + 00045 "string STRAIGHT_FRONT=STRAIGHT_FRONT\n" + 00046 "string STRAIGHT_RIGHT=STRAIGHT_RIGHT\n" + 00047 "\n" + 00048 "# Constants for the lower quadrants\n" + 00049 "string DOWN_LEFT=DOWN_LEFT\n" + 00050 "string DOWN_FRONT=DOWN_FRONT\n" + 00051 "string DOWN_RIGHT=DOWN_RIGHT\n" + 00052 "\n" + 00053 "#there is just one field for type\n" + 00054 "uint8 type\n" + 00055 "\n" + 00056 "# The id of the object\n" + 00057 "string id\n" + 00058 "\n" + 00059 ""; } 00060 public java.lang.String getMessageDefinition() { return __s_getMessageDefinition(); } 00061 00062 public EntityPosition clone() { 00063 EntityPosition c = new EntityPosition(); 00064 c.deserialize(serialize(0)); 00065 return c; 00066 } 00067 00068 public void setTo(ros.communication.Message m) { 00069 deserialize(m.serialize(0)); 00070 } 00071 00072 public int serializationLength() { 00073 int __l = 0; 00074 __l += entity.serializationLength(); 00075 __l += 4; // x 00076 __l += 4; // y 00077 __l += 4; // z 00078 __l += 4; // rotation 00079 return __l; 00080 } 00081 00082 public void serialize(ByteBuffer bb, int seq) { 00083 entity.serialize(bb, seq); 00084 bb.putFloat(x); 00085 bb.putFloat(y); 00086 bb.putFloat(z); 00087 bb.putFloat(rotation); 00088 } 00089 00090 public void deserialize(ByteBuffer bb) { 00091 entity.deserialize(bb); 00092 x = bb.getFloat(); 00093 y = bb.getFloat(); 00094 z = bb.getFloat(); 00095 rotation = bb.getFloat(); 00096 } 00097 00098 @SuppressWarnings("all") 00099 public boolean equals(Object o) { 00100 if(!(o instanceof EntityPosition)) 00101 return false; 00102 EntityPosition other = (EntityPosition) o; 00103 return 00104 entity.equals(other.entity) && 00105 x == other.x && 00106 y == other.y && 00107 z == other.z && 00108 rotation == other.rotation && 00109 true; 00110 } 00111 00112 @SuppressWarnings("all") 00113 public int hashCode() { 00114 final int prime = 31; 00115 int result = 1; 00116 long tmp; 00117 result = prime * result + (this.entity == null ? 0 : this.entity.hashCode()); 00118 result = prime * result + Float.floatToIntBits(this.x); 00119 result = prime * result + Float.floatToIntBits(this.y); 00120 result = prime * result + Float.floatToIntBits(this.z); 00121 result = prime * result + Float.floatToIntBits(this.rotation); 00122 return result; 00123 } 00124 } // class EntityPosition 00125 |