Пример #1
0
        public static void write(geometry_msgs.msg.Vector3 data, Halodi.CDR.CDRSerializer cdr)
        {
            cdr.write_type_6(data.x);

            cdr.write_type_6(data.y);

            cdr.write_type_6(data.z);
        }
Пример #2
0
        public static void Unity2Ros(this geometry_msgs.msg.Vector3 rosVector3Msg, Vector3 unityVector3)
        {
            Vector3 rosVector3 = unityVector3.Unity2Ros();

            rosVector3Msg.x = rosVector3.x;
            rosVector3Msg.y = rosVector3.y;
            rosVector3Msg.z = rosVector3.z;
        }
Пример #3
0
        public static void read(geometry_msgs.msg.Vector3 data, Halodi.CDR.CDRDeserializer cdr)
        {
            data.x = cdr.read_type_6();

            data.y = cdr.read_type_6();

            data.z = cdr.read_type_6();
        }
Пример #4
0
 public override void deserialize(MemoryStream stream, geometry_msgs.msg.Vector3 data)
 {
     using (BinaryReader reader = new BinaryReader(stream))
     {
         Halodi.CDR.CDRDeserializer cdr = new Halodi.CDR.CDRDeserializer(reader);
         read(data, cdr);
     }
 }
Пример #5
0
 public override void serialize(geometry_msgs.msg.Vector3 data, MemoryStream stream)
 {
     using (BinaryWriter writer = new BinaryWriter(stream))
     {
         Halodi.CDR.CDRSerializer cdr = new Halodi.CDR.CDRSerializer(writer);
         write(data, cdr);
     }
 }
Пример #6
0
        public static void read(halodi_msgs.msg.ContactPointCommand data, Halodi.CDR.CDRDeserializer cdr)
        {
            data.parent_joint = halodi_msgs.msg.JointNamePubSubType.Create();
            halodi_msgs.msg.JointNamePubSubType.read(data.parent_joint, cdr);

            data.contact_point_id = cdr.read_type_2();

            data.point_in_contact = cdr.read_type_7();


            int normal_length = cdr.read_type_2();

            data.normal = new System.Collections.Generic.List <geometry_msgs.msg.Vector3>(normal_length);
            for (int i = 0; i < normal_length; i++)
            {
                geometry_msgs.msg.Vector3 new_normal = geometry_msgs.msg.Vector3PubSubType.Create();
                geometry_msgs.msg.Vector3PubSubType.read(new_normal, cdr);
                data.normal.Add(new_normal);
            }



            int coefficient_of_friction_length = cdr.read_type_2();

            data.coefficient_of_friction = new System.Collections.Generic.List <double>(coefficient_of_friction_length);
            for (int i = 0; i < coefficient_of_friction_length; i++)
            {
                data.coefficient_of_friction.Add(cdr.read_type_6());
            }



            int maximum_contact_force_length = cdr.read_type_2();

            data.maximum_contact_force = new System.Collections.Generic.List <double>(maximum_contact_force_length);
            for (int i = 0; i < maximum_contact_force_length; i++)
            {
                data.maximum_contact_force.Add(cdr.read_type_6());
            }



            int rho_weight_divider_length = cdr.read_type_2();

            data.rho_weight_divider = new System.Collections.Generic.List <double>(rho_weight_divider_length);
            for (int i = 0; i < rho_weight_divider_length; i++)
            {
                data.rho_weight_divider.Add(cdr.read_type_6());
            }
        }
