I recently built and installed the hardware that goes along with the Easy Servo plugin and, while the servos are working correctly, I can't seem to get the Z Tracking working correctly. Whether or not I have Y axis inversion enabled, the camera always goes down rather than up. I have the following settings:
GPIO Numbers: Defaults
X Autohome Angle: 90
Y Autohome Angle: 85
X Axis Inversion: Enabled
Y Axis Inversion: Tried both
X/Y Sleep Time: Defaults
X Offset: 355mm
Y Offset: 101mm
I sliced a 200mm cylinder and printed in vase mode. When started, the camera looks like:
Yes. I'm aware of the GitHub project and have even pulled down the sources from there. With that said, there is no obvious way to contact the author in the project. In a case like that, is it best to use the Github user's email address to attempt to contact the author?
Thanks for responding @FranFran . I did set up Z Tracking. Hopefully I did it correctly. From my original post:
GPIO Numbers: Defaults
X Autohome Angle: 90
Y Autohome Angle: 85
X Axis Inversion: Enabled
Y Axis Inversion: Tried both
X/Y Sleep Time: Defaults X Offset: 355mm Y Offset: 101mm
I'm happy to do whatever I can to help with the effort. I was considering adding additional logging inside the plugin, but wasn't quite sure what I should even be looking for.
No worries! I'm happy to help in any way that I can. I think your project is very cool. I also created an adapter to tie together my previous camera mount arm with your pan tilt setup. Pan Tilt Camera Mount by csete - Thingiverse
I love it! You could post it as a "remix" if you want, but it's not a big deal.
So the way the "z-tracking" is working is that it is trying to figure out where, in Z, is your nozzle placed.
But it cannot make any difference if the Z coordinates are relative, or absolute, and is hard to track if relative. Maybe that it was the case during your print ?
You could try to see if the camera if following the print head by typing "G0 Z100 F2000", "G0 Z20 F2000" in the terminal, after making sure that you are in absolute positionning.
Of course, that could be a bug from my calculation. In this case, I'm giving you the same plugin, the only difference is that it will be logging the computed angle in the logs of octoprint that you can send me if it's not working. Here is the .zip file:
I tried to make my design a remix and it didn't seem to work. Not sure what happened there... probably one of the never-ending issues with Thingiverse I can give it a try again.
I will give things a try with the additional logging. I hadn't considered just using Z position commands in the terminal rather than actually doing a tall print. That may speed up my ability to make sense of this.
@FranFran - So far I'm not having much luck collecting more information for you. I installed the updated plugin and set the logging level of the plugin to DEBUG. I don't see a separate Easy Servo log file and all I see in octoprint.log is:
2021-08-04 13:21:10,094 - octoprint.plugins.EasyServo - INFO - The libraryUsed is pigpio
2021-08-04 13:21:10,096 - octoprint.plugins.EasyServo - INFO - Initializing pigpio
2021-08-04 13:21:10,099 - octoprint.plugins.EasyServo - INFO - <pipio.pi host=localhost port=8888>
2021-08-04 13:21:10,103 - octoprint.plugins.dashboard - INFO - Dashboard started
I don't see anything else no matter whether I change the Z height using G0 or change the camera angle manually. In addition, it doesn't seem like the camera angle is even changing while there is Z movement at all now. It will make an initial angle change to the camera at the beginning of the Z movement, but nothing after that.
Yes, it does "forget" the z-tracking option if the server is restarted but should not if the webpage is just refreshed.
I'm getting the logs from my side, that should look like this:
So the only thing that is left is that maybe you're using Pimoroni rather than Pigpio library ?
I didn't made z-tracking available for this library for some reasons, but I could absolutely enable it for this library in the next version if that's your case.
I'm absolutely using pigpiod as can be seen from the very limited logging I added above.
I can manually alter the pan/tilt from the control panel. Before installing the version you provided with additional logging, the z tracking attempted to work, but was backward. With the version with additional logging installed, it doesn't seem to do anything. And as I mentioned, I'm not really seeing any significant logging from the plugin.
I'm open to other suggestions at this point.
Thanks,
Craig
Hey @csete .
Sorry for the late reply but my servo motors were not working anymore and got some issues on my printer, so my motivation wasn't on the highest... But I managed to make everything work again so I'll ensure myself that the z-trackin works before publishing the next release.
Hey @csete !
I think that I solved the bug as well as some others that were on the road. If you wish to test it, you can install it from zip in the "devel" branch. I noticed that the angle calculation was totally wrong, so the approach is slightly different now, you will need to measure the X distance between the camera eye and the bed center, the Y offset between the eye of the camera and the bed (currently called offset over bed, but this name is not right), and the Y offset between the bed and the center of rotation (position of the servo, and same, bad name for now. It's called offset under bed..)
Thanks and sorry for making you wait!