fix var init error on drones and replace ROS_ERROR by ROS_WARN

This commit is contained in:
David St-Onge 2017-11-28 16:17:28 -05:00
parent 369006413f
commit c77c8044cf
2 changed files with 4 additions and 16 deletions

View File

@ -17,7 +17,7 @@ namespace buzzuav_closures{
static double goto_pos[3];
static double rc_goto_pos[3];
static float rc_gimbal[4];
static float batt[3];
static float batt[3]={0,0,0};
static float obst[5]={0,0,0,0,0};
static double cur_pos[3];
static uint8_t status;

View File

@ -82,7 +82,7 @@ void roscontroller::GetRobotId()
while (!xbeestatus_srv.call(robot_id_srv_request, robot_id_srv_response))
{
ros::Duration(0.1).sleep();
ROS_ERROR("Waiting for Xbee to respond to get device ID");
ROS_WARN("ROSBUZZ is waiting for Xbee device ID");
}
robot_id = robot_id_srv_response.value.integer;
@ -256,23 +256,10 @@ void roscontroller::RosControllerRun()
/*Set multi message available after update*/
//if (get_update_status())
//{
/* set_read_update_status();
set_read_update_status();
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);
/*Retrive the state of the graph and uav and log*/
@ -300,6 +287,7 @@ void roscontroller::RosControllerRun()
timer_step += 1;
maintain_pos(timer_step);
// std::cout<< "HOME: " << home.latitude << ", " << home.longitude;
}
/* Destroy updater and Cleanup */