Пример #7
0
        public static int getCdrSerializedSize(geometry_msgs.msg.Vector3 data, int current_alignment)
        {
            int initial_alignment = current_alignment;

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


            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.FeedbackParameters3D data, Halodi.CDR.CDRDeserializer cdr)
        {
            data.proportional = geometry_msgs.msg.Vector3PubSubType.Create();
            geometry_msgs.msg.Vector3PubSubType.read(data.proportional, cdr);


            int integral_length = cdr.read_type_2();

            data.integral = new System.Collections.Generic.List <geometry_msgs.msg.Vector3>(integral_length);
            for (int i = 0; i < integral_length; i++)
            {
                geometry_msgs.msg.Vector3 new_integral = geometry_msgs.msg.Vector3PubSubType.Create();
                geometry_msgs.msg.Vector3PubSubType.read(new_integral, cdr);
                data.integral.Add(new_integral);
            }


            data.derivative = geometry_msgs.msg.Vector3PubSubType.Create();
            geometry_msgs.msg.Vector3PubSubType.read(data.derivative, cdr);


            int maximum_proportional_error_length = cdr.read_type_2();

            data.maximum_proportional_error = new System.Collections.Generic.List <double>(maximum_proportional_error_length);
            for (int i = 0; i < maximum_proportional_error_length; i++)
            {
                data.maximum_proportional_error.Add(cdr.read_type_6());
            }



            int maximum_integral_windup_length = cdr.read_type_2();

            data.maximum_integral_windup = new System.Collections.Generic.List <double>(maximum_integral_windup_length);
            for (int i = 0; i < maximum_integral_windup_length; i++)
            {
                data.maximum_integral_windup.Add(cdr.read_type_6());
            }



            int maximum_derivative_error_length = cdr.read_type_2();

            data.maximum_derivative_error = new System.Collections.Generic.List <double>(maximum_derivative_error_length);
            for (int i = 0; i < maximum_derivative_error_length; i++)
            {
                data.maximum_derivative_error.Add(cdr.read_type_6());
            }



            int maximum_feedback_length = cdr.read_type_2();

            data.maximum_feedback = new System.Collections.Generic.List <double>(maximum_feedback_length);
            for (int i = 0; i < maximum_feedback_length; i++)
            {
                data.maximum_feedback.Add(cdr.read_type_6());
            }



            int maximum_feedback_rate_length = cdr.read_type_2();

            data.maximum_feedback_rate = new System.Collections.Generic.List <double>(maximum_feedback_rate_length);
            for (int i = 0; i < maximum_feedback_rate_length; i++)
            {
                data.maximum_feedback_rate.Add(cdr.read_type_6());
            }



            int integral_leakage_length = cdr.read_type_2();

            data.integral_leakage = new System.Collections.Generic.List <double>(integral_leakage_length);
            for (int i = 0; i < integral_leakage_length; i++)
            {
                data.integral_leakage.Add(cdr.read_type_6());
            }
        }
