Skip to content

Commit 1a6e9d3

Browse files
feat(behavior_path_planner): add avoidance debug (#60)
* fix: behavior path multi thread Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp> * add mutex unlock Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp> * feat(behavior_path_planner): debug messages for failed avoidance (#694) * feat(behavior_path_planner): debug message for avoidance Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp> * fix: make_shared for the pointers Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp> * chore: pre-commit Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp> * fix: remove related DEBUG_PRINT Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp> * chore: naming, add debug to the variable name This is so that people can infer mutable to debug, therefore reducing the amount of time for debugging other things Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp> * fix: object id is written as string instead of uint8x16 Also fix getUuidStr function to reflect the actual hex value. the function is moved to avoidance_util as it better served as helper function. Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp> * chore: fix spelling Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp> * fix: display all 32 uuid characters Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp> * chore: remove unnecessary header Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp> * feat: support more debug message Note: need further refactoring, due to multiple similar code, plus duplicate printing. Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp> * fix mutiplication by introducing global variables Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp> * header stamp to get the clock Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp> * fix: renaming the type to show clearer intent of the type Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp> Co-authored-by: Tomoya Kimura <tomoya.kimura@tier4.jp> Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp> * fix(behavior_path_planner): getAvoidanceDebugMsgArray caused crash (#828) this is due to the assignment to pointer without guards in the function Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp> * feat: output avoidance debug array whenever the avoidance module is enabled (#835) Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp> * fix: behavior path avoidance debug Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp> Co-authored-by: Zulfaqar Azmi <93502286+zulfaqar-azmi-t4@users.noreply.github.com>
1 parent 638e5a7 commit 1a6e9d3

10 files changed

+145
-29
lines changed

planning/behavior_path_planner/include/behavior_path_planner/behavior_path_planner_node.hpp

+7
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
#include <nav_msgs/msg/occupancy_grid.hpp>
3939
#include <nav_msgs/msg/odometry.hpp>
4040
#include <tier4_planning_msgs/msg/approval.hpp>
41+
#include <tier4_planning_msgs/msg/avoidance_debug_factor.hpp>
42+
#include <tier4_planning_msgs/msg/avoidance_debug_msg.hpp>
43+
#include <tier4_planning_msgs/msg/avoidance_debug_msg_array.hpp>
4144
#include <tier4_planning_msgs/msg/path_change_module.hpp>
4245
#include <tier4_planning_msgs/msg/path_change_module_array.hpp>
4346
#include <tier4_planning_msgs/msg/path_change_module_id.hpp>
@@ -65,6 +68,9 @@ using geometry_msgs::msg::TwistStamped;
6568
using nav_msgs::msg::OccupancyGrid;
6669
using nav_msgs::msg::Odometry;
6770
using route_handler::RouteHandler;
71+
using tier4_planning_msgs::msg::AvoidanceDebugFactor;
72+
using tier4_planning_msgs::msg::AvoidanceDebugMsg;
73+
using tier4_planning_msgs::msg::AvoidanceDebugMsgArray;
6874
using tier4_planning_msgs::msg::PathChangeModule;
6975
using tier4_planning_msgs::msg::PathChangeModuleArray;
7076
using visualization_msgs::msg::MarkerArray;
@@ -159,6 +165,7 @@ class BehaviorPathPlannerNode : public rclcpp::Node
159165
private:
160166
rclcpp::Publisher<OccupancyGrid>::SharedPtr debug_drivable_area_publisher_;
161167
rclcpp::Publisher<Path>::SharedPtr debug_path_publisher_;
168+
rclcpp::Publisher<AvoidanceDebugMsgArray>::SharedPtr debug_avoidance_msg_array_publisher_;
162169
rclcpp::Publisher<MarkerArray>::SharedPtr debug_marker_publisher_;
163170
void publishDebugMarker(const std::vector<MarkerArray> & debug_markers);
164171
};

planning/behavior_path_planner/include/behavior_path_planner/behavior_tree_manager.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class BehaviorTreeManager
5555
BehaviorModuleOutput run(const std::shared_ptr<PlannerData> & data);
5656
std::vector<std::shared_ptr<SceneModuleStatus>> getModulesStatus();
5757
std::vector<MarkerArray> getDebugMarkers();
58+
AvoidanceDebugMsgArray getAvoidanceDebugMsgArray();
5859

5960
private:
6061
BehaviorTreeManagerParam bt_manager_param_;

planning/behavior_path_planner/include/behavior_path_planner/scene_module/avoidance/avoidance_module.hpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
#include <autoware_auto_planning_msgs/msg/path.hpp>
2626
#include <autoware_auto_planning_msgs/msg/path_with_lane_id.hpp>
2727
#include <autoware_auto_vehicle_msgs/msg/turn_indicators_command.hpp>
28+
#include <tier4_planning_msgs/msg/avoidance_debug_factor.hpp>
29+
#include <tier4_planning_msgs/msg/avoidance_debug_msg.hpp>
30+
#include <tier4_planning_msgs/msg/avoidance_debug_msg_array.hpp>
2831

2932
#include <memory>
3033
#include <string>
@@ -154,7 +157,8 @@ class AvoidanceModule : public SceneModuleInterface
154157
// debug
155158
mutable DebugData debug_data_;
156159
void setDebugData(const PathShifter & shifter, const DebugData & debug);
157-
160+
mutable std::vector<AvoidanceDebugMsg> debug_avoidance_initializer_for_shift_point_;
161+
mutable rclcpp::Time debug_avoidance_initializer_for_shift_point_time_;
158162
// =====================================
159163
// ========= helper functions ==========
160164
// =====================================

planning/behavior_path_planner/include/behavior_path_planner/scene_module/avoidance/avoidance_module_data.hpp

+9
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
#include <autoware_auto_planning_msgs/msg/path.hpp>
2424
#include <autoware_auto_planning_msgs/msg/path_with_lane_id.hpp>
2525
#include <geometry_msgs/msg/pose_stamped.hpp>
26+
#include <tier4_planning_msgs/msg/avoidance_debug_factor.hpp>
27+
#include <tier4_planning_msgs/msg/avoidance_debug_msg.hpp>
28+
#include <tier4_planning_msgs/msg/avoidance_debug_msg_array.hpp>
2629

2730
#include <memory>
2831
#include <string>
@@ -33,6 +36,11 @@ namespace behavior_path_planner
3336
using autoware_auto_perception_msgs::msg::PredictedObject;
3437
using autoware_auto_perception_msgs::msg::PredictedObjects;
3538
using autoware_auto_planning_msgs::msg::PathWithLaneId;
39+
40+
using tier4_planning_msgs::msg::AvoidanceDebugFactor;
41+
using tier4_planning_msgs::msg::AvoidanceDebugMsg;
42+
using tier4_planning_msgs::msg::AvoidanceDebugMsgArray;
43+
3644
using geometry_msgs::msg::Point;
3745
using geometry_msgs::msg::Pose;
3846
using geometry_msgs::msg::PoseStamped;
@@ -288,6 +296,7 @@ struct DebugData
288296

289297
// tmp for plot
290298
PathWithLaneId center_line;
299+
AvoidanceDebugMsgArray avoidance_debug_msg_array;
291300
};
292301

