Octolapse icon indicating copy to clipboard operation
Octolapse copied to clipboard

Snapshots not stabilized.

Open Shadowen opened this issue 8 years ago • 90 comments

If this is a feature request describe it here

My snapshots aren't stabilized properly. The printer is still doing the stabilization movement, but the snapshot appears to be taken at the wrong time.

Version of Octolapse

Octolapse Version: Octolapse v0.3.1

Version of OctoPrint

OctoPrint Version: OctoPrint 1.3.8

When you ran into the problem, did you have diagnostic logging enabled?

Diagnostic Logging was Enabled: YES

What were you doing when the problem occurred

Run OctoLapse-enabled print. Settings as below.

What should have happened?

Stabilized print at printer's rear-left corner.

What happened instead?

Stabilization occurred, but snapshots were happening while the extruder head was still on the print, rather than in the corner. Likely snapshots were mis-timed.

Operating System running OctoPrint and Octolapse

OS Name: OctoPi Os Version: OctoPi 0.14.0

Printer model & used firmware incl. version

Printer Model: Maker Select v2.1 w/ RAMPS v1.4, Chimera toolhead (dual extrusion) Entire print executed with T1 (second tool). This may be relevant as T0 is unheated/unused throughout the entire print. Printer Firmware Version: Slightly modified Marlin 1.1.x (bugfix branch)

Link to the gcode file you were printing when the problem occurred

Link to Gcode File: CuteOcto.gcode

Link to settings.json

Link to settings.json with all passwords removed: Settings.json Stabilization: Fixed - Extruder at Back Left (default) X: Relative Coordinate 1% Y: Relative Coordinate 99% ??? What are relative coordinates?

Link to plugin_octolapse.log

Link to plugin_octolapse.log: octolapse.log

Link to octoprint.log

Link to octoprint.log: octoprint.log

Screenshots and/or videos of the problem:

Screenshot/Video Links: Attempt 1 - stabilization fails halfway through. Print was done in Vase mode. Gcode not provided. It's not clear which file the logs pertain to. Video - stabilization never occurs. Print was done in normal mode (0.18 first layer height, 0.2 layer height). Print is sliced at 50% size.

Shadowen avatar Apr 20 '18 22:04 Shadowen

I had the same problem on one of my printers...I increased the snapshot delay in the OctoLapse camera settings and it fixed it for me...I went to 250ms from the default 125ms.

ejjenkins avatar Apr 20 '18 22:04 ejjenkins

I thought that Octolapse should fill the printer's command buffer somehow to ensure the command is executed correctly... See https://github.com/yschaeff/slic3r_post_processing/blob/master/slic3r-post.py for how someone else implemented the movement portion.

Shadowen avatar Apr 20 '18 23:04 Shadowen

Is the printhead moving to the correct location, but the snapshot is being taken at the wrong time? If so, I have heard of some other cases of unusually large snapshot delays being necessary to get a stable video. I'm investigating but am having a hard time reproducing. I'll get to the bottom of this soon hopefully.

If the printhead is not moving to the right place, let me know and I'll get back to the drawing board.

In any case I'll take a closer look in the morning.

On Fri, Apr 20, 2018, 6:13 PM Wesley Heung [email protected] wrote:

I thought that Octolapse should fill the printer's command buffer somehow to ensure the command is executed correctly... See https://github.com/yschaeff/slic3r_post_processing/blob/master/slic3r-post.py for how someone else implemented the movement portion.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/FormerLurker/Octolapse/issues/149#issuecomment-383245063, or mute the thread https://github.com/notifications/unsubscribe-auth/Af0UuPqz4kzHH6d_SysGbiwp0VYPRxkuks5tqmuTgaJpZM4TeKMQ .

FormerLurker avatar Apr 21 '18 03:04 FormerLurker

I'm seeing the print head move to the correct location, but the snapshot doesn't even seem to be "off by a bit" - it seems to be taking the snapshot without even waiting for the printhead to move.

I'm thinking that OctoLapse isn't waiting for the move command to finish executing before it triggers the snapshot, but I'm not exactly familiar with how the snapshots are triggered.

Thanks for looking into it!

Shadowen avatar Apr 21 '18 04:04 Shadowen

It is probably taking too long to acquire the snapshot, and is grabbing a frame after returning to the start location. Try this as a test. Set the delay (camera profile) to 3000 and run a short test print and let me know how the timelapse looks. If that fixes it maybe you can help me debug further?

On Fri, Apr 20, 2018, 11:06 PM Wesley Heung [email protected] wrote:

I'm seeing the print head move to the correct location, but the snapshot doesn't even seem to be "off by a bit" - it seems to be taking the snapshot without even waiting for the printhead to move.

I'm thinking that OctoLapse isn't waiting for the move command to finish executing before it triggers the snapshot, but I'm not exactly familiar with how the snapshots are triggered.

Thanks for looking into it!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/FormerLurker/Octolapse/issues/149#issuecomment-383266016, or mute the thread https://github.com/notifications/unsubscribe-auth/Af0UuPIBj2qpINMqMO122Ksx_PMz4kcoks5tqrA9gaJpZM4TeKMQ .

FormerLurker avatar Apr 21 '18 04:04 FormerLurker

I'll give that a shot tomorrow and see what I can come up with. Thanks!

Shadowen avatar Apr 21 '18 05:04 Shadowen

Looks like that does the trick (mostly).

I suppose the correct solution would be to wait for the snapshot to finish (image capture) before resuming the print? I'll see if I can do that when I have some free time.

Shadowen avatar Apr 22 '18 21:04 Shadowen

I have the same issue, it use to be I could only do "center", and that would work most of the time, now even that doesn't work sometimes. I'll try increasing the delay.

