-
Notifications
You must be signed in to change notification settings - Fork 1
/
ivcbp.cpp
39 lines (33 loc) · 891 Bytes
/
ivcbp.cpp
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
32
33
34
35
36
37
38
39
#include <iostream>
#include "ros/ros.h"
#include "ros/time.h"
#include <boost/shared_ptr.hpp>
#include <ctime>
#include <opencv2//opencv.hpp>
#include "dwaplanner.h"
#include "dubins.h"
#include "sehs.h"
using namespace std;
using namespace cv;
int main(int argc, char *argv[])
{
ros::init(argc, argv, "ivcbp");
ros::NodeHandle nh;
// std::unique_ptr<dwaplanner> dwa(new dwaplanner(nh));
std::unique_ptr<sehs> heuristic(new sehs);
ros::Rate loop(1);
while (ros::ok())
{
ros::spinOnce();
clock_t start, finish;
double duration;
start = clock();
// dwa->testModule();
heuristic->testModule();
finish = clock();
duration = (double)(finish - start) / CLOCKS_PER_SEC;
std::cout<<"The algorithm costs: "<<duration * 1000.0<<" ms"<<std::endl;
loop.sleep();
}
return 0;
}