fixed dllexport issues in slam, only tests failing

release/4.3a0
Varun Agrawal 2022-02-17 10:44:28 -05:00
parent 2e5bdcd5e7
commit 38425f1164
4 changed files with 20 additions and 14 deletions

View File

@ -48,7 +48,7 @@ ConvertNoiseModel(const SharedNoiseModel &model, size_t n,
* element of SO(3) or SO(4).
*/
template <class Rot>
class GTSAM_EXPORT FrobeniusPrior : public NoiseModelFactor1<Rot> {
class FrobeniusPrior : public NoiseModelFactor1<Rot> {
enum { Dim = Rot::VectorN2::RowsAtCompileTime };
using MatrixNN = typename Rot::MatrixNN;
Eigen::Matrix<double, Dim, 1> vecM_; ///< vectorized matrix to approximate
@ -75,7 +75,7 @@ class GTSAM_EXPORT FrobeniusPrior : public NoiseModelFactor1<Rot> {
* The template argument can be any fixed-size SO<N>.
*/
template <class Rot>
class GTSAM_EXPORT FrobeniusFactor : public NoiseModelFactor2<Rot, Rot> {
class FrobeniusFactor : public NoiseModelFactor2<Rot, Rot> {
enum { Dim = Rot::VectorN2::RowsAtCompileTime };
public:
@ -101,7 +101,7 @@ class GTSAM_EXPORT FrobeniusFactor : public NoiseModelFactor2<Rot, Rot> {
* and in fact only SO3 and SO4 really work, as we need SO<N>::AdjointMap.
*/
template <class Rot>
class GTSAM_EXPORT FrobeniusBetweenFactor : public NoiseModelFactor2<Rot, Rot> {
class FrobeniusBetweenFactor : public NoiseModelFactor2<Rot, Rot> {
Rot R12_; ///< measured rotation between R1 and R2
Eigen::Matrix<double, Rot::dimension, Rot::dimension>
R2hat_H_R1_; ///< fixed derivative of R2hat wrpt R1

View File

@ -15,7 +15,7 @@ namespace gtsam {
/**
* Factor to measure a planar landmark from a given pose
*/
class OrientedPlane3Factor: public NoiseModelFactor2<Pose3, OrientedPlane3> {
class GTSAM_EXPORT OrientedPlane3Factor: public NoiseModelFactor2<Pose3, OrientedPlane3> {
protected:
OrientedPlane3 measured_p_;
typedef NoiseModelFactor2<Pose3, OrientedPlane3> Base;
@ -49,7 +49,7 @@ class OrientedPlane3Factor: public NoiseModelFactor2<Pose3, OrientedPlane3> {
};
// TODO: Convert this factor to dimension two, three dimensions is redundant for direction prior
class OrientedPlane3DirectionPrior : public NoiseModelFactor1<OrientedPlane3> {
class GTSAM_EXPORT OrientedPlane3DirectionPrior : public NoiseModelFactor1<OrientedPlane3> {
protected:
OrientedPlane3 measured_p_; /// measured plane parameters
typedef NoiseModelFactor1<OrientedPlane3> Base;

View File

@ -42,7 +42,7 @@ namespace gtsam {
* @addtogroup SLAM
*/
template <class CALIBRATION>
class GTSAM_EXPORT SmartProjectionPoseFactor
class SmartProjectionPoseFactor
: public SmartProjectionFactor<PinholePose<CALIBRATION> > {
private:
typedef PinholePose<CALIBRATION> Camera;

View File

@ -177,8 +177,9 @@ boost::optional<IndexedPose> parseVertexPose(istream &is, const string &tag) {
}
template <>
std::map<size_t, Pose2> parseVariables<Pose2>(const std::string &filename,
size_t maxIndex) {
GTSAM_EXPORT std::map<size_t, Pose2> parseVariables<Pose2>(const std::string &filename,
size_t maxIndex)
{
return parseToMap<Pose2>(filename, parseVertexPose, maxIndex);
}
@ -199,8 +200,9 @@ boost::optional<IndexedLandmark> parseVertexLandmark(istream &is,
}
template <>
std::map<size_t, Point2> parseVariables<Point2>(const std::string &filename,
size_t maxIndex) {
GTSAM_EXPORT std::map<size_t, Point2> parseVariables<Point2>(const std::string &filename,
size_t maxIndex)
{
return parseToMap<Point2>(filename, parseVertexLandmark, maxIndex);
}
@ -428,6 +430,7 @@ parseMeasurements(const std::string &filename,
/* ************************************************************************* */
// Implementation of parseFactors for Pose2
template <>
GTSAM_EXPORT
std::vector<BetweenFactor<Pose2>::shared_ptr>
parseFactors<Pose2>(const std::string &filename,
const noiseModel::Diagonal::shared_ptr &model,
@ -777,8 +780,9 @@ boost::optional<pair<size_t, Pose3>> parseVertexPose3(istream &is,
}
template <>
std::map<size_t, Pose3> parseVariables<Pose3>(const std::string &filename,
size_t maxIndex) {
GTSAM_EXPORT std::map<size_t, Pose3> parseVariables<Pose3>(const std::string &filename,
size_t maxIndex)
{
return parseToMap<Pose3>(filename, parseVertexPose3, maxIndex);
}
@ -795,8 +799,9 @@ boost::optional<pair<size_t, Point3>> parseVertexPoint3(istream &is,
}
template <>
std::map<size_t, Point3> parseVariables<Point3>(const std::string &filename,
size_t maxIndex) {
GTSAM_EXPORT std::map<size_t, Point3> parseVariables<Point3>(const std::string &filename,
size_t maxIndex)
{
return parseToMap<Point3>(filename, parseVertexPoint3, maxIndex);
}
@ -914,6 +919,7 @@ parseMeasurements(const std::string &filename,
/* ************************************************************************* */
// Implementation of parseFactors for Pose3
template <>
GTSAM_EXPORT
std::vector<BetweenFactor<Pose3>::shared_ptr>
parseFactors<Pose3>(const std::string &filename,
const noiseModel::Diagonal::shared_ptr &model,