Change the Parameter MAV_COMP_ID in QGroundControl

Hello Everyone!
I have a problem with MAV_COMP_ID parameter. I changed from QGoundControl this parameter from default value (“1”) to value 50. After that I’m not able to connect my px4 module to QGroundControl via USB or via Telemetry.
After that problem I changed next few things:
I changed the parameter target_component_id from 1 to 50 by rosparam set /mavros/target_component_id 50 and also I changed the parameter “tgt_component” from the file launch px4.launch. With all this changed I was able to communicate the px4 module with the raspberry when I launch the next file: roslaunch mavros px4.launch fcu_url:=/dev/ttyUSB0:57600 gcs_url:=“udp://@192.168.0.102:14550”
When I enter to QGroundControl and I activate the Common Link that I created:
QGC->Application Settings->Comm Links->add
Name: test2
Type: UDP
Listening port: 14550
Target Hosts: 192.168.0.102:14550
Still I can not connect to QGroundControl so I flashed the firmware but still doesn’t connect.

Does someone have any idea how to solve the problem or how to reset the parameter MAV_COMP_ID?

Thank you!

Hello there.
Yes I think I can help you.^^
Use “Mission Planner” (it will connect) then go to “full parameter tree”, “MAV” and there reset the comp_id to 1.

I have no idea why QGC stops connecting with this altered but Mission Planner helped me out here a couple times too, already. ,)
cheers

Alternatively if you wanted to keep the SysID at 50, you could route the mavlink traffic using mavlink-router and make the PX4 → GCS connection independent of ROS. You then point mavros to a udp endpoint (created with mavlink-router) and everything should behave as expected.

Your ROS node will still have an ID of 1, component 240 (at least it does for me on Noetic) so you’ll have to modifying the mavros node launcher to give it the correct system ID too.