Пример #9
0
 public static Vector3 Ros2Unity(this geometry_msgs.msg.Vector3 translation)
 {
     return(new Vector3(-(float)translation.y, (float)translation.z, (float)translation.x));
 }
        public static void read(halodi_msgs.msg.WholeBodyTrajectoryPoint data, Halodi.CDR.CDRDeserializer cdr)
        {
            data.time_from_start = builtin_interfaces.msg.DurationPubSubType.Create();
            builtin_interfaces.msg.DurationPubSubType.read(data.time_from_start, cdr);


            int task_space_commands_length = cdr.read_type_2();

            data.task_space_commands = new System.Collections.Generic.List <halodi_msgs.msg.TaskSpaceCommand>(task_space_commands_length);
            for (int i = 0; i < task_space_commands_length; i++)
            {
                halodi_msgs.msg.TaskSpaceCommand new_task_space_commands = halodi_msgs.msg.TaskSpaceCommandPubSubType.Create();
                halodi_msgs.msg.TaskSpaceCommandPubSubType.read(new_task_space_commands, cdr);
                data.task_space_commands.Add(new_task_space_commands);
            }



            int joint_space_commands_length = cdr.read_type_2();

            data.joint_space_commands = new System.Collections.Generic.List <halodi_msgs.msg.JointSpaceCommand>(joint_space_commands_length);
            for (int i = 0; i < joint_space_commands_length; i++)
            {
                halodi_msgs.msg.JointSpaceCommand new_joint_space_commands = halodi_msgs.msg.JointSpaceCommandPubSubType.Create();
                halodi_msgs.msg.JointSpaceCommandPubSubType.read(new_joint_space_commands, cdr);
                data.joint_space_commands.Add(new_joint_space_commands);
            }



            int contact_point_commands_length = cdr.read_type_2();

            data.contact_point_commands = new System.Collections.Generic.List <halodi_msgs.msg.ContactPointCommand>(contact_point_commands_length);
            for (int i = 0; i < contact_point_commands_length; i++)
            {
                halodi_msgs.msg.ContactPointCommand new_contact_point_commands = halodi_msgs.msg.ContactPointCommandPubSubType.Create();
                halodi_msgs.msg.ContactPointCommandPubSubType.read(new_contact_point_commands, cdr);
                data.contact_point_commands.Add(new_contact_point_commands);
            }



            int icp_offset_command_length = cdr.read_type_2();

            data.icp_offset_command = new System.Collections.Generic.List <geometry_msgs.msg.Vector3>(icp_offset_command_length);
            for (int i = 0; i < icp_offset_command_length; i++)
            {
                geometry_msgs.msg.Vector3 new_icp_offset_command = geometry_msgs.msg.Vector3PubSubType.Create();
                geometry_msgs.msg.Vector3PubSubType.read(new_icp_offset_command, cdr);
                data.icp_offset_command.Add(new_icp_offset_command);
            }



            int left_hand_command_length = cdr.read_type_2();

            data.left_hand_command = new System.Collections.Generic.List <halodi_msgs.msg.HandCommand>(left_hand_command_length);
            for (int i = 0; i < left_hand_command_length; i++)
            {
                halodi_msgs.msg.HandCommand new_left_hand_command = halodi_msgs.msg.HandCommandPubSubType.Create();
                halodi_msgs.msg.HandCommandPubSubType.read(new_left_hand_command, cdr);
                data.left_hand_command.Add(new_left_hand_command);
            }



            int right_hand_command_length = cdr.read_type_2();

            data.right_hand_command = new System.Collections.Generic.List <halodi_msgs.msg.HandCommand>(right_hand_command_length);
            for (int i = 0; i < right_hand_command_length; i++)
            {
                halodi_msgs.msg.HandCommand new_right_hand_command = halodi_msgs.msg.HandCommandPubSubType.Create();
                halodi_msgs.msg.HandCommandPubSubType.read(new_right_hand_command, cdr);
                data.right_hand_command.Add(new_right_hand_command);
            }
        }
        public void Set(WholeBodyTrajectoryPoint other)
        {
            builtin_interfaces.msg.DurationPubSubType.Copy(other.time_from_start, time_from_start);


            if (other.task_space_commands == null)
            {
                task_space_commands = null;
            }
            else
            {
                task_space_commands = new System.Collections.Generic.List <halodi_msgs.msg.TaskSpaceCommand>(other.task_space_commands.Count);
                for (int i1 = 0; i1 < other.task_space_commands.Count; i1++)
                {
                    if (other.task_space_commands[i1] == null)
                    {
                        task_space_commands.Add(null);
                    }
                    else
                    {
                        halodi_msgs.msg.TaskSpaceCommand newElement = halodi_msgs.msg.TaskSpaceCommandPubSubType.Create();
                        halodi_msgs.msg.TaskSpaceCommandPubSubType.Copy(other.task_space_commands[i1], newElement);
                        task_space_commands.Add(newElement);
                    }
                }
            }

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

            if (other.contact_point_commands == null)
            {
                contact_point_commands = null;
            }
            else
            {
                contact_point_commands = new System.Collections.Generic.List <halodi_msgs.msg.ContactPointCommand>(other.contact_point_commands.Count);
                for (int i3 = 0; i3 < other.contact_point_commands.Count; i3++)
                {
                    if (other.contact_point_commands[i3] == null)
                    {
                        contact_point_commands.Add(null);
                    }
                    else
                    {
                        halodi_msgs.msg.ContactPointCommand newElement = halodi_msgs.msg.ContactPointCommandPubSubType.Create();
                        halodi_msgs.msg.ContactPointCommandPubSubType.Copy(other.contact_point_commands[i3], newElement);
                        contact_point_commands.Add(newElement);
                    }
                }
            }

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

            if (other.left_hand_command == null)
            {
                left_hand_command = null;
            }
            else
            {
                left_hand_command = new System.Collections.Generic.List <halodi_msgs.msg.HandCommand>(other.left_hand_command.Count);
                for (int i5 = 0; i5 < other.left_hand_command.Count; i5++)
                {
                    if (other.left_hand_command[i5] == null)
                    {
                        left_hand_command.Add(null);
                    }
                    else
                    {
                        halodi_msgs.msg.HandCommand newElement = halodi_msgs.msg.HandCommandPubSubType.Create();
                        halodi_msgs.msg.HandCommandPubSubType.Copy(other.left_hand_command[i5], newElement);
                        left_hand_command.Add(newElement);
                    }
                }
            }

            if (other.right_hand_command == null)
            {
                right_hand_command = null;
            }
            else
            {
                right_hand_command = new System.Collections.Generic.List <halodi_msgs.msg.HandCommand>(other.right_hand_command.Count);
                for (int i6 = 0; i6 < other.right_hand_command.Count; i6++)
                {
                    if (other.right_hand_command[i6] == null)
                    {
                        right_hand_command.Add(null);
                    }
                    else
                    {
                        halodi_msgs.msg.HandCommand newElement = halodi_msgs.msg.HandCommandPubSubType.Create();
                        halodi_msgs.msg.HandCommandPubSubType.Copy(other.right_hand_command[i6], newElement);
                        right_hand_command.Add(newElement);
                    }
                }
            }
        }
