5 #include "../include/choreo_descartes_planner/pose_verification_helpers.h" 11 descartes_core::RobotModel& model,
12 const std::vector<Eigen::Affine3d>& poses,
18 assert(poses.size() == cap_rung.
path_pts_[0].size());
20 std::vector<double> st_jt;
21 std::vector<double> end_jt;
23 std::vector<std::vector<double>> joint_poses;
28 for(
size_t c_id = 0; c_id < poses.size(); c_id++)
32 if(c_id < poses.size() - 1)
43 model.getAllIK(poses[c_id], joint_poses);
45 if(joint_poses.empty())
56 for (
const auto& sol : joint_poses)
58 st_jt.insert(st_jt.end(), sol.cbegin(), sol.cend());
62 if(poses.size()-1 == c_id)
65 for (
const auto& sol : joint_poses)
67 end_jt.insert(end_jt.end(), sol.cbegin(), sol.cend());
79 descartes_core::RobotModel& model,
80 const std::vector<std::vector<Eigen::Affine3d>>& poses,
86 const int kin_family_size = cap_rung.
path_pts_.size();
88 assert(poses.size() == kin_family_size);
91 std::vector<double> st_jt;
92 std::vector<double> end_jt;
94 for(
int k=0; k<kin_family_size; k++)
96 std::vector<std::vector<double>> joint_poses;
99 for (
size_t c_id = 0; c_id < poses[k].size(); c_id++)
105 if (!model.getAllIK(poses[k][c_id], joint_poses))
114 if (0 == c_id && 0 == k)
117 for (
const auto &sol : joint_poses)
119 st_jt.insert(st_jt.end(), sol.cbegin(), sol.cend());
124 if (poses[k].size() - 1 == c_id && kin_family_size - 1 == k)
127 for (
const auto &sol : joint_poses)
129 end_jt.insert(end_jt.end(), sol.cbegin(), sol.cend());
142 descartes_core::RobotModel& model,
150 const std::vector<Eigen::Vector3d> pts = cap_rung.
path_pts_[0];
151 std::vector<Eigen::Affine3d> poses;
152 poses.reserve(cap_rung.
path_pts_.size());
155 const auto angle_step = 2 *
M_PI / n_angle_disc;
159 for (
long i = 0; i < n_angle_disc; ++i)
161 const auto angle = angle_step * i;
164 for(
const auto& pt : pts)
166 poses.push_back(
makePose(pt, orientation, angle));
std::vector< planning_scene::PlanningScenePtr > planning_scene_
std::vector< double > end_joint_data_
std::vector< std::vector< Eigen::Matrix3d > > orientations_
bool checkFeasibility(descartes_core::RobotModel &model, const std::vector< Eigen::Affine3d > &poses, descartes_planner::CapRung &cap_rung, descartes_planner::CapVert &cap_vert)
std::vector< std::vector< Eigen::Vector3d > > path_pts_
bool checkFeasibilityPickNPlace(descartes_core::RobotModel &model, const std::vector< std::vector< Eigen::Affine3d >> &poses, descartes_planner::CapRung &cap_rung, descartes_planner::CapVert &cap_vert)
std::vector< double > start_joint_data_
std::vector< planning_scene::PlanningScenePtr > planning_scene_completed_
std::vector< Eigen::Matrix3d > orientation_
bool domainDiscreteEnumerationCheck(descartes_core::RobotModel &model, descartes_planner::CapRung &cap_rung, descartes_planner::CapVert &cap_vert)
Eigen::Affine3d makePose(const Eigen::Vector3d &position, const Eigen::Matrix3d &orientation, const double z_axis_angle)