Flight indoor with offboard mode?


When trying to run the offboard example indoor, I am stuck in the while loop and the program keeps printing ‘Waiting for system to be ready’. I guess that’s because I don’t have enough GPS satellites, so I tried to change the function that is blocking in MAVSDK/src/mavsdk/plugins/telemetry/telemetry_impl.cpp like this:

bool TelemetryImpl::health_all_ok() const
    std::lock_guard<std::mutex> lock(_health_mutex);
    if (_health.is_gyrometer_calibration_ok && _health.is_accelerometer_calibration_ok &&
        _health.is_magnetometer_calibration_ok /*&& _health.is_local_position_ok &&
        _health.is_global_position_ok && _health.is_home_position_ok*/) {
        return true;
    } else {
        return false;

But it appears that the changes are not taking effect after a ‘make’. I thought that maybe some dependencies are not included, so I tried the rebuild the entire MAVSDK with cmake but I am struck with an other issue which I don’t know how to resolve :

[100%] Built target mavlink
-- MAVLink headers for dialect common generated in /home/geyart/projects/MAVSDK/build/third_party/mavlink/mavlink/src/mavlink/include/
-- ccache enabled (export CCACHE_DISABLE=1 to disable)
-- Found curl via config file: /home/geyart/projects/MAVSDK/build/third_party/install/lib/cmake/CURL
CMake Error at src/mavsdk/core/CMakeLists.txt:51 (set_target_properties):
  set_target_properties called with incorrect number of arguments.

CMake Error at src/CMakeLists.txt:63 (add_subdirectory):
  The source directory


  does not contain a CMakeLists.txt file.

-- BUILD_MAVSDK_SERVER not set: not building grpc mavsdk_server
-- Configuring incomplete, errors occurred!

So I would like to know if there is a way to control the drone with MAVSDK indoor without manual control? I want to first try some test indoor (without removing the GPS but just ignoring it) and I am particularly interested in the body frame control offered by the offboard example.
Any help is appreciated.

Update: I tried outdoor and I have an additional problem… I lose communication very often, especially during takeoff the program prints that the takeoff timed out and quit with an exit. The big problem is that the drone has actually taken off (I can hear the sound of the motors getting louder) and was trying to move back and forth with high gas, I had no way to stop it other than unplugging the battery (the drone is with propeller but restricted by a wooden structure that forces it to not move anywhere). Is it the fail-safe that tries to go somewhere or is it abnormal ?
(sorry for the additional issue)