capsulated_ladder_tree_RRTstar.h
Go to the documentation of this file.
1 //
2 // Created by yijiangh on 11/28/17.
3 //
4 
5 #ifndef CHOREO_DESCARTES_CAPSULATED_LADDER_TREE_RRTSTAR_H
6 #define CHOREO_DESCARTES_CAPSULATED_LADDER_TREE_RRTSTAR_H
7 
8 #include "constrained_segment.h"
10 
12 #include <descartes_trajectory/joint_trajectory_pt.h>
13 
14 namespace descartes_planner
15 {
16 // RRT* on capsulated ladder tree
18 {
19  public:
20  // for spatial extrusion
22  const std::vector<ConstrainedSegment>& segs,
23  const std::vector<planning_scene::PlanningScenePtr>& planning_scenes,
24  const std::vector<planning_scene::PlanningScenePtr>& planning_scenes_completed
25  = std::vector<planning_scene::PlanningScenePtr>());
26 
27  // for picknplace
29  const std::vector<ConstrainedSegmentPickNPlace>& segs);
30 
32 
33  std::vector<std::vector<int>> getGraphPartitionIds() const
34  {
35  assert(cap_rungs_.size() > 0);
36  std::vector<std::vector<int>> p_ids;
37 
38  for(const auto& c : cap_rungs_)
39  {
40  p_ids.push_back(c.sub_segment_ids_);
41  }
42 
43  return p_ids;
44  }
45 
46  // TODO: should pass generate sample, feasibility checking function in
47  // use RRT* on a ladder tree to get optimal capsulated solution
48  // return the cost of the solution, if no sol found, return numerical max
49  double solve(descartes_core::RobotModel& model, double clt_rrt_unit_process_timeout, double clt_rrt_timeout);
50 
51  // TODO: temporal function for solve PnP, this should be merged to a more universal solve function
52  double solvePickNPlace(descartes_core::RobotModel& model, double clt_rrt_unit_process_timeout, double clt_rrt_timeout);
53 
54  // construct ladder graph for each capsule and apply DAG search to get full trajectory solution
55  void extractSolution(descartes_core::RobotModel& model,
56  std::vector<descartes_core::TrajectoryPtPtr>& sol,
57  std::vector<descartes_planner::LadderGraph>& graphs,
58  std::vector<int>& graph_indices,
59  const bool use_saved_graph);
60 
61  private:
62  std::vector<CapRung> cap_rungs_;
63 
64  // TODO
65  // template:
66  // std::vector<Eigen::Affine3d> generateSample(const descartes_planner::CapRung& cap_rung,
67  // descartes_planner::CapVert& cap_vert)
68 // descartes_planner::SegmentSamplingFunction custom_sampling_fn_;
69 
70  // TODO
71  // template:
72 
73 };
74 }
75 
76 #endif //DESCARTES_CAPSULATED_LADDER_TREE_RRTSTAR_H
double solve(descartes_core::RobotModel &model, double clt_rrt_unit_process_timeout, double clt_rrt_timeout)
CapsulatedLadderTreeRRTstar(const std::vector< ConstrainedSegment > &segs, const std::vector< planning_scene::PlanningScenePtr > &planning_scenes, const std::vector< planning_scene::PlanningScenePtr > &planning_scenes_completed=std::vector< planning_scene::PlanningScenePtr >())
double solvePickNPlace(descartes_core::RobotModel &model, double clt_rrt_unit_process_timeout, double clt_rrt_timeout)
void extractSolution(descartes_core::RobotModel &model, std::vector< descartes_core::TrajectoryPtPtr > &sol, std::vector< descartes_planner::LadderGraph > &graphs, std::vector< int > &graph_indices, const bool use_saved_graph)
std::vector< std::vector< int > > getGraphPartitionIds() const


choreo_descartes_planner
Author(s): Yijiang Huang , Jonathan Meyer
autogenerated on Thu Jul 18 2019 03:58:35