예제 #1
0
        public static void read(halodi_msgs.msg.JointCalibration data, Halodi.CDR.CDRDeserializer cdr)
        {
            data.joint_name             = cdr.read_type_d();
            data.measurement_multiplier = cdr.read_type_6();

            data.measurement_bias = cdr.read_type_6();
        }
예제 #2
0
        public static void write(halodi_msgs.msg.JointCalibration data, Halodi.CDR.CDRSerializer cdr)
        {
            cdr.write_type_d(data.joint_name);

            cdr.write_type_6(data.measurement_multiplier);

            cdr.write_type_6(data.measurement_bias);
        }
예제 #3
0
 public override void deserialize(MemoryStream stream, halodi_msgs.msg.JointCalibration data)
 {
     using (BinaryReader reader = new BinaryReader(stream))
     {
         Halodi.CDR.CDRDeserializer cdr = new Halodi.CDR.CDRDeserializer(reader);
         read(data, cdr);
     }
 }
예제 #4
0
 public override void serialize(halodi_msgs.msg.JointCalibration data, MemoryStream stream)
 {
     using (BinaryWriter writer = new BinaryWriter(stream))
     {
         Halodi.CDR.CDRSerializer cdr = new Halodi.CDR.CDRSerializer(writer);
         write(data, cdr);
     }
 }
예제 #5
0
        public static int getCdrSerializedSize(halodi_msgs.msg.JointCalibration data, int current_alignment)
        {
            int initial_alignment = current_alignment;

            current_alignment += 4 + Halodi.CDR.CDRCommon.alignment(current_alignment, 4) + data.joint_name.Length + 1;

            current_alignment += 8 + Halodi.CDR.CDRCommon.alignment(current_alignment, 8);


            current_alignment += 8 + Halodi.CDR.CDRCommon.alignment(current_alignment, 8);



            return(current_alignment - initial_alignment);
        }
        public static void read(halodi_msgs.msg.ExtrinsicCalibration data, Halodi.CDR.CDRDeserializer cdr)
        {
            int sensors_length = cdr.read_type_2();

            data.sensors = new System.Collections.Generic.List <geometry_msgs.msg.TransformStamped>(sensors_length);
            for (int i = 0; i < sensors_length; i++)
            {
                geometry_msgs.msg.TransformStamped new_sensors = geometry_msgs.msg.TransformStampedPubSubType.Create();
                geometry_msgs.msg.TransformStampedPubSubType.read(new_sensors, cdr);
                data.sensors.Add(new_sensors);
            }



            int links_length = cdr.read_type_2();

            data.links = new System.Collections.Generic.List <geometry_msgs.msg.TransformStamped>(links_length);
            for (int i = 0; i < links_length; i++)
            {
                geometry_msgs.msg.TransformStamped new_links = geometry_msgs.msg.TransformStampedPubSubType.Create();
                geometry_msgs.msg.TransformStampedPubSubType.read(new_links, cdr);
                data.links.Add(new_links);
            }



            int joints_length = cdr.read_type_2();

            data.joints = new System.Collections.Generic.List <halodi_msgs.msg.JointCalibration>(joints_length);
            for (int i = 0; i < joints_length; i++)
            {
                halodi_msgs.msg.JointCalibration new_joints = halodi_msgs.msg.JointCalibrationPubSubType.Create();
                halodi_msgs.msg.JointCalibrationPubSubType.read(new_joints, cdr);
                data.joints.Add(new_joints);
            }
        }
        public void Set(ExtrinsicCalibration other)
        {
            if (other.sensors == null)
            {
                sensors = null;
            }
            else
            {
                sensors = new System.Collections.Generic.List <geometry_msgs.msg.TransformStamped>(other.sensors.Count);
                for (int i1 = 0; i1 < other.sensors.Count; i1++)
                {
                    if (other.sensors[i1] == null)
                    {
                        sensors.Add(null);
                    }
                    else
                    {
                        geometry_msgs.msg.TransformStamped newElement = geometry_msgs.msg.TransformStampedPubSubType.Create();
                        geometry_msgs.msg.TransformStampedPubSubType.Copy(other.sensors[i1], newElement);
                        sensors.Add(newElement);
                    }
                }
            }

            if (other.links == null)
            {
                links = null;
            }
            else
            {
                links = new System.Collections.Generic.List <geometry_msgs.msg.TransformStamped>(other.links.Count);
                for (int i2 = 0; i2 < other.links.Count; i2++)
                {
                    if (other.links[i2] == null)
                    {
                        links.Add(null);
                    }
                    else
                    {
                        geometry_msgs.msg.TransformStamped newElement = geometry_msgs.msg.TransformStampedPubSubType.Create();
                        geometry_msgs.msg.TransformStampedPubSubType.Copy(other.links[i2], newElement);
                        links.Add(newElement);
                    }
                }
            }

            if (other.joints == null)
            {
                joints = null;
            }
            else
            {
                joints = new System.Collections.Generic.List <halodi_msgs.msg.JointCalibration>(other.joints.Count);
                for (int i3 = 0; i3 < other.joints.Count; i3++)
                {
                    if (other.joints[i3] == null)
                    {
                        joints.Add(null);
                    }
                    else
                    {
                        halodi_msgs.msg.JointCalibration newElement = halodi_msgs.msg.JointCalibrationPubSubType.Create();
                        halodi_msgs.msg.JointCalibrationPubSubType.Copy(other.joints[i3], newElement);
                        joints.Add(newElement);
                    }
                }
            }
        }
예제 #8
0
 public static void Copy(halodi_msgs.msg.JointCalibration src, halodi_msgs.msg.JointCalibration target)
 {
     target.Set(src);
 }
예제 #9
0
 public static int getCdrSerializedSize(halodi_msgs.msg.JointCalibration data)
 {
     return(getCdrSerializedSize(data, 0));
 }