Hi @omer_1,
This comment provides some relevant context.
How are you trying to do this, and why are you trying to do it while QGC is already controlling the vehicle?
You can’t control the vehicle with conflicting commands, so if you want to use your own control you’ll need to either disable QGC’s joystick input, or close QGC entirely. If you want QGC to receive telemetry from the autopilot while you send commands in a separate program, you’ll likely want to set up an extra MAVLink endpoint for your program to connect to.