12 std::string
toString(
const double& float_value,
const int precision)
14 std::stringstream sstring;
15 sstring.precision(precision);
16 sstring << float_value;
27 if (path.back() ==
'/')
37 std::string ret = path;
38 while (!ret.empty() && (ret.back() ==
'/' || ret.back() ==
'\\'))
40 ret = ret.substr(0, ret.size() - 1);
47 std::string ret = filename;
48 while (!ret.empty() && (ret.front() ==
'/' || ret.front() ==
'\\'))
55 std::string
makeURDFFilePath(
const std::string& package_path,
const std::string& filename)
58 if (!package_path.empty())
64 package_name = package_name.substr(package_name.find_last_of(
"/\\") + 1);
140 void writeMeshToFile(
const std::shared_ptr<const tesseract_geometry::PolygonMesh>& mesh,
const std::string& filepath)
143 filepath, *(mesh->getVertices()), *(mesh->getFaces()), mesh->getFaceCount()))
144 std::throw_with_nested(std::runtime_error(
"Could not export file"));