| 40 | } |
| 41 | |
| 42 | double attrDouble(const QDomElement& el, const QString& name, double fallback) { |
| 43 | if (!el.hasAttribute(name)) { |
| 44 | return fallback; |
| 45 | } |
| 46 | bool ok = false; |
| 47 | const double v = el.attribute(name).toDouble(&ok); |
| 48 | return ok ? v : fallback; |
| 49 | } |
| 50 | |
| 51 | // Read <origin xyz="..." rpy="..."/> into any target with origin_xyz/origin_rpy |
| 52 | // (LinkGeom or RobotJoint). Missing attributes leave the target's defaults. |
no test coverage detected