#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 | |
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 () |
Variables | |
int | COM_DIS = 12 |
int | NEI_DIS = 10 |
std::map< int, std::vector< int > > | neighbor_map |
std::map< int, Position > | pos_map |
int | SWARM_SIZE = 20 |
Software License Agreement (BSD)
Definition in file app3_statistic.cpp.
float cal_error | ( | ) |
Definition at line 131 of file app3_statistic.cpp.
void callback | ( | const nav_msgs::OdometryConstPtr & | lmsg, |
int | r_id | ||
) |
Definition at line 56 of file app3_statistic.cpp.
std::vector<int> get_neighbor | ( | int | r_id | ) |
Definition at line 110 of file app3_statistic.cpp.
Position get_pos | ( | int | r_id | ) |
Definition at line 96 of file app3_statistic.cpp.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 183 of file app3_statistic.cpp.
float nei_dis | ( | int | id1, |
int | id2 | ||
) |
Definition at line 123 of file app3_statistic.cpp.
Definition at line 48 of file app3_statistic.cpp.
void process | ( | ) |
Definition at line 151 of file app3_statistic.cpp.
int COM_DIS = 12 |
Definition at line 41 of file app3_statistic.cpp.
int NEI_DIS = 10 |
Definition at line 40 of file app3_statistic.cpp.
std::map<int, std::vector<int> > neighbor_map |
Definition at line 54 of file app3_statistic.cpp.
std::map<int, Position> pos_map |
Definition at line 53 of file app3_statistic.cpp.
int SWARM_SIZE = 20 |
Definition at line 39 of file app3_statistic.cpp.