Not flying straight upwards

I am trying to make the drone go upwards but the pwm output of the 4 channels(apm2.8) are not the same.
I have calibrated the remote(raspberry pi in this case), accelerometer and the ESCs. But when I give input throttle keeping other inputs exactly in the middle, only 2 motors rotate first(ch1 and ch2) and the other 2 don’t at first but as I increase throttle, they start to rotate but slower as compared to the first two. I have 2 apm2.8 and having the same problem with both. I am running it in stabilize mode and giving only 4 inputs through a raspberry pi. Do other inputs matter? I connected it to mission planner armed it and gave throttle and found that the 4 channel outputs are not equal. At pwm input of 8% duty cycle, ch1 and ch2 were at 1900 at ch3 and ch4 were at 1500. What is causing this?