mavlink / qgroundcontrol

Cross-platform ground control station for drones (Android, iOS, Mac OS, Linux, Windows)
http://qgroundcontrol.io
3.22k stars 3.55k forks source link

The button in mavros/manual_control/control is always 0 #11775

Open 1776340526 opened 1 month ago

1776340526 commented 1 month ago

Issue details I use mavros (ros2) to connect a raspberry pi 4 and pixhawk4 and connect it to QGC. I connected a game controller in QGC and wanted to read the joystick and button information of the controller. Now I can read the x, y, z, r information of the controller normally, but the button information is always 0. In QGC, I can see that the button is pressed. I would like to ask how to solve this problem? I would be grateful if you could answer it! ! !

MAVROS version and platform Mavros: ros2 ROS: humble Ubuntu: 22.04 Game controller:Logitech F710

Autopilot type and version [ ] ArduPilot [√] PX4

ros2 topic echo /mavros/manual_control/control header: stamp: sec: 1723704903 nanosec: 509129632 frame_id: '' x: 0.0 y: 0.0 z: 0.0 r: 0.0 buttons: 0(buttons are always 0, even if the GQC shows that they have been pressed)

When I use JoystickValuesLog, I observe that there are only 6 parameters. D:\a\qgroundcontrol\qgroundcontrol\src\Joystick\Joystick.cc:697 - "name:roll:pitch:yaw:throttle:gimbalPitch:gimbalYaw "Controller (Wireless Gamepad F710)" 0 0 0 0.5 -1 -1"; Why is there no button information?

oponfil commented 1 day ago

Also please add to a manual_control message two extension axes (s, t) for gimbal servos control.