def serialize(self, buff):
    '\n    serialize message into buffer\n    :param buff: buffer, ``StringIO``\n    '
    try:
        _x = self.model_name
        length = len(_x)
        if (python3 or (type(_x) == unicode)):
            _x = _x.encode('utf-8')
            length = len(_x)
        buff.write(struct.pack(('<I%ss' % length), length, _x))
        _x = self
        buff.write(_get_struct_3I().pack(_x.joint_trajectory.header.seq, _x.joint_trajectory.header.stamp.secs, _x.joint_trajectory.header.stamp.nsecs))
        _x = self.joint_trajectory.header.frame_id
        length = len(_x)
        if (python3 or (type(_x) == unicode)):
            _x = _x.encode('utf-8')
            length = len(_x)
        buff.write(struct.pack(('<I%ss' % length), length, _x))
        length = len(self.joint_trajectory.joint_names)
        buff.write(_struct_I.pack(length))
        for val1 in self.joint_trajectory.joint_names:
            length = len(val1)
            if (python3 or (type(val1) == unicode)):
                val1 = val1.encode('utf-8')
                length = len(val1)
            buff.write(struct.pack(('<I%ss' % length), length, val1))
        length = len(self.joint_trajectory.points)
        buff.write(_struct_I.pack(length))
        for val1 in self.joint_trajectory.points:
            length = len(val1.positions)
            buff.write(_struct_I.pack(length))
            pattern = ('<%sd' % length)
            buff.write(struct.pack(pattern, *val1.positions))
            length = len(val1.velocities)
            buff.write(_struct_I.pack(length))
            pattern = ('<%sd' % length)
            buff.write(struct.pack(pattern, *val1.velocities))
            length = len(val1.accelerations)
            buff.write(_struct_I.pack(length))
            pattern = ('<%sd' % length)
            buff.write(struct.pack(pattern, *val1.accelerations))
            length = len(val1.effort)
            buff.write(_struct_I.pack(length))
            pattern = ('<%sd' % length)
            buff.write(struct.pack(pattern, *val1.effort))
            _v1 = val1.time_from_start
            _x = _v1
            buff.write(_get_struct_2i().pack(_x.secs, _x.nsecs))
        _x = self
        buff.write(_get_struct_7d2B().pack(_x.model_pose.position.x, _x.model_pose.position.y, _x.model_pose.position.z, _x.model_pose.orientation.x, _x.model_pose.orientation.y, _x.model_pose.orientation.z, _x.model_pose.orientation.w, _x.set_model_pose, _x.disable_physics_updates))
    except struct.error as se:
        self._check_types(struct.error(("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))))
    except TypeError as te:
        self._check_types(ValueError(("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))))
serialize message into buffer
:param buff: buffer, ``StringIO``
def serialize(self, buff):
    '\n    serialize message into buffer\n    :param buff: buffer, ``StringIO``\n    '
    try:
        _x = self.model_name
        length = len(_x)
        if (python3 or (type(_x) == unicode)):
            _x = _x.encode('utf-8')
            length = len(_x)
        buff.write(struct.pack(('<I%ss' % length), length, _x))
        _x = self
        buff.write(_get_struct_3I().pack(_x.joint_trajectory.header.seq, _x.joint_trajectory.header.stamp.secs, _x.joint_trajectory.header.stamp.nsecs))
        _x = self.joint_trajectory.header.frame_id
        length = len(_x)
        if (python3 or (type(_x) == unicode)):
            _x = _x.encode('utf-8')
            length = len(_x)
        buff.write(struct.pack(('<I%ss' % length), length, _x))
        length = len(self.joint_trajectory.joint_names)
        buff.write(_struct_I.pack(length))
        for val1 in self.joint_trajectory.joint_names:
            length = len(val1)
            if (python3 or (type(val1) == unicode)):
                val1 = val1.encode('utf-8')
                length = len(val1)
            buff.write(struct.pack(('<I%ss' % length), length, val1))
        length = len(self.joint_trajectory.points)
        buff.write(_struct_I.pack(length))
        for val1 in self.joint_trajectory.points:
            length = len(val1.positions)
            buff.write(_struct_I.pack(length))
            pattern = ('<%sd' % length)
            buff.write(struct.pack(pattern, *val1.positions))
            length = len(val1.velocities)
            buff.write(_struct_I.pack(length))
            pattern = ('<%sd' % length)
            buff.write(struct.pack(pattern, *val1.velocities))
            length = len(val1.accelerations)
            buff.write(_struct_I.pack(length))
            pattern = ('<%sd' % length)
            buff.write(struct.pack(pattern, *val1.accelerations))
            length = len(val1.effort)
            buff.write(_struct_I.pack(length))
            pattern = ('<%sd' % length)
            buff.write(struct.pack(pattern, *val1.effort))
            _v1 = val1.time_from_start
            _x = _v1
            buff.write(_get_struct_2i().pack(_x.secs, _x.nsecs))
        _x = self
        buff.write(_get_struct_7d2B().pack(_x.model_pose.position.x, _x.model_pose.position.y, _x.model_pose.position.z, _x.model_pose.orientation.x, _x.model_pose.orientation.y, _x.model_pose.orientation.z, _x.model_pose.orientation.w, _x.set_model_pose, _x.disable_physics_updates))
    except struct.error as se:
        self._check_types(struct.error(("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))))
    except TypeError as te:
        self._check_types(ValueError(("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))))