Mission plan does not work in Auto mode

Hello, guys! I am new to UAV. I am using mission planner to control UAV for experiment reasons. It is fine to fly with a controller.
The biggest problem I have met so far is that the drone does not execute the imported mission in Auto mode. Here are the details:

  1. I set a mission, and write waypoints into the drone via Mission Plan(It is the same path when I read the waypoints).
  2. Then I fly the drone into air at a fixed height in Stabalize mode.
  3. After I turn the drone into Auto mode via controller, the drone just flies towards a random direction, which is not the imported mission path.

Here are some results:
The purple curve is the actual path. The first half of a path is how it flies automatically, and the second half is the path I fly with controller in Alt_hold mode when the drone is going to fly out of the playground.
image
image
image
image
image

And the most strange result is that even if I only upload a mission that tells the drone to fly and hover, the drone still flies straight towards a random direction
image

In the official files, it says the drone will automatically carry out the imported mission. What is going wrong? Can somebody help me solve the problem, please? I can upload the logs if it is needed.

You have to provide onboad .bin log. Otherwise nobody will be able to help you. Plus some information about your copter, size, motors, power, controller type, GPS type, firmware version.
Did you do all necessary calibration and tuning ?