{"action":"created","issue":{"url":"https://api.github.com/repos/Smoothieware/Smoothieware/issues/713","labels_url":"https://api.github.com/repos/Smoothieware/Smoothieware/issues/713/labels{/name}","comments_url":"https://api.github.com/repos/Smoothieware/Smoothieware/issues/713/comments","events_url":"https://api.github.com/repos/Smoothieware/Smoothieware/issues/713/events","html_url":"https://github.com/Smoothieware/Smoothieware/pull/713","id":105065382,"number":713,"title":"Generic calibration strategy","user":{"login":"OskarLinde","id":3725313,"avatar_url":"https://avatars.githubusercontent.com/u/3725313?v=3","gravatar_id":"","url":"https://api.github.com/users/OskarLinde","html_url":"https://github.com/OskarLinde","followers_url":"https://api.github.com/users/OskarLinde/followers","following_url":"https://api.github.com/users/OskarLinde/following{/other_user}","gists_url":"https://api.github.com/users/OskarLinde/gists{/gist_id}","starred_url":"https://api.github.com/users/OskarLinde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OskarLinde/subscriptions","organizations_url":"https://api.github.com/users/OskarLinde/orgs","repos_url":"https://api.github.com/users/OskarLinde/repos","events_url":"https://api.github.com/users/OskarLinde/events{/privacy}","received_events_url":"https://api.github.com/users/OskarLinde/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":70,"created_at":"2015-09-06T02:23:46Z","updated_at":"2015-11-06T21:15:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Smoothieware/Smoothieware/pulls/713","html_url":"https://github.com/Smoothieware/Smoothieware/pull/713","diff_url":"https://github.com/Smoothieware/Smoothieware/pull/713.diff","patch_url":"https://github.com/Smoothieware/Smoothieware/pull/713.patch"},"body":"Here's a simple implementation of delta calibration that does a single probe pass and computes optimal model parameters to fit the probe results. It also supports bed leveling using a proper rotation transformation rather than the skew transform the other bed mapping strategies use.\r\n\r\nThe general idea is to store actuator positions for each probe trigger point and then optimize the model parameters until these actuator positions all correspond as closely as possible to z=0 in software. The model parameters are optimized without any knowledge of their meaning, each parameters influence on the solution is dynamically measured by nudging them one by one. (This means that the same method could be applied to other future arm solutions as well.) The model parameters are optimized using a iterative nonlinear solver using the [Levenberg-Marquardt](https://en.wikipedia.org/wiki/Levenberg–Marquardt_algorithm) method.\r\n\r\nThe general syntax is:\r\n\r\n```G32 <variables to optimize> Pp Oo```\r\n\r\nParameter |&nbsp;\r\n---|----\r\nP | number of probe points, default = 50, min = number of variables\r\nO | number of repeats for each probe point (helps flush out false probe results), default = 1\r\n\r\nVariables available to all arm solutions:\r\n\r\nVariable |&nbsp;\r\n---|----\r\nX,Y,Z | endstop trim\r\nU,V | plane tilt\r\nW | plane offset (mutually exclusive with X,Y,Z)\r\n\r\nFor LinearDelta:\r\n\r\nVariable |&nbsp;\r\n---|----\r\nR | delta radius\r\nA,B,C | tower offsets\r\nD,E,H | tower angle\r\n\r\nThe calibration respects Home Offset Z meaning one can keep Home Offset Z set to \"paper thickness\". The offset as defined unfortunately needs to be negative. Something to remember.\r\n\r\n##### Examples:\r\n\r\nGcode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | &nbsp;\r\n-----|-----\r\n```G32 X0 Y0 Z0``` | Calibrate endstops, 50 probe points\r\n```G32 U0 V0 W0 N7``` | Bed leveling (plane orientation and offset), 7 probe points\r\n```G32 X0 Y0 Z0 R0 L0 O3``` | Simple delta calibration (endstops, delta radius, rod length) 50 probe points, 3 repeats per point\r\n```G32 W0 P1``` | Simple single point bed offset correction. (Useful to correct for different hotend thermal expansions at different temperatures, or removable beds of different thickness)\r\n```G32 X0 Y0 Z0 R0 A0 B0 C0 D0 E0 H0 P200 O5``` | Full delta calibration, 200 (x5) probe points\r\n```G32 X0 Y0 Z0 R0 A0 B0 C0 D0 E0 H0 U0 V0``` | Full delta calibration including bed tilt\r\n\r\n***NOTE:*** The code is very lightly tested"},"comment":{"url":"https://api.github.com/repos/Smoothieware/Smoothieware/issues/comments/154543515","html_url":"https://github.com/Smoothieware/Smoothieware/pull/713#issuecomment-154543515","issue_url":"https://api.github.com/repos/Smoothieware/Smoothieware/issues/713","id":154543515,"user":{"login":"WZ9V","id":8654919,"avatar_url":"https://avatars.githubusercontent.com/u/8654919?v=3","gravatar_id":"","url":"https://api.github.com/users/WZ9V","html_url":"https://github.com/WZ9V","followers_url":"https://api.github.com/users/WZ9V/followers","following_url":"https://api.github.com/users/WZ9V/following{/other_user}","gists_url":"https://api.github.com/users/WZ9V/gists{/gist_id}","starred_url":"https://api.github.com/users/WZ9V/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WZ9V/subscriptions","organizations_url":"https://api.github.com/users/WZ9V/orgs","repos_url":"https://api.github.com/users/WZ9V/repos","events_url":"https://api.github.com/users/WZ9V/events{/privacy}","received_events_url":"https://api.github.com/users/WZ9V/received_events","type":"User","site_admin":false},"created_at":"2015-11-06T21:15:10Z","updated_at":"2015-11-06T21:15:10Z","body":"@adavidm, could you post the relevant config settings?  For some reason I can't get the calibration strategy to invoke correctly."}}