public override void Deserialize(byte[] SERIALIZEDSTUFF, ref int currentIndex)
 {
     //header
     header = new Header(SERIALIZEDSTUFF, ref currentIndex);
     //status
     status = new Messages.actionlib_msgs.GoalStatus(SERIALIZEDSTUFF, ref currentIndex);
     //feedback
     feedback = new hector_uav_msgs.LandingFeedback(SERIALIZEDSTUFF, ref currentIndex);
 }
Esempio n. 2
0
        public override bool Equals(IRosMessage ____other)
        {
            if (____other == null)
            {
                return(false);
            }
            hector_uav_msgs.LandingFeedback other = (hector_uav_msgs.LandingFeedback)____other;

            return(current_pose.Equals(other.current_pose));
        }
        public override void Randomize()
        {
            int    arraylength = -1;
            Random rand        = new Random();
            int    strlength;

            byte[] strbuf, myByte;

            //header
            header = new Header();
            header.Randomize();
            //status
            status = new Messages.actionlib_msgs.GoalStatus();
            status.Randomize();
            //feedback
            feedback = new hector_uav_msgs.LandingFeedback();
            feedback.Randomize();
        }
Esempio n. 4
0
 LandingFeedback(LandingFeedback lf)
 {
     current_pose                    = new PoseStamped();
     current_pose.pose               = new Pose();
     current_pose.pose.orientation   = new Quaternion();
     current_pose.pose.orientation.x = lf.current_pose.pose.orientation.x;
     current_pose.pose.orientation.y = lf.current_pose.pose.orientation.y;
     current_pose.pose.orientation.z = lf.current_pose.pose.orientation.z;
     current_pose.pose.orientation.w = lf.current_pose.pose.orientation.w;
     current_pose.pose.position      = new Point();
     current_pose.pose.position.x    = lf.current_pose.pose.position.x;
     current_pose.pose.position.y    = lf.current_pose.pose.position.y;
     current_pose.pose.position.z    = lf.current_pose.pose.position.z;
     current_pose.header             = new Header();
     current_pose.header.Frame_id    = lf.current_pose.header.Frame_id;
     current_pose.header.Seq         = lf.current_pose.header.Seq;
     current_pose.header.Stamp       = new Time(lf.current_pose.header.Stamp.data);
 }
        public override byte[] Serialize(bool partofsomethingelse)
        {
            int  currentIndex = 0, length = 0;
            bool hasmetacomponents = false;

            byte[]        thischunk, scratch1, scratch2;
            List <byte[]> pieces = new List <byte[]>();
            GCHandle      h;

            //header
            if (header == null)
            {
                header = new Header();
            }
            pieces.Add(header.Serialize(true));
            //status
            if (status == null)
            {
                status = new Messages.actionlib_msgs.GoalStatus();
            }
            pieces.Add(status.Serialize(true));
            //feedback
            if (feedback == null)
            {
                feedback = new hector_uav_msgs.LandingFeedback();
            }
            pieces.Add(feedback.Serialize(true));
            //combine every array in pieces into one array and return it
            int __a_b__f = pieces.Sum((__a_b__c) => __a_b__c.Length);
            int __a_b__e = 0;

            byte[] __a_b__d = new byte[__a_b__f];
            foreach (var __p__ in pieces)
            {
                Array.Copy(__p__, 0, __a_b__d, __a_b__e, __p__.Length);
                __a_b__e += __p__.Length;
            }
            return(__a_b__d);
        }