Skip to content

Commit

Permalink
Perception: remove "using" in header files
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroldchen authored and storypku committed Jul 21, 2020
1 parent 8602c01 commit d53f2a8
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 24 deletions.
6 changes: 2 additions & 4 deletions modules/perception/common/geometry/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
#include "modules/perception/base/box.h"
#include "modules/perception/base/point_cloud.h"

using apollo::common::EigenVector;

namespace apollo {
namespace perception {
namespace common {
Expand Down Expand Up @@ -313,8 +311,8 @@ void CalculateDistAndDirToBoundary(
template <typename PointT>
void CalculateDistAndDirToBoundary(
const Eigen::Matrix<typename PointT::Type, 3, 1> &pt,
const EigenVector<base::PointCloud<PointT>> &left_boundary,
const EigenVector<base::PointCloud<PointT>> &right_boundary,
const apollo::common::EigenVector<base::PointCloud<PointT>> &left_boundary,
const apollo::common::EigenVector<base::PointCloud<PointT>> &right_boundary,
typename PointT::Type *dist,
Eigen::Matrix<typename PointT::Type, 3, 1> *dir) {
using Type = typename PointT::Type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ namespace apollo {
namespace perception {
namespace lidar {

using apollo::common::EigenMap;
using apollo::common::EigenVector;

using ObjectPtr = std::shared_ptr<apollo::perception::base::Object>;
using apollo::cyber::common::GetAbsolutePath;
using apollo::perception::base::ObjectType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
#include "modules/perception/lidar/lib/classifier/fused_classifier/type_fusion_interface.h"
#include "modules/perception/lidar/lib/classifier/fused_classifier/util.h"

using apollo::common::EigenMap;
using apollo::common::EigenVector;

namespace apollo {
namespace perception {
namespace lidar {
Expand All @@ -44,7 +41,7 @@ class CCRFOneShotTypeFusion : public BaseOneShotTypeFusion {
Vectord* log_prob);

protected:
EigenMap<std::string, Matrixd> smooth_matrices_;
apollo::common::EigenMap<std::string, Matrixd> smooth_matrices_;
Matrixd confidence_smooth_matrix_;
};

Expand Down Expand Up @@ -81,9 +78,9 @@ class CCRFSequenceTypeFusion : public BaseSequenceTypeFusion {
Matrixd transition_matrix_;

// data member for window inference version
EigenVector<Vectord> fused_oneshot_probs_;
EigenVector<Vectord> fused_sequence_probs_;
EigenVector<Vectori> state_back_trace_;
apollo::common::EigenVector<Vectord> fused_oneshot_probs_;
apollo::common::EigenVector<Vectord> fused_sequence_probs_;
apollo::common::EigenVector<Vectori> state_back_trace_;

protected:
double s_alpha_ = 1.8;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ namespace perception {
namespace lidar {
namespace util {

using apollo::common::EigenMap;
using apollo::perception::base::ObjectType;

void FromStdToVector(const std::vector<float>& src_prob, Vectord* dst_prob) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#include "modules/common/util/eigen_defs.h"
#include "modules/perception/base/object_types.h"

using apollo::common::EigenMap;

namespace apollo {
namespace perception {
namespace lidar {
Expand Down Expand Up @@ -61,7 +59,8 @@ bool LoadSingleMatrix(std::ifstream& fin, Matrixd* matrix);
bool LoadSingleMatrixFile(const std::string& filename, Matrixd* matrix);

bool LoadMultipleMatricesFile(
const std::string& filename, EigenMap<std::string, Matrixd>* matrices);
const std::string& filename,
apollo::common::EigenMap<std::string, Matrixd>* matrices);

} // namespace util
} // namespace lidar
Expand Down
1 change: 1 addition & 0 deletions modules/perception/map/hdmap/hdmap_input.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ namespace apollo {
namespace perception {
namespace map {

using apollo::common::EigenVector;
using apollo::common::math::Polygon2d;
using apollo::common::math::Vec2d;
using apollo::hdmap::JunctionInfoConstPtr;
Expand Down
23 changes: 13 additions & 10 deletions modules/perception/map/hdmap/hdmap_input.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
#include "modules/perception/base/hdmap_struct.h"
#include "modules/perception/lib/thread/mutex.h"

using apollo::common::EigenVector;

namespace apollo {
namespace perception {
namespace map {
Expand All @@ -52,23 +50,28 @@ class HDMapInput {
void MergeBoundaryJunction(
const std::vector<apollo::hdmap::RoadRoiPtr>& boundary,
const std::vector<apollo::hdmap::JunctionInfoConstPtr>& junctions,
EigenVector<base::RoadBoundary>* road_boundaries_ptr,
EigenVector<base::PointCloud<base::PointD>>* road_polygons_ptr,
EigenVector<base::PointCloud<base::PointD>>* junction_polygons_ptr);
apollo::common::EigenVector<base::RoadBoundary>* road_boundaries_ptr,
apollo::common::EigenVector<base::PointCloud<base::PointD>>*
road_polygons_ptr,
apollo::common::EigenVector<base::PointCloud<base::PointD>>*
junction_polygons_ptr);

bool GetRoadBoundaryFilteredByJunctions(
const EigenVector<base::RoadBoundary>& road_boundaries,
const EigenVector<base::PointCloud<base::PointD>>& junctions,
EigenVector<base::RoadBoundary>* flt_road_boundaries_ptr);
const apollo::common::EigenVector<base::RoadBoundary>& road_boundaries,
const apollo::common::EigenVector<base::PointCloud<base::PointD>>&
junctions,
apollo::common::EigenVector<base::RoadBoundary>* flt_road_boundaries_ptr);

void DownsamplePoints(const base::PointDCloudPtr& raw_cloud_ptr,
base::PointCloud<base::PointD>* polygon_ptr,
size_t min_points_num_for_sample = 15) const;

void SplitBoundary(
const base::PointCloud<base::PointD>& boundary_line,
const EigenVector<base::PointCloud<base::PointD>>& junctions,
EigenVector<base::PointCloud<base::PointD>>* boundary_line_vec_ptr);
const apollo::common::EigenVector<base::PointCloud<base::PointD>>&
junctions,
apollo::common::EigenVector<base::PointCloud<base::PointD>>*
boundary_line_vec_ptr);

bool GetSignalsFromHDMap(const Eigen::Vector3d& pointd,
double forward_distance,
Expand Down

0 comments on commit d53f2a8

Please sign in to comment.