vertigo235 avatar Apr 23 '18 13:04 vertigo235

@Shadowen and @vertigo235, I will try making the snapshot acquisition routine synchronous and we can see if that helps at all.

FormerLurker avatar Apr 23 '18 14:04 FormerLurker

Am having the same problem moving the delay to 3000 ms seems to have fixed it some. Get a little bit of the head not completely moving to its position before taking snapshot. Will try higher then 3000 ms but thats a heck of a delay =)

Update:
I had to put my delay to 5000ms and it works well now in test mode will try a calibration cube and see how that works now.

m2oore avatar Apr 24 '18 01:04 m2oore

That is a very large delay.. too much. What hardware are you running, including your camera? Also, what resolution and framerate is your camera?

FormerLurker avatar Apr 24 '18 02:04 FormerLurker

Running CR-10S Using Th3d U1.R1.6 Firmware Camera is a Logitech C270 Resolution: 1280x720 Framerate: 30

Also, running it at 5000ms got a perfect timelapse

TimeLapse

m2oore avatar Apr 24 '18 02:04 m2oore

@m2oore, raspberry pi? If so, what model. Octopi? Sorry to be so nosy, lol!

FormerLurker avatar Apr 24 '18 02:04 FormerLurker

Yes Raspberry Pi 3 Model B Octoprint 1.3.8 Octopi 0.14.0

m2oore avatar Apr 24 '18 02:04 m2oore

Was there any resolution to this issue? I am experiencing the same problem...

I was running 0.31 of Octolapse on 1.3.7RC and everything was fine, but when I upgraded to 1.3.8 the stabilization stopped working. The head will move to the correct place for the stabilization, but the image isn't take right away and is delayed 2-3 seconds, and by the time the image is taken the print head has moved back to printing.

Failed Stabilize Video https://www.dropbox.com/s/k5ydjna5mbvwlrp/3DBenchy_20180508084205.mp4?dl=0

Version of Octolapse Octolapse Version: Octolapse v0.3.1

Version of OctoPrint OctoPrint Version: OctoPrint 1.3.8

When you ran into the problem, did you have diagnostic logging enabled? No I have not done a print with diagnostic logging enabled.

What were you doing when the problem occurred Just running my Anet A8 printer like I normally would.

What should have happened? The timelapse should have been stabilized, with the printhead in the fixed in the center of the build tray.

What happened instead? The timelapse video that was rendered looks like the basic timelapse videos from OctoPrint.

Operating System running OctoPrint and Octolapse OS Name: OctoPi Os Version: OctoPi 0.13 and 0.15 (I updated to 0.15 last night and the problem still persists) Raspberry Pi 3

Printer model & used firmware (incl. version) Printer Model: Anet A8, stock hardware Printer Firmware Version: Marlin 1.1.8, with some customization for pausing, and basic speeds and feeds.

Link to the gcode file you were printing when the problem occurred https://www.dropbox.com/s/p52f5x7snbcoq4j/3DBenchy.gcode?dl=0

Stabilization: Fixed - Extruder Center X: Relative Coordinate 50% Y: Relative Coordinate 50%

Link to plugin_octolapse.log https://www.dropbox.com/s/lp2egnhyp8j0tn5/plugin_octolapse.log.2018-05-08?dl=0

Screenshots and/or videos of the problem: Screenshot/Video Links:

  1. Run last night after my update to OctoPi 0.15 https://www.dropbox.com/s/k5ydjna5mbvwlrp/3DBenchy_20180508084205.mp4?dl=0

Boymeetsmill avatar May 08 '18 22:05 Boymeetsmill

@Boymeetsmill, I believe there is a threading problem that affects some specific hardware/firmware combinations that is causing the snapshot delay to be quite high. Try editing your camera profile and turning up the snapshot delay. I recommend doubling it until the image is stabilized.

Progress has been kind of slow for the last month due to some work related issues, so I apologize that this issue hasn't already been dealt with. I hope to have this and some other items fixed as soon as things let up a bit :)

FormerLurker avatar May 09 '18 15:05 FormerLurker

@FormerLurker I have tried upping the delay, going to 2000ms almost fixed it. There are two hiccups in the beginning, but overall the time lapse much better.

https://www.dropbox.com/s/hms0y18s7x64x0w/3DBenchy_20180510072801.mp4?dl=0

Boymeetsmill avatar May 10 '18 18:05 Boymeetsmill

@Boymeetsmill, I'm glad it's a bit better. 2000MS is way too high, so I'll let you know when I have some new code for you to test.

FormerLurker avatar May 10 '18 18:05 FormerLurker

I can confirm the observed behavior with:

Octolapse Version: 0.3.1 OctoPrint Version: 1.3.8 (installed from source, not from octopi image) Running on: Rasberry Pi 2 (900MHz) OS Name: Raspbian Os Version: 2018-03-13-raspbian-stretch-lite Printer Model: Anet A6 Printer Firmware Version: Marlin 1.1.8 + autolevel customization Using octolapse settings:

  • printer: Anet A8
  • stabilization: fixed - extruder at center
  • snapshot: height 0.20mm
  • camera: default webcam (RasPi camera)

Timelapse will be stable if and only if snapshot delay is set to 2500ms or higher.

Currently not logging. If it helps, I could provide log files (with the new logging features of 13-May-2018).

a-w avatar May 14 '18 08:05 a-w

same issue here.

Octolapse Version 0.3.1 OctoPrint Version 1.3.8 Raspberry Pi 3 Printer Model: Custom CoreXY (using MK3 profile) stabilization: fixed - extruder at back snapshot: layer change camera: Microsoft LifeCam Studio

Core3dTech avatar Jun 12 '18 19:06 Core3dTech