提交 bfee9ddd 编写于 作者: Z Zhang Liangliang 提交者: Jiangtao Hu

Planning: cleaned up unused 'using' and removed function to directly get vehicle_pose in frame.

上级 e51c9998
......@@ -53,8 +53,6 @@ void Frame::SetVehicleInitPose(const localization::Pose &pose) {
init_pose_ = pose;
}
const localization::Pose &Frame::VehicleInitPose() const { return init_pose_; }
void Frame::SetRoutingResponse(const routing::RoutingResponse &routing) {
routing_response_ = routing;
}
......
......@@ -70,7 +70,6 @@ class Frame {
ADCTrajectory *MutableADCTrajectory();
const PublishableTrajectory &computed_trajectory() const;
const localization::Pose &VehicleInitPose() const;
const routing::RoutingResponse &routing_response() const;
......
......@@ -15,7 +15,7 @@
*****************************************************************************/
/**
* @file decider.cpp
* @file
**/
#include <limits>
......
......@@ -48,7 +48,6 @@ using common::ErrorCode;
using common::SpeedPoint;
using common::SLPoint;
using common::TrajectoryPoint;
using common::VehicleState;
using common::math::Vec2d;
void EMPlanner::RegisterTasks() {
......
......@@ -96,13 +96,12 @@ ReferencePoint ReferenceLine::GetReferencePoint(const double s) const {
if (it_lower == accumulated_s.begin()) {
return reference_points_.front();
} else {
std::uint32_t index =
static_cast<std::uint32_t>(it_lower - accumulated_s.begin());
auto p0 = reference_points_[index - 1];
auto p1 = reference_points_[index];
auto index = std::distance(accumulated_s.begin(), it_lower);
const auto& p0 = reference_points_[index - 1];
const auto& p1 = reference_points_[index];
auto s0 = accumulated_s[index - 1];
auto s1 = accumulated_s[index];
const double s0 = accumulated_s[index - 1];
const double s1 = accumulated_s[index];
return Interpolate(p0, s0, p1, s1, s);
}
......
......@@ -21,14 +21,12 @@
#include "modules/planning/tasks/traffic_decider/traffic_decider.h"
#include "modules/common/configs/vehicle_config_helper.h"
#include "modules/common/vehicle_state/vehicle_state.h"
#include "modules/planning/common/planning_gflags.h"
#include "modules/planning/tasks/traffic_decider/back_side_vehicles.h"
namespace apollo {
namespace planning {
using ::apollo::common::Status;
using ::apollo::common::VehicleState;
using ::apollo::common::VehicleConfigHelper;
TrafficDecider::TrafficDecider() : Task("TrafficDecider") {}
......
......@@ -96,7 +96,7 @@ TrajectoryStitcher::ComputeStitchingTrajectory(
}
auto matched_point = prev_trajectory.TrajectoryPointAt(matched_index);
double position_diff =
const double position_diff =
common::math::Vec2d(
matched_point.path_point().x() - VehicleState::instance()->x(),
matched_point.path_point().y() - VehicleState::instance()->y())
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册