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
#include <gtest/gtest.h>
#include "assignment8.h"

int main(int argc, char * argv[]) {
	
	cimg_library::CImg<unsigned char> map("emptymap.png");
	RRT rrt = RRT(map);
	Node node_start = Node(1,1);
	Node node_end = Node(6, 6);
	Node node_start2 = Node(3,3);
	Node node_end2 = Node(5,6);
	// rrt.Distance(node_start, node_end);
	// rrt.Distance(node_start2, node_end2);
	// std::cout << "before Link_Path \nnode_start id " << node_start.id<< std::endl;
	// std::cout << "parent_if of node_end2 is " << node_end2.parent_id << std::endl;
	// node_start.SetID(rrt.GenerateNodeID(node_start.x, node_start.y));
	// rrt.Link_Path(node_end2, node_start);
	// std::cout << "After Link_Path \nnode_start's id is" << node_start.id << std::endl;
	// std::cout << "parent of node_end2 is :" << node_end2.parent_id << std::endl;
	// rrt.Project(203, 102, node_start2, 3);

	rrt.FindPath(node_start, node_end, 5, 1);
	// rrt.FindPath(node_start2, node_end2, 1, 2);
	// map.display();
	return 0;
}