00001
00002
00003 package ros.pkg.mapping_msgs.msg;
00004
00005 import java.nio.ByteBuffer;
00006
00007 public class AttachedCollisionObject extends ros.communication.Message {
00008 static public final java.lang.String REMOVE_ALL_ATTACHED_OBJECTS = "\"all\"";
00009
00010 public java.lang.String link_name = new java.lang.String();
00011 public ros.pkg.mapping_msgs.msg.CollisionObject object = new ros.pkg.mapping_msgs.msg.CollisionObject();
00012 public java.util.ArrayList<java.lang.String> touch_links = new java.util.ArrayList<java.lang.String>();
00013
00014 public AttachedCollisionObject() {
00015 }
00016
00017 public static java.lang.String __s_getDataType() { return "mapping_msgs/AttachedCollisionObject"; }
00018 public java.lang.String getDataType() { return __s_getDataType(); }
00019 public static java.lang.String __s_getMD5Sum() { return "58c7f119e35988da1dbd450c682308ed"; }
00020 public java.lang.String getMD5Sum() { return __s_getMD5Sum(); }
00021 public static java.lang.String __s_getMessageDefinition() { return "# The CollisionObject will be attached with a fixed joint to this link\n" +
00022 "# If link name is set to REMOVE_ALL_ATTACHED_OBJECTS and object.operation \n" +
00023 "# is set to REMOVE will remove all attached bodies attached to any object\n" +
00024 "string link_name\n" +
00025 "\n" +
00026 "#Reserved for indicating that all attached objects should be removed\n" +
00027 "string REMOVE_ALL_ATTACHED_OBJECTS = \"all\"\n" +
00028 "\n" +
00029 "#This contains the actual shapes and poses for the CollisionObject\n" +
00030 "#to be attached to the link\n" +
00031 "#If action is remove and no object.id is set, all objects\n" +
00032 "#attached to the link indicated by link_name will be removed\n" +
00033 "CollisionObject object\n" +
00034 "\n" +
00035 "# The set of links that the attached objects are allowed to touch\n" +
00036 "# by default - the link_name is included by default\n" +
00037 "string[] touch_links\n" +
00038 "\n" +
00039 "================================================================================\n" +
00040 "MSG: mapping_msgs/CollisionObject\n" +
00041 "# a header, used for interpreting the poses\n" +
00042 "Header header\n" +
00043 "\n" +
00044 "# the id of the object\n" +
00045 "string id\n" +
00046 "\n" +
00047 "#This contains what is to be done with the object\n" +
00048 "CollisionObjectOperation operation\n" +
00049 "\n" +
00050 "#the shapes associated with the object\n" +
00051 "geometric_shapes_msgs/Shape[] shapes\n" +
00052 "\n" +
00053 "#the poses associated with the shapes - will be transformed using the header\n" +
00054 "geometry_msgs/Pose[] poses\n" +
00055 "\n" +
00056 "================================================================================\n" +
00057 "MSG: std_msgs/Header\n" +
00058 "# Standard metadata for higher-level stamped data types.\n" +
00059 "# This is generally used to communicate timestamped data \n" +
00060 "# in a particular coordinate frame.\n" +
00061 "# \n" +
00062 "# sequence ID: consecutively increasing ID \n" +
00063 "uint32 seq\n" +
00064 "#Two-integer timestamp that is expressed as:\n" +
00065 "# * stamp.secs: seconds (stamp_secs) since epoch\n" +
00066 "# * stamp.nsecs: nanoseconds since stamp_secs\n" +
00067 "# time-handling sugar is provided by the client library\n" +
00068 "time stamp\n" +
00069 "#Frame this data is associated with\n" +
00070 "# 0: no frame\n" +
00071 "# 1: global frame\n" +
00072 "string frame_id\n" +
00073 "\n" +
00074 "================================================================================\n" +
00075 "MSG: mapping_msgs/CollisionObjectOperation\n" +
00076 "#Puts the object into the environment\n" +
00077 "#or updates the object if already added\n" +
00078 "byte ADD=0\n" +
00079 "\n" +
00080 "#Removes the object from the environment entirely\n" +
00081 "byte REMOVE=1\n" +
00082 "\n" +
00083 "#Only valid within the context of a CollisionAttachedObject message\n" +
00084 "#Will be ignored if sent with an CollisionObject message\n" +
00085 "#Takes an attached object, detaches from the attached link\n" +
00086 "#But adds back in as regular object\n" +
00087 "byte DETACH_AND_ADD_AS_OBJECT=2\n" +
00088 "\n" +
00089 "#Only valid within the context of a CollisionAttachedObject message\n" +
00090 "#Will be ignored if sent with an CollisionObject message\n" +
00091 "#Takes current object in the environment and removes it as\n" +
00092 "#a regular object\n" +
00093 "byte ATTACH_AND_REMOVE_AS_OBJECT=3\n" +
00094 "\n" +
00095 "# Byte code for operation\n" +
00096 "byte operation\n" +
00097 "\n" +
00098 "================================================================================\n" +
00099 "MSG: geometric_shapes_msgs/Shape\n" +
00100 "byte SPHERE=0\n" +
00101 "byte BOX=1\n" +
00102 "byte CYLINDER=2\n" +
00103 "byte MESH=3\n" +
00104 "\n" +
00105 "byte type\n" +
00106 "\n" +
00107 "\n" +
00108 "#### define sphere, box, cylinder ####\n" +
00109 "# the origin of each shape is considered at the shape's center\n" +
00110 "\n" +
00111 "# for sphere\n" +
00112 "# radius := dimensions[0]\n" +
00113 "\n" +
00114 "# for cylinder\n" +
00115 "# radius := dimensions[0]\n" +
00116 "# length := dimensions[1]\n" +
00117 "# the length is along the Z axis\n" +
00118 "\n" +
00119 "# for box\n" +
00120 "# size_x := dimensions[0]\n" +
00121 "# size_y := dimensions[1]\n" +
00122 "# size_z := dimensions[2]\n" +
00123 "float64[] dimensions\n" +
00124 "\n" +
00125 "\n" +
00126 "#### define mesh ####\n" +
00127 "\n" +
00128 "# list of triangles; triangle k is defined by tre vertices located\n" +
00129 "# at indices triangles[3k], triangles[3k+1], triangles[3k+2]\n" +
00130 "int32[] triangles\n" +
00131 "geometry_msgs/Point[] vertices\n" +
00132 "\n" +
00133 "================================================================================\n" +
00134 "MSG: geometry_msgs/Point\n" +
00135 "# This contains the position of a point in free space\n" +
00136 "float64 x\n" +
00137 "float64 y\n" +
00138 "float64 z\n" +
00139 "\n" +
00140 "================================================================================\n" +
00141 "MSG: geometry_msgs/Pose\n" +
00142 "# A representation of pose in free space, composed of postion and orientation. \n" +
00143 "Point position\n" +
00144 "Quaternion orientation\n" +
00145 "\n" +
00146 "================================================================================\n" +
00147 "MSG: geometry_msgs/Quaternion\n" +
00148 "# This represents an orientation in free space in quaternion form.\n" +
00149 "\n" +
00150 "float64 x\n" +
00151 "float64 y\n" +
00152 "float64 z\n" +
00153 "float64 w\n" +
00154 "\n" +
00155 ""; }
00156 public java.lang.String getMessageDefinition() { return __s_getMessageDefinition(); }
00157
00158 public AttachedCollisionObject clone() {
00159 AttachedCollisionObject c = new AttachedCollisionObject();
00160 c.deserialize(serialize(0));
00161 return c;
00162 }
00163
00164 public void setTo(ros.communication.Message m) {
00165 deserialize(m.serialize(0));
00166 }
00167
00168 public int serializationLength() {
00169 int __l = 0;
00170 __l += 4 + link_name.length();
00171 __l += object.serializationLength();
00172 __l += 4;
00173 for(java.lang.String val : touch_links) {
00174 __l += 4 + val.length();
00175 }
00176 return __l;
00177 }
00178
00179 public void serialize(ByteBuffer bb, int seq) {
00180 Serialization.writeString(bb, link_name);
00181 object.serialize(bb, seq);
00182 bb.putInt(touch_links.size());
00183 for(java.lang.String val : touch_links) {
00184 Serialization.writeString(bb, val);
00185 }
00186 }
00187
00188 public void deserialize(ByteBuffer bb) {
00189 link_name = Serialization.readString(bb);
00190 object.deserialize(bb);
00191
00192 int __touch_links_len = bb.getInt();
00193 touch_links = new java.util.ArrayList<java.lang.String>(__touch_links_len);
00194 for(int __i=0; __i<__touch_links_len; __i++) {
00195 touch_links.add(Serialization.readString(bb));
00196 }
00197 }
00198
00199 @SuppressWarnings("all")
00200 public boolean equals(Object o) {
00201 if(!(o instanceof AttachedCollisionObject))
00202 return false;
00203 AttachedCollisionObject other = (AttachedCollisionObject) o;
00204 return
00205 link_name.equals(other.link_name) &&
00206 object.equals(other.object) &&
00207 touch_links.equals(other.touch_links) &&
00208 true;
00209 }
00210
00211 @SuppressWarnings("all")
00212 public int hashCode() {
00213 final int prime = 31;
00214 int result = 1;
00215 long tmp;
00216 result = prime * result + (this.link_name == null ? 0 : this.link_name.hashCode());
00217 result = prime * result + (this.object == null ? 0 : this.object.hashCode());
00218 result = prime * result + (this.touch_links == null ? 0 : this.touch_links.hashCode());
00219 return result;
00220 }
00221 }
00222