I have an issuse to fly drone with VIO and GPS. Am I able to set proper value of the mask EKF_AID_MASK to turn off the GPS signal during the flight and navigate only by VIO system or on the other hand to fly drone with GPS with deacitvated the vision system. I want to deactivate GPS or VIO during the flight of the drone.
If yes what would be the EKF_AID_MASK value ? Or maybe there is other solution to my issue.
Why won’t mavsdk allows EKF2_GPS_CTRL to be set? Perhaps it is not in the version of PX4 you are using?
Because setting EKF2_GPS_CTRL to zero is the “right” think to do what you want in main as far as I know. So if it is in the version of PX4 you are using, worth finding out why MAVSDK won’t set it.
auto get = param->get_param_int("EKF2_GPS_CTRL");
std::cout <<"1.1) Result get:\t"<< get.first <<"\tint_32:\t" << get.second << std::endl;
auto set = param->set_param_int("EKF2_GPS_CTRL",0);
std::cout <<"2.1) Result set:\t"<< set << std::endl;
get = param->get_param_int("EKF2_GPS_CTRL");
std::cout <<"2.2) Result get:\t"<< get.first <<"\tint_32:\t" << get.second << std::endl;
set = param->set_param_int("EKF2_GPS_CTRL",1);
std::cout <<"3.1) Result set:\t"<< set << std::endl;
get = param->get_param_int("EKF2_GPS_CTRL");
std::cout <<"3.2) Result get:\t"<< get.first <<"\tint_32:\t" << get.second << std::endl;
Hi, my main purpose was navigating the drone with fusion of GPS and VIO system. I want to start flying the drone using fusion of GPS and VIO. I want to use VIO as backup in case of GPS noise. I don’t want to land the drone and change the ekf2_aid_mask and continue the flight with the mask set for vio.
Is there any solution to my problem?
Now I am testing the vio system in the simulation. The drone is flying with VIO with EKF_AID_MASK = 24. From starting the flight to landing the drone is using only VIO system.
The EKF_AID_mask values that was shown in previous reply don’t have bitmask 0: use GPS set bit to 1. Does it mean that I don’t have to use bitmask 0 to use GPS with VIO?
But there are promblem if you feed PX4 by pose from VIO, it can conflict with pose from GPS, and drone can crushed.
So if you use GPS + VIO you can feed PX4 speed from VIO. (I read about it on this forum. Don’t remember where exatly ) And then PX4 fusing data correctly.
Any way if you testing in the simulation use EKF2_AID_MASK = 25.
What’s wrong with Failure plugin? What result did you expect but it worked in another way? Right now, I am trying to turn on/off GPS. So the only way I found it by sending command that instantiate mavlink shell and pass gps stop/start command. Don’t like it, any ideas to solve that in a more elegabt way?