RTL minimum altitude requirement?

Hi everyone,

I’m using an APM 2.8 and I am planning missions via mavlink through the port serial of an Arduino.

I plan a mission to flight to certain coordinates and return to land. I set altitude to 5 meters in order to test it safely. Everything is working fine, but once the copter reaches the first waypoint and start returning home it goes up until 20 meters aproximately.

I don’t type 20 meters anywhere in the code. Could there be a minimum altitude requirement for the return to land command?

I don’t understand why it’s doing such thing.

Thank you for your help!

Take a look here:
http://ardupilot.org/copter/docs/rtl-mode.html?highlight=rtl