Swarm table fix
This commit is contained in:
parent
817b2951d6
commit
50327cb6b6
@ -2,15 +2,17 @@
|
||||
|
||||
<launch>
|
||||
<node name="rosbuzz_node" pkg="rosbuzz" type="rosbuzz_node" respawn="false" output="screen" >
|
||||
<param name="bzzfile_name" value="$(env ROS_WS)/src/ROSBuzz/src/test1.bzz" />
|
||||
<rosparam file="$(find rosbuzz)/launch/launch_config/m100.yaml"/>
|
||||
<param name="bzzfile_name" value="$(env ROS_WS)/src/testflockfev.bzz" />
|
||||
<param name="rcclient" value="true" />
|
||||
<param name="rcservice_name" value="/buzzcmd" />
|
||||
<param name="fcclient_name" value="/dji_mavcmd" />
|
||||
<!--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="xbee_plugged" value="true"/>
|
||||
<!--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"/>
|
||||
</node>
|
||||
|
||||
|
@ -450,7 +450,7 @@ buzzvm_dup(VM);
|
||||
buzzswarm_elem_t e = *(buzzswarm_elem_t*)data;
|
||||
int* status = (int*)params;
|
||||
if(*status == 3) return;
|
||||
fprintf(stderr, "CHECKING SWARM MEMBERS:%i\n",buzzdarray_get(e->swarms, 0, uint16_t));
|
||||
fprintf(stderr, "CHECKING SWARM :%i, memeber: %i, age: %i \n",buzzdarray_get(e->swarms, 0, uint16_t), *(uint16_t*)key, e->age);
|
||||
if(buzzdarray_size(e->swarms) != 1) {
|
||||
fprintf(stderr, "Swarm list size is not 1\n");
|
||||
*status = 3;
|
||||
@ -504,16 +504,18 @@ buzzvm_dup(VM);
|
||||
buzz_error_info());
|
||||
buzzvm_dump(VM);
|
||||
}
|
||||
/* Update swarm membership */
|
||||
buzzswarm_members_update(VM->swarmmembers);
|
||||
//buzzvm_process_outmsgs(VM); //--> done in out_msg_process() function called each step
|
||||
//usleep(10000);
|
||||
/*Print swarm*/
|
||||
//buzzswarm_members_print(stdout, VM->swarmmembers, VM->robot);
|
||||
buzzswarm_members_print(stdout, VM->swarmmembers, VM->robot);
|
||||
//int SwarmSize = buzzdict_size(VM->swarmmembers)+1;
|
||||
//fprintf(stderr, "Real Swarm Size: %i\n",SwarmSize);
|
||||
|
||||
/* Check swarm state -- Not crashing thanks to test added in check_swarm_members */
|
||||
// int status = 1;
|
||||
// buzzdict_foreach(VM->swarmmembers, check_swarm_members, &status);
|
||||
int status = 1;
|
||||
buzzdict_foreach(VM->swarmmembers, check_swarm_members, &status);
|
||||
}
|
||||
|
||||
/****************************************/
|
||||
|
@ -26,7 +26,7 @@ namespace rosbzz_node{
|
||||
if(xbeeplugged)
|
||||
GetRobotId();
|
||||
else
|
||||
robot_id=strtol(robot_name.c_str() + 5, NULL, 10);;
|
||||
robot_id= strtol(robot_name.c_str() + 5, NULL, 10);;
|
||||
setpoint_counter = 0;
|
||||
fcu_timeout = TIMEOUT;
|
||||
home[0]=0.0;home[1]=0.0;home[2]=0.0;
|
||||
@ -268,16 +268,16 @@ namespace rosbzz_node{
|
||||
bzzfile_in_compile.str("");
|
||||
std::string name = bzzfile_name.substr(bzzfile_name.find_last_of("/\\") + 1);
|
||||
name = name.substr(0,name.find_last_of("."));
|
||||
bzzfile_in_compile << "bzzparse "<<bzzfile_name<<" "<<path<< name<<".basm";
|
||||
system(bzzfile_in_compile.str().c_str());
|
||||
bzzfile_in_compile.str("");
|
||||
bzzfile_in_compile <<"bzzasm "<<path<<name<<".basm "<<path<<name<<".bo "<<path<<name<<".bdbg";
|
||||
bzzfile_in_compile << "bzzc "<<bzzfile_name; //<<" "<<path<< name<<".basm";
|
||||
system(bzzfile_in_compile.str().c_str());
|
||||
//bzzfile_in_compile.str("");
|
||||
//bzzfile_in_compile <<"bzzasm "<<path<<name<<".basm "<<path<<name<<".bo "<<path<<name<<".bdbg";
|
||||
//system(bzzfile_in_compile.str().c_str());
|
||||
bzzfile_in_compile.str("");
|
||||
bzzfile_in_compile <<path<<name<<".bo";
|
||||
bcfname = bzzfile_in_compile.str();
|
||||
bzzfile_in_compile.str("");
|
||||
bzzfile_in_compile <<path<<name<<".bdbg";
|
||||
bzzfile_in_compile <<path<<name<<".bdb";
|
||||
dbgfname = bzzfile_in_compile.str();
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user