提交 ab67094a 编写于 作者: K Kecheng Xu 提交者: Dong Li

refactor to prediction/container/pose_container.cc (#22)

上级 4bc35072
......@@ -21,12 +21,15 @@ namespace prediction {
using apollo::perception::PerceptionObstacle;
using apollo::perception::Point;
using apollo::localization::LocalizationEstimate;
std::mutex PoseContainer::g_mutex_;
int PoseContainer::id_ = -1;
PerceptionObstacle::Type PoseContainer::type_ = PerceptionObstacle::VEHICLE;
void PoseContainer::Insert(const ::google::protobuf::Message& message) {}
void PoseContainer::Insert(const ::google::protobuf::Message& message) {
Update(dynamic_cast<const LocalizationEstimate&>(message));
}
void PoseContainer::Update(
const localization::LocalizationEstimate &localization) {
......
......@@ -50,19 +50,16 @@ class PoseContainer : public Container {
*/
void Insert(const ::google::protobuf::Message& message) override;
/**
* @brief Update the content in pose container by localization.
* @param localization The information to update the content in
* the pose container.
*/
void Update(const localization::LocalizationEstimate &localization);
/**
* @brief Transform pose to a perception obstacle.
* @return A pointer to a perception obstacle.
*/
apollo::perception::PerceptionObstacle* ToPerceptionObstacle();
private:
void Update(const localization::LocalizationEstimate &localization);
private:
std::unique_ptr<apollo::perception::PerceptionObstacle> obstacle_ptr_;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册