How long to wait before being able to call service on mavros
Hello everyone,
So this issue is mostly related with mavros but maybe you guys can still help.
I have a callback subscribed to "mavros/state":
void Telemetry::state_cb(const mavros_msgs::State::ConstPtr& msg) {
this->connected = msg->connected;
}
Right after this->connected gets true. I'm calling a get_service to get "MAV_SYS_ID". However, it shows up some error on mavros: However, if after this->connected = true, I sleep 10 seconds or more (not less) then I can call the get_service to get the MAV_SYS_ID, it works. Why so ? Is it normal ?