What is the system id of mavros? It needs to match the SYSID_MYGCS parameter on your controller.
https://ardupilot.org/copter/docs/parameters-Copter-latest-V4.0.2-dev.html#sysid-mygcs-my-ground-station-number . I set mavros to match my controller when launching: roslaunch mavros apm.launch fcu_url:=‘udp://127.0.0.1:14551@14555/?ids=255,240’ where the 255 matches the Pixhawk SYSID_MYGCS setting. Unless these two match, the Pixhawk will ignore all commands