added backwards compatibility for parseVertex

release/4.3a0
Varun Agrawal 2020-07-24 11:37:58 -05:00
parent 6897ddc8aa
commit d2063d928e
2 changed files with 17 additions and 0 deletions

View File

@ -195,6 +195,13 @@ static SharedNoiseModel readNoiseModel(ifstream& is, bool smart,
} }
} }
#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V41
/* ************************************************************************* */
boost::optional<IndexedPose> parseVertex(istream& is, const string& tag) {
return parseVertexPose(is, tag);
}
#endif
/* ************************************************************************* */ /* ************************************************************************* */
boost::optional<IndexedPose> parseVertexPose(istream& is, const string& tag) { boost::optional<IndexedPose> parseVertexPose(istream& is, const string& tag) {
if ((tag == "VERTEX2") || (tag == "VERTEX_SE2") || (tag == "VERTEX")) { if ((tag == "VERTEX2") || (tag == "VERTEX_SE2") || (tag == "VERTEX")) {

View File

@ -79,6 +79,16 @@ typedef std::pair<Key, Pose2> IndexedPose;
typedef std::pair<Key, Point2> IndexedLandmark; typedef std::pair<Key, Point2> IndexedLandmark;
typedef std::pair<std::pair<Key, Key>, Pose2> IndexedEdge; typedef std::pair<std::pair<Key, Key>, Pose2> IndexedEdge;
#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V41
/**
* Parse TORO/G2O vertex "id x y yaw"
* @param is input stream
* @param tag string parsed from input stream, will only parse if vertex type
*/
GTSAM_EXPORT boost::optional<IndexedPose> parseVertex(std::istream& is,
const std::string& tag);
#endif
/** /**
* Parse TORO/G2O vertex "id x y yaw" * Parse TORO/G2O vertex "id x y yaw"
* @param is input stream * @param is input stream