Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
Signed-off-by: beyza <[email protected]>
  • Loading branch information
beyzanurkaya committed Sep 2, 2024
1 parent 980890f commit d890466
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
turn_signal_shift_length_threshold: 0.3
turn_signal_remaining_shift_length_threshold: 0.1
turn_signal_on_swerving: true
traffic_flow: "left_side" # right or left

enable_akima_spline_first: false
enable_cog_on_centerline: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ class BehaviorPathPlannerNode : public rclcpp::Node
const std::shared_ptr<PathWithLaneId> & path_candidate_ptr, const bool is_ready,
const std::shared_ptr<PlannerData> & planner_data);

PathWithLaneId shiftPath(const PathWithLaneId & ref_paths, const double shift_distance);
std::unique_ptr<autoware::universe_utils::LoggerLevelConfigure> logger_configure_;

std::unique_ptr<autoware::universe_utils::PublishedTimePublisher> published_time_publisher_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ BehaviorPathPlannerParameters BehaviorPathPlannerNode::getCommonParam()
declare_parameter<double>("turn_signal_remaining_shift_length_threshold");
p.turn_signal_on_swerving = declare_parameter<bool>("turn_signal_on_swerving");

p.traffic_flow = declare_parameter<std::string>("traffic_flow");
p.enable_akima_spline_first = declare_parameter<bool>("enable_akima_spline_first");
p.enable_cog_on_centerline = declare_parameter<bool>("enable_cog_on_centerline");
p.input_path_interval = declare_parameter<double>("input_path_interval");
Expand Down Expand Up @@ -503,6 +504,22 @@ void BehaviorPathPlannerNode::run()
RCLCPP_DEBUG(get_logger(), "----- behavior path planner end -----\n\n");
}

[[maybe_unused]] PathWithLaneId BehaviorPathPlannerNode::shiftPath(
const PathWithLaneId & path, const double shift_distance)
{
PathWithLaneId shifted_path;
shifted_path.header.stamp = path.header.stamp;
shifted_path.points.reserve(path.points.size());
for (const auto & pose : path.points) {
tier4_planning_msgs::msg::PathPointWithLaneId shifted_pose{};
shifted_pose = pose;
shifted_pose.point.pose.position.x += shift_distance;
shifted_path.points.push_back(shifted_pose);
}

return shifted_path;
}

void BehaviorPathPlannerNode::computeTurnSignal(
const std::shared_ptr<PlannerData> planner_data, const PathWithLaneId & path,
const BehaviorModuleOutput & output)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

#include <autoware_vehicle_info_utils/vehicle_info_utils.hpp>

#include <string>

struct ModuleConfigParameters
{
bool enable_module{false};
Expand Down Expand Up @@ -53,6 +55,8 @@ struct BehaviorPathPlannerParameters
double turn_signal_remaining_shift_length_threshold;
bool turn_signal_on_swerving;

std::string traffic_flow{"left_side"};

bool enable_akima_spline_first;
bool enable_cog_on_centerline;
double input_path_interval;
Expand Down

0 comments on commit d890466

Please sign in to comment.