Frix-x / klippain-shaketune

Klipper streamlined input shaper workflow and calibration tools
GNU General Public License v3.0
570 stars 62 forks source link

axes_map determination very inconsistent #128

Open hapklaar opened 3 weeks ago

hapklaar commented 3 weeks ago

K-Shake&Tune module branch

Version

v4.0.1-0-g69ad2283

Describe the bug and expected behavior

When trying to determine the axes map of my printer using the AXES_MAP_CALIBRATION command, I get varying or no results at all. The map was -x, -y, z yesterday. Today I've seen all kinds of variants and currently the map can't be determined correctly anymore. Printer (CoreXY RatRig400) seems to function just fine other than this.

Not sure if this is a problem with the printer, accelerometer or the script. I've seen the following axis maps: -x,-y,z (I assume this is the correct one) -x,-y,-z x,y,z

Some varying results below:

12:13:11
--> Detected axes_map: unable to determine it correctly!
12:13:11
--> Detected gravity: 10.29 m/s²
12:13:11
Dynamic noise level: 285.01 mm/s² -> OK
12:13:11
Machine axis Z -> nearest accelerometer direction vector: [0 1 0] (angle error: 44.34°)
12:13:05
Machine axis Y -> nearest accelerometer direction vector: [0 1 0] (angle error: 4.60°)
12:13:03
Machine axis X -> nearest accelerometer direction vector: [1 0 0] (angle error: 1.66°)
12:13:00
This may take some time (1-3min)
12:13:00
Analysis of the movements...
12:12:52
Shake&Tune version: v4.0.1
12:12:51
AXES_MAP_CALIBRATION
12:26:18
--> Detected axes_map: -x, -y, z
12:26:18
--> Detected gravity: 10.29 m/s²
12:26:18
Dynamic noise level: 298.72 mm/s² -> OK
12:26:18
Machine axis Z -> nearest accelerometer direction vector: [0 0 1] (angle error: 37.12°)
12:26:12
Machine axis Y -> nearest accelerometer direction vector: [ 0 -1 0] (angle error: 5.32°)
12:26:10
Machine axis X -> nearest accelerometer direction vector: [-1 0 0] (angle error: 3.03°)
12:26:08
This may take some time (1-3min)
12:26:08
Analysis of the movements...
12:25:58
Shake&Tune version: v4.0.1
12:25:58
AXES_MAP_CALIBRATION
12:27:20
--> Detected axes_map: -x, -y, -z
12:27:20
--> Detected gravity: 10.30 m/s²
12:27:20
Dynamic noise level: 309.24 mm/s² -> OK
12:27:20
Machine axis Z -> nearest accelerometer direction vector: [ 0 0 -1] (angle error: 50.36°)
12:27:14
Machine axis Y -> nearest accelerometer direction vector: [ 0 -1 0] (angle error: 8.11°)
12:27:11
Machine axis X -> nearest accelerometer direction vector: [-1 0 0] (angle error: 4.65°)
12:27:09
This may take some time (1-3min)
12:27:09
Analysis of the movements...
12:26:59
Shake&Tune version: v4.0.1
12:26:59
AXES_MAP_CALIBRATION

Additional information and klippy.log

klippy.log

Frix-x commented 3 weeks ago

Can you also share your graphs please? And also which accelerometer you are using and its position when doing the measurement?

hapklaar commented 3 weeks ago

Certainly. I use a beacon probe by the way, probe_points: 200,200,20

3 consecutive results: axesmap_20240618_192553 axesmap_20240618_192621 axesmap_20240618_192651

roykrikke commented 5 days ago

axesmap_20240707_121718 axesmap_20240707_121538 I have more or less the same issue. But I'm not sure if the spread on the Z axis has something to do with it.

Frix-x commented 6 hours ago

Hello,

I've done some diagnostic on this and I definitely need to improve the system. At the moment it only works in the case where the accelerometer is not moving that much (not vibrating/rotating). The problem is that most nozzle mounts or beacon kind of accelerometers will exhibit this kind of movements and are not perfect for this.

I have some ideas to change a bit the way I'm recording things in order to improve the measurement and analysis. I'll let you know when I've a testing branch available.