Пример #12
0
 public static Vector3 Ros2Unity(this geometry_msgs.msg.Vector3 translation)
 {
     return(new Vector3((float)translation.X, (float)translation.Y, (float)translation.Z).Ros2Unity());
 }
Пример #13
0
 public static int getCdrSerializedSize(geometry_msgs.msg.Vector3 data)
 {
     return(getCdrSerializedSize(data, 0));
 }
Пример #14
0
        public void Set(FeedbackParameters3D other)
        {
            geometry_msgs.msg.Vector3PubSubType.Copy(other.proportional, proportional);


            if (other.integral == null)
            {
                integral = null;
            }
            else
            {
                integral = new System.Collections.Generic.List <geometry_msgs.msg.Vector3>(other.integral.Count);
                for (int i1 = 0; i1 < other.integral.Count; i1++)
                {
                    if (other.integral[i1] == null)
                    {
                        integral.Add(null);
                    }
                    else
                    {
                        geometry_msgs.msg.Vector3 newElement = geometry_msgs.msg.Vector3PubSubType.Create();
                        geometry_msgs.msg.Vector3PubSubType.Copy(other.integral[i1], newElement);
                        integral.Add(newElement);
                    }
                }
            }
            geometry_msgs.msg.Vector3PubSubType.Copy(other.derivative, derivative);


            if (other.maximum_proportional_error == null)
            {
                maximum_proportional_error = null;
            }
            else
            {
                maximum_proportional_error = new System.Collections.Generic.List <double>(other.maximum_proportional_error.Count);
                for (int i2 = 0; i2 < other.maximum_proportional_error.Count; i2++)
                {
                    maximum_proportional_error.Add(other.maximum_proportional_error[i2]);
                }
            }

            if (other.maximum_integral_windup == null)
            {
                maximum_integral_windup = null;
            }
            else
            {
                maximum_integral_windup = new System.Collections.Generic.List <double>(other.maximum_integral_windup.Count);
                for (int i3 = 0; i3 < other.maximum_integral_windup.Count; i3++)
                {
                    maximum_integral_windup.Add(other.maximum_integral_windup[i3]);
                }
            }

            if (other.maximum_derivative_error == null)
            {
                maximum_derivative_error = null;
            }
            else
            {
                maximum_derivative_error = new System.Collections.Generic.List <double>(other.maximum_derivative_error.Count);
                for (int i4 = 0; i4 < other.maximum_derivative_error.Count; i4++)
                {
                    maximum_derivative_error.Add(other.maximum_derivative_error[i4]);
                }
            }

            if (other.maximum_feedback == null)
            {
                maximum_feedback = null;
            }
            else
            {
                maximum_feedback = new System.Collections.Generic.List <double>(other.maximum_feedback.Count);
                for (int i5 = 0; i5 < other.maximum_feedback.Count; i5++)
                {
                    maximum_feedback.Add(other.maximum_feedback[i5]);
                }
            }

            if (other.maximum_feedback_rate == null)
            {
                maximum_feedback_rate = null;
            }
            else
            {
                maximum_feedback_rate = new System.Collections.Generic.List <double>(other.maximum_feedback_rate.Count);
                for (int i6 = 0; i6 < other.maximum_feedback_rate.Count; i6++)
                {
                    maximum_feedback_rate.Add(other.maximum_feedback_rate[i6]);
                }
            }

            if (other.integral_leakage == null)
            {
                integral_leakage = null;
            }
            else
            {
                integral_leakage = new System.Collections.Generic.List <double>(other.integral_leakage.Count);
                for (int i7 = 0; i7 < other.integral_leakage.Count; i7++)
                {
                    integral_leakage.Add(other.integral_leakage[i7]);
                }
            }
        }
        public void Set(WholeBodyControllerCommand other)
        {
            sequence_id = other.sequence_id;

            halodi_msgs.msg.BalanceModePubSubType.Copy(other.balance_mode, balance_mode);


            if (other.task_space_commands == null)
            {
                task_space_commands = null;
            }
            else
            {
                task_space_commands = new System.Collections.Generic.List <halodi_msgs.msg.TaskSpaceCommand>(other.task_space_commands.Count);
                for (int i1 = 0; i1 < other.task_space_commands.Count; i1++)
                {
                    if (other.task_space_commands[i1] == null)
                    {
                        task_space_commands.Add(null);
                    }
                    else
                    {
                        halodi_msgs.msg.TaskSpaceCommand newElement = halodi_msgs.msg.TaskSpaceCommandPubSubType.Create();
                        halodi_msgs.msg.TaskSpaceCommandPubSubType.Copy(other.task_space_commands[i1], newElement);
                        task_space_commands.Add(newElement);
                    }
                }
            }

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

            if (other.contact_point_commands == null)
            {
                contact_point_commands = null;
            }
            else
            {
                contact_point_commands = new System.Collections.Generic.List <halodi_msgs.msg.ContactPointCommand>(other.contact_point_commands.Count);
                for (int i3 = 0; i3 < other.contact_point_commands.Count; i3++)
                {
                    if (other.contact_point_commands[i3] == null)
                    {
                        contact_point_commands.Add(null);
                    }
                    else
                    {
                        halodi_msgs.msg.ContactPointCommand newElement = halodi_msgs.msg.ContactPointCommandPubSubType.Create();
                        halodi_msgs.msg.ContactPointCommandPubSubType.Copy(other.contact_point_commands[i3], newElement);
                        contact_point_commands.Add(newElement);
                    }
                }
            }

            if (other.driving_command == null)
            {
                driving_command = null;
            }
            else
            {
                driving_command = new System.Collections.Generic.List <halodi_msgs.msg.DrivingCommand>(other.driving_command.Count);
                for (int i4 = 0; i4 < other.driving_command.Count; i4++)
                {
                    if (other.driving_command[i4] == null)
                    {
                        driving_command.Add(null);
                    }
                    else
                    {
                        halodi_msgs.msg.DrivingCommand newElement = halodi_msgs.msg.DrivingCommandPubSubType.Create();
                        halodi_msgs.msg.DrivingCommandPubSubType.Copy(other.driving_command[i4], newElement);
                        driving_command.Add(newElement);
                    }
                }
            }

            if (other.icp_command == null)
            {
                icp_command = null;
            }
            else
            {
                icp_command = new System.Collections.Generic.List <geometry_msgs.msg.Vector3>(other.icp_command.Count);
                for (int i5 = 0; i5 < other.icp_command.Count; i5++)
                {
                    if (other.icp_command[i5] == null)
                    {
                        icp_command.Add(null);
                    }
                    else
                    {
                        geometry_msgs.msg.Vector3 newElement = geometry_msgs.msg.Vector3PubSubType.Create();
                        geometry_msgs.msg.Vector3PubSubType.Copy(other.icp_command[i5], newElement);
                        icp_command.Add(newElement);
                    }
                }
            }
        }
