Go to the documentation of this file.00001
00003 #ifndef GTSPSOLVER_H_
00004 #define GTSPSOLVER_H_
00005
00006 #include<surfacelet/SurfacePatch.h>
00007 #include<tf/tf.h>
00008 #include<coverage_3d_arm_navigation/TrajectoryPlanner.h>
00009 #include<coverage_3d_planning/SolverInterface.h>
00010 class GTSPSolver : public SolverInterface{
00011 public:
00012 GTSPSolver();
00013 GTSPSolver(double max_adjacency);
00014
00015 void getSolution(std::vector<std::vector<double> >& joint_path, std::vector<tf::Pose>& pose_path,
00016 std::vector<unsigned int>& action, std::vector<unsigned int>& res_traj);
00017 void getActions(const std::vector<unsigned int>& traj, std::vector<
00018 unsigned int>& actions);
00019 void setAlpha(double alpha);
00020
00021 private:
00022 double alpha_;
00023
00024 void transformGraphToGTSP(const Eigen::MatrixXi& adj_bool, const std::vector<SurfacePatch>& patches, Eigen::VectorXi& mapping, Eigen::MatrixXi& new_adj_bool,Eigen::MatrixXf& new_adj_float);
00025 void transformGTSPToTSP(const Eigen::VectorXi& multinode_mapping, Eigen::MatrixXi& adj_bool,
00026 Eigen::MatrixXf& adj_float);
00027 void mapGTSPIndexToMultinode(const Eigen::VectorXi& multinode_mapping, const std::vector<unsigned int>& traj,
00028 std::vector<unsigned int>& multinode_traj);
00029 unsigned int mapGTSPIndexToMultinode(const Eigen::VectorXi& multinode_mapping, unsigned int node);
00030 void insertStartIntoWeights(const Eigen::MatrixXf& weights,const Eigen::VectorXi& multinode_mapping, Eigen::MatrixXf& new_weights);
00031 };
00032
00033 #endif