Open coliss86 opened 5 months ago
Let's go through the math and calculations together. As a reference, here is the picture with the axis and the math:
I'm examining your 4th line of debug=5:
AX:0, AY:0, BX:-348, BY:0, CX:0, CY:0, DX:98, DY:0, ||TX:0, TY:0, TZ:-350, RX:0, RY:297, RZ:0
The values for the joysticks are already centered, deadzone zeroed and mapped from min and max to +/- 350. Your max for DX is 98. Your min for BX = -348.
You pushed down the right joystick a little bit (DX=98) and pulled up the left joystick very much (BX=-348)
With the calculations (see Readme or in the picture):
TRANSZ = -AX -BX -CX -DX
TZ = -0 -(-348) -0 -98 = 250
TZ = mod(TZ) / POS_TRANSZ_SENSITIVITY = 1*(250) / 0.5 = 500
constrain values to +/- 350 -> +350
INVZ = 1 -> TZ = -350.
ROTY = -BX + DX
ROTY = (--348 + 98) / ROTY_SENSITIVITY = 446 / 1.5 = 297
modifier function = 1 -> ROTY = 297
ROTY
Therefore: The math is correct, not a bug, as you wrote. ;)
I don't understand your initial line: Did you want to rotate or translate? What is the expected and what is the undesired movement?
On my mouse, the handling is much easier, when I just push one side down. For example the right one (DX is positive) and all other values are zero. Then the model starts to rotate and .... (!) when I don't lift the opposite joystick at the same amount (BX negative) the model will also translate, because it recognizes, that the whole mouse is slightly pushed down. Therefore, in general, I reduced this down movement significantly with a high value NEG_TRANSZ_SENSITIVITY and the GATE for neg. Z.
In your example on the other hand: You pulled the left joystick up (BX=-348) and pushed the right one down only slightly (DX=98). Therefore it looks like you need to change the pos_Z sensitivity and maybe introduce a Gate value for this.
Writing and thinking of this: First of all, we should check if the potentiometers in your joysticks are working in the same direction as indicated in the pictures and in my setup:
When you push the joystick down, that value shall be positive. When you pull it up, the value shall be negative. Is this correct? Or are your joysticks wired in the opposite? This would lead to the sensitivity and Gate values to be wrongly defaulted.
Thanks for your answer.
I don't understand your initial line: Did you want to rotate or translate? What is the expected and what is the undesired movement?
I want to rotate :-)
Here is the value when I push the joystick down:
AX:350, AY:0, BX:348, BY:0, CX:350, CY:0, DX:350, DY:0, ||TX:0, TY:0, TZ:279, RX:0, RY:0, RZ:0,
up:
AX:-350, AY:0, BX:-351, BY:0, CX:-350, CY:0, DX:-350, DY:0, ||TX:0, TY:0, TZ:-350, RX:0, RY:0, RZ:0,
I'll have a try with NEG_TRANSZ_SENSITIVITY
and GATE
, thanks :-)
The positive values for down and negative for up look good. Please report, what you found after tuning the sensitivity and gate.
@coliss86 You may check, if the inversion of single axis (as in #47 and merge #48) helps you.
Or is this issue maybe resolved?
Thanks for getting back to me ;) I didn't take time to do something since this report :/ As I can see from #47, the joysticks used are far better than mine, maybe I'll have to change them again.
The precision of 3D printing seriously affects the feel of our operation, in addition 6DOF is really free, our common operation usually will only move or rotate on a plane, but now this situation can be accidentally misused, it is difficult to achieve precise control. I think this is the reason why this project adds an encoder for rotary operation. The spring grams of the joystick also affect the operation, it feels like the spring used now is too stiff.
Hi,
I do not think it a bug in the software, I need help to figure out what is wrong: In fusion, when moving slowly the axis on RX for example, it first zoom out, and when I rotate more the axis, it then rotate.
Here is my
config.h
:here is a debug with
STARTDEBUG 5
I first though it was due to my joysticks, I replace them with a new set but it is the same. It behaves quite the same in all axis.
Any ideas ?
Thanks :-)