Go to the documentation of this file.
22 #include <Eigen/Geometry>
24 #include <SimoxUtility/json.h>
31 #include <mplib/core/types.h>
36 Eigen::VectorXf
getEigenVec(nlohmann::json& userConfig,
37 nlohmann::json& defaultConfig,
38 const std::string& entryName,
45 nlohmann::json& defaultConfig,
46 const std::string& entryName,
49 if (userConfig.find(entryName) != userConfig.end())
51 vec = userConfig[entryName];
55 vec = defaultConfig[entryName];
60 getEigenMatrix(nlohmann::json& userConfig,
const std::string& entryName, Eigen::MatrixXf& mat);
63 Eigen::VectorXf defaultValue,
64 const std::string& entryName);
69 nlohmann::json& defaultConfig,
70 const std::string& entryName)
72 if (userConfig.find(entryName) != userConfig.end())
74 return userConfig[entryName].get<
T>();
78 return defaultConfig[entryName].get<
T>();
86 if (userConfig.find(entryName) != userConfig.end())
88 return userConfig[entryName].get<
T>();
102 Eigen::Vector3d& targetPosition,
115 void to_json(nlohmann::json& j,
const PoseBasePtr& fp);
117 void from_json(
const nlohmann::json& j, PoseBasePtr& fp);
133 Eigen::VectorXf
vecToEigen(std::vector<float>& vec);
135 std::string
sVecToString(
const std::vector<std::string>& vec,
136 const std::string& delimiter =
", ");
void debugEigenPose(StringVariantBaseMap &datafields, const std::string &name, Eigen::Matrix4f pose)
std::map< std::string, VariantBasePtr > StringVariantBaseMap
std::vector< float > mat4ToFVec(Eigen::Matrix4f &mat)
T getValueWithDefault(nlohmann::json &userConfig, T defaultValue, const std::string &entryName)
Eigen::VectorXf getEigenVecWithDefault(nlohmann::json &userConfig, Eigen::VectorXf defaultValue, const std::string &entryName)
mplib::core::DVec mat4ToDVec(Eigen::Matrix4f &mat)
void getError(Eigen::Matrix4f ¤tPose, Eigen::Vector3d &targetPosition, Eigen::Quaterniond &targetQuaternion, double &posiError, double &oriError)
void from_json(const nlohmann::json &j, Pose &fp)
This file is part of ArmarX.
std::vector< float > poseToFVec(PosePtr &pose)
std::string dVecToString(const mplib::core::DVec &dvec)
std::shared_ptr< Value > value()
mplib::core::DVec poseToDVec(PosePtr &pose)
Eigen::Matrix4f dVecToMat4(const mplib::core::DVec &dvec)
PosePtr dVecToPose(const mplib::core::DVec &dvec)
void debugEigenVec(StringVariantBaseMap &datafields, const std::string &name, Eigen::VectorXf vec)
Eigen::VectorXf vecToEigen(std::vector< float > &vec)
T getValue(nlohmann::json &userConfig, nlohmann::json &defaultConfig, const std::string &entryName)
MatrixXX< 4, 4, float > Matrix4f
void to_json(nlohmann::json &j, const Pose &fp)
Quaternion< double, 0 > Quaterniond
Eigen::VectorXf getEigenVec(nlohmann::json &userConfig, nlohmann::json &defaultConfig, const std::string &entryName, int size, int value)
std::string sVecToString(const std::vector< std::string > &vec, const std::string &delimiter)
void getEigenMatrix(nlohmann::json &userConfig, const std::string &entryName, Eigen::MatrixXf &mat)