Transfer joy msg (manual_control_setpoint) from qgc to rosnode

Hi there,

I plan to use ps4 joystick to remote control my drone. I hope my companion computer will also receive messages from the joystick, so I think there should be two ways.

One is that a smartphone receives joystick messages via bluetooth and the qgc running on it publishs manual_control_setpoint messages to pixhawk via wifi, and then px4 forwards the messages to ros.

The other way is that the companion computer receives joystick messages via Bluetooth and forwards them to the px4 via the mavlink protocol.

Well, the second way seems easy to implement, but I will disregard it first since it is limited by the effective transmission distance of Bluetooth.

Therefore I would like to use the first one. However, listening to manual_control_setpoint messages on qgc works fine (data source = 2, mavlink_instance_0), while on ros I cannot receive any messages from topic of /mavros/manual_control_setpoint/control.

Referred from Px4 User Guide , I am sure I have enabled the parameter MAV_X_FORWARD shown in the following figure.

PS: Here I use the latest version of px4 updated from qgc, as well as the newest mavros.

Does anyone could help me plesssss? Has anyone ever solved this problem?

Thx a lot…


It works now for me, although I don’t know where the adjustments were made.

If anyone is experiencing similar problems, the suggestions I leave are
1/ Make sure mavlink is connected properly and enable mavlink forward
2/Recompile and then re-burn to flight control
3/ Make sure all devices are powered properly. Since I have a lot of sensors, it is easy to get abnormal errors when powered by the usb cable only
4/ Since I just use my phone as ground station to transmit joy messages to the flight control via wifi, the wifi module is a necessity.
5/ Usually you need to modify the px4_config.yaml and px4_pluginlists.yaml files to suit your needs.

At the end, everything described in the previous section is correct, so please refer to it.