提交 05aa2243 编写于 作者: A Aaron Xiao 提交者: Jiangtao Hu

Planning: StGraph code clean.

上级 e70e9dde
......@@ -99,7 +99,6 @@ Status StBoundaryMapper::GetGraphBoundary(
}
st_boundaries->clear();
Status ret = Status::OK();
const PathObstacle* stop_obstacle = nullptr;
ObjectDecisionType stop_decision;
......
......@@ -46,6 +46,8 @@ class StBoundaryMapper {
const PathData& path_data, const double planning_distance,
const double planning_time);
virtual ~StBoundaryMapper() = default;
apollo::common::Status GetGraphBoundary(
const PathDecision& path_decision,
std::vector<StBoundary>* const boundary) const;
......
......@@ -23,6 +23,7 @@
#include "gtest/gtest.h"
#include "modules/common/log.h"
#include "modules/map/hdmap/hdmap_util.h"
#include "modules/planning/common/path_obstacle.h"
#include "modules/planning/reference_line/reference_line_smoother.h"
......@@ -33,13 +34,10 @@ class StBoundaryMapperTest : public ::testing::Test {
public:
virtual void SetUp() {
hdmap_.LoadMapFromFile(map_file);
const std::string lane_id_str = "1_-1";
hdmap::Id lane_id;
lane_id.set_id(lane_id_str);
lane_info_ptr = hdmap_.GetLaneById(lane_id);
const std::string lane_id = "1_-1";
lane_info_ptr = hdmap_.GetLaneById(hdmap::MakeMapId(lane_id));
if (!lane_info_ptr) {
AERROR << "failed to find lane " << lane_id_str << " from map "
<< map_file;
AERROR << "failed to find lane " << lane_id << " from map " << map_file;
return;
}
ReferenceLineSmootherConfig config;
......
......@@ -40,7 +40,7 @@ const std::vector<StBoundary>& StGraphData::st_boundaries() const {
const TrajectoryPoint& StGraphData::init_point() const { return init_point_; }
const SpeedLimit StGraphData::speed_limit() const { return speed_limit_; }
const SpeedLimit& StGraphData::speed_limit() const { return speed_limit_; }
double StGraphData::path_data_length() const { return path_data_length_; }
......
......@@ -34,8 +34,6 @@ namespace planning {
class StGraphData {
public:
StGraphData() = default;
StGraphData(const std::vector<StBoundary>& st_boundaries,
const apollo::common::TrajectoryPoint& init_point,
const SpeedLimit& speed_limit, const double path_data_length);
......@@ -44,7 +42,7 @@ class StGraphData {
const apollo::common::TrajectoryPoint& init_point() const;
const SpeedLimit speed_limit() const;
const SpeedLimit& speed_limit() const;
double path_data_length() const;
......
......@@ -29,20 +29,6 @@ namespace apollo {
namespace planning {
TEST(StGraphDataTest, basic_test) {
StGraphData st_graph_data;
EXPECT_EQ(st_graph_data.st_boundaries().size(), 0);
EXPECT_DOUBLE_EQ(st_graph_data.init_point().path_point().x(), 0.0);
EXPECT_DOUBLE_EQ(st_graph_data.init_point().path_point().y(), 0.0);
EXPECT_DOUBLE_EQ(st_graph_data.init_point().path_point().z(), 0.0);
EXPECT_DOUBLE_EQ(st_graph_data.init_point().path_point().theta(), 0.0);
EXPECT_DOUBLE_EQ(st_graph_data.init_point().path_point().kappa(), 0.0);
EXPECT_DOUBLE_EQ(st_graph_data.init_point().path_point().dkappa(), 0.0);
EXPECT_DOUBLE_EQ(st_graph_data.init_point().path_point().ddkappa(), 0.0);
EXPECT_DOUBLE_EQ(st_graph_data.init_point().v(), 0.0);
EXPECT_DOUBLE_EQ(st_graph_data.init_point().a(), 0.0);
EXPECT_DOUBLE_EQ(st_graph_data.init_point().relative_time(), 0.0);
EXPECT_DOUBLE_EQ(st_graph_data.path_data_length(), 0.0);
std::vector<StBoundary> boundary_vec;
boundary_vec.push_back(StBoundary());
apollo::common::TrajectoryPoint traj_point;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册