293302
} // namespace behavior_path_planner

planning/behavior_path_planner/include/behavior_path_planner/scene_module/avoidance/avoidance_utils.hpp

+3
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ void setStartData(
5757
AvoidPoint & ap, const double start_length, const geometry_msgs::msg::Pose & start,
5858
const size_t start_idx, const double start_dist);
5959

60+
std::string getUuidStr(const ObjectData & obj);
61+
62+
std::vector<std::string> getUuidStr(const ObjectDataArray & objs);
6063
} // namespace behavior_path_planner
6164

6265
#endif // BEHAVIOR_PATH_PLANNER__SCENE_MODULE__AVOIDANCE__AVOIDANCE_UTILS_HPP_

planning/behavior_path_planner/include/behavior_path_planner/scene_module/scene_module_interface.hpp

+13
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
#include <autoware_auto_planning_msgs/msg/path_with_lane_id.hpp>
2626
#include <autoware_auto_vehicle_msgs/msg/hazard_lights_command.hpp>
2727
#include <autoware_auto_vehicle_msgs/msg/turn_indicators_command.hpp>
28+
#include <tier4_planning_msgs/msg/avoidance_debug_factor.hpp>
29+
#include <tier4_planning_msgs/msg/avoidance_debug_msg.hpp>
30+
#include <tier4_planning_msgs/msg/avoidance_debug_msg_array.hpp>
2831

