You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The vehicle may change out of offboard mode outside the control of your application (for example if a GCS were to put the vehicle into Hold mode). In this case, the SDK will automatically stop sending setpoints and Offboard::is_active() will change from true to false.
From these texts, I understood that if I continuously this method and the flight_mode() from telemetry, is_active should be returning 1 if flight_mode is offboard, and 0 otherwise.
However, I am doing a simple test and I am getting is_active() == 1 with the UAV in Altctl. This is the code.
int counter = 0;
while(run){
std::cout << autopilot->mavOffboard_->is_active() << ", " <<
autopilot->mavTelemetry_->flight_mode() << std::endl;
mavsdk::Offboard::Attitude cmdRpyt{};
cmdRpyt.roll_deg = 0;
cmdRpyt.pitch_deg = 0;
cmdRpyt.thrust_value = 0.2*sin(counter*0.02)+0.3;
cmdRpyt.yaw_deg = 0;
auto result = autopilot->mavOffboard_->set_attitude(cmdRpyt);
auto values = autopilot->rpy();
counter++;
rate.wait();
}
In the image, I show that is_active values 1 in Altctl, and if I pull manually the switch to toggle to offboard control, it switches the mode and the value is still 1. The engines in Altctl mode spin at a constant speed, and when I toggle to offboard I hear them swinging as expected from the code.
If I commented out the "set_attitude" command, then is when I see is_active() == 0, and obviously, the autopilot do not let me switch to offboard mode, as there aren't any control command being received.
Did someone noticed it too?
If so, the documentation should say that is_active returns true when the offboard is receiving setpoint, but does not imply that the offboard mode itself is active.
The text was updated successfully, but these errors were encountered:
According to the documentation in https://mavsdk.mavlink.io/v0.37.0/en/api_reference/classmavsdk_1_1_offboard.html#classmavsdk_1_1_offboard_1aa5e0f3c02a03f2667f82d5e162221ff5 , it is said that is_active() method returns true if offboard control is active.
Additionally, in section Monitoring Offboard Mode in https://mavsdk.mavlink.io/v0.37.0/en/guide/offboard.html . It is said
From these texts, I understood that if I continuously this method and the flight_mode() from telemetry, is_active should be returning 1 if flight_mode is offboard, and 0 otherwise.
However, I am doing a simple test and I am getting is_active() == 1 with the UAV in Altctl. This is the code.
In the image, I show that is_active values 1 in Altctl, and if I pull manually the switch to toggle to offboard control, it switches the mode and the value is still 1. The engines in Altctl mode spin at a constant speed, and when I toggle to offboard I hear them swinging as expected from the code.
If I commented out the "set_attitude" command, then is when I see is_active() == 0, and obviously, the autopilot do not let me switch to offboard mode, as there aren't any control command being received.

Did someone noticed it too?
If so, the documentation should say that is_active returns true when the offboard is receiving setpoint, but does not imply that the offboard mode itself is active.
The text was updated successfully, but these errors were encountered: