Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copter: Cannot ARM/DISARM in MODE2 using the game controller #28647

Open
muramura opened this issue Nov 16, 2024 · 6 comments
Open

Copter: Cannot ARM/DISARM in MODE2 using the game controller #28647

muramura opened this issue Nov 16, 2024 · 6 comments

Comments

@muramura
Copy link
Contributor

Bug report

Issue details

Game controller PS4 DUALSHOCK 4 is calibrated in MODE 2 and does not ARM or DISARM when operating ARM or DISARM with the stick

Version

ArduCopter V4.6.0-dev

Platform
[ ] All
[ ] AntennaTracker
[X] Copter
[ ] Plane
[ ] Rover
[ ] Submarine

Airframe type

QUAD/X

Hardware type

STAMPFLY

Logs

NONE

@tpwrules
Copy link
Contributor

The problem with game controllers is that they generally can't output minimum throttle and maximum yaw at the same time due to the circular aperture. I'm not sure this is Copter's fault, though the thresholds are fixed.

The software reading the controller and converting it into commands can calibrate or map differently to resolve this, though I don't know if any software supports that.

@rmackay9
Copy link
Contributor

OK, if @tpwrules is right then the controller is probably internally converting the stick's square movements into a circle. AP also does this conversion and it's important because when you put the sticks in the corners you don't want the vehicle's lean angle to be ANGLE_MAX in both roll and pitch because that would result in a total lean angle of more than ANGLE_MAX

A solution could be to add an RC_OPTION to disable AP's conversion from square to circle

@tpwrules
Copy link
Contributor

tpwrules commented Nov 18, 2024

The sticks can't move in a square, they can only move in a circle. I don't think they are converting anything, unless you refer to the plastic of the controller housing.

I also think this conversion would happen after the check for arming. The arming check is simply min throttle and yaw channel > 88%.

Can you point me to the conversion?

@rmackay9
Copy link
Contributor

Hi @tpwrules,

It's in AP_Math's control.h/cpp in the rc_input_to_roll_pitch() function

@peterbarker
Copy link
Contributor

You should be able to arm in non-manual-throttle-modes if you mark the throttle as "sprung" using PILOT_THR_BHV

@peterbarker
Copy link
Contributor

Another thought - not only could you not arm because the yaw wasn't at the limit - but your throttle would also probably be outside the deadzone, and that's not something we should bypass!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants