addition of relative pos for logging
This commit is contained in:
parent
a1a8090670
commit
95f80f5e9d
|
@ -706,7 +706,7 @@ int create_stig_tables() {
|
|||
//buzzswarm_members_print(stdout, VM->swarmmembers, VM->robot);
|
||||
//int SwarmSize = buzzdict_size(VM->swarmmembers)+1;
|
||||
//fprintf(stderr, "Real Swarm Size: %i\n",SwarmSize);
|
||||
set_robot_var(buzzdict_size(VM->swarmmembers)+1);
|
||||
|
||||
|
||||
/* Check swarm state -- Not crashing thanks to test added in check_swarm_members */
|
||||
//int status = 1;
|
||||
|
|
|
@ -112,15 +112,21 @@ namespace rosbzz_node{
|
|||
multi_msg=true;
|
||||
log<<cur_pos.latitude<<","<<cur_pos.longitude<<","<<cur_pos.altitude<<",";
|
||||
collect_data(log);
|
||||
map< int, buzz_utility::Pos_struct >::iterator it = neighbours_pos_map.begin();
|
||||
log<<","<<neighbours_pos_map.size();
|
||||
for(;it != neighbours_pos_map.end();++it){
|
||||
log<<","<<(double)it->second.x<<","<<(double)it->second.y<<","<<(double)it->second.z;
|
||||
}
|
||||
log<<std::endl;
|
||||
}
|
||||
/*Set ROBOTS variable for barrier in .bzz from neighbours count*/
|
||||
//no_of_robots=get_number_of_robots();
|
||||
get_number_of_robots();
|
||||
buzz_utility::set_robot_var(no_of_robots);
|
||||
//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 TODO only when not updating*/
|
||||
if(multi_msg)
|
||||
//if(multi_msg)
|
||||
updates_set_robots(no_of_robots);
|
||||
ROS_INFO("ROBOTS: %i , acutal : %i",(int)no_of_robots,(int)buzzdict_size(buzz_utility::get_vm()->swarmmembers)+1);
|
||||
/*run once*/
|
||||
|
|
Loading…
Reference in New Issue