bool parsePose(Pose &pose, TiXmlElement* xml) { pose.clear(); if (xml) { const char* xyz_str = xml->Attribute("xyz"); if (xyz_str != NULL) { try { pose.position.init(xyz_str); } catch (ParseError &e) { CONSOLE_BRIDGE_logError(e.what()); return false; } } const char* rpy_str = xml->Attribute("rpy"); if (rpy_str != NULL) { try { pose.rotation.init(rpy_str); } catch (ParseError &e) { CONSOLE_BRIDGE_logError(e.what()); return false; } } } return true; }