|
| 1 | +/** |
| 2 | + * @file trajopt_default_composite_profile.h |
| 3 | + * @brief |
| 4 | + * |
| 5 | + * @author Levi Armstrong |
| 6 | + * @date June 18, 2020 |
| 7 | + * @version TODO |
| 8 | + * @bug No known bugs |
| 9 | + * |
| 10 | + * @copyright Copyright (c) 2020, Southwest Research Institute |
| 11 | + * |
| 12 | + * @par License |
| 13 | + * Software License Agreement (Apache License) |
| 14 | + * @par |
| 15 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 16 | + * you may not use this file except in compliance with the License. |
| 17 | + * You may obtain a copy of the License at |
| 18 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 19 | + * @par |
| 20 | + * Unless required by applicable law or agreed to in writing, software |
| 21 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 22 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 23 | + * See the License for the specific language governing permissions and |
| 24 | + * limitations under the License. |
| 25 | + */ |
| 26 | + |
| 27 | +#ifndef TESSERACT_MOTION_PLANNERS_TRAJOPT_IFOPT_DEFAULT_COMPOSITE_PROFILE_H |
| 28 | +#define TESSERACT_MOTION_PLANNERS_TRAJOPT_IFOPT_DEFAULT_COMPOSITE_PROFILE_H |
| 29 | + |
| 30 | +#include <tesseract_common/macros.h> |
| 31 | +TESSERACT_COMMON_IGNORE_WARNINGS_PUSH |
| 32 | +#include <vector> |
| 33 | +#include <Eigen/Geometry> |
| 34 | +#include <Eigen/Core> |
| 35 | +TESSERACT_COMMON_IGNORE_WARNINGS_POP |
| 36 | + |
| 37 | +#include <tesseract_motion_planners/trajopt_ifopt/trajopt_ifopt_collision_config.h> |
| 38 | +#include <tesseract_motion_planners/trajopt_ifopt/profile/trajopt_ifopt_profile.h> |
| 39 | + |
| 40 | +namespace tesseract_planning |
| 41 | +{ |
| 42 | +class TrajOptIfoptDefaultCompositeProfile : public TrajOptIfoptCompositeProfile |
| 43 | +{ |
| 44 | +public: |
| 45 | + TrajOptIfoptDefaultCompositeProfile() = default; |
| 46 | + TrajOptIfoptDefaultCompositeProfile(const tinyxml2::XMLElement& xml_element); |
| 47 | + |
| 48 | +// /** @brief The type of contact test to perform: FIRST, CLOSEST, ALL */ |
| 49 | +// tesseract_collision::ContactTestType contact_test_type = tesseract_collision::ContactTestType::ALL; |
| 50 | +// /** @brief Configuration info for collisions that are modeled as costs */ |
| 51 | +// CollisionCostConfig collision_cost_config; |
| 52 | +// /** @brief Configuration info for collisions that are modeled as constraints */ |
| 53 | +// CollisionConstraintConfig collision_constraint_config; |
| 54 | +// /** @brief If true, a joint velocity cost with a target of 0 will be applied for all timesteps Default: true*/ |
| 55 | +// bool smooth_velocities = true; |
| 56 | +// /** @brief This default to all ones, but allows you to weight different joints */ |
| 57 | +// Eigen::VectorXd velocity_coeff; |
| 58 | +// /** @brief If true, a joint acceleration cost with a target of 0 will be applied for all timesteps Default: false*/ |
| 59 | +// bool smooth_accelerations = true; |
| 60 | +// /** @brief This default to all ones, but allows you to weight different joints */ |
| 61 | +// Eigen::VectorXd acceleration_coeff; |
| 62 | +// /** @brief If true, a joint jerk cost with a target of 0 will be applied for all timesteps Default: false*/ |
| 63 | +// bool smooth_jerks = true; |
| 64 | +// /** @brief This default to all ones, but allows you to weight different joints */ |
| 65 | +// Eigen::VectorXd jerk_coeff; |
| 66 | +// /** @brief If true, applies a cost to avoid kinematic singularities */ |
| 67 | +// bool avoid_singularity = false; |
| 68 | +// /** @brief Optimization weight associated with kinematic singularity avoidance */ |
| 69 | +// double avoid_singularity_coeff = 5.0; |
| 70 | + |
| 71 | +// /** @brief Set the resolution at which state validity needs to be verified in order for a motion between two states |
| 72 | +// * to be considered valid in post checking of trajectory returned by TrajOptIfopt. |
| 73 | +// * |
| 74 | +// * The resolution is equal to longest_valid_segment_fraction * state_space.getMaximumExtent() |
| 75 | +// * |
| 76 | +// * Note: The planner takes the conservative of either longest_valid_segment_fraction or longest_valid_segment_length. |
| 77 | +// */ |
| 78 | +// double longest_valid_segment_fraction = 0.01; // 1% |
| 79 | + |
| 80 | +// /** @brief Set the resolution at which state validity needs to be verified in order for a motion between two states |
| 81 | +// * to be considered valid. If norm(state1 - state0) > longest_valid_segment_length. |
| 82 | +// * |
| 83 | +// * Note: This gets converted to longest_valid_segment_fraction. |
| 84 | +// * longest_valid_segment_fraction = longest_valid_segment_length / state_space.getMaximumExtent() |
| 85 | +// */ |
| 86 | +// double longest_valid_segment_length = 0.5; |
| 87 | + |
| 88 | +// /**@brief Special link collision cost distances */ |
| 89 | +// trajopt::SafetyMarginData::Ptr special_collision_cost{ nullptr }; |
| 90 | +// /**@brief Special link collision constraint distances */ |
| 91 | +// trajopt::SafetyMarginData::Ptr special_collision_constraint{ nullptr }; |
| 92 | + |
| 93 | +// void apply(trajopt::ProblemConstructionInfo& pci, |
| 94 | +// int start_index, |
| 95 | +// int end_index, |
| 96 | +// const ManipulatorInfo& manip_info, |
| 97 | +// const std::vector<std::string>& active_links, |
| 98 | +// const std::vector<int>& fixed_indices) override; |
| 99 | + |
| 100 | +// tinyxml2::XMLElement* toXML(tinyxml2::XMLDocument& doc) const override; |
| 101 | + |
| 102 | +//protected: |
| 103 | +// void addCollisionCost(trajopt::ProblemConstructionInfo& pci, |
| 104 | +// int start_index, |
| 105 | +// int end_index, |
| 106 | +// const std::vector<int>& fixed_indices) const; |
| 107 | + |
| 108 | +// void addCollisionConstraint(trajopt::ProblemConstructionInfo& pci, |
| 109 | +// int start_index, |
| 110 | +// int end_index, |
| 111 | +// const std::vector<int>& fixed_indices) const; |
| 112 | + |
| 113 | +// void addVelocitySmoothing(trajopt::ProblemConstructionInfo& pci, |
| 114 | +// int start_index, |
| 115 | +// int end_index, |
| 116 | +// const std::vector<int>& fixed_indices) const; |
| 117 | + |
| 118 | +// void addAccelerationSmoothing(trajopt::ProblemConstructionInfo& pci, |
| 119 | +// int start_index, |
| 120 | +// int end_index, |
| 121 | +// const std::vector<int>& fixed_indices) const; |
| 122 | + |
| 123 | +// void addJerkSmoothing(trajopt::ProblemConstructionInfo& pci, |
| 124 | +// int start_index, |
| 125 | +// int end_index, |
| 126 | +// const std::vector<int>& fixed_indices) const; |
| 127 | + |
| 128 | +// void addConstraintErrorFunctions(trajopt::ProblemConstructionInfo& pci, |
| 129 | +// int start_index, |
| 130 | +// int end_index, |
| 131 | +// const std::vector<int>& fixed_indices) const; |
| 132 | + |
| 133 | +// void addAvoidSingularity(trajopt::ProblemConstructionInfo& pci, |
| 134 | +// int start_index, |
| 135 | +// int end_index, |
| 136 | +// const std::string& link, |
| 137 | +// const std::vector<int>& fixed_indices) const; |
| 138 | + |
| 139 | +// void smoothMotionTerms(const tinyxml2::XMLElement& xml_element, |
| 140 | +// bool& enabled, |
| 141 | +// Eigen::VectorXd& coeff, |
| 142 | +// std::size_t& length); |
| 143 | +}; |
| 144 | +} // namespace tesseract_planning |
| 145 | + |
| 146 | +#endif // TESSERACT_MOTION_PLANNERS_TRAJOPT_IFOPT_DEFAULT_COMPOSITE_PROFILE_H |
0 commit comments