@@ -87,24 +87,28 @@ class PlanningFactorInterface
87
87
* @param behavior of this planning factor.
88
88
* @param safety factor.
89
89
* @param driving direction.
90
- * @param target velocity of the control point.
91
- * @param shift length of the control point.
90
+ * @param target velocity of the 1st control point.
91
+ * @param target velocity of the 2nd control point.
92
+ * @param shift length of the 1st control point.
93
+ * @param shift length of the 2nd control point.
92
94
* @param detail information.
93
95
*/
94
96
template <class PointType >
95
97
void add (
96
98
const std::vector<PointType> & points, const Pose & ego_pose, const Pose & start_pose,
97
99
const Pose & end_pose, const uint16_t behavior, const SafetyFactorArray & safety_factors,
98
- const bool is_driving_forward = true , const double velocity = 0.0 ,
99
- const double shift_length = 0.0 , const std::string & detail = " " )
100
+ const bool is_driving_forward = true , const double start_velocity = 0.0 ,
101
+ const double end_velocity = 0.0 , const double start_shift_length = 0.0 ,
102
+ const double end_shift_length = 0.0 , const std::string & detail = " " )
100
103
{
101
104
const auto start_distance = static_cast <float >(
102
105
autoware::motion_utils::calcSignedArcLength (points, ego_pose.position , start_pose.position ));
103
106
const auto end_distance = static_cast <float >(
104
107
autoware::motion_utils::calcSignedArcLength (points, ego_pose.position , end_pose.position ));
105
108
add (
106
109
start_distance, end_distance, start_pose, end_pose, behavior, safety_factors,
107
- is_driving_forward, velocity, shift_length, detail);
110
+ is_driving_forward, start_velocity, end_velocity, start_shift_length, end_shift_length,
111
+ detail);
108
112
}
109
113
110
114
/* *
@@ -151,26 +155,29 @@ class PlanningFactorInterface
151
155
* @param behavior of this planning factor.
152
156
* @param safety factor.
153
157
* @param driving direction.
154
- * @param target velocity of the control point.
155
- * @param shift length of the control point.
158
+ * @param target velocity of the 1st control point.
159
+ * @param target velocity of the 2nd control point.
160
+ * @param shift length of the 1st control point.
161
+ * @param shift length of the 2nd control point.
156
162
* @param detail information.
157
163
*/
158
164
void add (
159
165
const double start_distance, const double end_distance, const Pose & start_pose,
160
166
const Pose & end_pose, const uint16_t behavior, const SafetyFactorArray & safety_factors,
161
- const bool is_driving_forward = true , const double velocity = 0.0 ,
162
- const double shift_length = 0.0 , const std::string & detail = " " )
167
+ const bool is_driving_forward = true , const double start_velocity = 0.0 ,
168
+ const double end_velocity = 0.0 , const double start_shift_length = 0.0 ,
169
+ const double end_shift_length = 0.0 , const std::string & detail = " " )
163
170
{
164
171
const auto control_start_point = autoware_internal_planning_msgs::build<ControlPoint>()
165
172
.pose (start_pose)
166
- .velocity (velocity )
167
- .shift_length (shift_length )
173
+ .velocity (start_velocity )
174
+ .shift_length (start_shift_length )
168
175
.distance (start_distance);
169
176
170
177
const auto control_end_point = autoware_internal_planning_msgs::build<ControlPoint>()
171
178
.pose (end_pose)
172
- .velocity (velocity )
173
- .shift_length (shift_length )
179
+ .velocity (end_velocity )
180
+ .shift_length (end_shift_length )
174
181
.distance (end_distance);
175
182
176
183
const auto factor = autoware_internal_planning_msgs::build<PlanningFactor>()
@@ -227,15 +234,15 @@ extern template void
227
234
PlanningFactorInterface::add<autoware_internal_planning_msgs::msg::PathPointWithLaneId>(
228
235
const std::vector<autoware_internal_planning_msgs::msg::PathPointWithLaneId> &, const Pose &,
229
236
const Pose &, const Pose &, const uint16_t behavior, const SafetyFactorArray &, const bool ,
230
- const double , const double , const std::string &);
237
+ const double , const double , const double , const double , const std::string &);
231
238
extern template void PlanningFactorInterface::add<autoware_planning_msgs::msg::PathPoint>(
232
239
const std::vector<autoware_planning_msgs::msg::PathPoint> &, const Pose &, const Pose &,
233
240
const Pose &, const uint16_t behavior, const SafetyFactorArray &, const bool , const double ,
234
- const double , const std::string &);
241
+ const double , const double , const double , const std::string &);
235
242
extern template void PlanningFactorInterface::add<autoware_planning_msgs::msg::TrajectoryPoint>(
236
243
const std::vector<autoware_planning_msgs::msg::TrajectoryPoint> &, const Pose &, const Pose &,
237
244
const Pose &, const uint16_t behavior, const SafetyFactorArray &, const bool , const double ,
238
- const double , const std::string &);
245
+ const double , const double , const double , const std::string &);
239
246
240
247
} // namespace autoware::planning_factor_interface
241
248
0 commit comments