public override void Randomize() { int arraylength = -1; Random rand = new Random(); int strlength; byte[] strbuf, myByte; //header header = new Header(); header.Randomize(); //type type = new Messages.object_recognition_msgs.ObjectType(); type.Randomize(); //confidence confidence = (float)(rand.Next() + rand.NextDouble()); //point_clouds arraylength = rand.Next(10); if (point_clouds == null) { point_clouds = new Messages.sensor_msgs.PointCloud2[arraylength]; } else { Array.Resize(ref point_clouds, arraylength); } for (int i = 0; i < point_clouds.Length; i++) { //point_clouds[i] point_clouds[i] = new Messages.sensor_msgs.PointCloud2(); point_clouds[i].Randomize(); } //bounding_mesh bounding_mesh = new Messages.shape_msgs.Mesh(); bounding_mesh.Randomize(); //bounding_contours arraylength = rand.Next(10); if (bounding_contours == null) { bounding_contours = new Point[arraylength]; } else { Array.Resize(ref bounding_contours, arraylength); } for (int i = 0; i < bounding_contours.Length; i++) { //bounding_contours[i] bounding_contours[i] = new Point(); bounding_contours[i].Randomize(); } //pose pose = new PoseWithCovarianceStamped(); pose.Randomize(); }
public override void Randomize() { int arraylength = -1; Random rand = new Random(); int strlength; byte[] strbuf, myByte; //map map = new Messages.nav_msgs.OccupancyGrid(); map.Randomize(); //initial_pose initial_pose = new PoseWithCovarianceStamped(); initial_pose.Randomize(); }