Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Setting tool offset using USB microscope

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    7
    63
    4.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Danalundefined
      Danal @dc42
      last edited by

      @dc42 said in Setting tool offset using USB microscope:

      @Danal said in Setting tool offset using USB microscope:

      P.S. That's why Python at the moment... a better place might be conditional G-Code, but that does not yet work from the Pi DSF

      Expressions within GCode commands do work from the Pi DSF in RRF 3.04. It's meta commands such as 'if' and 'while' that don't yet.

      Good point. Lots of progress being made very quickly. Which is quite exciting!!

      It is probably more clear to say that touchplate oriented stuff can/could/will be done in Cond G-Code at some point very soon now as that all progresses. On the other hand, Camera based stuff seems like it will be on the Pi for the foreseeable planning horizon.

      Delta / Kossel printer fanatic

      1 Reply Last reply Reply Quote 0
      • Danalundefined
        Danal @tekstyle
        last edited by

        @tekstyle said in Setting tool offset using USB microscope:

        you won't believe this. I used my other laptop running windows 8, win32diskimager to load the duetpi image. and that worked. i have no idea why using balena etcher on win 10 doesn't work.

        Good news is you are up and have a reproducable path.

        Odd thing is I use W10 with Balena for all my SD cards for PIs, and I probably build two a week. Well, maybe one a week. Anyway, it has been trouble free.

        Anyway, glad to see you have a working SD, feel free to ask other questions, I'm eager for testing of the camera based scripts in particular.

        Sometime today I'm going to post an entirely new set of "machine vision" scripts... had some breakthroughs in the last 24 hours. Look for a new top-level post in a few hours.

        Delta / Kossel printer fanatic

        tekstyleundefined 1 Reply Last reply Reply Quote 0
        • tekstyleundefined
          tekstyle @Danal
          last edited by

          @Danal

          Unopenned terminal typed CD ~/Desktop/Duet

          My folder is on the Desktop and I renamed it to Duet. Didn't find the path. So I just right clicked the .sh file and selected open in terminal. I'll see how it goes after work.

          1 Reply Last reply Reply Quote 0
          • tekstyleundefined
            tekstyle
            last edited by tekstyle

            pi@duet3:~/Desktop/Duet $ python3 toolAlignImage.py
            Traceback (most recent call last):
            File "toolAlignImage.py", line 11, in <module>
            import cv2
            ModuleNotFoundError: No module named 'cv2'

            this is what i am getting when i try to run toolAlignImage.py. i have the camera plugged in as well when I attempt to run the *.py file. it is not connected in any way to the duet2wifi for obvious reasons.

            1 Reply Last reply Reply Quote 0
            • Danalundefined
              Danal
              last edited by

              That means that OpenCV is not installed.

              You can re-run the installOpenCV.sh any number of times. It is long enough that you may need to ensure your Pi does not go to sleep or otherwise time out. It does produce yellow warnings at various points; it should not produce any red failures.

              Important If you re-run it, when it finishes, copy the last dozen or so lines of output and post them here.

              Also, see this post: https://forum.duet3d.com/topic/15026/tool-alignment-machine-vision-some-progress

              I'd highly, highly recommend switching to the code described in that thread. You will still need OpenCV...

              Delta / Kossel printer fanatic

              tekstyleundefined 1 Reply Last reply Reply Quote 0
              • tekstyleundefined
                tekstyle @Danal
                last edited by

                @Danal said in Setting tool offset using USB microscope:

                That means that OpenCV is not installed.

                You can re-run the installOpenCV.sh any number of times. It is long enough that you may need to ensure your Pi does not go to sleep or otherwise time out. It does produce yellow warnings at various points; it should not produce any red failures.

                Important If you re-run it, when it finishes, copy the last dozen or so lines of output and post them here.

                Also, see this post: https://forum.duet3d.com/topic/15026/tool-alignment-machine-vision-some-progress

                I'd highly, highly recommend switching to the code described in that thread. You will still need OpenCV...

                How do u turn off sleep in duetpi? I can't seem to find it in any menu unlike the raspbian os.

                1 Reply Last reply Reply Quote 0
                • Danalundefined
                  Danal
                  last edited by Danal

                  https://www.google.com/search?q=disable+sleep+raspberry+pi

                  Delta / Kossel printer fanatic

                  1 Reply Last reply Reply Quote 0
                  • tekstyleundefined
                    tekstyle
                    last edited by

                    i tried to disable sleep. i think it worked. then during the install with the file from https://github.com/DanalEstes/installOpenCV, it was going well for a few hours until it froze. wished i can copy and paste what happened.

                    i am using a 32gb sandisk. i do not have an original duetpi card and i am using a raspberry pi model 3B

                    Danalundefined 1 Reply Last reply Reply Quote 0
                    • Danalundefined
                      Danal @tekstyle
                      last edited by Danal

                      @tekstyle said in Setting tool offset using USB microscope:

                      i do not have an original duetpi card and i am using a raspberry pi model 3B

                      Do you mean physical card? Any "brand name" card should do fine. Most of mine are Sandisk. I'm running a 16G and I have everything in the world installed and it is about 1/2 full.

                      Do you mean content? When you download the full image from Duet, and etch it to a card, that is the same content they ship. I recommend doing that for the Pi in a D3 (instead of some other raspbian image).

                      Delta / Kossel printer fanatic

                      tekstyleundefined 1 Reply Last reply Reply Quote 0
                      • tekstyleundefined
                        tekstyle @Danal
                        last edited by

                        @Danal said in Setting tool offset using USB microscope:

                        Do you mean content? When you download the full image from Duet, and etch it to a card, that is the same content they ship. I recommend doing that for the Pi in a D3 (instead of some other raspbian image).

                        Yes, I mean physical card. What do you mean by doing that for the Pi in a D3? So far, I've downloaded the deutpi image file and using baleena etcher.

                        Danalundefined 1 Reply Last reply Reply Quote 0
                        • Danalundefined
                          Danal @tekstyle
                          last edited by

                          @tekstyle said in Setting tool offset using USB microscope:

                          Yes, I mean physical card. What do you mean by doing that for the Pi in a D3? So far, I've downloaded the deutpi image file and using baleena etcher.

                          That's the correct thing to do.

                          I have no idea why yours hangs. Multiple people have run that script, and there is absolutely nothing in it that does anything to any system settings or similar. All it does is install software.

                          Since that does make the SD card fairly active, you may want to try a physically different card. Long shot, but worth a try.

                          Delta / Kossel printer fanatic

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Unless otherwise noted, all forum content is licensed under CC-BY-SA