libmove3d-planners
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Groups Pages
plannarTrajectorySmoothing.hpp
1 #ifndef PLANNARTRAJECTORYSMOOTHING_HPP
2 #define PLANNARTRAJECTORYSMOOTHING_HPP
3 
4 
5 #include "API/planningAPI.hpp"
6 
7 
8 //using namespace std;
9 //using namespace tr1;
10 using namespace Eigen;
11 #include <Eigen/StdVector>
12 
14 {
15 public:
17 
18 
19  void initTraj(std::vector<Eigen::Vector2d,Eigen::aligned_allocator<Eigen::Vector2d> > traj, Robot* Cylinder);
20  bool goToNextStep();
21 
22 
23  // functions
24  double computeDistOfTraj(std::vector<Eigen::Vector2d,Eigen::aligned_allocator<Eigen::Vector2d> > traj, int begin, int end);
25 
26  double computeDistBetweenTrajAndPoint(std::vector<Eigen::Vector2d,Eigen::aligned_allocator<Eigen::Vector2d> > traj, Eigen::Vector2d p);
27 
28  std::vector<Eigen::Vector2d,Eigen::aligned_allocator<Eigen::Vector2d> > removeUnnecessaryPoint(
29  std::vector<Eigen::Vector2d,Eigen::aligned_allocator<Eigen::Vector2d> > trajectory, double threshold);
30 
31  bool robotCanDoTraj(std::vector<Eigen::Vector2d,Eigen::aligned_allocator<Eigen::Vector2d> > traj,
32  Robot* BoundingBox, Robot* trajOfThisRobot, double dist);
33 
34  std::vector<Eigen::Vector2d,Eigen::aligned_allocator<Eigen::Vector2d> > smoothTrajectory(Robot* robot,
35  std::vector<Eigen::Vector2d,Eigen::aligned_allocator<Eigen::Vector2d> > trajectory);
36 
37  Eigen::Vector2d getRandomPointInSegment(Eigen::Vector2d p1, Eigen::Vector2d p2, double errorT);
38 
39  std::vector<Eigen::Vector2d,Eigen::aligned_allocator<Eigen::Vector2d> > findShortCut(std::vector<Eigen::Vector2d,Eigen::aligned_allocator<Eigen::Vector2d> > traj, uint i, uint j);
40 
41 
42  std::vector<Eigen::Vector2d,Eigen::aligned_allocator<Eigen::Vector2d> > findShortCut(
43  std::vector<Eigen::Vector2d,Eigen::aligned_allocator<Eigen::Vector2d> > traj, uint i, Robot* cyl, Robot* robot);
44 
45  std::vector<Eigen::Vector3d,Eigen::aligned_allocator<Eigen::Vector3d> > add3Dim(
46  std::vector<Eigen::Vector2d,Eigen::aligned_allocator<Eigen::Vector2d> > traj, Robot* robot, double epsilon);
47 
48  std::vector<Eigen::Vector3d,Eigen::aligned_allocator<Eigen::Vector3d> > add3DimwithoutTrajChange(
49  std::vector<Eigen::Vector2d,Eigen::aligned_allocator<Eigen::Vector2d> > traj, Robot* robot, double epsilon);
50 
51  std::vector<Eigen::Vector3d,Eigen::aligned_allocator<Eigen::Vector3d> > removeSamePoints(
52  std::vector<Eigen::Vector3d,Eigen::aligned_allocator<Eigen::Vector3d> > traj, double epsilon);
53 
54  std::vector<Eigen::Vector2d,Eigen::aligned_allocator<Eigen::Vector2d> > get2DtrajFrom3Dtraj(
55  std::vector<Eigen::Vector3d,Eigen::aligned_allocator<Eigen::Vector3d> > traj);
56 
57 
58 
59 private:
60  int _id;
61  std::vector<Eigen::Vector2d,Eigen::aligned_allocator<Eigen::Vector2d> > _traj;
62  Robot* _cyl;
63  Robot* _Robot;
64  confPtr_t _curRobotConf;
65  confPtr_t _curCylConf;
66  double _dist;
67 
68 
69 };
70 
71 #endif // PLANNARTRAJECTORYSMOOTHING_HPP
This class holds a the robot represented by a kinematic chain.
Definition: robot.hpp:42
Definition: plannarTrajectorySmoothing.hpp:13