MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / parseOriginInto

Function parseOriginInto

pj_scene3D/widgets/src/urdf_parser.cpp:54–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52// (LinkGeom or RobotJoint). Missing attributes leave the target's defaults.
53template <typename T>
54void parseOriginInto(const QDomElement& parent, T& out) {
55 const QDomElement origin = parent.firstChildElement(QStringLiteral("origin"));
56 if (origin.isNull()) {
57 return;
58 }
59 std::array<double, 3> xyz{0, 0, 0};
60 std::array<double, 3> rpy{0, 0, 0};
61 if (parseDoubles(origin.attribute(QStringLiteral("xyz")), xyz)) {
62 out.origin_xyz = {xyz[0], xyz[1], xyz[2]};
63 }
64 if (parseDoubles(origin.attribute(QStringLiteral("rpy")), rpy)) {
65 out.origin_rpy = {rpy[0], rpy[1], rpy[2]};
66 }
67}
68
69// Read <geometry> into a GeomShape. Mesh refs are dispatched to the resolver.
70// Returns false if no recognized child geometry is present.

Callers 2

parseGeomElementFunction · 0.85
parseUrdfFunction · 0.85

Calls 2

parseDoublesFunction · 0.85
isNullMethod · 0.45

Tested by

no test coverage detected