child.add(((IDLSequence.Integer) seq).get(i));
((IDLSequence.Integer) seq).add(val.asInt());
throw new RuntimeException("int16_values field exceeds the maximum length"); if(data.getUint16Values().size() <= 3) cdr.write_type_e(data.getUint16Values());else throw new RuntimeException("uint16_values field exceeds the maximum length"); if(data.getInt32Values().size() <= 3) cdr.write_type_e(data.getInt32Values());else throw new RuntimeException("int32_values field exceeds the maximum length");
Rectangle rectangle = new Rectangle(boundingBoxes.getBoundingBoxesXCoordinates().get(0), boundingBoxes.getBoundingBoxesYCoordinates().get(0), boundingBoxes.getBoundingBoxesWidths().get(0), boundingBoxes.getBoundingBoxesHeights().get(0)); double knownWidth = expectedObjectSize.getDoubleValue(); Point2D_F64 topLeft = new Point2D_F64(rectangle.x, rectangle.y);
((IDLSequence.Integer) seq).add(val.asInt());
child.add(((IDLSequence.Integer) seq).get(i));
throw new RuntimeException("int16_values field exceeds the maximum length"); if(data.getUint16Values().size() <= 100) cdr.write_type_e(data.getUint16Values());else throw new RuntimeException("uint16_values field exceeds the maximum length"); if(data.getInt32Values().size() <= 100) cdr.write_type_e(data.getInt32Values());else throw new RuntimeException("int32_values field exceeds the maximum length");
next.getFootstepOrder().add(footstepOrder); next.getFlag().add(flag); return next;
for (int regionIndex = 0; regionIndex < message.getRegionId().size(); regionIndex++) int regionId = message.getRegionId().get(regionIndex); Point3D origin = message.getRegionOrigin().get(regionIndex); Vector3D normal = message.getRegionNormal().get(regionIndex); planarRegionCommand.setRegionProperties(regionId, origin, normal); upperBound += message.getConcaveHullsSize().get(regionIndex); for (; polygonIndex < message.getNumberOfConvexPolygons().get(regionIndex); polygonIndex++) upperBound += message.getConvexPolygonsSize().get(convexPolygonIndexStart + polygonIndex); ConvexPolygon2D convexPolygon = planarRegionCommand.addConvexPolygon();
public static void write(controller_msgs.msg.dds.PlanarRegionsListMessage data, us.ihmc.idl.CDR cdr) { cdr.write_type_4(data.getSequenceId()); if(data.getRegionId().size() <= 300) cdr.write_type_e(data.getRegionId());else throw new RuntimeException("region_id field exceeds the maximum length"); if(data.getRegionOrigin().size() <= 300) cdr.write_type_e(data.getRegionOrigin());else throw new RuntimeException("region_origin field exceeds the maximum length"); if(data.getRegionNormal().size() <= 300) cdr.write_type_e(data.getRegionNormal());else throw new RuntimeException("region_normal field exceeds the maximum length"); if(data.getConcaveHullsSize().size() <= 300) cdr.write_type_e(data.getConcaveHullsSize());else throw new RuntimeException("concave_hulls_size field exceeds the maximum length"); if(data.getNumberOfConvexPolygons().size() <= 300) cdr.write_type_e(data.getNumberOfConvexPolygons());else throw new RuntimeException("number_of_convex_polygons field exceeds the maximum length"); if(data.getConvexPolygonsSize().size() <= 1000) cdr.write_type_e(data.getConvexPolygonsSize());else throw new RuntimeException("convex_polygons_size field exceeds the maximum length"); if(data.getVertexBuffer().size() <= 5000) cdr.write_type_e(data.getVertexBuffer());else throw new RuntimeException("vertex_buffer field exceeds the maximum length"); }
public final static int getCdrSerializedSize(controller_msgs.msg.dds.PlanarRegionsListMessage data, int current_alignment) { int initial_alignment = current_alignment; current_alignment += 4 + us.ihmc.idl.CDR.alignment(current_alignment, 4); current_alignment += 4 + us.ihmc.idl.CDR.alignment(current_alignment, 4); current_alignment += (data.getRegionId().size() * 4) + us.ihmc.idl.CDR.alignment(current_alignment, 4); current_alignment += 4 + us.ihmc.idl.CDR.alignment(current_alignment, 4); for(int i0 = 0; i0 < data.getRegionOrigin().size(); ++i0) { current_alignment += geometry_msgs.msg.dds.PointPubSubType.getCdrSerializedSize(data.getRegionOrigin().get(i0), current_alignment);} current_alignment += 4 + us.ihmc.idl.CDR.alignment(current_alignment, 4); for(int i0 = 0; i0 < data.getRegionNormal().size(); ++i0) { current_alignment += geometry_msgs.msg.dds.Vector3PubSubType.getCdrSerializedSize(data.getRegionNormal().get(i0), current_alignment);} current_alignment += 4 + us.ihmc.idl.CDR.alignment(current_alignment, 4); current_alignment += (data.getConcaveHullsSize().size() * 4) + us.ihmc.idl.CDR.alignment(current_alignment, 4); current_alignment += 4 + us.ihmc.idl.CDR.alignment(current_alignment, 4); current_alignment += (data.getNumberOfConvexPolygons().size() * 4) + us.ihmc.idl.CDR.alignment(current_alignment, 4); current_alignment += 4 + us.ihmc.idl.CDR.alignment(current_alignment, 4); current_alignment += (data.getConvexPolygonsSize().size() * 4) + us.ihmc.idl.CDR.alignment(current_alignment, 4); current_alignment += 4 + us.ihmc.idl.CDR.alignment(current_alignment, 4); for(int i0 = 0; i0 < data.getVertexBuffer().size(); ++i0) { current_alignment += geometry_msgs.msg.dds.PointPubSubType.getCdrSerializedSize(data.getVertexBuffer().get(i0), current_alignment);} return current_alignment - initial_alignment; }
@Override public boolean equals(Object other) { if(other == null) return false; if(other == this) return true; if(!(other instanceof DynamicArrayPrimitives)) return false; DynamicArrayPrimitives otherMyClass = (DynamicArrayPrimitives) other; if (!this.bool_values_.equals(otherMyClass.bool_values_)) return false; if (!this.byte_values_.equals(otherMyClass.byte_values_)) return false; if (!this.char_values_.equals(otherMyClass.char_values_)) return false; if (!this.float32_values_.equals(otherMyClass.float32_values_)) return false; if (!this.float64_values_.equals(otherMyClass.float64_values_)) return false; if (!this.int8_values_.equals(otherMyClass.int8_values_)) return false; if (!this.uint8_values_.equals(otherMyClass.uint8_values_)) return false; if (!this.int16_values_.equals(otherMyClass.int16_values_)) return false; if (!this.uint16_values_.equals(otherMyClass.uint16_values_)) return false; if (!this.int32_values_.equals(otherMyClass.int32_values_)) return false; if (!this.uint32_values_.equals(otherMyClass.uint32_values_)) return false; if (!this.int64_values_.equals(otherMyClass.int64_values_)) return false; if (!this.uint64_values_.equals(otherMyClass.uint64_values_)) return false; if (!this.string_values_.equals(otherMyClass.string_values_)) return false; if(this.check_ != otherMyClass.check_) return false; return true; }
@Override public boolean equals(Object other) { if(other == null) return false; if(other == this) return true; if(!(other instanceof BoundedArrayPrimitives)) return false; BoundedArrayPrimitives otherMyClass = (BoundedArrayPrimitives) other; if (!this.bool_values_.equals(otherMyClass.bool_values_)) return false; if (!this.byte_values_.equals(otherMyClass.byte_values_)) return false; if (!this.char_values_.equals(otherMyClass.char_values_)) return false; if (!this.float32_values_.equals(otherMyClass.float32_values_)) return false; if (!this.float64_values_.equals(otherMyClass.float64_values_)) return false; if (!this.int8_values_.equals(otherMyClass.int8_values_)) return false; if (!this.uint8_values_.equals(otherMyClass.uint8_values_)) return false; if (!this.int16_values_.equals(otherMyClass.int16_values_)) return false; if (!this.uint16_values_.equals(otherMyClass.uint16_values_)) return false; if (!this.int32_values_.equals(otherMyClass.int32_values_)) return false; if (!this.uint32_values_.equals(otherMyClass.uint32_values_)) return false; if (!this.int64_values_.equals(otherMyClass.int64_values_)) return false; if (!this.uint64_values_.equals(otherMyClass.uint64_values_)) return false; if (!this.string_values_.equals(otherMyClass.string_values_)) return false; if(this.check_ != otherMyClass.check_) return false; return true; }
@Override public void setFromMessage(PlanarRegionMessage message) { setRegionProperties(message.getRegionId(), message.getRegionOrigin(), message.getRegionNormal()); concaveHullsVertices.clear(); int vertexIndex = 0; int upperBound = message.getConcaveHullSize(); for (; vertexIndex < upperBound; vertexIndex++) addConcaveHullVertex().set(message.getVertexBuffer().get(vertexIndex)); convexPolygons.clear(); for (int polygonIndex = 0; polygonIndex < message.getNumberOfConvexPolygons(); polygonIndex++) { ConvexPolygon2D convexPolygon = convexPolygons.add(); upperBound += message.getConvexPolygonsSize().get(polygonIndex); for (; vertexIndex < upperBound; vertexIndex++) { convexPolygon.addVertex(message.getVertexBuffer().get(vertexIndex)); } convexPolygon.update(); } }
public static void write(controller_msgs.msg.dds.BoundingBoxesPacket data, us.ihmc.idl.CDR cdr) { cdr.write_type_4(data.getSequenceId()); if(data.getBoundingBoxesXCoordinates().size() <= 100) cdr.write_type_e(data.getBoundingBoxesXCoordinates());else throw new RuntimeException("bounding_boxes_x_coordinates field exceeds the maximum length"); if(data.getBoundingBoxesYCoordinates().size() <= 100) cdr.write_type_e(data.getBoundingBoxesYCoordinates());else throw new RuntimeException("bounding_boxes_y_coordinates field exceeds the maximum length"); if(data.getBoundingBoxesWidths().size() <= 100) cdr.write_type_e(data.getBoundingBoxesWidths());else throw new RuntimeException("bounding_boxes_widths field exceeds the maximum length"); if(data.getBoundingBoxesHeights().size() <= 100) cdr.write_type_e(data.getBoundingBoxesHeights());else throw new RuntimeException("bounding_boxes_heights field exceeds the maximum length"); if(data.getLabels().size() <= 100) cdr.write_type_e(data.getLabels());else throw new RuntimeException("labels field exceeds the maximum length"); }
public final static int getCdrSerializedSize(controller_msgs.msg.dds.BoundingBoxesPacket data, int current_alignment) { int initial_alignment = current_alignment; current_alignment += 4 + us.ihmc.idl.CDR.alignment(current_alignment, 4); current_alignment += 4 + us.ihmc.idl.CDR.alignment(current_alignment, 4); current_alignment += (data.getBoundingBoxesXCoordinates().size() * 4) + us.ihmc.idl.CDR.alignment(current_alignment, 4); current_alignment += 4 + us.ihmc.idl.CDR.alignment(current_alignment, 4); current_alignment += (data.getBoundingBoxesYCoordinates().size() * 4) + us.ihmc.idl.CDR.alignment(current_alignment, 4); current_alignment += 4 + us.ihmc.idl.CDR.alignment(current_alignment, 4); current_alignment += (data.getBoundingBoxesWidths().size() * 4) + us.ihmc.idl.CDR.alignment(current_alignment, 4); current_alignment += 4 + us.ihmc.idl.CDR.alignment(current_alignment, 4); current_alignment += (data.getBoundingBoxesHeights().size() * 4) + us.ihmc.idl.CDR.alignment(current_alignment, 4); current_alignment += 4 + us.ihmc.idl.CDR.alignment(current_alignment, 4); for(int i0 = 0; i0 < data.getLabels().size(); ++i0) { current_alignment += 4 + us.ihmc.idl.CDR.alignment(current_alignment, 4) + data.getLabels().get(i0).length() + 1; } return current_alignment - initial_alignment; }