#include <sys/stat.h>
#include <sys/types.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
#include <float.h>
#include <fstream>
#include <iostream>
#include <string>
#include <ros/ros.h>
#include <ros/package.h>
#include <move_base_msgs/MoveBaseAction.h>
#include <actionlib/client/simple_action_client.h>
#include <tf/transform_broadcaster.h>
#include <tf/transform_listener.h>
#include <std_msgs/Int16MultiArray.h>
#include <std_msgs/String.h>
#include "getgraph.h"
#include "message_types.h"
#include "patrolling_sim/GoToStartPosSrv.h"
Go to the source code of this file.
#define DEAD_ROBOT_TIME 300.0 |
Definition at line 64 of file monitor.cpp.
#define EXTENDED_STAGE 0 |
Definition at line 72 of file monitor.cpp.
#define LOG_MONITOR 0 |
Definition at line 70 of file monitor.cpp.
#define MAX_DIMENSION 200 |
Definition at line 110 of file monitor.cpp.
#define MAXIDLENESS 500.0 |
Definition at line 68 of file monitor.cpp.
#define NUM_MAX_ROBOTS 32 |
Definition at line 63 of file monitor.cpp.
#define RESOLUTION 1.0 |
Definition at line 67 of file monitor.cpp.
#define SAVE_HYSTOGRAMS 0 |
Definition at line 71 of file monitor.cpp.
#define SIMULATE_FOREVER true |
Definition at line 74 of file monitor.cpp.
#define TIMEOUT_WRITE_RESULTS 180.0 |
Definition at line 65 of file monitor.cpp.
#define TIMEOUT_WRITE_RESULTS_FOREVER 900.0 |
Definition at line 75 of file monitor.cpp.
typedef unsigned int uint |
Definition at line 81 of file monitor.cpp.
uint calculate_patrol_cycle | ( | int * | nr_visits, |
uint | dimension | ||
) |
Definition at line 427 of file monitor.cpp.
bool check_dead_robots | ( | ) |
Definition at line 516 of file monitor.cpp.
void dolog | ( | const char * | str | ) |
Definition at line 142 of file monitor.cpp.
void finish_simulation | ( | ) |
Definition at line 280 of file monitor.cpp.
double get_last_goal_reached | ( | int | k | ) |
Definition at line 152 of file monitor.cpp.
int main | ( | int | argc, |
char ** | argv | ||
) |
D.Portugal: needed in case you "rosrun" from another folder
Definition at line 622 of file monitor.cpp.
Definition at line 301 of file monitor.cpp.
void resultsCB | ( | const std_msgs::Int16MultiArray::ConstPtr & | msg | ) |
Definition at line 168 of file monitor.cpp.
void scenario_name | ( | char * | name, |
const char * | graph_file, | ||
const char * | teamsize_str | ||
) |
Definition at line 441 of file monitor.cpp.
void set_last_goal_reached | ( | int | k, |
double | val | ||
) |
Definition at line 160 of file monitor.cpp.
void update_stats | ( | int | id_robot, |
int | goal | ||
) |
Definition at line 544 of file monitor.cpp.
void write_results | ( | double * | avg_idleness, |
double * | stddev_idleness, | ||
int * | number_of_visits, | ||
uint | complete_patrol, | ||
uint | dimension, | ||
double | worst_avg_idleness, | ||
double | avg_graph_idl, | ||
double | median_graph_idl, | ||
double | stddev_graph_idl, | ||
double | min_idleness, | ||
double | gavg, | ||
double | gstddev, | ||
double | max_idleness, | ||
uint | interference_cnt, | ||
uint | tot_visits, | ||
float | avg_visits, | ||
const char * | graph_file, | ||
const char * | teamsize_str, | ||
double | duration, | ||
double | real_duration, | ||
double | comm_delay, | ||
string | filename | ||
) |
Definition at line 468 of file monitor.cpp.
string algorithm |
Definition at line 105 of file monitor.cpp.
string algparams |
Definition at line 105 of file monitor.cpp.
double avg_graph_idl |
Definition at line 118 of file monitor.cpp.
double avg_idleness[MAX_DIMENSION] |
Definition at line 113 of file monitor.cpp.
double avg_stddev_graph_idl |
Definition at line 118 of file monitor.cpp.
Definition at line 90 of file monitor.cpp.
double comm_delay |
Definition at line 104 of file monitor.cpp.
uint complete_patrol = 0 |
Definition at line 125 of file monitor.cpp.
double current_idleness[MAX_DIMENSION] |
Definition at line 113 of file monitor.cpp.
size_t dimension |
Definition at line 116 of file monitor.cpp.
double gavg |
Definition at line 121 of file monitor.cpp.
int goal |
Definition at line 101 of file monitor.cpp.
bool goal_reached = false |
Definition at line 99 of file monitor.cpp.
double goal_reached_wait |
Definition at line 104 of file monitor.cpp.
bool goto_start_pos = false |
Definition at line 89 of file monitor.cpp.
Definition at line 85 of file monitor.cpp.
double gstddev |
Definition at line 121 of file monitor.cpp.
double gT0 = 0.0 |
Definition at line 122 of file monitor.cpp.
double gT1 = 0.0 |
Definition at line 122 of file monitor.cpp.
double gT2 = 0.0 |
Definition at line 122 of file monitor.cpp.
FILE* idlfile |
Definition at line 137 of file monitor.cpp.
bool init_robots[NUM_MAX_ROBOTS] |
Definition at line 92 of file monitor.cpp.
string initial_positions |
Definition at line 105 of file monitor.cpp.
bool initialize = true |
Definition at line 88 of file monitor.cpp.
uint interference_cnt = 0 |
Definition at line 124 of file monitor.cpp.
double last_goal_reached[NUM_MAX_ROBOTS] |
Definition at line 93 of file monitor.cpp.
double last_report_time |
Definition at line 102 of file monitor.cpp.
double last_visit[MAX_DIMENSION] |
Definition at line 113 of file monitor.cpp.
pthread_mutex_t lock_last_goal_reached |
Definition at line 96 of file monitor.cpp.
FILE* logfile = NULL |
Definition at line 140 of file monitor.cpp.
double lost_message_rate |
Definition at line 104 of file monitor.cpp.
double max_idleness = 0.0 |
Definition at line 120 of file monitor.cpp.
double median_graph_idl |
Definition at line 118 of file monitor.cpp.
double min_idleness = 0.0 |
Definition at line 120 of file monitor.cpp.
string nav_mod |
Definition at line 105 of file monitor.cpp.
Definition at line 115 of file monitor.cpp.
uint patrol_cnt = 1 |
Definition at line 126 of file monitor.cpp.
double previous_avg_graph_idl = DBL_MAX |
Definition at line 118 of file monitor.cpp.
const std::string PS_path = ros::package::getPath("patrolling_sim") |
Definition at line 107 of file monitor.cpp.
time_t real_time_zero |
Definition at line 103 of file monitor.cpp.
Definition at line 84 of file monitor.cpp.
Definition at line 83 of file monitor.cpp.
Definition at line 84 of file monitor.cpp.
double stddev_graph_idl |
Definition at line 118 of file monitor.cpp.
double stddev_idleness[MAX_DIMENSION] |
Definition at line 113 of file monitor.cpp.
Definition at line 91 of file monitor.cpp.
double time_zero |
Definition at line 102 of file monitor.cpp.
double total_0[MAX_DIMENSION] |
Definition at line 114 of file monitor.cpp.
double total_1[MAX_DIMENSION] |
Definition at line 114 of file monitor.cpp.
double total_2[MAX_DIMENSION] |
Definition at line 114 of file monitor.cpp.
double worst_avg_idleness |
Definition at line 118 of file monitor.cpp.