The drone is either hitting the roof or it isn't taking off. When we are connecting to crazyflie cf client, we got to know that the altitude of drone is fluctuating continuously even when the drone is in stationary position.Is the problem with sensor(Sensor used IMU) or any other issue? Do we need to use Flow deck to get stable values of altitude or is there any other alternative?

That sounds very wrong and you should not need the flow deck. The altitude value is imprecise and nothing strange, are you trying to fly it in altitude hold mode? What about the roll/pitch values, are they stable?

Do you seem to have a bad radio link? This could delay the input commands and the CF2 becomes very hard to control. Then try change radio channel and rate to e.g. ch 70 and 2Mbit.

We are not using flowdeck in both links we mentioned. So we are unable to move drone autonomously and we are unable to find mistake. Can you contact us at maddinenimahesh1998@gmail.com as soon as possible.