void AgentCore::algorithmCallback(const ros::TimerEvent &timer_event) { consensus(); // also clears the received statistics container control(); // also publishes virtual agent pose and path guidance(); dynamics(); // also publishes agent pose and path waitForSlotTDMA(slot_tdma_*agent_id_); // sync to the next transmission TDMA slot (agent dependent) // publishes the last estimated statistics in the proper TDMA slot formation_control::FormationStatisticsStamped msg; msg.header.frame_id = agent_virtual_frame_; msg.header.stamp = ros::Time::now(); msg.agent_id = agent_id_; msg.stats = estimated_statistics_; stats_publisher_.publish(msg); std::stringstream s; s << "Estimated statistics published."; console(__func__, s, DEBUG); }
void cover() { s=18;sp=6; w9=w8=w4=w6=w5=w2=w3=w7=w0=wk=we=wf=wj=wl=wp=wr=ws=s/2;//1/2 w1=wi=s/4; wg=wc=wh=wn=wb=wu=wt=wv=wx=wy=2*s/3;//2/3 ww=wm=wa=wd=wo=wq=wz=3*s/4;//3/4 h=s;//1 /////////////////// xnxt=-52;ynxt=370; computer(); xnxt+=s/2; graphics(); xnxt=0;ynxt-=2*s-4; mini(); xnxt+=s/2; project(); ///////////////// s=28;sp=8; w9=w8=w4=w6=w5=w2=w3=w7=w0=wk=we=wf=wj=wl=wp=wr=ws=s/2;//1/2 w1=wi=s/4; wg=wc=wh=wn=wb=wu=wt=wv=wx=wy=2*s/3;//2/3 ww=wm=wa=wd=wo=wq=wz=3*s/4;//3/4 h=s;//1 /////////////////// glPointSize(3.0); xnxt=-100;ynxt-=2*s; balloon1(); xnxt+=s/2; shooting(); //////////////// s=16;sp=4; w9=w8=w4=w6=w5=w2=w3=w7=w0=wk=we=wf=wj=wl=wp=wr=ws=s/2;//1/2 w1=wi=s/4; wg=wc=wh=wn=wb=wu=wt=wv=wx=wy=2*s/3;//2/3 ww=wm=wa=wd=wo=wq=wz=3*s/4;//3/4 h=s;//1 ////////////// glPointSize(2.0); xnxt=320;ynxt-=4*s; glPointSize(1.5); by(); //////////////// s=16;sp=6; w9=w8=w4=w6=w5=w2=w3=w7=w0=wk=we=wf=wj=wl=wp=wr=ws=s/2;//1/2 w1=wi=s/4; wg=wc=wh=wn=wb=wu=wt=wv=wx=wy=2*s/3;//2/3 ww=wm=wa=wd=wo=wq=wz=3*s/4;//3/4 h=s;//1 xnxt=170;ynxt-=3*s; arahant(); xnxt=160;ynxt-=2*s; ashrith(); xnxt=170;ynxt-=2*s; dhanush(); xnxt=138;ynxt-=2*s; harsha(); xnxt=184;ynxt-=2*s; shreeman(); /////////////////////////// xnxt=-190;ynxt=124; guidance(); xnxt=-190;ynxt-=3*s; sir(); xnxt=-190;ynxt-=2*s; madam(); }