Go to the documentation of this file.
5 #include <SimoxUtility/algorithm/string.h>
6 #include <SimoxUtility/math/pose/pose.h>
100 if (enumType ==
nullptr or enumData ==
nullptr)
106 std::string name = enumType->getValueName(enumData->getValue());
118 template <
typename ScalarT>
122 Eigen::Map<Eigen::Matrix<ScalarT, Eigen::Dynamic, Eigen::Dynamic>> m(
123 reinterpret_cast<ScalarT*
>(
data.getData()),
124 data.getShape().at(0),
125 data.getShape().at(1));
130 TypedDataDisplayVisitor::processQuaternion(
const data::NDArray&
data)
140 TypedDataDisplayVisitor::processPose(
const type::Matrix&,
const data::NDArray& d)
142 const Eigen::IOFormat
eigenIof(Eigen::StreamPrecision, 0,
" ",
"\n",
"( ",
" )",
"",
"");
143 const std::string cdot =
"\u00B7";
145 auto getLines = [&](
auto&& mat)
147 std::stringstream ss;
157 const std::vector<std::string> r = getLines(simox::math::orientation(pose));
158 const std::vector<std::string> t = getLines(simox::math::position(pose));
160 std::vector<std::string> lines;
161 lines.push_back(r.at(0) +
" \t" + t.at(0));
162 lines.push_back(r.at(1) +
" " + cdot +
" x + \t" + t.at(1));
163 lines.push_back(r.at(2) +
" \t" + t.at(2));
165 value << simox::alg::join(lines,
"\n");
169 TypedDataDisplayVisitor::processPosition(
const type::Matrix&,
const data::NDArray& d)
186 processQuaternion(d);
void visitImage(const data::VariantPtr &data, const type::VariantPtr &type) override
std::shared_ptr< Variant > VariantPtr
Eigen::Matrix< T, 3, 3 > Matrix
static std::string getValue(const type::VariantPtr &type, const data::VariantPtr &data)
static Eigen::Matrix4f ConvertToMatrix4f(const data::NDArrayPtr &)
void visitPointCloud(const data::VariantPtr &data, const type::VariantPtr &type) override
void setStreamPrecision()
static PointerType DynamicCastAndCheck(const VariantPtr &n)
static PointerType DynamicCast(const VariantPtr &n)
std::shared_ptr< Variant > VariantPtr
void visitString(const data::VariantPtr &data, const type::VariantPtr &type) override
void visitBool(const data::VariantPtr &data, const type::VariantPtr &type) override
void visitDouble(const data::VariantPtr &data, const type::VariantPtr &type) override
static IntEnum & DynamicCast(Variant &n)
void visitMatrix(const data::VariantPtr &data, const type::VariantPtr &type) override
void visitTuple(const data::VariantPtr &data, const type::VariantPtr &type) override
Quaternion< float, 0 > Quaternionf
static Eigen::Quaternion< float > ConvertToQuaternionf(const data::NDArrayPtr &)
const Eigen::IOFormat eigenIof
static std::string getValue(const data::VariantPtr &n)
void visitIntEnum(const data::VariantPtr &data, const type::VariantPtr &type) override
double v(double t, double v0, double a0, double j)
MatrixXX< 4, 4, float > Matrix4f
TypedDataDisplayVisitor()
void visitDict(const data::VariantPtr &data, const type::VariantPtr &type) override
void visitObject(const data::VariantPtr &data, const type::VariantPtr &type) override
requires isVisitor< VisitorImplementation, typename VisitorImplementation::Input > void visit(VisitorImplementation &v, typename VisitorImplementation::Input &o)
void visitFloat(const data::VariantPtr &data, const type::VariantPtr &type) override
std::shared_ptr< IntEnum > IntEnumPtr
void visitLong(const data::VariantPtr &data, const type::VariantPtr &type) override
void visitQuaternion(const data::VariantPtr &data, const type::VariantPtr &type) override
void visitInt(const data::VariantPtr &data, const type::VariantPtr &type) override
const std::string coeffSep
std::shared_ptr< Int > IntPtr
#define ARMARX_CHECK_EQUAL(lhs, rhs)
This macro evaluates whether lhs is equal (==) rhs and if it turns out to be false it will throw an E...
void visitList(const data::VariantPtr &data, const type::VariantPtr &type) override
static Eigen::Vector3f ConvertToVector3f(const data::NDArrayPtr &)
std::vector< std::string > split(const std::string &source, const std::string &splitBy, bool trimElements=false, bool removeEmptyElements=false)