diff --git a/launch/rosbuzzm100.launch b/launch/rosbuzzm100.launch index c44b99e..0c0b0e7 100644 --- a/launch/rosbuzzm100.launch +++ b/launch/rosbuzzm100.launch @@ -2,15 +2,17 @@ - + + - + - - + + + diff --git a/src/buzz_utility.cpp b/src/buzz_utility.cpp index c9cbd69..cf39566 100644 --- a/src/buzz_utility.cpp +++ b/src/buzz_utility.cpp @@ -450,8 +450,8 @@ 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)); - if(buzzdarray_size(e->swarms) != 1) { + 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); } /****************************************/ diff --git a/src/roscontroller.cpp b/src/roscontroller.cpp index 26f5508..faf8c29 100644 --- a/src/roscontroller.cpp +++ b/src/roscontroller.cpp @@ -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 "<