qgroundcontrol
qgroundcontrol copied to clipboard
RC PWM joystick buttons override
This PR realizes #10430 Adds sending PWM values on Joystick press and release. Very useful. Review would be appreciated :)
Hey @dagar / @bkueng can you please help me review this one?
@zdanek : This breaks the regression?
@fredowski fixed all issues with compiling and build
I ran this version of QGroundControl with a Pixhawk 5x and Pixhawk 6c. Very useful feature for our confetti cannon trigger!
I ran this version of QGroundControl with a Pixhawk 5x and Pixhawk 6c. Very useful feature for our confetti cannon trigger!
OMG @marshallwicker thank you for your support. Is there any chance to see a video with this cannon? :D Can be privately with a link on my mail :)
Can you provide a little bit more info on how you tested? Hardware (CubeOrange / Pixhawk4 for example) and software (Ardupilot / PX4 and release version). I have some feedback I will leave a review but would like to be able to test as well I'm at it. Thanks for the contribution this seems like a really useful feature.
I ran this version of QGroundControl with a Pixhawk 5x and Pixhawk 6c. Very useful feature for our confetti cannon trigger!
OMG @marshallwicker thank you for your support. Is there any chance to see a video with this cannon? :D Can be privately with a link on my mail :)
I totally would, but it was just a proof of concept test on the bench to see if it would trigger our PWM switch (basically a pwm controlled relay). If I can find another confetti cannon, I’ll record it!
Can you provide a little bit more info on how you tested? Hardware (CubeOrange / Pixhawk4 for example) and software (Ardupilot / PX4 and release version). I have some feedback I will leave a review but would like to be able to test as well I'm at it. Thanks for the contribution this seems like a really useful feature.
I tested on the Holybro Pixhawk 5x and Holybro Pixhawk 6c using PX4-Autopilot. I only tested one channel though! I will test further tomorrow.
I tested on the Holybro Pixhawk 5x and Holybro Pixhawk 6c using PX4-Autopilot
Stupid question from me as I haven't used newer PX4 in a long time. I just got a Pixhawk 5X and am using PX4 1.13. I can enable FMU OUT channel 3 (PWM AUX 3) via QGC Actuators menu and control them via slider no problem, but this button feature isn't working. I have pre-arm mode set to always and I have even tested while armed with no success. I do see uORB rc_input
update when I press the button so I know the messages are getting through, PX4 is just not acting on that data. And ideas?
I tested on the Holybro Pixhawk 5x and Holybro Pixhawk 6c using PX4-Autopilot
Stupid question from me as I haven't used newer PX4 in a long time. I just got a Pixhawk 5X and am using PX4 1.13. I can enable FMU OUT channel 3 (PWM AUX 3) via QGC Actuators menu and control them via slider no problem, but this button feature isn't working. I have pre-arm mode set to always and I have even tested while armed with no success. I do see uORB
rc_input
update when I press the button so I know the messages are getting through, PX4 is just not acting on that data. And ideas?
I’m not sure, but I’ll check again tomorrow to see if I did anything out off the ordinary. I am building PX4 from master locally, but I haven’t changed my submodule for Mavlink, so I can’t see why that would be an issue.
I tested on the Holybro Pixhawk 5x and Holybro Pixhawk 6c using PX4-Autopilot
Stupid question from me as I haven't used newer PX4 in a long time. I just got a Pixhawk 5X and am using PX4 1.13. I can enable FMU OUT channel 3 (PWM AUX 3) via QGC Actuators menu and control them via slider no problem, but this button feature isn't working. I have pre-arm mode set to always and I have even tested while armed with no success. I do see uORB
rc_input
update when I press the button so I know the messages are getting through, PX4 is just not acting on that data. And ideas?
@dakejahl I'm not sure is this related. The mechanism behind my feature it to use RC Override mavlink command to override RC channel value. I'm not sure how AUX channels work since I have only Pixhawk with Ardupilot. Not sure if this is to be used / connected with AUX outputs. Joystick button press is translated to certain PWM value on RC channel (currently one of 8 to 16). That's all. I don't know if this is to be used with AUX output. Maybe you can explain it.
Thank you.
After thinking about this further, this does feel like a bit of a workaround. Instead of directly assigning the outputs of the flight controller to a PWM output, I think we should find a way to map it to an actuator output (RC AUX 1-6) so it can be configured in the actuator menu. The computer joystick should be configured similar to an RC controller where the buttons become analog outputs and can be assigned to an RC AUX output. I think this is a great solution, but it’s strongly coupled to flight controllers that have at least 16 outputs. To keep this abstract and follow the control scheme, we shouldn’t directly assign outputs to a high or low pwm value. We should just make them capable of transmitting on the RC Aux channels.
Can you provide a little bit more info on how you tested? Hardware (CubeOrange / Pixhawk4 for example) and software (Ardupilot / PX4 and release version). I have some feedback I will leave a review but would like to be able to test as well I'm at it. Thanks for the contribution this seems like a really useful feature.
I tested on the Holybro Pixhawk 5x and Holybro Pixhawk 6c using PX4-Autopilot. I only tested one channel though! I will test further tomorrow.
Also after further review, I have discovered that it wasn't functioning on PX4. RC_OVERRIDE commands are only in ardupilot.
Also after further review, I have discovered that it wasn't functioning on PX4. RC_OVERRIDE commands are only in ardupilot.
So it seems PX4 does not implement Mavlink standard message # 70 https://mavlink.io/en/messages/common.html#RC_CHANNELS_OVERRIDE
@marshallwicker I don't know PX4. Can you tell me is there any other mechanism I could use to pass (override) RC channel values?
It looks like MAV_CMD_DO_SET_SERVO will accomplish the same thing in Ardupilot. It is also not implemented in PX4. In fact I don't think there is any way in PX4 to allow the GCS to set an actuator output value outside of MAV_CMD_ACTUATOR_TEST
@junwoo091400 your input on this PR would be appreciated. I think this feature is useful but we need to find a way for it to work "properly" in both Ardupilot and PX4. Ardupilot does not have any of the ACTUATOR messages/commands in their mavlink fork and PX4 does not currently support setting servo endpoints (by any means) from the GCS using a Joystick.
What's the state of this? Still doesn't seem to be ready.
I did not push latest changes. I can rework this to Qt6 and in case of Ardupilot it's ready. For PX4 someone who knows it, should propose own solution, probably based on actuators or sth. But for Ardupilot it works nicely on real drones, as we're using it.