Changes to be committed: change logging

modified:   src/rosbuzz/src/roscontroller.cpp
This commit is contained in:
Fang Wu 2018-09-18 15:38:44 -04:00
parent 4523de48a2
commit d63bc3686b
1 changed files with 20 additions and 21 deletions

View File

@ -175,26 +175,25 @@ void roscontroller::RosControllerRun()
<< cur_pos.altitude * 100000 << ",";
log << (int)no_of_robots << ",";
log << neighbours_pos_map.size() << ",";
map<int, buzz_utility::Pos_struct>::iterator it =
neighbours_pos_map.begin();
log << (int)inmsgdata.size() << "," << message_number << ",";
log << out_msg_time <<",";
log <<buzz_utility::get_bvmstate()<<",";
log << buzz_utility::get_bvmstate();
map<int, buzz_utility::Pos_struct>::iterator it =
neighbours_pos_map.begin();
for (; it != neighbours_pos_map.end(); ++it)
{
log<< it->first<<",";
log << "," << it->first << ",";
log << (double)it->second.x << "," << (double)it->second.y
<< "," << (double)it->second.z <<",";
<< "," << (double)it->second.z;
}
for (std::vector<msg_data>::iterator it = inmsgdata.begin() ; it != inmsgdata.end(); ++it){
log<<(int)it->nid <<","<<(int)it->msgid<<","<<(int)it->size<<","<<it->sent_time
<<","<<it->received_time <<",";
for (std::vector<msg_data>::iterator it = inmsgdata.begin() ; it != inmsgdata.end(); ++it)
{
log << "," << (int)it->nid << "," << (int)it->msgid << "," << (int)it->size << "," <<
it->sent_time << "," << it->received_time;
}
log << std::endl ;
inmsgdata.clear();
log <<buzz_utility::get_bvmstate()<<std::endl;
log << std::endl;
// time_sync_step();
// if(debug)