Пример #16
0
 public static void Copy(geometry_msgs.msg.Vector3 src, geometry_msgs.msg.Vector3 target)
 {
     target.Set(src);
 }
Пример #17
0
        public void Set(ContactPointCommand other)
        {
            halodi_msgs.msg.JointNamePubSubType.Copy(other.parent_joint, parent_joint);

            contact_point_id = other.contact_point_id;

            point_in_contact = other.point_in_contact;


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

            if (other.coefficient_of_friction == null)
            {
                coefficient_of_friction = null;
            }
            else
            {
                coefficient_of_friction = new System.Collections.Generic.List <double>(other.coefficient_of_friction.Count);
                for (int i2 = 0; i2 < other.coefficient_of_friction.Count; i2++)
                {
                    coefficient_of_friction.Add(other.coefficient_of_friction[i2]);
                }
            }

            if (other.maximum_contact_force == null)
            {
                maximum_contact_force = null;
            }
            else
            {
                maximum_contact_force = new System.Collections.Generic.List <double>(other.maximum_contact_force.Count);
                for (int i3 = 0; i3 < other.maximum_contact_force.Count; i3++)
                {
                    maximum_contact_force.Add(other.maximum_contact_force[i3]);
                }
            }

            if (other.rho_weight_divider == null)
            {
                rho_weight_divider = null;
            }
            else
            {
                rho_weight_divider = new System.Collections.Generic.List <double>(other.rho_weight_divider.Count);
                for (int i4 = 0; i4 < other.rho_weight_divider.Count; i4++)
                {
                    rho_weight_divider.Add(other.rho_weight_divider[i4]);
                }
            }
        }
