Ejemplo n.º 1
0
        public override void Randomize()
        {
            int    arraylength = -1;
            Random rand        = new Random();
            int    strlength;

            byte[] strbuf, myByte;

            //goal_id
            goal_id = new Messages.actionlib_msgs.GoalID();
            goal_id.Randomize();
            //status
            myByte = new byte[1];
            rand.NextBytes(myByte);
            status = myByte[0];
            //text
            strlength = rand.Next(100) + 1;
            strbuf    = new byte[strlength];
            rand.NextBytes(strbuf);  //fill the whole buffer with random bytes
            for (int __x__ = 0; __x__ < strlength; __x__++)
            {
                if (strbuf[__x__] == 0) //replace null chars with non-null random ones
                {
                    strbuf[__x__] = (byte)(rand.Next(254) + 1);
                }
            }
            strbuf[strlength - 1] = 0; //null terminate
            text = Encoding.ASCII.GetString(strbuf);
        }
 public override void Randomize()
 {
     header = new Messages.std_msgs.Header();
     header.Randomize();
     goal_id = new Messages.actionlib_msgs.GoalID();
     goal_id.Randomize();
     goal = new LandingGoal();
     goal.Randomize();
 }
Ejemplo n.º 3
0
        public override void Randomize()
        {
            int    arraylength = -1;
            Random rand        = new Random();
            int    strlength;

            byte[] strbuf, myByte;

            //header
            header = new Header();
            header.Randomize();
            //goal_id
            goal_id = new Messages.actionlib_msgs.GoalID();
            goal_id.Randomize();
            //goal
            goal = new Messages.object_recognition_msgs.ObjectRecognitionGoal();
            goal.Randomize();
        }
Ejemplo n.º 4
0
        public override void Randomize()
        {
            int    arraylength = -1;
            Random rand        = new Random();
            int    strlength;

            byte[] strbuf, myByte;

            //header
            header = new Header();
            header.Randomize();
            //goal_id
            goal_id = new Messages.actionlib_msgs.GoalID();
            goal_id.Randomize();
            //goal
            goal = new Messages.control_msgs.SingleJointPositionGoal();
            goal.Randomize();
        }
Ejemplo n.º 5
0
        public override void Randomize()
        {
            int    arraylength = -1;
            Random rand        = new Random();
            int    strlength;

            byte[] strbuf, myByte;

            //header
            header = new Header();
            header.Randomize();
            //goal_id
            goal_id = new Messages.actionlib_msgs.GoalID();
            goal_id.Randomize();
            //goal
            goal = new Messages.tf2_msgs.LookupTransformGoal();
            goal.Randomize();
        }
Ejemplo n.º 6
0
        public override void Randomize()
        {
            int    arraylength = -1;
            Random rand        = new Random();
            int    strlength;

            byte[] strbuf, myByte;

            //header
            header = new Header();
            header.Randomize();
            //goal_id
            goal_id = new Messages.actionlib_msgs.GoalID();
            goal_id.Randomize();
            //goal
            goal = new Messages.humanoid_nav_msgs.ExecFootstepsGoal();
            goal.Randomize();
        }