(self)
return buf.raw
Serialize the model to a string of bytes.
Serialize the model to a string of bytes.
Serialize the model to a string of bytes .
def to_bytes(self):
    """Serialize the model to a string of bytes."""
    bufsize = mjlib.mj_sizeModel(self.ptr)
    buf = ctypes.create_string_buffer(bufsize)
    mjlib.mj_saveModel(self.ptr, None, buf, bufsize)
    return buf.raw
def to_bytes ( self ) : bufsize = mjlib . mj_sizeModel ( self . ptr ) buf = ctypes . create_string_buffer ( bufsize ) mjlib . mj_saveModel ( self . ptr , None , buf , bufsize ) return buf . raw