2932
#include <boost/optional.hpp>
3033

@@ -43,6 +46,7 @@ using autoware_auto_vehicle_msgs::msg::TurnIndicatorsCommand;
4346
using route_handler::LaneChangeDirection;
4447
using route_handler::PullOutDirection;
4548
using route_handler::PullOverDirection;
49+
using tier4_planning_msgs::msg::AvoidanceDebugMsgArray;
4650
using visualization_msgs::msg::MarkerArray;
4751
using PlanResult = PathWithLaneId::SharedPtr;
4852

@@ -189,13 +193,22 @@ class SceneModuleInterface
189193

190194
MarkerArray getDebugMarker() { return debug_marker_; }
191195

196+
AvoidanceDebugMsgArray::SharedPtr getAvoidanceDebugMsgArray()
197+
{
198+
if (debug_avoidance_msg_array_ptr_) {
199+
debug_avoidance_msg_array_ptr_->header.stamp = clock_->now();
200+
}
201+
return debug_avoidance_msg_array_ptr_;
202+
}
203+
192204
private:
193205
std::string name_;
194206
rclcpp::Logger logger_;
195207

196208
protected:
197209
MarkerArray debug_marker_;
198210
rclcpp::Clock::SharedPtr clock_;
211+
mutable AvoidanceDebugMsgArray::SharedPtr debug_avoidance_msg_array_ptr_{};
199212

200213
public:
201214
ApprovalHandler approval_handler_;

planning/behavior_path_planner/src/behavior_path_planner_node.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ BehaviorPathPlannerNode::BehaviorPathPlannerNode(const rclcpp::NodeOptions & nod
9191
hazard_signal_publisher_ = create_publisher<HazardLightsCommand>("~/output/hazard_lights_cmd", 1);
9292
debug_drivable_area_publisher_ = create_publisher<OccupancyGrid>("~/debug/drivable_area", 1);
9393
debug_path_publisher_ = create_publisher<Path>("~/debug/path_for_visualize", 1);
94+
debug_avoidance_msg_array_publisher_ =
95+
create_publisher<AvoidanceDebugMsgArray>("~/debug/avoidance_debug_message_array", 1);
9496

9597
// For remote operation
9698
plan_ready_publisher_ = create_publisher<PathChangeModule>("~/output/ready", 1);
@@ -535,7 +537,7 @@ void BehaviorPathPlannerNode::run()
535537

536538
// for remote operation
537539
publishModuleStatus(bt_manager_->getModulesStatus(), planner_data);
538-
540+
debug_avoidance_msg_array_publisher_->publish(bt_manager_->getAvoidanceDebugMsgArray());
539541
publishDebugMarker(bt_manager_->getDebugMarkers());
540542

541543
mutex_bt_.unlock();

planning/behavior_path_planner/src/behavior_tree_manager.cpp

+16
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,22 @@ std::vector<MarkerArray> BehaviorTreeManager::getDebugMarkers()
124124
return data;
125125
}
126126

