@@ -45,101 +45,101 @@ class TrajOptIfoptDefaultCompositeProfile : public TrajOptIfoptCompositeProfile
45
45
TrajOptIfoptDefaultCompositeProfile () = default ;
46
46
TrajOptIfoptDefaultCompositeProfile (const tinyxml2::XMLElement& xml_element);
47
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);
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 (TrajOptIfoptProblem& problem ,
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 (TrajOptIfoptProblem& problem ,
104
+ int start_index,
105
+ int end_index,
106
+ const std::vector<int >& fixed_indices) const ;
107
+
108
+ void addCollisionConstraint (TrajOptIfoptProblem& problem ,
109
+ int start_index,
110
+ int end_index,
111
+ const std::vector<int >& fixed_indices) const ;
112
+
113
+ void addVelocitySmoothing (TrajOptIfoptProblem& problem ,
114
+ int start_index,
115
+ int end_index,
116
+ const std::vector<int >& fixed_indices) const ;
117
+
118
+ void addAccelerationSmoothing (TrajOptIfoptProblem& problem ,
119
+ int start_index,
120
+ int end_index,
121
+ const std::vector<int >& fixed_indices) const ;
122
+
123
+ void addJerkSmoothing (TrajOptIfoptProblem& problem ,
124
+ int start_index,
125
+ int end_index,
126
+ const std::vector<int >& fixed_indices) const ;
127
+
128
+ void addConstraintErrorFunctions (TrajOptIfoptProblem& problem ,
129
+ int start_index,
130
+ int end_index,
131
+ const std::vector<int >& fixed_indices) const ;
132
+
133
+ void addAvoidSingularity (TrajOptIfoptProblem& problem ,
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
143
};
144
144
} // namespace tesseract_planning
145
145
0 commit comments