Robots variable fix

This commit is contained in:
vivek-shankar 2017-04-02 21:43:36 -04:00
parent 60d220b248
commit 4dbcecf2da
4 changed files with 6 additions and 4 deletions

View File

@ -59,6 +59,7 @@ private:
int armstate;
int barrier;
int message_number=0;
int no_of_robots=0;
std::string bzzfile_name, fcclient_name, armclient, modeclient, rcservice_name,bcfname,dbgfname,out_payload,in_payload,stand_by,xbeesrv_name;
bool rcclient;
bool multi_msg;

View File

@ -8,8 +8,7 @@
<param name="rcservice_name" value="/buzzcmd" />
<param name="in_payload" value="/inMavlink"/>
<param name="out_payload" value="/outMavlink"/>
<param name="robot_id" value="3"/>
<param name="No_of_Robots" value="3"/>
<param name="xbee_status_srv" value="/xbee_status"/>
<param name="stand_by" value="$(env ROS_WS)/src/ROSBuzz/src/stand_by.bo"/>
</node>

View File

@ -8,6 +8,7 @@
<param name="fcclient_name" value="/dji_mavcmd" />
<param name="in_payload" value="/inMavlink"/>
<param name="out_payload" value="/outMavlink"/>
<param name="xbee_status_srv" value="/xbee_status"/>
<param name="robot_id" value="3"/>
<param name="No_of_Robots" value="3"/>
<param name="stand_by" value="$(env ROS_WS)/src/ROSBuzz/src/stand_by.bo"/>

View File

@ -73,9 +73,10 @@ namespace rosbzz_node{
multi_msg=true;
}
/*Set ROBOTS variable for barrier in .bzz from neighbours count*/
buzz_utility::set_robot_var(raw_neighbours_pos_map.size()+1);
if(neighbours_pos_map.size() >0) no_of_robots =neighbours_pos_map.size()+1;
buzz_utility::set_robot_var(no_of_robots);
/*Set no of robots for updates*/
updates_set_robots(raw_neighbours_pos_map.size()+1);
updates_set_robots(no_of_robots);
/*run once*/
ros::spinOnce();
/*loop rate of ros*/