Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lane_change): remove velocity factor #1741

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ LaneChangeInterface::LaneChangeInterface(
{
module_type_->setTimeKeeper(getTimeKeeper());
logger_ = utils::lane_change::getLogger(module_type_->getModuleTypeStr());
steering_factor_interface_.init(PlanningBehavior::LANE_CHANGE);
velocity_factor_interface_.init(PlanningBehavior::LANE_CHANGE);
}

void LaneChangeInterface::processOnExit()
Expand Down Expand Up @@ -153,8 +151,6 @@ BehaviorModuleOutput LaneChangeInterface::plan()

set_longitudinal_planning_factor(output.path);

setVelocityFactor(output.path);

return output;
}

Expand Down Expand Up @@ -193,8 +189,6 @@ BehaviorModuleOutput LaneChangeInterface::planWaitingApproval()

set_longitudinal_planning_factor(out.path);

setVelocityFactor(out.path);

return out;
}

Expand Down Expand Up @@ -421,15 +415,6 @@ MarkerArray LaneChangeInterface::getModuleVirtualWall()
void LaneChangeInterface::updateSteeringFactorPtr(const BehaviorModuleOutput & output)
{
universe_utils::ScopedTimeTrack st(__func__, *getTimeKeeper());
const auto steering_factor_direction = std::invoke([&]() {
if (module_type_->getDirection() == Direction::LEFT) {
return SteeringFactor::LEFT;
}
if (module_type_->getDirection() == Direction::RIGHT) {
return SteeringFactor::RIGHT;
}
return SteeringFactor::UNKNOWN;
});

const auto current_position = module_type_->getEgoPosition();
const auto status = module_type_->getLaneChangeStatus();
Expand All @@ -438,10 +423,6 @@ void LaneChangeInterface::updateSteeringFactorPtr(const BehaviorModuleOutput & o
const auto finish_distance = autoware::motion_utils::calcSignedArcLength(
output.path.points, current_position, status.lane_change_path.info.shift_line.end.position);

steering_factor_interface_.set(
{status.lane_change_path.info.shift_line.start, status.lane_change_path.info.shift_line.end},
{start_distance, finish_distance}, steering_factor_direction, SteeringFactor::TURNING, "");

const auto planning_factor_direction = std::invoke([&]() {
if (module_type_->getDirection() == Direction::LEFT) {
return PlanningFactor::SHIFT_LEFT;
Expand All @@ -460,18 +441,6 @@ void LaneChangeInterface::updateSteeringFactorPtr(const BehaviorModuleOutput & o
void LaneChangeInterface::updateSteeringFactorPtr(
const CandidateOutput & output, const LaneChangePath & selected_path) const
{
const uint16_t steering_factor_direction = std::invoke([&output]() {
if (output.lateral_shift > 0.0) {
return SteeringFactor::LEFT;
}
return SteeringFactor::RIGHT;
});

steering_factor_interface_.set(
{selected_path.info.shift_line.start, selected_path.info.shift_line.end},
{output.start_distance_to_path_change, output.finish_distance_to_path_change},
steering_factor_direction, SteeringFactor::APPROACHING, "");

const uint16_t planning_factor_direction = std::invoke([&output]() {
if (output.lateral_shift > 0.0) {
return PlanningFactor::SHIFT_LEFT;
Expand Down
Loading