Пример #18
0
        public static void read(halodi_msgs.msg.WholeBodyControllerCommand data, Halodi.CDR.CDRDeserializer cdr)
        {
            data.sequence_id = cdr.read_type_2();

            data.balance_mode = halodi_msgs.msg.BalanceModePubSubType.Create();
            halodi_msgs.msg.BalanceModePubSubType.read(data.balance_mode, cdr);


            int task_space_commands_length = cdr.read_type_2();

            data.task_space_commands = new System.Collections.Generic.List <halodi_msgs.msg.TaskSpaceCommand>(task_space_commands_length);
            for (int i = 0; i < task_space_commands_length; i++)
            {
                halodi_msgs.msg.TaskSpaceCommand new_task_space_commands = halodi_msgs.msg.TaskSpaceCommandPubSubType.Create();
                halodi_msgs.msg.TaskSpaceCommandPubSubType.read(new_task_space_commands, cdr);
                data.task_space_commands.Add(new_task_space_commands);
            }



            int joint_space_commands_length = cdr.read_type_2();

            data.joint_space_commands = new System.Collections.Generic.List <halodi_msgs.msg.JointSpaceCommand>(joint_space_commands_length);
            for (int i = 0; i < joint_space_commands_length; i++)
            {
                halodi_msgs.msg.JointSpaceCommand new_joint_space_commands = halodi_msgs.msg.JointSpaceCommandPubSubType.Create();
                halodi_msgs.msg.JointSpaceCommandPubSubType.read(new_joint_space_commands, cdr);
                data.joint_space_commands.Add(new_joint_space_commands);
            }



            int contact_point_commands_length = cdr.read_type_2();

            data.contact_point_commands = new System.Collections.Generic.List <halodi_msgs.msg.ContactPointCommand>(contact_point_commands_length);
            for (int i = 0; i < contact_point_commands_length; i++)
            {
                halodi_msgs.msg.ContactPointCommand new_contact_point_commands = halodi_msgs.msg.ContactPointCommandPubSubType.Create();
                halodi_msgs.msg.ContactPointCommandPubSubType.read(new_contact_point_commands, cdr);
                data.contact_point_commands.Add(new_contact_point_commands);
            }



            int driving_command_length = cdr.read_type_2();

            data.driving_command = new System.Collections.Generic.List <halodi_msgs.msg.DrivingCommand>(driving_command_length);
            for (int i = 0; i < driving_command_length; i++)
            {
                halodi_msgs.msg.DrivingCommand new_driving_command = halodi_msgs.msg.DrivingCommandPubSubType.Create();
                halodi_msgs.msg.DrivingCommandPubSubType.read(new_driving_command, cdr);
                data.driving_command.Add(new_driving_command);
            }



            int icp_command_length = cdr.read_type_2();

            data.icp_command = new System.Collections.Generic.List <geometry_msgs.msg.Vector3>(icp_command_length);
            for (int i = 0; i < icp_command_length; i++)
            {
                geometry_msgs.msg.Vector3 new_icp_command = geometry_msgs.msg.Vector3PubSubType.Create();
                geometry_msgs.msg.Vector3PubSubType.read(new_icp_command, cdr);
                data.icp_command.Add(new_icp_command);
            }
        }