4 #include <netinet/in.h>
8 #include <libplayercore/playercore.h>
40 #define LOCAL2GLOBAL_X(x,y,px,py,pa) (cos(pa)*(x) - sin(pa)*(y) + px)
41 #define LOCAL2GLOBAL_Y(x,y,px,py,pa) (sin(pa)*(x) + cos(pa)*(y) + py)
42 #define MAP_INDEX(map, i, j) (int)((i) + (j) * map.width)
43 #define MAP_VALID(map, i, j) ((i >= 0) && (i <= (int)map.width) && (j >= 0) && (j <= (int)map.height))
44 #define ROTATE_X(x,y,th) (cos(th)*(x) - sin(th)*(y))
45 #define ROTATE_Y(x,y,th) (sin(th)*(x) + cos(th)*(y))
54 double sonar_treshold;
55 double sonar_aperture;
56 double sensor_model(
double x,
double y,
double r);
60 sonar_aperture=0.5235987;
76 bool operator<(
const MAP_POINT &b)
const {
77 if (x < b.x)
return(1);
78 else if (x == b.x)
return(y < b.y);
108 class Map :
public map<MAP_POINT,MAP_POSE>
119 float sonar_treshold;
152 std::cout<<
"not implemented yet" << std::endl;
157 double Sonar::sensor_model(
double x,
double y,
double r)
160 exp((-pow(x,2)/r)-(pow(y,2)/sonar_aperture))/((
double)1.7)
int width
the map is defined as x,y -> pose (px,py,pa,P)
Definition: gridmap.h:114
Definition: playerclient.h:305
Request/reply: get grid map tile.
Definition: player_interfaces.h:3032
Definition: gridmap.h:108