-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
32 lines (28 loc) · 739 Bytes
/
main.cpp
File metadata and controls
32 lines (28 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "structs.h"
#include "map.h"
#include "theta.h"
#include <iostream>
int main(int argc, char* argv[])
{
OccupancyGrid grid;
grid.info.height = 960;
grid.info.width = 960;
grid.info.resolution = 0.05;
grid.info.origin.position.x = 480;
grid.info.origin.position.y = 480;
goalPose gPose;
gPose.pose.position.x = 470;
gPose.pose.position.y = 480;
Map map;
map.initialize(grid);
map.setStartPos(grid.info.origin.position);
map.setGoalPos(gPose.pose.position);
map.setAgentSize(1);
Theta theta;
SearchResult result;
result = theta.startSearch(map);
std::list<goalPose> poses;
if(result.pathfound)
poses = map.getGoalPoses(result);
return 0;
}