unit_process.h
Go to the documentation of this file.
1 //
2 // Created by yijiangh on 6/26/17.
3 //
4 
5 #ifndef FRAMEFAB_PATH_POST_PROCESSOR_PROCESSPATH_H
6 #define FRAMEFAB_PATH_POST_PROCESSOR_PROCESSPATH_H
7 
8 #include <choreo_msgs/ElementCandidatePoses.h>
9 #include <moveit_msgs/CollisionObject.h>
10 #include <Eigen/Core>
11 
13 {
14 
16 {
17  public:
18  UnitProcess(int index,
19  int wireframe_id,
20  Eigen::Vector3d st_pt, Eigen::Vector3d end_pt,
21  std::vector<Eigen::Vector3d> feasible_orients,
22  std::string type_str,
23  double element_diameter,
24  double shrink_length,
25  std::string world_frame)
26  {
27  id_ = index;
28  wireframe_id_ = wireframe_id;
29  st_pt_ = st_pt;
30  end_pt_ = end_pt;
31  feasible_orients_ = feasible_orients;
32  type_ = type_str;
33  element_diameter_ = element_diameter;
34  shrink_length_ = shrink_length;
35  world_frame_ = world_frame;
36  }
37  virtual ~UnitProcess(){}
38 
39  Eigen::Vector3d getStartPt() { return st_pt_; }
40  Eigen::Vector3d getEndPt() { return end_pt_; }
41  std::vector<Eigen::Vector3d> getFeasibleOrients() { return feasible_orients_; }
42  std::string getType() { return type_; }
43 
44  choreo_msgs::ElementCandidatePoses asElementCandidatePoses();
45 
46  protected:
47  moveit_msgs::CollisionObject createCollisionObject(
48  const int& id, const Eigen::Vector3d& st_pt, const Eigen::Vector3d& end_pt,
49  const double& element_diameter, std::string&& shrink_type_suffix = "") const;
50 
51  void createShrinkedEndPoint(Eigen::Vector3d& st_pt, Eigen::Vector3d& end_st,
52  double shrink_length);
53 
54  geometry_msgs::Pose computeCylinderPose(
55  const Eigen::Vector3d& st_pt, const Eigen::Vector3d& end_pt) const;
56 
57  private:
58  int id_;
60  Eigen::Vector3d st_pt_;
61  Eigen::Vector3d end_pt_;
62  std::vector<Eigen::Vector3d> feasible_orients_;
63  std::string type_;
64 
65  // collision objects
68  std::string world_frame_;
69 };
70 }
71 
72 #endif //FRAMEFAB_PATH_POST_PROCESSOR_PROCESSPATH_H
UnitProcess(int index, int wireframe_id, Eigen::Vector3d st_pt, Eigen::Vector3d end_pt, std::vector< Eigen::Vector3d > feasible_orients, std::string type_str, double element_diameter, double shrink_length, std::string world_frame)
Definition: unit_process.h:18
std::vector< Eigen::Vector3d > getFeasibleOrients()
Definition: unit_process.h:41
void createShrinkedEndPoint(Eigen::Vector3d &st_pt, Eigen::Vector3d &end_st, double shrink_length)
std::vector< Eigen::Vector3d > feasible_orients_
Definition: unit_process.h:62
choreo_msgs::ElementCandidatePoses asElementCandidatePoses()
geometry_msgs::Pose computeCylinderPose(const Eigen::Vector3d &st_pt, const Eigen::Vector3d &end_pt) const
moveit_msgs::CollisionObject createCollisionObject(const int &id, const Eigen::Vector3d &st_pt, const Eigen::Vector3d &end_pt, const double &element_diameter, std::string &&shrink_type_suffix="") const


choreo_task_sequence_processor
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 03:59:29