Victrid / splatplost

A software-based SplatPost plotter.
GNU General Public License v3.0
191 stars 17 forks source link

Cannot generate plotting plan #19

Closed MagicLoki closed 2 years ago

MagicLoki commented 2 years ago

loki@loki-virtual-machine:~/Desktop$ sudo splatplan -i inkling.png -o test [sudo] loki's password: Blocks to be visited: 0%| | 0/24 [00:00<?, ?it/s]

The execution progress of the program stopped at 0%. After I waited for a few minutes, the terminal interface closed automatically. I tried several times and all failed

Using Ubuntu 22.04.1 LTS

``WI_AW RQH}$39F9S5NITN

Victrid commented 2 years ago

Hello, can you provide your inkling file so we can look into it? thanks

TattlingElk commented 2 years ago

I have the exact same problem on my end, one of my files can get to 2/24 before crashing as well. Is there a specific way to prepare our images to make it work?

Victrid commented 2 years ago

@MagicLoki @TattlingElk Maybe it's the memory problem. the plotting plan is getting quite large if you have lots of not-connected item on them.

I'll add a "continue" option to the plotter, and change the planning strategy, which allows to plot in multiple runs.

Victrid commented 2 years ago

You can open the system monitor (系统监视器?) or htop to view if out-of-memory causes the problem.

MagicLoki commented 2 years ago

inkling_black

MagicLoki commented 2 years ago

U7Z1T D91%%%OJLD)4H0CY I now assign Ubuntu 8G of memory, but it still doesn't help, it looks like the CPU is full

Victrid commented 2 years ago

@MagicLoki It fills up my 32G memory machine

It seems that the DP algorithm solving TSP problem is taking too much memory.

I'll fix the memory issue as soon as I can.

Logic530 commented 2 years ago

@Victrid I do appreciate your hard work towards the optimization of the plotting algorithm, while I think a much simpler solution would be realeasing a version of splaplost without any optimization algorithm. (Just scanning lines when plotting) After all, the plotting time without optimization is fairly acceptable. (Just a little bit more hours I think🤔)(And it's much easier to correct any plotting error when scanning plotting)(Also it could save us from installing countless python data science packages and their dependencies😂)

Victrid commented 2 years ago

@Victrid I do appreciate your hard work towards the optimization of the plotting algorithm, while I think a much simpler solution would be realeasing a version of splaplost without any optimization algorithm. (Just scanning lines when plotting) After all, the plotting time without optimization is fairly acceptable. (Just a little bit more hours I thinkthinking)(And it's much easier to correct any plotting error when scanning plotting)(Also it could save us from installing countless python data science packages and their dependenciesjoy)

I'll dive into that, but removing data science packages completely would be much harder to handle matrices.

At least we need to have numpy :joy:

Logic530 commented 2 years ago

@Victrid numpy is totally fine😂

TattlingElk commented 2 years ago

I can confirm that using an image that is much more simple in graphics does indeed go through successfully.

Logic530 commented 2 years ago

@Victrid 还有个想法就是放弃掉蓝牙控制部分的代码,仅保留计算路径的功能,将计算的路径结果输出为 NXBT 的宏脚本,直接配合使用 NXBT 的从文件运行宏指令的方法画图。原因包括 NXBT 的安装体验还是修的比较好的,使用命令行敲一下就能自动安装成功,相对的今天下午我尝试sudo pip install splatplost就一直失败 (在全新的 ubuntu desktop 22.04 虚拟机环境下 python-dbus装不上) (死去的配环境记忆开始攻击我),以及少维护一部分代码可以省很多精力 (更多时间用于优化算法),目前的splatplan命令的功能只需一些微小的修改就可以实现上述效果。NXBT 运行宏的便捷度和稳定性我体验感觉都没什么问题 (用旧版的 insgen.py 生成的 .order 文件手动修改格式作为 NXBT 宏运行) (经我测试将按键按下和松开之间的间隔设置为 0.08s 可以稳定运行不会吞键) 以上,不好意思给作者提了这么多要求,但过两天喷三就要出了啊,还是希望能让更多人第一时间用上,非常感谢。

Victrid commented 2 years ago

吞键应该主要是蓝牙链接不稳定的问题。这个跟蓝牙无线网卡的质量关系比较大,而且时间设长了又会导致识别为连键。

python-dbus应该是nxbt的依赖,现在蓝牙部分都是NXBT在干。

把nxbt加在代码里而不是单独列出,主要还是希望之后能够把以USB手柄连接的方法合并进来,稳定性比蓝牙的实现高很多。

现在正在搞断点恢复和修复重画错误图形的功能,喷3出了之后应该会更方便,因为喷3的橡皮是绑在B键上的。

Victrid commented 2 years ago

By now the figure can be generate correctly. Please update splatplost to version 0.1.4+ with pip.

pip install -U splatplost

This will also introduce the stable mode, add --stable to the command line to enable it.

photo_2022-09-01_21-42-15