Commit 33f27831 authored by mederic_fourmy's avatar mederic_fourmy
Browse files

[skip-ci] Remove implicit equality of landmark node id and tag id

parent af2db0f6
...@@ -32,7 +32,6 @@ LandmarkApriltag::LandmarkApriltag(Eigen::Vector7d& pose, const int& _tagid, con ...@@ -32,7 +32,6 @@ LandmarkApriltag::LandmarkApriltag(Eigen::Vector7d& pose, const int& _tagid, con
tag_width_(_tag_width) tag_width_(_tag_width)
{ {
setDescriptor(Eigen::VectorXd::Constant(1,_tagid)); //change tagid to int ? do not use descriptor vector ? setDescriptor(Eigen::VectorXd::Constant(1,_tagid)); //change tagid to int ? do not use descriptor vector ?
setId(_tagid); // overwrite lmk ID to match tag_id.
} }
LandmarkApriltag::~LandmarkApriltag() LandmarkApriltag::~LandmarkApriltag()
...@@ -57,7 +56,6 @@ int LandmarkApriltag::getTagId() const ...@@ -57,7 +56,6 @@ int LandmarkApriltag::getTagId() const
LandmarkBasePtr LandmarkApriltag::create(const YAML::Node& _lmk_node) LandmarkBasePtr LandmarkApriltag::create(const YAML::Node& _lmk_node)
{ {
// Parse YAML node with lmk info and data // Parse YAML node with lmk info and data
unsigned int id = _lmk_node["id"] .as<unsigned int>();
unsigned int tag_id = _lmk_node["tag id"] .as<unsigned int>(); unsigned int tag_id = _lmk_node["tag id"] .as<unsigned int>();
double tag_width = _lmk_node["tag width"] .as<double>(); double tag_width = _lmk_node["tag width"] .as<double>();
Eigen::Vector3d pos = _lmk_node["position"] .as<Eigen::Vector3d>(); Eigen::Vector3d pos = _lmk_node["position"] .as<Eigen::Vector3d>();
...@@ -82,7 +80,6 @@ LandmarkBasePtr LandmarkApriltag::create(const YAML::Node& _lmk_node) ...@@ -82,7 +80,6 @@ LandmarkBasePtr LandmarkApriltag::create(const YAML::Node& _lmk_node)
// Create a new landmark // Create a new landmark
LandmarkApriltagPtr lmk_ptr = std::make_shared<LandmarkApriltag>(pose, tag_id, tag_width); LandmarkApriltagPtr lmk_ptr = std::make_shared<LandmarkApriltag>(pose, tag_id, tag_width);
lmk_ptr->setId(id);
lmk_ptr->getP()->setFixed(pos_fixed); lmk_ptr->getP()->setFixed(pos_fixed);
lmk_ptr->getO()->setFixed(ori_fixed); lmk_ptr->getO()->setFixed(ori_fixed);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment