-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.cpp
27 lines (22 loc) · 871 Bytes
/
main.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
#include <iostream>
#include <vector>
#include "BiquadFilter.h"
#include "FirFilter.h"
#include "Logger.h"
#include "TrajectoryGenerator.h"
#include <thread>
int main()
{
using clock = std::chrono::steady_clock;
auto begin = clock::now();
std::vector<float> kinematicConstarints = {50, 20, 200, 2000};
TrajectoryGenerator trajectoryGenerator(kinematicConstarints);
trajectoryGenerator.generateTrajectory(0.001);
auto end = clock::now();
std::cout << "Time taken: " << std::chrono::duration_cast<std::chrono::milliseconds>(end - begin).count() << "ms" << std::endl;
std::vector<float> trajectoryPositions = trajectoryGenerator.getTrajectoryPositions();
std::vector<float> trajectoryVelocities = trajectoryGenerator.getTrajectoryVelocities();
Logger logger;
logger.Log(trajectoryPositions, "../output.txt");
return 0;
}