127+
AvoidanceDebugMsgArray BehaviorTreeManager::getAvoidanceDebugMsgArray()
128+
{
129+
const auto avoidance_module = std::find_if(
130+
scene_modules_.begin(), scene_modules_.end(),
131+
[](const std::shared_ptr<SceneModuleInterface> & module_ptr) {
132+
return module_ptr->name() == "Avoidance";
133+
});
134+
if (avoidance_module != scene_modules_.end()) {
135+
const auto & ptr = avoidance_module->get()->getAvoidanceDebugMsgArray();
136+
if (ptr) {
137+
return *ptr;
138+
}
139+
}
140+
return AvoidanceDebugMsgArray();
141+
}
142+
127143
BT::NodeStatus BehaviorTreeManager::checkForceApproval(const std::string & name)
128144
{
129145
const auto & approval = current_planner_data_->approval.is_force_approved;

planning/behavior_path_planner/src/scene_module/avoidance/avoidance_module.cpp

+69-27
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ bool AvoidanceModule::isExecutionReady() const
7474
{
7575
DEBUG_PRINT("AVOIDANCE isExecutionReady");
7676

77+
{
78+
DebugData debug;
79+
static_cast<void>(calcAvoidancePlanningData(debug));
80+
}
81+
7782
if (current_state_ == BT::NodeStatus::RUNNING) {
7883
return true;
7984
}
@@ -88,7 +93,6 @@ BT::NodeStatus AvoidanceModule::updateState()
8893
DebugData debug;
8994
const auto avoid_data = calcAvoidancePlanningData(debug);
9095
const bool has_avoidance_target = !avoid_data.objects.empty();
91-
9296
if (!is_plan_running && !has_avoidance_target) {
9397
current_state_ = BT::NodeStatus::SUCCESS;
9498
} else {
@@ -191,41 +195,51 @@ ObjectDataArray AvoidanceModule::calcAvoidanceTargetObjects(
191195
debug_linestring.clear();
192196
// for filtered objects
193197
ObjectDataArray target_objects;
198+
std::vector<AvoidanceDebugMsg> avoidance_debug_msg_array;
194199
for (const auto & i : lane_filtered_objects_index) {
195200
const auto & object = objects_candidate.objects.at(i);
196201
const auto & object_pos = object.kinematics.initial_pose_with_covariance.pose.position;
202+
AvoidanceDebugMsg avoidance_debug_msg;
203+
const auto avoidance_debug_array_false_and_push_back =
204+
[&avoidance_debug_msg, &avoidance_debug_msg_array](const std::string & failed_reason) {
205+
avoidance_debug_msg.allow_avoidance = false;
206+
avoidance_debug_msg.failed_reason = failed_reason;
207+
avoidance_debug_msg_array.push_back(avoidance_debug_msg);
208+
};
197209

198210
if (!isTargetObjectType(object)) {
199-
DEBUG_PRINT("Ignore object: (isTargetObjectType is false)");
211+
avoidance_debug_array_false_and_push_back(AvoidanceDebugFactor::OBJECT_IS_NOT_TYPE);
200212
continue;
201213
}
202214

203215
ObjectData object_data;
204216
object_data.object = object;
205-
217+
avoidance_debug_msg.object_id = getUuidStr(object_data);
206218
// calc longitudinal distance from ego to closest target object footprint point.
207219
object_data.longitudinal = calcDistanceToClosestFootprintPoint(reference_path, object, ego_pos);
220+
avoidance_debug_msg.longitudinal_distance = object_data.longitudinal;
208221

209222
// object is behind ego or too far.
210223
if (object_data.longitudinal < -parameters_.object_check_backward_distance) {
211-
DEBUG_PRINT("Ignore object: (object < -backward_distance threshold)");
224+
avoidance_debug_array_false_and_push_back(AvoidanceDebugFactor::OBJECT_IS_BEHIND_THRESHOLD);
212225
continue;
213226
}
214227
if (object_data.longitudinal > parameters_.object_check_forward_distance) {
215-
DEBUG_PRINT("Ignore object: (object > forward_distance threshold)");
228+
avoidance_debug_array_false_and_push_back(AvoidanceDebugFactor::OBJECT_IS_IN_FRONT_THRESHOLD);
216229
continue;
217230
}
218231

219232
// Target object is behind the path goal -> ignore.
220233
if (object_data.longitudinal > dist_to_goal) {
221-
DEBUG_PRINT("Ignore object: (object is behind the path goal)");
234+
avoidance_debug_array_false_and_push_back(AvoidanceDebugFactor::OBJECT_BEHIND_PATH_GOAL);
222235
continue;
223236
}
224237

225238
// Calc lateral deviation from path to target object.
226239
const auto object_closest_index = findNearestIndex(path_points, object_pos);
227240
const auto object_closest_pose = path_points.at(object_closest_index).point.pose;
228241
object_data.lateral = calcLateralDeviation(object_closest_pose, object_pos);
242+
avoidance_debug_msg.lateral_distance_from_centerline = object_data.lateral;
229243

230244
// Find the footprint point closest to the path, set to object_data.overhang_distance.
231245
object_data.overhang_dist =
@@ -283,8 +297,9 @@ ObjectDataArray AvoidanceModule::calcAvoidanceTargetObjects(
283297
object_data.to_road_shoulder_distance);
284298

285299
// Object is on center line -> ignore.
300+
avoidance_debug_msg.lateral_distance_from_centerline = object_data.lateral;
286301
if (std::abs(object_data.lateral) < parameters_.threshold_distance_object_is_on_center) {
287-
DEBUG_PRINT("Ignore object: (object is on center line)");
302+
avoidance_debug_array_false_and_push_back(AvoidanceDebugFactor::TOO_NEAR_TO_CENTERLINE);
288303
continue;
289304
}
290305

@@ -294,6 +309,21 @@ ObjectDataArray AvoidanceModule::calcAvoidanceTargetObjects(
294309

295310
// debug
296311
{
312+
debug_data_.avoidance_debug_msg_array.avoidance_info.clear();
313+
auto & debug_data_avoidance = debug_data_.avoidance_debug_msg_array.avoidance_info;
314+
debug_data_avoidance = avoidance_debug_msg_array;
315+
if (!debug_avoidance_initializer_for_shift_point_.empty()) {
316+
const bool is_info_old_ =
317+
(clock_->now() - debug_avoidance_initializer_for_shift_point_time_).seconds() > 1.0;
318+
if (!is_info_old_) {
319+
debug_data_avoidance.insert(
320+
debug_data_avoidance.end(), debug_avoidance_initializer_for_shift_point_.begin(),
321+
debug_avoidance_initializer_for_shift_point_.end());
322+
}
323+
}
324+
325+
debug_avoidance_msg_array_ptr_ =
326+
std::make_shared<AvoidanceDebugMsgArray>(debug_data_.avoidance_debug_msg_array);
297327
debug.farthest_linestring_from_overhang =
298328
std::make_shared<lanelet::ConstLineStrings3d>(debug_linestring);
299329
debug.current_lanelets = std::make_shared<lanelet::ConstLanelets>(current_lanes);
@@ -449,6 +479,7 @@ void AvoidanceModule::registerRawShiftPoints(const AvoidPointArray & future)
449479
AvoidPointArray AvoidanceModule::calcRawShiftPointsFromObjects(
450480
const ObjectDataArray & objects) const
451481
{
482+
debug_avoidance_initializer_for_shift_point_.clear();
452483
const auto prepare_distance = getNominalPrepareDistance();
453484

454485
// To be consistent with changes in the ego position, the current shift length is considered.
@@ -465,7 +496,28 @@ AvoidPointArray AvoidanceModule::calcRawShiftPointsFromObjects(
465496
lat_collision_safety_buffer + lat_collision_margin + 0.5 * vehicle_width;
466497

467498
AvoidPointArray avoid_points;
499+
std::vector<AvoidanceDebugMsg> avoidance_debug_msg_array;
500+
avoidance_debug_msg_array.reserve(objects.size());
468501
for (auto & o : objects) {
502+
AvoidanceDebugMsg avoidance_debug_msg;
503+
const auto avoidance_debug_array_false_and_push_back =
504+
[&avoidance_debug_msg, &avoidance_debug_msg_array](const std::string & failed_reason) {
505+
avoidance_debug_msg.allow_avoidance = false;
506+
avoidance_debug_msg.failed_reason = failed_reason;
507+
avoidance_debug_msg_array.push_back(avoidance_debug_msg);
508+
};
509+
510+
avoidance_debug_msg.object_id = getUuidStr(o);
511+
avoidance_debug_msg.longitudinal_distance = o.longitudinal;
512+
avoidance_debug_msg.lateral_distance_from_centerline = o.lateral;
513+
avoidance_debug_msg.to_furthest_linestring_distance = o.to_road_shoulder_distance;
514+
avoidance_debug_msg.max_shift_length = max_allowable_lateral_distance;
515+
516+
if (!(o.to_road_shoulder_distance > max_allowable_lateral_distance)) {
517+
avoidance_debug_msg.allow_avoidance = false;
518+
avoidance_debug_msg.failed_reason = AvoidanceDebugFactor::INSUFFICIENT_LATERAL_MARGIN;
519+
}
520+
469521
const auto max_shift_length =
470522
o.to_road_shoulder_distance - road_shoulder_safety_margin - 0.5 * vehicle_width;
471523
const auto max_left_shift_limit = [&o, &max_allowable_lateral_distance, &max_shift_length,
@@ -507,17 +559,18 @@ AvoidPointArray AvoidanceModule::calcRawShiftPointsFromObjects(
507559
// TODO(Horibe) Even if there is no enough distance for avoidance shift, the
508560
// return-to-center shift must be considered for each object if the current_shift
509561
// is not zero.
510-
DEBUG_PRINT("object is ignored since remaining_distance <= 0");
562+
avoidance_debug_array_false_and_push_back(
563+
AvoidanceDebugFactor::REMAINING_DISTANCE_LESS_THAN_ZERO);
511564
continue;
512565
}
513566

514567
// This is the case of exceeding the jerk limit. Use the sharp avoidance ego speed.
515568
const auto required_jerk = path_shifter_.calcJerkFromLatLonDistance(
516569
avoiding_shift, remaining_distance, getSharpAvoidanceEgoSpeed());
570+
avoidance_debug_msg.required_jerk = required_jerk;
571+
avoidance_debug_msg.maximum_jerk = parameters_.max_lateral_jerk;
517572
if (required_jerk > parameters_.max_lateral_jerk) {
518-
DEBUG_PRINT(
519-
"object is ignored required_jerk is too large (req: %f, max: %f)", required_jerk,
520-
parameters_.max_lateral_jerk);
573+
avoidance_debug_array_false_and_push_back(AvoidanceDebugFactor::TOO_LARGE_JERK);
521574
continue;
522575
}
523576
}
@@ -563,8 +616,12 @@ AvoidPointArray AvoidanceModule::calcRawShiftPointsFromObjects(
563616
avoiding_shift, return_shift, ap_avoid.start_longitudinal, ap_avoid.end_longitudinal,
564617
ap_return.end_longitudinal, nominal_avoid_distance, avoiding_distance, avoid_margin,
565618
nominal_return_distance);
619+
avoidance_debug_msg.allow_avoidance = true;
620+
avoidance_debug_msg_array.push_back(avoidance_debug_msg);
566621
}
567622

623+
debug_avoidance_initializer_for_shift_point_ = std::move(avoidance_debug_msg_array);
624+
debug_avoidance_initializer_for_shift_point_time_ = clock_->now();
568625
fillAdditionalInfoFromLongitudinal(avoid_points);
569626

570627
return avoid_points;
@@ -2403,22 +2460,6 @@ void AvoidanceModule::updateData()
24032460
}
24042461
}
24052462

2406-
std::string getUuidStr(const ObjectData & obj)
2407-
{
2408-
return std::to_string(obj.object.object_id.uuid.at(0)) +
2409-
std::to_string(obj.object.object_id.uuid.at(1)) +
2410-
std::to_string(obj.object.object_id.uuid.at(2));
2411-
}
2412-
2413-
std::string getUuidStr(const ObjectDataArray & objs)
2414-
{
2415-
std::stringstream ss;
2416-
for (const auto & o : objs) {
2417-
ss << getUuidStr(o) << ", ";
2418-
}
2419-
return ss.str();
2420-
}
2421-
24222463
/*
24232464
* updateRegisteredObject
24242465
*
@@ -2540,6 +2581,7 @@ void AvoidanceModule::initVariables()
25402581
prev_reference_ = PathWithLaneId();
25412582
path_shifter_ = PathShifter{};
25422583

2584+
debug_avoidance_msg_array_ptr_.reset();
25432585
debug_data_ = DebugData();
25442586

25452587
registered_raw_shift_points_ = {};

0 commit comments

Comments
 (0)