I’m experiencing an issue with joystick calibration in Cockpit.
Compared to QGroundControl, where I can perform a full joystick calibration (including the stick axes), I noticed that Cockpit only provides an option to configure the deadzone. I couldn’t find any way to calibrate the joystick axes themselves.
The reason I’m asking is that when I arm the motors, I notice that the throttle axis is not centered at its physical zero position. Instead, it appears to have an offset, causing the vehicle to receive a non-zero throttle input even though the joystick is physically centered.
How can I calibrate the joystick axes when using Cockpit? Is this something that should be done within Cockpit, or is it expected that the joystick is calibrated at the operating system level before being used?
Any advice or recommended procedure would be greatly appreciated.
Cockpit does have joystick calibration, however as you note it only auto-calibrates the dead-zone. Have you pushed this button, and still find the one axis causes motor motion without moving your sticks? As noted in the docs, you may want to replace your joystick if that’s the case?
To confirm, have you actually noticed the joystick not being centred, or is the only symptom that the vehicle moves immediately when armed, without intentional input from you (which could be caused by incorrect input axis range values, input or output trim configured in the firmware, automated flight mode behaviour, ESC timing/trim offsets, etc)?
It would be helpful to know what Cockpit’s Joystick page “table” view is showing when the joystick is at rest (it should display whether any of the axes are being detected as deflected), and if that looks fine we can discuss other possible causes for the issue you’re having.
In response to @tony-white , I tried calibrating the deadzone, but it still doesn’t work—it’s as if the physical zero point is offset, and only the vertical motors start moving as soon as I click “arm.”
The joystick works fine, both in “jstest-gtk” (test joystick for ubuntu) and qground control (After running the calibration), without any issues.
I’m currently using Ardusub 4.5.7
On the “Joystick configuration” screen, the values look correct. Point 0 is exactly where I want (see figure 1) it to be, but when I engage the motors while keeping the knob at 0, the motors take off at full speed.
I’ve noticed, however, that when I turn the knob to the left, at a certain point the motors stop, as if the zero mark were in that position. (see figure 2)
Not really sure what you’re asking here - if you click on the Issue link you’ll be able to see any discussion and progress related to it, and whether it has been closed as complete.
If you’re not regularly changing axis assignments to unusual values then you may never directly “see” that the issue has been resolved, but if you have unexpected values then whatever solution we end up with should notify you when you’re in the joystick page of the relevant Cockpit version (and possibly also when you try to arm the vehicle).