public static void read(halodi_msgs.msg.JointNullSpaceConfiguration data, Halodi.CDR.CDRDeserializer cdr)
        {
            data.joint = halodi_msgs.msg.JointNamePubSubType.Create();
            halodi_msgs.msg.JointNamePubSubType.read(data.joint, cdr);

            data.q_nullspace = cdr.read_type_6();
        }
 public override void deserialize(MemoryStream stream, halodi_msgs.msg.JointNullSpaceConfiguration data)
 {
     using (BinaryReader reader = new BinaryReader(stream))
     {
         Halodi.CDR.CDRDeserializer cdr = new Halodi.CDR.CDRDeserializer(reader);
         read(data, cdr);
     }
 }
 public override void serialize(halodi_msgs.msg.JointNullSpaceConfiguration data, MemoryStream stream)
 {
     using (BinaryWriter writer = new BinaryWriter(stream))
     {
         Halodi.CDR.CDRSerializer cdr = new Halodi.CDR.CDRSerializer(writer);
         write(data, cdr);
     }
 }
        public static int getCdrSerializedSize(halodi_msgs.msg.JointNullSpaceConfiguration data, int current_alignment)
        {
            int initial_alignment = current_alignment;

            current_alignment += halodi_msgs.msg.JointNamePubSubType.getCdrSerializedSize(data.joint, current_alignment);

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



            return(current_alignment - initial_alignment);
        }
        public void Set(TaskSpaceCommand other)
        {
            halodi_msgs.msg.ReferenceFrameNamePubSubType.Copy(other.body_frame, body_frame);

            halodi_msgs.msg.ReferenceFrameNamePubSubType.Copy(other.expressed_in_frame, expressed_in_frame);

            express_in_z_up = other.express_in_z_up;

            geometry_msgs.msg.PosePubSubType.Copy(other.pose, pose);

            geometry_msgs.msg.Vector3PubSubType.Copy(other.angular_velocity, angular_velocity);

            geometry_msgs.msg.Vector3PubSubType.Copy(other.linear_velocity, linear_velocity);

            geometry_msgs.msg.Vector3PubSubType.Copy(other.angular_acceleration, angular_acceleration);

            geometry_msgs.msg.Vector3PubSubType.Copy(other.linear_acceleration, linear_acceleration);


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

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

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

            if (other.nullspace_command == null)
            {
                nullspace_command = null;
            }
            else
            {
                nullspace_command = new System.Collections.Generic.List <halodi_msgs.msg.JointNullSpaceConfiguration>(other.nullspace_command.Count);
                for (int i4 = 0; i4 < other.nullspace_command.Count; i4++)
                {
                    if (other.nullspace_command[i4] == null)
                    {
                        nullspace_command.Add(null);
                    }
                    else
                    {
                        halodi_msgs.msg.JointNullSpaceConfiguration newElement = halodi_msgs.msg.JointNullSpaceConfigurationPubSubType.Create();
                        halodi_msgs.msg.JointNullSpaceConfigurationPubSubType.Copy(other.nullspace_command[i4], newElement);
                        nullspace_command.Add(newElement);
                    }
                }
            }
        }
Exemple #6
0
        public static void read(halodi_msgs.msg.TaskSpaceCommand data, Halodi.CDR.CDRDeserializer cdr)
        {
            data.body_frame = halodi_msgs.msg.ReferenceFrameNamePubSubType.Create();
            halodi_msgs.msg.ReferenceFrameNamePubSubType.read(data.body_frame, cdr);

            data.expressed_in_frame = halodi_msgs.msg.ReferenceFrameNamePubSubType.Create();
            halodi_msgs.msg.ReferenceFrameNamePubSubType.read(data.expressed_in_frame, cdr);

            data.express_in_z_up = cdr.read_type_7();

            data.pose = geometry_msgs.msg.PosePubSubType.Create();
            geometry_msgs.msg.PosePubSubType.read(data.pose, cdr);

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

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

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

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


            int passivity_input_length = cdr.read_type_2();

            data.passivity_input = new System.Collections.Generic.List <halodi_msgs.msg.PassivityData>(passivity_input_length);
            for (int i = 0; i < passivity_input_length; i++)
            {
                halodi_msgs.msg.PassivityData new_passivity_input = halodi_msgs.msg.PassivityDataPubSubType.Create();
                halodi_msgs.msg.PassivityDataPubSubType.read(new_passivity_input, cdr);
                data.passivity_input.Add(new_passivity_input);
            }



            int orientation_feedback_parameters_length = cdr.read_type_2();

            data.orientation_feedback_parameters = new System.Collections.Generic.List <halodi_msgs.msg.FeedbackParameters3D>(orientation_feedback_parameters_length);
            for (int i = 0; i < orientation_feedback_parameters_length; i++)
            {
                halodi_msgs.msg.FeedbackParameters3D new_orientation_feedback_parameters = halodi_msgs.msg.FeedbackParameters3DPubSubType.Create();
                halodi_msgs.msg.FeedbackParameters3DPubSubType.read(new_orientation_feedback_parameters, cdr);
                data.orientation_feedback_parameters.Add(new_orientation_feedback_parameters);
            }



            int position_feedback_parameters_length = cdr.read_type_2();

            data.position_feedback_parameters = new System.Collections.Generic.List <halodi_msgs.msg.FeedbackParameters3D>(position_feedback_parameters_length);
            for (int i = 0; i < position_feedback_parameters_length; i++)
            {
                halodi_msgs.msg.FeedbackParameters3D new_position_feedback_parameters = halodi_msgs.msg.FeedbackParameters3DPubSubType.Create();
                halodi_msgs.msg.FeedbackParameters3DPubSubType.read(new_position_feedback_parameters, cdr);
                data.position_feedback_parameters.Add(new_position_feedback_parameters);
            }



            int nullspace_command_length = cdr.read_type_2();

            data.nullspace_command = new System.Collections.Generic.List <halodi_msgs.msg.JointNullSpaceConfiguration>(nullspace_command_length);
            for (int i = 0; i < nullspace_command_length; i++)
            {
                halodi_msgs.msg.JointNullSpaceConfiguration new_nullspace_command = halodi_msgs.msg.JointNullSpaceConfigurationPubSubType.Create();
                halodi_msgs.msg.JointNullSpaceConfigurationPubSubType.read(new_nullspace_command, cdr);
                data.nullspace_command.Add(new_nullspace_command);
            }
        }
 public static void Copy(halodi_msgs.msg.JointNullSpaceConfiguration src, halodi_msgs.msg.JointNullSpaceConfiguration target)
 {
     target.Set(src);
 }
        public static void write(halodi_msgs.msg.JointNullSpaceConfiguration data, Halodi.CDR.CDRSerializer cdr)
        {
            halodi_msgs.msg.JointNamePubSubType.write(data.joint, cdr);

            cdr.write_type_6(data.q_nullspace);
        }
 public static int getCdrSerializedSize(halodi_msgs.msg.JointNullSpaceConfiguration data)
 {
     return(getCdrSerializedSize(data, 0));
 }