diff --git a/GraspPlanning/GraspQuality/GraspEvaluationPoseUncertainty.h b/GraspPlanning/GraspQuality/GraspEvaluationPoseUncertainty.h index 3ec365c674af532f7eb8b0751fb09610d3cad094..370ff9f2c412df07765bd0efc9e1b97a223cbe19 100644 --- a/GraspPlanning/GraspQuality/GraspEvaluationPoseUncertainty.h +++ b/GraspPlanning/GraspQuality/GraspEvaluationPoseUncertainty.h @@ -37,7 +37,7 @@ namespace GraspStudio This class implements the paper: Jonathan Weisz and Peter K. Allen, "Pose Error Robust Grasping from Contact Wrench Space Metrics", 2012 IEEE International Conference on Robotics and Automation */ -class GraspEvaluationPoseUncertainty : public boost::enable_shared_from_this<GraspEvaluationPoseUncertainty> +class GRASPSTUDIO_IMPORT_EXPORT GraspEvaluationPoseUncertainty : public boost::enable_shared_from_this<GraspEvaluationPoseUncertainty> { public: EIGEN_MAKE_ALIGNED_OPERATOR_NEW diff --git a/GraspPlanning/examples/GraspPlanner/GraspPlannerWindow.cpp b/GraspPlanning/examples/GraspPlanner/GraspPlannerWindow.cpp index c855c0141b0c17ca4e32545cec31f3a4c3d178dc..871f76570a448e96d3357b19f7463a82d505180a 100644 --- a/GraspPlanning/examples/GraspPlanner/GraspPlannerWindow.cpp +++ b/GraspPlanning/examples/GraspPlanner/GraspPlannerWindow.cpp @@ -542,12 +542,14 @@ void GraspPlannerWindow::planObjectBatch() for (boost::filesystem::recursive_directory_iterator end, dir(fi.toUtf8().data(), boost::filesystem::symlink_option::recurse); dir != end ; ++dir) { - std::string path(dir->path().c_str()); + //std::string path(dir->path().c_str()); // search for all statechart group xml files if (dir->path().extension() == ".moxml") { - paths << dir->path().c_str(); + std::string p = dir->path().string(); + QString qs(p.c_str()); + paths.append(qs); } } diff --git a/VirtualRobot/MathTools.h b/VirtualRobot/MathTools.h index 2a55b55af37672544d883d1dfcb41bad54567893..713f10c0872e611e0a14c423cf5b2a3f0b2dcbba 100644 --- a/VirtualRobot/MathTools.h +++ b/VirtualRobot/MathTools.h @@ -89,21 +89,21 @@ namespace VirtualRobot */ MathTools::Quaternion VIRTUAL_ROBOT_IMPORT_EXPORT slerp(const MathTools::Quaternion& q1, const MathTools::Quaternion& q2, float alpha); - float fmod(float value, float boundLow, float boundHigh); + float VIRTUAL_ROBOT_IMPORT_EXPORT fmod(float value, float boundLow, float boundHigh); - float angleMod2PI(float value); + float VIRTUAL_ROBOT_IMPORT_EXPORT angleMod2PI(float value); - float angleModPI(float value); + float VIRTUAL_ROBOT_IMPORT_EXPORT angleModPI(float value); - float angleModX(float value, float center); + float VIRTUAL_ROBOT_IMPORT_EXPORT angleModX(float value, float center); - float Lerp(float a, float b, float f); + float VIRTUAL_ROBOT_IMPORT_EXPORT Lerp(float a, float b, float f); - float ILerp(float a, float b, float f); + float VIRTUAL_ROBOT_IMPORT_EXPORT ILerp(float a, float b, float f); - float AngleLerp(float a, float b, float f); + float VIRTUAL_ROBOT_IMPORT_EXPORT AngleLerp(float a, float b, float f); - float AngleDelta(float angle1, float angle2); + float VIRTUAL_ROBOT_IMPORT_EXPORT AngleDelta(float angle1, float angle2); /************************************************************************/ /* SPHERICAL COORDINATES */ diff --git a/VirtualRobot/Random.h b/VirtualRobot/Random.h index 2aa5a62b07c5f547f0723b1a1bbb4bc8245320d3..96a9eeed01e115deb463b75120915a23b5843ed0 100644 --- a/VirtualRobot/Random.h +++ b/VirtualRobot/Random.h @@ -22,11 +22,12 @@ */ #pragma once +#include "VirtualRobot.h" #include <random> namespace VirtualRobot { - std::mt19937_64& PRNG64Bit(); + std::mt19937_64 VIRTUAL_ROBOT_IMPORT_EXPORT & PRNG64Bit(); inline typename std::mt19937_64::result_type RandomNumber() { diff --git a/VirtualRobot/TimeOptimalTrajectory/Path.h b/VirtualRobot/TimeOptimalTrajectory/Path.h index 0dd40d37de8fa5385d6c737d75338051137824b9..94b66bcaa72f1bdf7be08d42dc3d83e99b24de7e 100644 --- a/VirtualRobot/TimeOptimalTrajectory/Path.h +++ b/VirtualRobot/TimeOptimalTrajectory/Path.h @@ -38,12 +38,13 @@ #pragma once +#include "../VirtualRobot.h" #include <list> #include <Eigen/Core> namespace VirtualRobot { - class PathSegment + class VIRTUAL_ROBOT_IMPORT_EXPORT PathSegment { public: PathSegment(double length = 0.0) : @@ -69,7 +70,7 @@ namespace VirtualRobot - class Path + class VIRTUAL_ROBOT_IMPORT_EXPORT Path { public: Path(const std::list<Eigen::VectorXd> &path, double maxDeviation = 0.0); diff --git a/VirtualRobot/TimeOptimalTrajectory/TimeOptimalTrajectory.h b/VirtualRobot/TimeOptimalTrajectory/TimeOptimalTrajectory.h index 23bd16274ee6e7231d6cd458907b1cc00fdc0376..af42cd6a1326e57de59e0fedb565b4ff772dd77e 100644 --- a/VirtualRobot/TimeOptimalTrajectory/TimeOptimalTrajectory.h +++ b/VirtualRobot/TimeOptimalTrajectory/TimeOptimalTrajectory.h @@ -38,6 +38,7 @@ #pragma once +#include "../VirtualRobot.h" #include <Eigen/Core> #include "Path.h" @@ -49,7 +50,7 @@ namespace VirtualRobot * Time-Optimal Trajectory Generation for Path Following with Bounded Acceleration and Velocity * Robotics: Science and Systems. 2012. */ - class TimeOptimalTrajectory + class VIRTUAL_ROBOT_IMPORT_EXPORT TimeOptimalTrajectory { public: // Generates a time-optimal trajectory diff --git a/VirtualRobot/VirtualRobot.h b/VirtualRobot/VirtualRobot.h index 9af653432fe5fa6956b82e93c73ff9a645f58bf9..5ab517e54f299e1038e95b3498a2869a4c288d56 100644 --- a/VirtualRobot/VirtualRobot.h +++ b/VirtualRobot/VirtualRobot.h @@ -114,10 +114,12 @@ EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Eigen::Vector2f) EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Eigen::Vector3f) EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Eigen::Vector4f) EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Eigen::VectorXf) +EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Eigen::VectorXd) EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Eigen::Matrix2f) EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Eigen::Matrix3f) EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Eigen::Matrix4f) EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Eigen::MatrixXf) +EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Eigen::MatrixXd) EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Eigen::Vector3d) EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Eigen::Vector3i) diff --git a/VirtualRobot/Visualization/TriMeshModel.cpp b/VirtualRobot/Visualization/TriMeshModel.cpp index fa4d27946531958511e0d84f3aaad22692eff912..941ab1a65ff4eec805c015e08de23ec6fa91c085 100644 --- a/VirtualRobot/Visualization/TriMeshModel.cpp +++ b/VirtualRobot/Visualization/TriMeshModel.cpp @@ -386,7 +386,7 @@ namespace VirtualRobot query_pt[1] = p1[1]; query_pt[2] = p1[2]; const size_t nMatches = index.radiusSearch(&query_pt[0],search_radius, ret_matches, params); - for (int k = 0; k < nMatches; ++k) + for (size_t k = 0; k < nMatches; ++k) { int foundIndex = ret_matches.at(k).first; auto& faces = vertex2FaceMap[foundIndex]; @@ -471,7 +471,7 @@ namespace VirtualRobot } std::vector<Eigen::Vector3f> newVertices; - std::map<u_int, u_int> oldNewIndexMap; + std::map<unsigned int, unsigned int> oldNewIndexMap; for (size_t i=0; i<vertex2FaceMap.size(); i++ ) { @@ -480,7 +480,7 @@ namespace VirtualRobot { Eigen::Vector3f &v = vertices.at(i); newVertices.push_back(v); - oldNewIndexMap[i] = (u_int)newVertices.size()-1; + oldNewIndexMap[i] = (unsigned int)newVertices.size()-1; } } diff --git a/VirtualRobot/examples/RobotViewer/RobotViewer.cpp b/VirtualRobot/examples/RobotViewer/RobotViewer.cpp index 9ef445f7cfa0429e1937863524e324aec3f85540..05b9df68f34722c5d4b6e6d458b9ff386fb3ecdc 100644 --- a/VirtualRobot/examples/RobotViewer/RobotViewer.cpp +++ b/VirtualRobot/examples/RobotViewer/RobotViewer.cpp @@ -38,6 +38,7 @@ int main(int argc, char* argv[]) cout << " --- START --- " << endl; // --robot "robots/iCub/iCub.xml" std::string filename("robots/ArmarIII/ArmarIII.xml"); + //std::string filename("C:/Projects/MMM/mmmtools/data/Model/Winter/mmm.xml"); //std::string filename("robots/ArmarIII/ArmarIII-RightArm.xml"); //std::string filename("C:/Projects/IIT_Projects/iCubRobot/robot/iCub.xml"); //std::string filename(DEMO_BASE_DIR "/robot/iCub_RightArm.xml"); diff --git a/VirtualRobot/math/AbstractFunctionR1Ori.h b/VirtualRobot/math/AbstractFunctionR1Ori.h index fd85ea7a7e5335f7527589efb8b89477b862e63f..4215bf8337e95288468ae3432c78f509bd9381a8 100644 --- a/VirtualRobot/math/AbstractFunctionR1Ori.h +++ b/VirtualRobot/math/AbstractFunctionR1Ori.h @@ -21,12 +21,13 @@ #pragma once +#include "../VirtualRobot.h" #include "MathForwardDefinitions.h" #include "SimpleAbstractFunctionR1Ori.h" namespace math { - class AbstractFunctionR1Ori + class VIRTUAL_ROBOT_IMPORT_EXPORT AbstractFunctionR1Ori : public SimpleAbstractFunctionR1Ori { public: diff --git a/VirtualRobot/math/AbstractFunctionR1R2.cpp b/VirtualRobot/math/AbstractFunctionR1R2.cpp index 045ff816ec8c15421f3382ff363008fc8f6d2f8b..9d92e99030113932698927ba940e407966e813b4 100644 --- a/VirtualRobot/math/AbstractFunctionR1R2.cpp +++ b/VirtualRobot/math/AbstractFunctionR1R2.cpp @@ -19,6 +19,7 @@ * GNU Lesser General Public License */ +#include "../VirtualRobot.h" #include "AbstractFunctionR1R2.h" #include <Eigen/Geometry> diff --git a/VirtualRobot/math/AbstractFunctionR1R2.h b/VirtualRobot/math/AbstractFunctionR1R2.h index 47f4b688c73e33a4b894546d3bb119372da60c67..b4d1f0a406169e3f1e128ad240290167cebebb21 100644 --- a/VirtualRobot/math/AbstractFunctionR1R2.h +++ b/VirtualRobot/math/AbstractFunctionR1R2.h @@ -21,6 +21,7 @@ #pragma once +#include "../VirtualRobot.h" #include "MathForwardDefinitions.h" @@ -29,7 +30,7 @@ namespace math { -class AbstractFunctionR1R2 +class VIRTUAL_ROBOT_IMPORT_EXPORT AbstractFunctionR1R2 { public: virtual Eigen::Vector2f Get(float t) = 0; diff --git a/VirtualRobot/math/AbstractFunctionR1R3.h b/VirtualRobot/math/AbstractFunctionR1R3.h index e739b45ec420e2e40f88b19f6cb364fbb592585d..a3fd117b8a526c783a1ad353eaac918f70b61087 100644 --- a/VirtualRobot/math/AbstractFunctionR1R3.h +++ b/VirtualRobot/math/AbstractFunctionR1R3.h @@ -21,13 +21,12 @@ #pragma once +#include "../VirtualRobot.h" #include "SimpleAbstractFunctionR1R3.h" - - namespace math { - class AbstractFunctionR1R3 : + class VIRTUAL_ROBOT_IMPORT_EXPORT AbstractFunctionR1R3 : public SimpleAbstractFunctionR1R3 { public: diff --git a/VirtualRobot/math/AbstractFunctionR1R6.h b/VirtualRobot/math/AbstractFunctionR1R6.h index 1feb63b856b27aa8be59d4b95d48ec7ae204b8e5..ce5d636c6d7c8aca7b71789c8d9bc5ccc5e0df07 100644 --- a/VirtualRobot/math/AbstractFunctionR1R6.h +++ b/VirtualRobot/math/AbstractFunctionR1R6.h @@ -21,12 +21,13 @@ #pragma once +#include "../VirtualRobot.h" #include "MathForwardDefinitions.h" #include "SimpleAbstractFunctionR1R6.h" namespace math { - class AbstractFunctionR1R6 + class VIRTUAL_ROBOT_IMPORT_EXPORT AbstractFunctionR1R6 : public SimpleAbstractFunctionR1R6 { public: diff --git a/VirtualRobot/math/AbstractFunctionR2R3.h b/VirtualRobot/math/AbstractFunctionR2R3.h index 39f4d71046a3d07895c536d57c2efa3f9880e94b..e7a8f27a9ba0dc077efffee2597c79c8f29ffe18 100644 --- a/VirtualRobot/math/AbstractFunctionR2R3.h +++ b/VirtualRobot/math/AbstractFunctionR2R3.h @@ -21,6 +21,7 @@ #pragma once +#include "../VirtualRobot.h" #include "SimpleAbstractFunctionR2R3.h" @@ -29,7 +30,7 @@ namespace math { -class AbstractFunctionR2R3: +class VIRTUAL_ROBOT_IMPORT_EXPORT AbstractFunctionR2R3: public SimpleAbstractFunctionR2R3 { public: diff --git a/VirtualRobot/math/AbstractFunctionR3R1.h b/VirtualRobot/math/AbstractFunctionR3R1.h index b610da2934032fa4f4ac391f5ab7b41c94519c24..8cc11401229cce58ee2387d006dee767d04f94cd 100644 --- a/VirtualRobot/math/AbstractFunctionR3R1.h +++ b/VirtualRobot/math/AbstractFunctionR3R1.h @@ -22,12 +22,13 @@ #pragma once +#include "../VirtualRobot.h" #include "SimpleAbstractFunctionR3R1.h" namespace math { - class AbstractFunctionR3R1 : + class VIRTUAL_ROBOT_IMPORT_EXPORT AbstractFunctionR3R1 : public SimpleAbstractFunctionR3R1 { public: diff --git a/VirtualRobot/math/Bezier.h b/VirtualRobot/math/Bezier.h index cae16e12cd25679aa0d262c49ea46b5f99a7e488..f62ce7382589b4b76433eb84b1d96d5dab8a89c7 100644 --- a/VirtualRobot/math/Bezier.h +++ b/VirtualRobot/math/Bezier.h @@ -21,14 +21,14 @@ #pragma once +#include "../VirtualRobot.h" #include "MathForwardDefinitions.h" - #include "AbstractFunctionR1R3.h" namespace math { - class Bezier : + class VIRTUAL_ROBOT_IMPORT_EXPORT Bezier : public AbstractFunctionR1R3 { public: diff --git a/VirtualRobot/math/Contact.h b/VirtualRobot/math/Contact.h index 3b6b85763b1431db55cee4ba32324e0f730db908..bdce4d61f93f91fea17aee4f39a3d379071064e1 100644 --- a/VirtualRobot/math/Contact.h +++ b/VirtualRobot/math/Contact.h @@ -21,6 +21,7 @@ #pragma once +#include "../VirtualRobot.h" #include "MathForwardDefinitions.h" #include <sstream> @@ -28,7 +29,7 @@ namespace math { - class Contact + class VIRTUAL_ROBOT_IMPORT_EXPORT Contact { public: Contact(); diff --git a/VirtualRobot/math/ContactList.h b/VirtualRobot/math/ContactList.h index 2a2f4e82d4c8288142613c386d3a1036ff9d0fe2..285999707349ed74b13eb39face3b509ef6c4f4c 100644 --- a/VirtualRobot/math/ContactList.h +++ b/VirtualRobot/math/ContactList.h @@ -20,13 +20,13 @@ */ #pragma once - +#include "../VirtualRobot.h" #include "Contact.h" namespace math { - class ContactList : + class VIRTUAL_ROBOT_IMPORT_EXPORT ContactList : public std::vector<Contact> { public: diff --git a/VirtualRobot/math/FitPlane.h b/VirtualRobot/math/FitPlane.h index f4ee5ed9f77feae50a1d60d0bf4f406a1220cd92..679e0bc0e03931e37d7c52c28cef9ca5ef56a8e6 100644 --- a/VirtualRobot/math/FitPlane.h +++ b/VirtualRobot/math/FitPlane.h @@ -21,13 +21,14 @@ #pragma once +#include "../VirtualRobot.h" #include "Plane.h" #include <Eigen/Dense> namespace math { - class FitPlane + class VIRTUAL_ROBOT_IMPORT_EXPORT FitPlane { public: static Plane Fit(const std::vector<Eigen::Vector3f>& points); diff --git a/VirtualRobot/math/GaussianImplicitSurface3D.h b/VirtualRobot/math/GaussianImplicitSurface3D.h index c7fbb37f40836e00d22e0c7e15118008cf3f4a27..da3a2fa609bc0837e5556e13a1b0e30514eb54fb 100644 --- a/VirtualRobot/math/GaussianImplicitSurface3D.h +++ b/VirtualRobot/math/GaussianImplicitSurface3D.h @@ -21,6 +21,7 @@ #pragma once +#include "../VirtualRobot.h" #include "MathForwardDefinitions.h" #include "DataR3R1.h" #include "DataR3R2.h" @@ -31,7 +32,7 @@ namespace math { -class GaussianImplicitSurface3D : +class VIRTUAL_ROBOT_IMPORT_EXPORT GaussianImplicitSurface3D : public SimpleAbstractFunctionR3R1 { public: diff --git a/VirtualRobot/math/GaussianImplicitSurface3DCombined.cpp b/VirtualRobot/math/GaussianImplicitSurface3DCombined.cpp index 28b5c62e646528a192e83744423dc971290e5be9..b234a53f8fe4a1f7c36b4ffa28d78886ca572d8d 100644 --- a/VirtualRobot/math/GaussianImplicitSurface3DCombined.cpp +++ b/VirtualRobot/math/GaussianImplicitSurface3DCombined.cpp @@ -79,7 +79,7 @@ void GaussianImplicitSurface3DCombined::Calculate(const ContactList& normalSampl y(i) = samples[i].Value1(); } - for (uint i = 0; i < normalSamples.size(); i++) + for (size_t i = 0; i < normalSamples.size(); i++) { y(samples.size() + i * 4) = 0; y(samples.size() + i * 4 + 1) = normalSamples[i].Normal().x(); diff --git a/VirtualRobot/math/GaussianImplicitSurface3DNormals.cpp b/VirtualRobot/math/GaussianImplicitSurface3DNormals.cpp index f9f65643bdd13bf4299f413afc665731fb446404..fe2b6af74b353def38d03eb86aaaf681f624608a 100644 --- a/VirtualRobot/math/GaussianImplicitSurface3DNormals.cpp +++ b/VirtualRobot/math/GaussianImplicitSurface3DNormals.cpp @@ -51,7 +51,7 @@ void GaussianImplicitSurface3DNormals::Calculate(const ContactList& samples, flo CalculateCovariance(points, R, noise, normalNoise); Eigen::VectorXd values(samples.size() * 4); - for (uint i = 0; i < samples.size(); i++) + for (unsigned int i = 0; i < samples.size(); i++) { values(i * 4) = 0; values(i * 4 + 1) = samples.at(i).Normal().x(); diff --git a/VirtualRobot/math/GaussianImplicitSurface3DNormals.h b/VirtualRobot/math/GaussianImplicitSurface3DNormals.h index 0bceb17e029c85a923646c4afbd6ca71b09d4797..93bf473ca9a0a1c06b5bc31a17618e139b8d2fd7 100644 --- a/VirtualRobot/math/GaussianImplicitSurface3DNormals.h +++ b/VirtualRobot/math/GaussianImplicitSurface3DNormals.h @@ -21,6 +21,7 @@ #pragma once +#include "../VirtualRobot.h" #include "MathForwardDefinitions.h" #include "Contact.h" #include "Helpers.h" @@ -31,7 +32,7 @@ namespace math { -class GaussianImplicitSurface3DNormals : +class VIRTUAL_ROBOT_IMPORT_EXPORT GaussianImplicitSurface3DNormals : public SimpleAbstractFunctionR3R1 { public: diff --git a/VirtualRobot/math/GaussianObjectModel.h b/VirtualRobot/math/GaussianObjectModel.h index 086cd299923042e25cbe8c526e80eb699b5fcdf5..1ade2ee5527a6d01ea8de1f0a9259e43cff14228 100644 --- a/VirtualRobot/math/GaussianObjectModel.h +++ b/VirtualRobot/math/GaussianObjectModel.h @@ -23,6 +23,7 @@ #include "MathForwardDefinitions.h" +#include "../VirtualRobot.h" #include "Contact.h" #include "DataR3R1.h" #include "GaussianImplicitSurface3D.h" @@ -31,7 +32,7 @@ namespace math { - class GaussianObjectModel : + class VIRTUAL_ROBOT_IMPORT_EXPORT GaussianObjectModel : public ImplicitObjectModel { public: diff --git a/VirtualRobot/math/GaussianObjectModelNormals.h b/VirtualRobot/math/GaussianObjectModelNormals.h index 6516cc33a2639d16aa1fef9e0c016a2627cd3b35..19f4f037005d0ed06182ae72402742f802ecd78f 100644 --- a/VirtualRobot/math/GaussianObjectModelNormals.h +++ b/VirtualRobot/math/GaussianObjectModelNormals.h @@ -21,6 +21,7 @@ #pragma once +#include "../VirtualRobot.h" #include "MathForwardDefinitions.h" #include "Contact.h" @@ -30,7 +31,7 @@ namespace math { - class GaussianObjectModelNormals : + class VIRTUAL_ROBOT_IMPORT_EXPORT GaussianObjectModelNormals : public ImplicitObjectModel { public: diff --git a/VirtualRobot/math/GridCacheFloat3.h b/VirtualRobot/math/GridCacheFloat3.h index ff46c27f4d6caf83d3e079fc7bde00700172bf4a..c868ce6508aa421f0ac7f381f20b70777fdc7283 100644 --- a/VirtualRobot/math/GridCacheFloat3.h +++ b/VirtualRobot/math/GridCacheFloat3.h @@ -34,7 +34,6 @@ public: float Get(int x, int y, int z); - private: Array3DFloatPtr data; Array3DBoolPtr valid; diff --git a/VirtualRobot/math/Helpers.cpp b/VirtualRobot/math/Helpers.cpp index b09b86c145e8dbdd603bfa015b8aca4bf650c2ab..46a12f1cab61355afeb751642be7970fca0f757c 100644 --- a/VirtualRobot/math/Helpers.cpp +++ b/VirtualRobot/math/Helpers.cpp @@ -231,10 +231,11 @@ Eigen::Vector3f Helpers::CreateVectorFromCylinderCoords(float r, float angle, fl return Eigen::Vector3f(r * cos(angle), r * sin(angle), z); } -Eigen::Matrix4f math::Helpers::TranslatePose(Eigen::Matrix4f pose, const Eigen::Vector3f &offset) +Eigen::Matrix4f math::Helpers::TranslatePose(const Eigen::Matrix4f &pose, const Eigen::Vector3f &offset) { - pose.block<3, 1>(0, 3) += offset; - return pose; + Eigen::Matrix4f p = pose; + p.block<3, 1>(0, 3) += offset; + return p; } Eigen::Vector3f Helpers::TransformPosition(const Eigen::Matrix4f& transform, const Eigen::Vector3f& pos) diff --git a/VirtualRobot/math/Helpers.h b/VirtualRobot/math/Helpers.h index c87553aa9000bb16d70294acb0af4ebf4ad0b2d0..e0f3d45c57863dc3694e5e48c39e82b166597d3d 100644 --- a/VirtualRobot/math/Helpers.h +++ b/VirtualRobot/math/Helpers.h @@ -58,7 +58,7 @@ namespace math static Eigen::Matrix3f GetRotationMatrix(const Eigen::Vector3f &source, const Eigen::Vector3f &target); static Eigen::Matrix3f RotateOrientationToFitVector(const Eigen::Matrix3f& ori, const Eigen::Vector3f &localSource, const Eigen::Vector3f &globalTarget); static Eigen::Vector3f CreateVectorFromCylinderCoords(float r, float angle, float z); - static Eigen::Matrix4f TranslatePose(Eigen::Matrix4f pose, const Eigen::Vector3f& offset); + static Eigen::Matrix4f TranslatePose(const Eigen::Matrix4f &pose, const Eigen::Vector3f& offset); static Eigen::Vector3f TransformPosition(const Eigen::Matrix4f& transform, const Eigen::Vector3f &pos); static Eigen::Vector3f TransformDirection(const Eigen::Matrix4f& transform, const Eigen::Vector3f &dir); static Eigen::Matrix3f TransformOrientation(const Eigen::Matrix4f& transform, const Eigen::Matrix3f &ori); diff --git a/VirtualRobot/math/ImplicitObjectModel.h b/VirtualRobot/math/ImplicitObjectModel.h index 6ad55998e7b98e0f6474dc2dca8136887a8a1a8b..93f160a55c97ea6fce1ba5e1a82886b96dca0f17 100644 --- a/VirtualRobot/math/ImplicitObjectModel.h +++ b/VirtualRobot/math/ImplicitObjectModel.h @@ -21,13 +21,14 @@ #pragma once +#include "../VirtualRobot.h" #include "MathForwardDefinitions.h" #include "ContactList.h" #include "SimpleAbstractFunctionR3R1.h" namespace math { -class ImplicitObjectModel +class VIRTUAL_ROBOT_IMPORT_EXPORT ImplicitObjectModel { public: ContactListPtr Contacts() {return contacts;} diff --git a/VirtualRobot/math/Kernels.h b/VirtualRobot/math/Kernels.h index b44b49a8549593832edd4a9ca4802ffff09fa90a..90a5ed4d434fc95367bcb07f17df30a38b94b93f 100644 --- a/VirtualRobot/math/Kernels.h +++ b/VirtualRobot/math/Kernels.h @@ -21,13 +21,14 @@ #pragma once +#include "../VirtualRobot.h" #include "MathForwardDefinitions.h" #include <memory> namespace math { -class KernelWithDerivatives +class VIRTUAL_ROBOT_IMPORT_EXPORT KernelWithDerivatives { public: virtual float Kernel(const Eigen::Vector3f& p1, const Eigen::Vector3f& p2, float R) const = 0; @@ -42,7 +43,7 @@ public: void swap(float &x, float &y, float &z, int index) const; }; -class GaussianKernel : public KernelWithDerivatives { +class VIRTUAL_ROBOT_IMPORT_EXPORT GaussianKernel : public KernelWithDerivatives { public: GaussianKernel(float lengthScale); float Kernel(const Eigen::Vector3f& p1, const Eigen::Vector3f& p2, float R) const override; @@ -54,14 +55,14 @@ private: float lengthScale; }; -class WilliamsPlusKernel : public KernelWithDerivatives { +class VIRTUAL_ROBOT_IMPORT_EXPORT WilliamsPlusKernel : public KernelWithDerivatives { float Kernel(const Eigen::Vector3f& p1, const Eigen::Vector3f& p2, float R) const override; float Kernel_dx(float x, float y, float z, float r, float R) const override; float Kernel_ddx(float x, float y, float z, float r, float R) const override; float Kernel_dxdy(float x, float y, float z, float r, float R) const override; }; -class WilliamsMinusKernel : public KernelWithDerivatives { +class VIRTUAL_ROBOT_IMPORT_EXPORT WilliamsMinusKernel : public KernelWithDerivatives { float Kernel(const Eigen::Vector3f& p1, const Eigen::Vector3f& p2, float R) const override; float Kernel_dx(float x, float y, float z, float r, float R) const override; float Kernel_ddx(float x, float y, float z, float r, float R) const override; diff --git a/VirtualRobot/math/MathForwardDefinitions.h b/VirtualRobot/math/MathForwardDefinitions.h index bb386e41a6faeae4c19d28c60cf5f19e2bbb82b0..81910575e41fa9cb0283aa8ef06ab35c38cb769b 100644 --- a/VirtualRobot/math/MathForwardDefinitions.h +++ b/VirtualRobot/math/MathForwardDefinitions.h @@ -108,7 +108,7 @@ namespace math{ typedef boost::shared_ptr<class Bezier> BezierPtr; typedef boost::shared_ptr<class LinearContinuedBezier> LinearContinuedBezierPtr; typedef boost::shared_ptr<class Primitive> PrimitivePtr; - typedef boost::shared_ptr<class Index3> Index3Ptr; + typedef boost::shared_ptr<struct Index3> Index3Ptr; typedef boost::shared_ptr<class AbstractContactFeature> AbstractContactFeaturePtr; typedef boost::shared_ptr<class BinContactFeature> BinContactFeaturePtr; template<class T> class Array3D; diff --git a/VirtualRobot/math/SimpleAbstractFunctionR1Ori.h b/VirtualRobot/math/SimpleAbstractFunctionR1Ori.h index 92eb0351fae9f88da9340deeb167d2c48359c064..d655039ced217f9b3bb425df390d0fa16403f181 100644 --- a/VirtualRobot/math/SimpleAbstractFunctionR1Ori.h +++ b/VirtualRobot/math/SimpleAbstractFunctionR1Ori.h @@ -21,11 +21,12 @@ #pragma once +#include "../VirtualRobot.h" #include "MathForwardDefinitions.h" namespace math { - class SimpleAbstractFunctionR1Ori + class VIRTUAL_ROBOT_IMPORT_EXPORT SimpleAbstractFunctionR1Ori { public: virtual Eigen::Quaternionf Get(float t) = 0; diff --git a/VirtualRobot/math/SimpleAbstractFunctionR1R3.h b/VirtualRobot/math/SimpleAbstractFunctionR1R3.h index 332292b2228ea49a433b7cf58a8fd2fc6445ddc7..9b500904d8eeeade13f3e8f64a579a9755337e51 100644 --- a/VirtualRobot/math/SimpleAbstractFunctionR1R3.h +++ b/VirtualRobot/math/SimpleAbstractFunctionR1R3.h @@ -21,14 +21,13 @@ #pragma once +#include "../VirtualRobot.h" #include "MathForwardDefinitions.h" - - namespace math { - class SimpleAbstractFunctionR1R3 + class VIRTUAL_ROBOT_IMPORT_EXPORT SimpleAbstractFunctionR1R3 { public: virtual Eigen::Vector3f Get(float t) = 0; diff --git a/VirtualRobot/math/SimpleAbstractFunctionR1R6.h b/VirtualRobot/math/SimpleAbstractFunctionR1R6.h index 90582d38ec35325161c1d2f6b81f96c1ec8ec880..aa5f98445dec3a1f8929477ff24c9704b9b11599 100644 --- a/VirtualRobot/math/SimpleAbstractFunctionR1R6.h +++ b/VirtualRobot/math/SimpleAbstractFunctionR1R6.h @@ -21,11 +21,12 @@ #pragma once +#include "../VirtualRobot.h" #include "MathForwardDefinitions.h" namespace math { - class SimpleAbstractFunctionR1R6 + class VIRTUAL_ROBOT_IMPORT_EXPORT SimpleAbstractFunctionR1R6 { public: virtual Eigen::Vector3f GetPosition(float t) = 0; diff --git a/VirtualRobot/math/SimpleAbstractFunctionR2R3.h b/VirtualRobot/math/SimpleAbstractFunctionR2R3.h index a55902ff28ee025f6ee628425198a70899e6d25e..c6cb4dafe1b8017f61fb8bb684e1308adaf65d7d 100644 --- a/VirtualRobot/math/SimpleAbstractFunctionR2R3.h +++ b/VirtualRobot/math/SimpleAbstractFunctionR2R3.h @@ -21,14 +21,13 @@ #pragma once +#include "../VirtualRobot.h" #include "MathForwardDefinitions.h" - - namespace math { -class SimpleAbstractFunctionR2R3 +class VIRTUAL_ROBOT_IMPORT_EXPORT SimpleAbstractFunctionR2R3 { public: virtual Eigen::Vector3f GetPoint(float u, float v) = 0; diff --git a/VirtualRobot/math/SimpleAbstractFunctionR3R1.h b/VirtualRobot/math/SimpleAbstractFunctionR3R1.h index 0b5d99cc66b770c480014eb182d26112c3edb64e..68b70f1af5538c8e9e0a19f627b034a438b2babc 100644 --- a/VirtualRobot/math/SimpleAbstractFunctionR3R1.h +++ b/VirtualRobot/math/SimpleAbstractFunctionR3R1.h @@ -21,14 +21,13 @@ #pragma once +#include "../VirtualRobot.h" #include "MathForwardDefinitions.h" - - namespace math { - class SimpleAbstractFunctionR3R1 + class VIRTUAL_ROBOT_IMPORT_EXPORT SimpleAbstractFunctionR3R1 { public: virtual float Get(Eigen::Vector3f pos) = 0;