提交 4ed4307d 编写于 作者: K Kecheng Xu 提交者: Calvin Miao

initial implementation for obstacle class's constructor and destructor

上级 db11133f
......@@ -19,12 +19,27 @@
namespace apollo {
namespace prediction {
Obstacle::Obstacle() {
using apollo::perception::PerceptionObstacle;
std::mutex Obstacle::_mutex;
Obstacle::Obstacle() :
id_(-1),
type_(PerceptionObstacle::UNKNOWN_MOVABLE),
feature_history_(0),
kf_motion_tracker_(),
is_motion_tracker_enabled_(false),
kf_lane_tracker_map_(0) {
}
Obstacle::~Obstacle() {
id_ = -1;
type_ = PerceptionObstacle::UNKNOWN_UNMOVABLE;
feature_history_.clear();
is_motion_tracker_enabled_ = false;
kf_lane_tracker_map_.clear();
// TODO(author) current_lanes_.clear();
}
void Obstacle::Insert(
......
......@@ -51,9 +51,10 @@ class Obstacle {
apollo::perception::PerceptionObstacle::Type type_;
std::deque<Feature> feature_history_;
apollo::common::math::KalmanFilter<double, 6, 2, 0> kf_motion_tracker_;
bool is_motion_tracker_enabled;
bool is_motion_tracker_enabled_;
std::unordered_map<std::string,
apollo::common::math::KalmanFilter<double, 4, 2, 0>> kf_lane_tracker_;
apollo::common::math::KalmanFilter<double, 4, 2, 0>> kf_lane_tracker_map_;
// TODO(author) std::vector<const adu::hdmap::LaneInfo*> _current_lanes;
static std::mutex _mutex;
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册