提交 17f95252 编写于 作者: S storypku 提交者: Liu Jiaming

map: typofix

上级 5e9953f9
......@@ -154,7 +154,7 @@ int Client::DataCollectStage() {
AINFO << "cmd [" << cmd << "]";
std::vector<std::string> lines = GetFileLines(data_collect_time_flag_file_);
std::ofstream time_file_handler(data_collect_time_flag_file_);
double now = UnixtimeNow();
double now = UnixNow();
if (cmd == "start") {
if (lines.empty()) {
time_file_handler << now << " start\n";
......
......@@ -34,6 +34,6 @@ namespace hdmap {
#endif
std::vector<std::string> GetFileLines(const std::string& path);
inline double UnixtimeNow() { return apollo::cyber::Time::Now().ToSecond(); }
inline double UnixNow() { return apollo::cyber::Time::Now().ToSecond(); }
} // namespace hdmap
} // namespace apollo
......@@ -33,7 +33,7 @@ typedef struct BadOrGoodPoseInfo {
class Alignment {
public:
explicit Alignment(std::shared_ptr<JSonConf> sp_conf)
explicit Alignment(std::shared_ptr<JsonConf> sp_conf)
: return_state_(ErrorCode::SUCCESS),
sp_conf_(sp_conf),
sp_good_pose_info_(std::make_shared<BadOrGoodPoseInfo>()),
......@@ -138,7 +138,7 @@ class Alignment {
int start_index_;
double end_index_;
ErrorCode return_state_;
std::shared_ptr<JSonConf> sp_conf_ = nullptr;
std::shared_ptr<JsonConf> sp_conf_ = nullptr;
// BadOrGoodPoseInfo _bad_pose_info, _good_pose_info;
std::shared_ptr<BadOrGoodPoseInfo> sp_good_pose_info_ = nullptr;
std::shared_ptr<BadOrGoodPoseInfo> sp_bad_pose_info_ = nullptr;
......
......@@ -38,7 +38,7 @@ template <typename ALIGNMENT_TYPE, typename REQUEST_TYPE,
class AlignmentAgent {
public:
AlignmentAgent(
std::shared_ptr<JSonConf> sp_conf,
std::shared_ptr<JsonConf> sp_conf,
std::shared_ptr<PoseCollectionAgent> sp_pose_collection_agent) {
sp_conf_ = sp_conf;
sp_pose_collection_agent_ = sp_pose_collection_agent;
......@@ -93,7 +93,7 @@ class AlignmentAgent {
int AsyncStartAlignment() {
SetState(AlignmentAgentState::RUNNING);
std::thread alignment_thread([=]() {
sp_alignment_->SetStartTime(UnixtimeNow());
sp_alignment_->SetStartTime(UnixNow());
AINFO << "set state RUNNING";
while (!need_stop_ && !apollo::cyber::IsShutdown()) {
std::shared_ptr<std::vector<FramePose>> sp_poses = GetPoses();
......@@ -175,7 +175,7 @@ class AlignmentAgent {
AlignmentAgentState GetState() const { return state_; }
private:
std::shared_ptr<JSonConf> sp_conf_ = nullptr;
std::shared_ptr<JsonConf> sp_conf_ = nullptr;
std::shared_ptr<ALIGNMENT_TYPE> sp_alignment_ = nullptr;
std::shared_ptr<PoseCollectionAgent> sp_pose_collection_agent_ = nullptr;
AlignmentAgentState state_;
......
......@@ -28,7 +28,7 @@
namespace apollo {
namespace hdmap {
ChannelVerify::ChannelVerify(std::shared_ptr<JSonConf> sp_conf)
ChannelVerify::ChannelVerify(std::shared_ptr<JsonConf> sp_conf)
: sp_conf_(sp_conf) {
Reset();
}
......
......@@ -55,7 +55,7 @@ typedef std::vector<OneRecordChannelCheckResult>::iterator CheckResultIterator;
class ChannelVerify {
public:
explicit ChannelVerify(std::shared_ptr<JSonConf> sp_conf);
explicit ChannelVerify(std::shared_ptr<JsonConf> sp_conf);
ErrorCode Check(const std::string& record_dir_or_record_full_path);
std::shared_ptr<std::vector<OneRecordChannelCheckResult>> get_check_result()
const;
......@@ -74,7 +74,7 @@ class ChannelVerify {
void Reset();
private:
std::shared_ptr<JSonConf> sp_conf_ = nullptr;
std::shared_ptr<JsonConf> sp_conf_ = nullptr;
CheckedResult sp_vec_check_result_ = nullptr;
ErrorCode return_state_;
std::set<std::string> checked_records_;
......
......@@ -25,7 +25,7 @@
namespace apollo {
namespace hdmap {
ChannelVerifyAgent::ChannelVerifyAgent(std::shared_ptr<JSonConf> sp_conf) {
ChannelVerifyAgent::ChannelVerifyAgent(std::shared_ptr<JsonConf> sp_conf) {
sp_conf_ = sp_conf;
sp_channel_checker_ = nullptr;
sp_check_result_ = nullptr;
......
......@@ -35,7 +35,7 @@ enum class ChannelVerifyAgentState { IDLE, RUNNING };
class ChannelVerifyAgent {
public:
explicit ChannelVerifyAgent(std::shared_ptr<JSonConf> sp_conf);
explicit ChannelVerifyAgent(std::shared_ptr<JsonConf> sp_conf);
grpc::Status ProcessGrpcRequest(grpc::ServerContext *context,
ChannelVerifyRequest *request,
ChannelVerifyResponse *response);
......@@ -64,7 +64,7 @@ class ChannelVerifyAgent {
std::mutex stop_mutex_;
bool need_stop_;
bool stopped_;
std::shared_ptr<JSonConf> sp_conf_ = nullptr;
std::shared_ptr<JsonConf> sp_conf_ = nullptr;
std::shared_ptr<ChannelVerify> sp_channel_checker_ = nullptr;
CheckedResult sp_check_result_ = nullptr;
std::thread::id check_thread_id_;
......
......@@ -20,7 +20,7 @@
namespace apollo {
namespace hdmap {
std::shared_ptr<JSonConf> ParseJson(std::string conf_path) {
std::shared_ptr<JsonConf> ParseJson(std::string conf_path) {
AINFO << "parsing json config";
boost::filesystem::path path(conf_path);
if (!boost::filesystem::exists(path)) {
......@@ -28,7 +28,7 @@ std::shared_ptr<JSonConf> ParseJson(std::string conf_path) {
return nullptr;
}
std::shared_ptr<JSonConf> conf(new JSonConf);
std::shared_ptr<JsonConf> conf(new JsonConf);
boost::property_tree::ptree pt;
try {
boost::property_tree::read_json(conf_path, pt);
......
......@@ -55,7 +55,7 @@ struct FramePose {
enum class State { IDLE, RUNNING };
struct JSonConf {
struct JsonConf {
std::vector<std::pair<std::string, double>> topic_list;
bool use_system_time;
double topic_rate_tolerance;
......@@ -106,7 +106,7 @@ struct JSonConf {
double laps_rate_thresh;
};
std::shared_ptr<JSonConf> ParseJson(std::string conf_path);
std::shared_ptr<JsonConf> ParseJson(std::string conf_path);
inline double GetYaw(double from_x, double from_y, double to_x, double to_y) {
double vecx = to_x - from_x;
......@@ -118,7 +118,7 @@ inline double GetYaw(double from_x, double from_y, double to_x, double to_y) {
return kRADIANS_TO_DEGREES * alpha;
}
inline double UnixtimeNow() { return apollo::cyber::Time::Now().ToSecond(); }
inline double UnixNow() { return apollo::cyber::Time::Now().ToSecond(); }
} // namespace hdmap
} // namespace apollo
......@@ -21,7 +21,7 @@
namespace apollo {
namespace hdmap {
EightRoute::EightRoute(std::shared_ptr<JSonConf> sp_conf) : Alignment(sp_conf) {
EightRoute::EightRoute(std::shared_ptr<JsonConf> sp_conf) : Alignment(sp_conf) {
Reset();
}
......
......@@ -30,7 +30,7 @@ namespace hdmap {
// TODO(yuanyijun): change EightRoute to FigureEight
class EightRoute : public Alignment {
public:
explicit EightRoute(std::shared_ptr<JSonConf> sp_conf);
explicit EightRoute(std::shared_ptr<JsonConf> sp_conf);
ErrorCode Process(const std::vector<FramePose>& poses);
double GetProgress() const;
......
......@@ -28,7 +28,7 @@ namespace apollo {
namespace hdmap {
LapsChecker::LapsChecker(const std::vector<FramePose> &poses, int laps_to_check,
std::shared_ptr<JSonConf> sp_conf)
std::shared_ptr<JsonConf> sp_conf)
: poses_(poses), sp_conf_(sp_conf) {
laps_to_check_ = laps_to_check;
maxx_ = 0.0;
......
......@@ -35,7 +35,7 @@ typedef std::vector<GridMeta> Grid;
class LapsChecker {
public:
LapsChecker(const std::vector<FramePose>& poses, int laps_to_check,
std::shared_ptr<JSonConf> sp_conf);
std::shared_ptr<JsonConf> sp_conf);
ErrorCode Check();
double GetProgress() const;
double GetConfidence();
......@@ -71,7 +71,7 @@ class LapsChecker {
size_t laps_to_check_;
size_t possible_max_laps_;
size_t lap_;
std::shared_ptr<JSonConf> sp_conf_;
std::shared_ptr<JsonConf> sp_conf_;
ErrorCode return_state_;
};
......
......@@ -23,7 +23,7 @@ namespace apollo {
namespace hdmap {
LoopsVerifyAgent::LoopsVerifyAgent(
std::shared_ptr<JSonConf> sp_conf,
std::shared_ptr<JsonConf> sp_conf,
std::shared_ptr<PoseCollectionAgent> sp_pose_collection_agent) {
sp_conf_ = sp_conf;
sp_pose_collection_agent_ = sp_pose_collection_agent;
......
......@@ -33,7 +33,7 @@ enum class LoopsVerifyAgentState { IDLE, RUNNING };
class LoopsVerifyAgent {
public:
LoopsVerifyAgent(
std::shared_ptr<JSonConf> sp_conf,
std::shared_ptr<JsonConf> sp_conf,
std::shared_ptr<PoseCollectionAgent> sp_pose_collection_agent);
grpc::Status ProcessGrpcRequest(grpc::ServerContext *context,
LoopsVerifyRequest *request,
......@@ -60,7 +60,7 @@ class LoopsVerifyAgent {
LoopsVerifyAgentState GetState();
private:
std::shared_ptr<JSonConf> sp_conf_ = nullptr;
std::shared_ptr<JsonConf> sp_conf_ = nullptr;
std::shared_ptr<PoseCollectionAgent> sp_pose_collection_agent_ = nullptr;
std::shared_ptr<LapsChecker> sp_laps_checker_ = nullptr;
LoopsVerifyAgentState state_;
......
......@@ -18,7 +18,7 @@
namespace apollo {
namespace hdmap {
PoseCollection::PoseCollection(std::shared_ptr<JSonConf> sp_conf) {
PoseCollection::PoseCollection(std::shared_ptr<JsonConf> sp_conf) {
sp_conf_ = sp_conf;
Reset();
}
......
......@@ -26,7 +26,7 @@ enum class PoseCollectionState { IDLE, RUNNING };
class PoseCollection {
public:
explicit PoseCollection(std::shared_ptr<JSonConf> sp_conf);
explicit PoseCollection(std::shared_ptr<JsonConf> sp_conf);
void Collect(const FramePose& pose);
std::shared_ptr<std::vector<FramePose>> GetPoses() const;
......@@ -35,7 +35,7 @@ class PoseCollection {
private:
std::shared_ptr<std::vector<FramePose>> sp_poses_ = nullptr;
std::shared_ptr<JSonConf> sp_conf_ = nullptr;
std::shared_ptr<JsonConf> sp_conf_ = nullptr;
};
} // namespace hdmap
......
......@@ -23,7 +23,7 @@
namespace apollo {
namespace hdmap {
PoseCollectionAgent::PoseCollectionAgent(std::shared_ptr<JSonConf> sp_conf) {
PoseCollectionAgent::PoseCollectionAgent(std::shared_ptr<JsonConf> sp_conf) {
sp_pj_transformer_ = std::make_shared<PJTransformer>(50);
sp_conf_ = sp_conf;
Reset();
......@@ -44,7 +44,7 @@ void PoseCollectionAgent::OnBestgnssposCallback(
bestgnsspos->measurement_time()); // in seconds
FramePose pose;
if (sp_conf_->use_system_time) {
pose.time_stamp = UnixtimeNow();
pose.time_stamp = UnixNow();
AINFO << "system time: " << pose.time_stamp;
} else {
pose.time_stamp = time_stamp;
......
......@@ -29,7 +29,7 @@ namespace hdmap {
class PoseCollectionAgent {
public:
explicit PoseCollectionAgent(std::shared_ptr<JSonConf> sp_conf);
explicit PoseCollectionAgent(std::shared_ptr<JsonConf> sp_conf);
void OnBestgnssposCallback(
const std::shared_ptr<const apollo::drivers::gnss::GnssBestPose>
......@@ -42,7 +42,7 @@ class PoseCollectionAgent {
private:
std::mutex mutex_;
std::shared_ptr<PoseCollection> sp_pose_collection_ = nullptr;
std::shared_ptr<JSonConf> sp_conf_ = nullptr;
std::shared_ptr<JsonConf> sp_conf_ = nullptr;
std::shared_ptr<PJTransformer> sp_pj_transformer_ = nullptr;
};
......
......@@ -20,7 +20,7 @@
namespace apollo {
namespace hdmap {
StaticAlign::StaticAlign(std::shared_ptr<JSonConf> sp_conf)
StaticAlign::StaticAlign(std::shared_ptr<JsonConf> sp_conf)
: Alignment(sp_conf) {
sp_conf_ = sp_conf;
static_align_detect_method_ = StaticAlignDetectMethod::DYNAMIC_CENTROID;
......
......@@ -43,7 +43,7 @@ typedef struct Centroid3D {
class StaticAlign : public Alignment {
public:
explicit StaticAlign(std::shared_ptr<JSonConf> sp_conf);
explicit StaticAlign(std::shared_ptr<JsonConf> sp_conf);
ErrorCode Process(const std::vector<FramePose>& poses);
private:
......
......@@ -62,7 +62,7 @@ class MapDataCheckerAgent final
LoopsVerifyResponse *response);
private:
std::shared_ptr<JSonConf> sp_conf_ = nullptr;
std::shared_ptr<JsonConf> sp_conf_ = nullptr;
std::shared_ptr<PoseCollectionAgent> sp_pose_collection_agent_ = nullptr;
std::shared_ptr<ChannelVerifyAgent> sp_channel_checker_agent_ = nullptr;
std::shared_ptr<STATIC_ALIGN_AGENT_TYPE> sp_static_align_agent_ = nullptr;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册