haythamb / tamv Goto Github PK
View Code? Open in Web Editor NEWThis project forked from danalestes/tamv
TAMV = Tool Align Machine Vision for Duet based tool changing 3D printers.
License: MIT License
This project forked from danalestes/tamv
TAMV = Tool Align Machine Vision for Duet based tool changing 3D printers.
License: MIT License
In case of inverted X and Y printer ( tool parralele of X axis )
the move order is not X,Y but Y,X for dont brake anything
Any possibility to add an config for that ?
If TAMV is in the middle of running and the user clicks disconnect, it throws an error 0x00:
line 1136: (c, transform, mpp) = self.calibrateTool(int(ptool['number']), rep)
line 1528: (self.xy, self.taget, self.tool_coordinates, self.radius) = self.analyzeFrame()
TypeError: cannot unpack non-iterable object NoneType object
Need to handle the printer disconnecting during a calibration to catch this.
Create a built-in setup wizard that takes new users through each of the steps needed to get nozzles cleaned and prepped for alignment. Can use the Tx buttons built-in along with modal popups to instruct users on how to do this for each nozzle.
Add functionality to allow users to save multiple machine connection strings within TAMV, and not just a single URL with no nickname.
This framework is already set-up in settings.json
but there is currently no method of handling multiple profiles, or for displaying printer names.
I forgot to add M564 S0 to my tfreeX.g macros.
TAMV finished with the tool, moved as far as the axis limit (in config.g) would allow. And unlocked the tool.
Not TAMV's fault, but probably worth noting.
If you have a 3 tools with numbers 0, 1, 3 (eg. relating to physical position on printer) then the code thinks there are
4 tools installed.
I seem to be getting an error when its trying to install the openCV.
CMake Error at cmake/OpenCVFindLibsGUI.cmake:18 (find_package):
Could not find a package configuration file provided by "Qt5" with any of
the following names:
Qt5Config.cmake
qt5-config.cmake
I guess it has some requirements? This was on a new raspberry pi 4 with the latest version of Raspian.
https://www.mail-archive.com/[email protected]/msg5902890.html
See above. Therefore TAMV does not launch on raspberry pi os bullseye
A feature that would allow you to run a series of homes to test the consistency of the z switch and show the range and standard deviation of the run.
This would allow you to validate your switch after a crash or just periodic testing to make sure the switch is still reading consistently.
Side note: Much less important but if the effort is minimal you could throw in x and y validations too. I don't really care much about those but if we are validating the soundness of the machine might be neat to include.
Look at either adding DNS caching, or parse user input and force an IP address.
Also remove the requirement for the leading "http://" prefix and replace with a drop-down for https if need (plus test)
Having a timestamp + printer ID in the JSON output filename would be useful for long-term performance monitoring and debugging. Including it as a field in the JSON would also not be a horrid idea?
When adjusting the camera-parameters with the sliders, like brightness or contrast, they aren't at the same value when the opoup-window is opened again.
Modal dialogs were blocking parent window (you can't see the preview image with the jog panel on!).
Installation instructions for openCV on Ubuntu weren't mentioned - added the commands to install using apt! :)
The nozzle orifice of a big volcano nozzle seems be hard to detect reliably.
Runing TAMV on Klipper with offsets set to 0 will give me following offsets that are verry off (Y axes is easiest to measure as my carriage is in X):
printer['tool 11'].offset : [-12.122, -5.306, '3.28']
printer['tool 10'].offset : [-11.651, -4.11, '3.36']
printer['tool 9'].offset : [0.967, 0.285, '-1.42']
printer['tool 0'].offset : [-11.677, -5.213, '3.16']
Old offsets I eas using were:
T11: 11.973,5.586,3.26
T10: 11.555,4.775,3.43
T9: -1.055,0.055,-1.51
T0: 11.663,5.255,3.10
This means that the sign is off.
Manually correcting that by inverting the sign:
SET_TOOL_OFFSET TOOL=0 X=11.677 Y=5.213
SET_TOOL_OFFSET TOOL=9 X=-0.967 Y=-0.285
SET_TOOL_OFFSET TOOL=10 X=11.651 Y=4.11
SET_TOOL_OFFSET TOOL=11 X=12.122 Y=5.306
Running TAMV again:
printer['tool 11'].offset : [12.081, 5.412, '3.28']
printer['tool 10'].offset : [11.691, 4.176, '3.36']
printer['tool 9'].offset : [-0.927, -0.193, '-1.42']
printer['tool 0'].offset : [11.652, 5.295, '3.16']
And once more:
printer['tool 11'].offset : [11.997, 5.612, '3.28']
printer['tool 10'].offset : [11.785, 4.296, '3.36']
printer['tool 9'].offset : [-0.834, -0.02, '-1.42']
printer['tool 0'].offset : [11.626, 5.463, '3.16']
And third time:
printer['tool 11'].offset : [11.838, 6.018, '3.28']
printer['tool 10'].offset : [11.97, 4.536, '3.36']
printer['tool 9'].offset : [-0.667, 0.328, '-1.42']
printer['tool 0'].offset : [11.538, 5.8, '3.16']
This shows that the corrections applied to the current offset is in the wrong direction, agravating the error by each run.
I assume this is not a problem on the more widely used Duet ecosystem.
The popup windows (e.g. controls for setting the CP) always open up in the same position, even if dragged to the side before.
Generate new dependencies profile and update repo for python.
Using TAMV with great success but noticed this:
I had M551 and a password in my config ( i'm on a shared network).
This prevented TAMV from connecting to the duet. (Duet 2 RRF 3.2.2)
random crash with no error codes, no exceptions, no entries in log files.
suspected segmentation faults or uncollected garbage items happening in lower-level Qt libraries triggering C++ faults that don't trickly back up to Python layer.
Add option for user to specify nozzle diameter for each tool (with the option to save this to a file), which can then be fed to set minArea and maxArea parameters for blob detector, and help users get the correct focal distance and zoom level for nozzles to get smooth alignment results.
It would be nice, if the cam-preview would resize with the GUI-window.
I tried several times on an Raspi 5 (ubuntu) with two different cameras the tool but i always get the tuple error when the button toggleCrosshair is pressed or when the calibration is started. When i start calibration after safe controlpoint the printer fetch the head an go back to camera at this moment the tuple error occurs.
the full print is :
CRITICAL : Camera failed to retrieve data.
CRITICAL : 'tuple' object does not support item assignment
CRITICAL : Critical camera error. Please restart TAMV.
Hopefully anyone has an idea where the bug is.
If i set a break point where these print functions are located it does not halt.
Best Regards Thomas
Should contain what an unclean nozzle looks like, and explain how TAMV detects the nozzle such that any user may understand what they need to do in order to run it successfully.
Also include images of clean and unclean nozzles for reference, and a sample set of cleaning steps (cleaning with silicon/nylon brushes, using acupuncture needles to push back filament into nozzle throat, etc)
Its causing infinite buffer checks instead of executing commands.
Need a dropdown interface for users to select which camera is active for a TAMV run, and save that selection to settings.json
This is limited to cameras connected over USB
Some desktop environments, like GNOME, will by default fix a modal window to the center of the parent window. In that case, the user will not be able to observe the camera while operating the jog window.
JSON has been modified, need to update interface to allow users to manipulate RTSP profiles.
Additional axis mapping (U, V, etc) would allow TAMV to better interface with additional machine types (e.g. IDEX machines).
Example config.g lines from an IDEX machine:
;T0
M563 P0 D0 H1 ; Define tool 0, extruder 0, heater 1
G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets
;T1
M563 P1 D1 H2 X3 ; Define tool 1, extruder 1, heater 2, maps X to U
G10 P1 X0 Y0 U0 Z0 ; Set tool 1 axis offsets
Example current TAMV output for T1:
G10 P1 X-0.118 Y0.237
Example TAMV output for T1 w/additional axis support:
G10 P1 X0 Y0.237 U-0.118
add an on-screen toggle box to pause auto alignment and allow users to jog nozzle and capture offset coordinates manually, then continue to next tool.
RRF by default defines a 0.7mm Z probe offset.
This value must be factored into calculating the final offsets before applying them back to the machine.
When starting the TAMV GUI, with no webcam connected, this is the message one sees:
...
WARNING : This is an alpha release. Always use only when standing next to your machine and ready to hit EMERGENCY STOP.
INFO : Launching application..
INFO : .. reading drivers..
INFO : .. creating new settings.json..
INFO : .. starting video feed..
Traceback (most recent call last):
File "TAMV_GUI.py", line 3659, in <module>
a = App()
File "TAMV_GUI.py", line 2469, in __init__
self.startVideo()
File "TAMV_GUI.py", line 3580, in startVideo
self.video_thread = CalibrateNozzles(parentTh=self,numTools=0, cycles=1, align=False)
File "TAMV_GUI.py", line 928, in __init__
self.change_pixmap_signal.emit(local_img)
TypeError: CalibrateNozzles.change_pixmap_signal[numpy.ndarray].emit(): argument 1 has unexpected type 'NoneType'
Would be nice to catch the error and suggest something to the user.
Need to add a method for users to save their inputted machine parameters to settings.json from the GUI. Currently TAMV generates a template settings.json, and will read any required parameters from it if the user modifies the JSON file, but this needs to be presented within a "Parameters" or a "Configuration Setup" screen within the TAMV interface.
TAMV's default behavior is to unload all tools from last known position upon closing the program.
If a user is executing a print and trying out TAMV, this can cause disruption and machine damage.
Solution: add a checking function to DuetWebAPI to see if there's a job currently executing, and switch the Disconnect and Close behaviors of TAMV to suit as needed.
Develop a small script to test all the functions usually used by openCV, numpy, DuetWebAPI, etc. on a test image and printer.
This "unit test" script would help troubleshoot exceptions and errors that are triggered by 3rd party libraries on the different platforms TAMV is deployed on.
Need to create interface to select between a USB camera and a network http/rtsp feed for running TAMV.
Should ideally support all camera sources that openCV does using the VideoCapture class
The printerURL field takes whatever input the user chooses and tries to execute all Duet REST API from that address as baseURL in the format: baseURL/rr_status
or baseURL/rr_gcode
For a better UX, this input needs to be parsed and sanitized such that it can handle all URL combinations a user would enter, such as:
http://IP_ADDRESS
or http://IP_ADDRESS/
or https://IP_ADDRESS
or https://IP_ADDRESS
and similarly http://NET_NAME
or IP_ADDRESS
or NET_NAME
without the preceding http(s)
prefixes
Can anyone explain how i update to the latest version of TAMV?
Title says it all, anyways:
It would be handy, if one could e.g. just select the tools to test the repeatability of.
Would be a timesaver if e.g. only a single tool is about to get tested.
Add a way to open/start TAMV with a double-click on an icon at the desktop.
Redesign jog panel such that the increment is user-selectable (1, 0.1, 0.01) and we have less buttons on screen. This helps small display runs of TAMV become more user-friendly.
When launching TAMVGUI in fullscreen mode, referencing any menu item for setting enabled or disabled status results in a crash.
Must port over repeatability testing functions from TAMV To TAMV_GUI to enable users to perform the testing and interpret machine results.
Found a bug and an easy fix. Please read SteveJWallace/JubileeKlipper#3
Needs to be modified to remove optional openCV "test" and "perf" libraries to reduce compile time
Need to add commands to install numpy and scipy
Users need to be able to select from a set of crosshair overlays to choose one that is best suited for their setup and preference. The current green and grey crosshairs are not enough, and can sometimes be difficult to see/use while running CP alignment or manual nozzle alignment.
Using Ubuntu 20.04, I can't change the brightness, contrast, saturation, or any other parameters from within TAMV. Probably need to ensure that the OS is using v4l2 to interface with the camera to investigate this.
create a walkthrough of how to install python + openCV on a MAC OS machine
just like the title says, its already working on klipper, got to make that extensible!
Consider redirecting feedback from DuetWebAPI to a debug screen or statusbar, instead of pushing text to the terminal. Also consider disabling non-error feedback with a global flag.
create a walkthrough of how to install python + openCV on a Windows machine
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.