#include <iostream>
#include <fstream>
#include <sstream>
#include <ros/ros.h>
#include <math.h>
#include <boost/function.hpp>
#include <boost/bind.hpp>
#include <boost/thread.hpp>
#include "std_msgs/String.h"
#include "nav_msgs/Odometry.h"
#include "geometry_msgs/Twist.h"
Go to the source code of this file.
Classes | |
struct | Position |
Functions | |
bool | blue (int id) |
float | cal_error () |
void | callback (const nav_msgs::OdometryConstPtr &lmsg, int r_id) |
std::vector< int > | get_neighbor (int r_id) |
Position | get_pos (int r_id) |
int | main (int argc, char **argv) |
float | nei_dis (int id1, int id2) |
float | pos_dis (Position self, Position nei) |
void | process () |
bool | red (int id) |
bool | same_swarm (int i, int j) |
Variables | |
int | COM_DIS = 40 |
int | IN_NEI_DIS = 5 |
std::map< int, std::vector< int > > | neighbor_map |
int | OUT_NEI_DIS = 25 |
std::map< int, Position > | pos_map |
int | SWARM_SIZE = 20 |
Software License Agreement (BSD)
Definition in file app2_statistic.cpp.
bool blue | ( | int | id | ) |
Definition at line 65 of file app2_statistic.cpp.
float cal_error | ( | ) |
Definition at line 159 of file app2_statistic.cpp.
void callback | ( | const nav_msgs::OdometryConstPtr & | lmsg, |
int | r_id | ||
) |
Definition at line 84 of file app2_statistic.cpp.
std::vector<int> get_neighbor | ( | int | r_id | ) |
Definition at line 138 of file app2_statistic.cpp.
Position get_pos | ( | int | r_id | ) |
Definition at line 124 of file app2_statistic.cpp.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 217 of file app2_statistic.cpp.
float nei_dis | ( | int | id1, |
int | id2 | ||
) |
Definition at line 151 of file app2_statistic.cpp.
Definition at line 49 of file app2_statistic.cpp.
void process | ( | ) |
Definition at line 185 of file app2_statistic.cpp.
bool red | ( | int | id | ) |
Definition at line 57 of file app2_statistic.cpp.
bool same_swarm | ( | int | i, |
int | j | ||
) |
Definition at line 73 of file app2_statistic.cpp.
int COM_DIS = 40 |
Definition at line 42 of file app2_statistic.cpp.
int IN_NEI_DIS = 5 |
Definition at line 40 of file app2_statistic.cpp.
std::map<int, std::vector<int> > neighbor_map |
Definition at line 55 of file app2_statistic.cpp.
int OUT_NEI_DIS = 25 |
Definition at line 41 of file app2_statistic.cpp.
std::map<int, Position> pos_map |
Definition at line 54 of file app2_statistic.cpp.
int SWARM_SIZE = 20 |
Definition at line 39 of file app2_statistic.cpp.