-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
30 lines (25 loc) · 663 Bytes
/
Copy pathmain.cpp
File metadata and controls
30 lines (25 loc) · 663 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
#include <bits/stdc++.h>
#include "RRT.hpp"
using namespace std;
int main(){
Cobs c0(50.0, 130.0, 80.0,20.0);
Cobs c1(100.0, 15.0, 200.0,50.0);
Cobs c2(40.0, 200.0, 50.0,50.0);
vector<Cobs> all;
all.push_back(c0);
all.push_back(c1);
all.push_back(c2);
RRTMain rrt(all, 400, 400);
vertex aa = make_pair(100,300);
vertex b = make_pair(139,5);
rrt.init(aa, b, 5, 1000);
try{
rrt.run();
}catch(exception &e){
cout<<"Exception.."<<e.what()<<endl;
}
rrt.welcome();
rrt.save();
rrt.plot();
return 0;
}