From f7b1f7273dec5f224cc1666c8731927ddd80e925 Mon Sep 17 00:00:00 2001 From: Michael Ripperger Date: Sat, 11 Jan 2025 12:49:14 -0600 Subject: [PATCH] Moved URDF element name definitions to source files --- tesseract_urdf/include/tesseract_urdf/box.h | 2 +- tesseract_urdf/include/tesseract_urdf/calibration.h | 2 +- tesseract_urdf/include/tesseract_urdf/capsule.h | 2 +- tesseract_urdf/include/tesseract_urdf/collision.h | 2 +- tesseract_urdf/include/tesseract_urdf/cone.h | 2 +- tesseract_urdf/include/tesseract_urdf/cylinder.h | 2 +- tesseract_urdf/include/tesseract_urdf/dynamics.h | 2 +- tesseract_urdf/include/tesseract_urdf/geometry.h | 2 +- tesseract_urdf/include/tesseract_urdf/inertial.h | 2 +- tesseract_urdf/include/tesseract_urdf/joint.h | 2 +- tesseract_urdf/include/tesseract_urdf/limits.h | 2 +- tesseract_urdf/include/tesseract_urdf/link.h | 2 +- tesseract_urdf/include/tesseract_urdf/material.h | 2 +- tesseract_urdf/include/tesseract_urdf/mesh.h | 2 +- tesseract_urdf/include/tesseract_urdf/mimic.h | 2 +- tesseract_urdf/include/tesseract_urdf/octomap.h | 2 +- tesseract_urdf/include/tesseract_urdf/octree.h | 2 +- tesseract_urdf/include/tesseract_urdf/origin.h | 2 +- tesseract_urdf/include/tesseract_urdf/point_cloud.h | 2 +- tesseract_urdf/include/tesseract_urdf/safety_controller.h | 2 +- tesseract_urdf/include/tesseract_urdf/sdf_mesh.h | 2 +- tesseract_urdf/include/tesseract_urdf/sphere.h | 2 +- tesseract_urdf/include/tesseract_urdf/visual.h | 2 +- tesseract_urdf/src/box.cpp | 2 ++ tesseract_urdf/src/calibration.cpp | 2 ++ tesseract_urdf/src/capsule.cpp | 2 ++ tesseract_urdf/src/collision.cpp | 2 ++ tesseract_urdf/src/cone.cpp | 2 ++ tesseract_urdf/src/cylinder.cpp | 2 ++ tesseract_urdf/src/dynamics.cpp | 2 ++ tesseract_urdf/src/geometry.cpp | 2 ++ tesseract_urdf/src/inertial.cpp | 2 ++ tesseract_urdf/src/joint.cpp | 2 ++ tesseract_urdf/src/limits.cpp | 2 ++ tesseract_urdf/src/link.cpp | 2 ++ tesseract_urdf/src/material.cpp | 2 ++ tesseract_urdf/src/mesh.cpp | 2 ++ tesseract_urdf/src/mimic.cpp | 2 ++ tesseract_urdf/src/octomap.cpp | 2 ++ tesseract_urdf/src/octree.cpp | 2 ++ tesseract_urdf/src/origin.cpp | 2 ++ tesseract_urdf/src/point_cloud.cpp | 2 ++ tesseract_urdf/src/safety_controller.cpp | 2 ++ tesseract_urdf/src/sdf_mesh.cpp | 2 ++ tesseract_urdf/src/sphere.cpp | 2 ++ tesseract_urdf/src/visual.cpp | 2 ++ 46 files changed, 69 insertions(+), 23 deletions(-) diff --git a/tesseract_urdf/include/tesseract_urdf/box.h b/tesseract_urdf/include/tesseract_urdf/box.h index c9254a37b15..f9c21409c96 100644 --- a/tesseract_urdf/include/tesseract_urdf/box.h +++ b/tesseract_urdf/include/tesseract_urdf/box.h @@ -41,7 +41,7 @@ class XMLDocument; namespace tesseract_urdf { -static const char* BOX_ELEMENT_NAME = "box"; // NOLINT +extern const char* BOX_ELEMENT_NAME; /** * @brief Parse a xml box element diff --git a/tesseract_urdf/include/tesseract_urdf/calibration.h b/tesseract_urdf/include/tesseract_urdf/calibration.h index dc2233f7283..5296d22fd79 100644 --- a/tesseract_urdf/include/tesseract_urdf/calibration.h +++ b/tesseract_urdf/include/tesseract_urdf/calibration.h @@ -41,7 +41,7 @@ class XMLDocument; namespace tesseract_urdf { -static const char* CALIBRATION_ELEMENT_NAME = "calibration"; // NOLINT +extern const char* CALIBRATION_ELEMENT_NAME; /** * @brief Parse a xml calibration element diff --git a/tesseract_urdf/include/tesseract_urdf/capsule.h b/tesseract_urdf/include/tesseract_urdf/capsule.h index 0db2b6d99d8..56d29044fc5 100644 --- a/tesseract_urdf/include/tesseract_urdf/capsule.h +++ b/tesseract_urdf/include/tesseract_urdf/capsule.h @@ -41,7 +41,7 @@ class XMLDocument; namespace tesseract_urdf { -static const char* CAPSULE_ELEMENT_NAME = "tesseract:capsule"; // NOLINT +extern const char* CAPSULE_ELEMENT_NAME; /** * @brief Parse a xml capsule element diff --git a/tesseract_urdf/include/tesseract_urdf/collision.h b/tesseract_urdf/include/tesseract_urdf/collision.h index 547b20614d6..e5b047e9dfc 100644 --- a/tesseract_urdf/include/tesseract_urdf/collision.h +++ b/tesseract_urdf/include/tesseract_urdf/collision.h @@ -43,7 +43,7 @@ class XMLDocument; namespace tesseract_urdf { -static const char* COLLISION_ELEMENT_NAME = "collision"; // NOLINT +extern const char* COLLISION_ELEMENT_NAME; /** * @brief Parse xml element collision diff --git a/tesseract_urdf/include/tesseract_urdf/cone.h b/tesseract_urdf/include/tesseract_urdf/cone.h index 8ca02ea9191..5512b442f7e 100644 --- a/tesseract_urdf/include/tesseract_urdf/cone.h +++ b/tesseract_urdf/include/tesseract_urdf/cone.h @@ -41,7 +41,7 @@ class XMLDocument; namespace tesseract_urdf { -static const char* CONE_ELEMENT_NAME = "tesseract:cone"; // NOLINT +extern const char* CONE_ELEMENT_NAME; /** * @brief Parse a xml cone element diff --git a/tesseract_urdf/include/tesseract_urdf/cylinder.h b/tesseract_urdf/include/tesseract_urdf/cylinder.h index 54163dfbc62..ab34cfceea3 100644 --- a/tesseract_urdf/include/tesseract_urdf/cylinder.h +++ b/tesseract_urdf/include/tesseract_urdf/cylinder.h @@ -41,7 +41,7 @@ class XMLDocument; namespace tesseract_urdf { -static const char* CYLINDER_ELEMENT_NAME = "cylinder"; // NOLINT +extern const char* CYLINDER_ELEMENT_NAME; /** * @brief Parse a xml cylinder element diff --git a/tesseract_urdf/include/tesseract_urdf/dynamics.h b/tesseract_urdf/include/tesseract_urdf/dynamics.h index 2fb00dde851..814467aee74 100644 --- a/tesseract_urdf/include/tesseract_urdf/dynamics.h +++ b/tesseract_urdf/include/tesseract_urdf/dynamics.h @@ -41,7 +41,7 @@ class XMLDocument; namespace tesseract_urdf { -static const char* DYNAMICS_ELEMENT_NAME = "dynamics"; // NOLINT +extern const char* DYNAMICS_ELEMENT_NAME; /** * @brief Parse a xml dynamics element diff --git a/tesseract_urdf/include/tesseract_urdf/geometry.h b/tesseract_urdf/include/tesseract_urdf/geometry.h index 18e8bdb45e2..af7344e7229 100644 --- a/tesseract_urdf/include/tesseract_urdf/geometry.h +++ b/tesseract_urdf/include/tesseract_urdf/geometry.h @@ -43,7 +43,7 @@ class XMLDocument; namespace tesseract_urdf { -static const char* GEOMETRY_ELEMENT_NAME = "geometry"; // NOLINT +extern const char* GEOMETRY_ELEMENT_NAME; /** * @brief Parse xml element geometry diff --git a/tesseract_urdf/include/tesseract_urdf/inertial.h b/tesseract_urdf/include/tesseract_urdf/inertial.h index 4779d6f7289..0eb42db52d6 100644 --- a/tesseract_urdf/include/tesseract_urdf/inertial.h +++ b/tesseract_urdf/include/tesseract_urdf/inertial.h @@ -41,7 +41,7 @@ class XMLDocument; namespace tesseract_urdf { -static const char* INERTIAL_ELEMENT_NAME = "inertial"; // NOLINT +extern const char* INERTIAL_ELEMENT_NAME; /** * @brief Parse xml element inertial diff --git a/tesseract_urdf/include/tesseract_urdf/joint.h b/tesseract_urdf/include/tesseract_urdf/joint.h index 1cb4182774a..0c357563de5 100644 --- a/tesseract_urdf/include/tesseract_urdf/joint.h +++ b/tesseract_urdf/include/tesseract_urdf/joint.h @@ -41,7 +41,7 @@ class XMLDocument; namespace tesseract_urdf { -static const char* JOINT_ELEMENT_NAME = "joint"; // NOLINT +extern const char* JOINT_ELEMENT_NAME; /** * @brief Parse xml element joint diff --git a/tesseract_urdf/include/tesseract_urdf/limits.h b/tesseract_urdf/include/tesseract_urdf/limits.h index 1a15bc69f74..93edb806bde 100644 --- a/tesseract_urdf/include/tesseract_urdf/limits.h +++ b/tesseract_urdf/include/tesseract_urdf/limits.h @@ -41,7 +41,7 @@ class XMLDocument; namespace tesseract_urdf { -static const char* LIMITS_ELEMENT_NAME = "limit"; // NOLINT +extern const char* LIMITS_ELEMENT_NAME; /** * @brief Parse xml element limits diff --git a/tesseract_urdf/include/tesseract_urdf/link.h b/tesseract_urdf/include/tesseract_urdf/link.h index ce05f65853f..fdf87ff6dde 100644 --- a/tesseract_urdf/include/tesseract_urdf/link.h +++ b/tesseract_urdf/include/tesseract_urdf/link.h @@ -43,7 +43,7 @@ class XMLDocument; namespace tesseract_urdf { -static const char* LINK_ELEMENT_NAME = "link"; // NOLINT +extern const char* LINK_ELEMENT_NAME; /** * @brief Parse xml element link diff --git a/tesseract_urdf/include/tesseract_urdf/material.h b/tesseract_urdf/include/tesseract_urdf/material.h index 1821fc56931..7e83fa2e8c5 100644 --- a/tesseract_urdf/include/tesseract_urdf/material.h +++ b/tesseract_urdf/include/tesseract_urdf/material.h @@ -42,7 +42,7 @@ class XMLDocument; namespace tesseract_urdf { -static const char* MATERIAL_ELEMENT_NAME = "material"; // NOLINT +extern const char* MATERIAL_ELEMENT_NAME; /** * @brief Parse xml element material diff --git a/tesseract_urdf/include/tesseract_urdf/mesh.h b/tesseract_urdf/include/tesseract_urdf/mesh.h index 049041d07e0..79db73cf923 100644 --- a/tesseract_urdf/include/tesseract_urdf/mesh.h +++ b/tesseract_urdf/include/tesseract_urdf/mesh.h @@ -43,7 +43,7 @@ class XMLDocument; namespace tesseract_urdf { -static const char* MESH_ELEMENT_NAME = "mesh"; // NOLINT +extern const char* MESH_ELEMENT_NAME; /** * @brief Parse xml element mesh diff --git a/tesseract_urdf/include/tesseract_urdf/mimic.h b/tesseract_urdf/include/tesseract_urdf/mimic.h index a7571a7a182..fbd1d8db444 100644 --- a/tesseract_urdf/include/tesseract_urdf/mimic.h +++ b/tesseract_urdf/include/tesseract_urdf/mimic.h @@ -41,7 +41,7 @@ class XMLDocument; namespace tesseract_urdf { -static const char* MIMIC_ELEMENT_NAME = "mimic"; // NOLINT +extern const char* MIMIC_ELEMENT_NAME; /** * @brief Parse xml element mimic diff --git a/tesseract_urdf/include/tesseract_urdf/octomap.h b/tesseract_urdf/include/tesseract_urdf/octomap.h index 2d1e7f2474a..4a1dcdd82cd 100644 --- a/tesseract_urdf/include/tesseract_urdf/octomap.h +++ b/tesseract_urdf/include/tesseract_urdf/octomap.h @@ -42,7 +42,7 @@ class XMLDocument; namespace tesseract_urdf { -static const char* OCTOMAP_ELEMENT_NAME = "tesseract:octomap"; // NOLINT +extern const char* OCTOMAP_ELEMENT_NAME; /** * @brief Parse xml element octomap diff --git a/tesseract_urdf/include/tesseract_urdf/octree.h b/tesseract_urdf/include/tesseract_urdf/octree.h index 843869914cc..0a840d8e77e 100644 --- a/tesseract_urdf/include/tesseract_urdf/octree.h +++ b/tesseract_urdf/include/tesseract_urdf/octree.h @@ -42,7 +42,7 @@ class XMLDocument; namespace tesseract_urdf { -static const char* OCTREE_ELEMENT_NAME = "tesseract:octree"; // NOLINT +extern const char* OCTREE_ELEMENT_NAME; /** * @brief Parse xml element octree diff --git a/tesseract_urdf/include/tesseract_urdf/origin.h b/tesseract_urdf/include/tesseract_urdf/origin.h index 05f986507a2..20f427a62b0 100644 --- a/tesseract_urdf/include/tesseract_urdf/origin.h +++ b/tesseract_urdf/include/tesseract_urdf/origin.h @@ -39,7 +39,7 @@ class XMLDocument; namespace tesseract_urdf { -static const char* ORIGIN_ELEMENT_NAME = "origin"; // NOLINT +extern const char* ORIGIN_ELEMENT_NAME; /** * @brief Parse xml element origin diff --git a/tesseract_urdf/include/tesseract_urdf/point_cloud.h b/tesseract_urdf/include/tesseract_urdf/point_cloud.h index 312c9de07c7..af30e1bd48a 100644 --- a/tesseract_urdf/include/tesseract_urdf/point_cloud.h +++ b/tesseract_urdf/include/tesseract_urdf/point_cloud.h @@ -42,7 +42,7 @@ class XMLDocument; namespace tesseract_urdf { -static const char* POINT_CLOUD_ELEMENT_NAME = "tesseract:point_cloud"; // NOLINT +extern const char* POINT_CLOUD_ELEMENT_NAME; /** * @brief Parse xml element point_cloud diff --git a/tesseract_urdf/include/tesseract_urdf/safety_controller.h b/tesseract_urdf/include/tesseract_urdf/safety_controller.h index 323d72d6b4a..f7e39d5258b 100644 --- a/tesseract_urdf/include/tesseract_urdf/safety_controller.h +++ b/tesseract_urdf/include/tesseract_urdf/safety_controller.h @@ -41,7 +41,7 @@ class XMLDocument; namespace tesseract_urdf { -static const char* SAFETY_CONTROLLER_ELEMENT_NAME = "safety_controller"; // NOLINT +extern const char* SAFETY_CONTROLLER_ELEMENT_NAME; /** * @brief Parse xml element safety_controller diff --git a/tesseract_urdf/include/tesseract_urdf/sdf_mesh.h b/tesseract_urdf/include/tesseract_urdf/sdf_mesh.h index a1f501b27f4..28a3e375321 100644 --- a/tesseract_urdf/include/tesseract_urdf/sdf_mesh.h +++ b/tesseract_urdf/include/tesseract_urdf/sdf_mesh.h @@ -42,7 +42,7 @@ class XMLDocument; namespace tesseract_urdf { -static const char* SDF_MESH_ELEMENT_NAME = "tesseract:sdf_mesh"; // NOLINT +extern const char* SDF_MESH_ELEMENT_NAME; /** * @brief Parse xml element sdf_mesh diff --git a/tesseract_urdf/include/tesseract_urdf/sphere.h b/tesseract_urdf/include/tesseract_urdf/sphere.h index d31aa48e44b..c43d9dc630f 100644 --- a/tesseract_urdf/include/tesseract_urdf/sphere.h +++ b/tesseract_urdf/include/tesseract_urdf/sphere.h @@ -41,7 +41,7 @@ class XMLDocument; namespace tesseract_urdf { -static const char* SPHERE_ELEMENT_NAME = "sphere"; // NOLINT +extern const char* SPHERE_ELEMENT_NAME; /** * @brief Parse a xml sphere element diff --git a/tesseract_urdf/include/tesseract_urdf/visual.h b/tesseract_urdf/include/tesseract_urdf/visual.h index 481696c0238..9f69231174d 100644 --- a/tesseract_urdf/include/tesseract_urdf/visual.h +++ b/tesseract_urdf/include/tesseract_urdf/visual.h @@ -44,7 +44,7 @@ class XMLDocument; namespace tesseract_urdf { -static const char* VISUAL_ELEMENT_NAME = "visual"; // NOLINT +extern const char* VISUAL_ELEMENT_NAME; /** * @brief Parse xml element visual diff --git a/tesseract_urdf/src/box.cpp b/tesseract_urdf/src/box.cpp index c352ab6aff2..039fe20d27e 100644 --- a/tesseract_urdf/src/box.cpp +++ b/tesseract_urdf/src/box.cpp @@ -38,6 +38,8 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP namespace tesseract_urdf { +const char* BOX_ELEMENT_NAME = "box"; + tesseract_geometry::Box::Ptr parseBox(const tinyxml2::XMLElement* xml_element) { std::string size_string; diff --git a/tesseract_urdf/src/calibration.cpp b/tesseract_urdf/src/calibration.cpp index a5ea6d28d5a..65a1106cafb 100644 --- a/tesseract_urdf/src/calibration.cpp +++ b/tesseract_urdf/src/calibration.cpp @@ -38,6 +38,8 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP namespace tesseract_urdf { +const char* CALIBRATION_ELEMENT_NAME = "calibration"; + tesseract_scene_graph::JointCalibration::Ptr parseCalibration(const tinyxml2::XMLElement* xml_element) { if (xml_element->Attribute("rising") == nullptr && xml_element->Attribute("falling") == nullptr) diff --git a/tesseract_urdf/src/capsule.cpp b/tesseract_urdf/src/capsule.cpp index 75bf1bab94d..6080942f6e4 100644 --- a/tesseract_urdf/src/capsule.cpp +++ b/tesseract_urdf/src/capsule.cpp @@ -37,6 +37,8 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP namespace tesseract_urdf { +const char* CAPSULE_ELEMENT_NAME = "tesseract:capsule"; + tesseract_geometry::Capsule::Ptr parseCapsule(const tinyxml2::XMLElement* xml_element) { double r{ 0 }, l{ 0 }; diff --git a/tesseract_urdf/src/collision.cpp b/tesseract_urdf/src/collision.cpp index c3a5b1a25bb..01ed67a677d 100644 --- a/tesseract_urdf/src/collision.cpp +++ b/tesseract_urdf/src/collision.cpp @@ -42,6 +42,8 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP namespace tesseract_urdf { +const char* COLLISION_ELEMENT_NAME = "collision"; + tesseract_scene_graph::Collision::Ptr parseCollision(const tinyxml2::XMLElement* xml_element, const tesseract_common::ResourceLocator& locator, bool make_convex_meshes) diff --git a/tesseract_urdf/src/cone.cpp b/tesseract_urdf/src/cone.cpp index 7b6ac4a7a97..f5eec632a04 100644 --- a/tesseract_urdf/src/cone.cpp +++ b/tesseract_urdf/src/cone.cpp @@ -37,6 +37,8 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP namespace tesseract_urdf { +const char* CONE_ELEMENT_NAME = "tesseract:cone"; + tesseract_geometry::Cone::Ptr parseCone(const tinyxml2::XMLElement* xml_element) { double r{ 0 }, l{ 0 }; diff --git a/tesseract_urdf/src/cylinder.cpp b/tesseract_urdf/src/cylinder.cpp index 0295571e677..e586db989dc 100644 --- a/tesseract_urdf/src/cylinder.cpp +++ b/tesseract_urdf/src/cylinder.cpp @@ -37,6 +37,8 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP namespace tesseract_urdf { +const char* CYLINDER_ELEMENT_NAME = "cylinder"; + tesseract_geometry::Cylinder::Ptr parseCylinder(const tinyxml2::XMLElement* xml_element) { double r{ 0 }, l{ 0 }; diff --git a/tesseract_urdf/src/dynamics.cpp b/tesseract_urdf/src/dynamics.cpp index e28d214c656..94aa12e6218 100644 --- a/tesseract_urdf/src/dynamics.cpp +++ b/tesseract_urdf/src/dynamics.cpp @@ -38,6 +38,8 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP namespace tesseract_urdf { +const char* DYNAMICS_ELEMENT_NAME = "dynamics"; + tesseract_scene_graph::JointDynamics::Ptr parseDynamics(const tinyxml2::XMLElement* xml_element) { if (xml_element->Attribute("damping") == nullptr && xml_element->Attribute("friction") == nullptr) diff --git a/tesseract_urdf/src/geometry.cpp b/tesseract_urdf/src/geometry.cpp index 7fd2d7e63ab..624463140e8 100644 --- a/tesseract_urdf/src/geometry.cpp +++ b/tesseract_urdf/src/geometry.cpp @@ -48,6 +48,8 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP namespace tesseract_urdf { +const char* GEOMETRY_ELEMENT_NAME = "geometry"; + tesseract_geometry::Geometry::Ptr parseGeometry(const tinyxml2::XMLElement* xml_element, const tesseract_common::ResourceLocator& locator, bool visual, diff --git a/tesseract_urdf/src/inertial.cpp b/tesseract_urdf/src/inertial.cpp index a4922f42351..c0c7c0d9909 100644 --- a/tesseract_urdf/src/inertial.cpp +++ b/tesseract_urdf/src/inertial.cpp @@ -38,6 +38,8 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP namespace tesseract_urdf { +const char* INERTIAL_ELEMENT_NAME = "inertial"; + tesseract_scene_graph::Inertial::Ptr parseInertial(const tinyxml2::XMLElement* xml_element) { auto inertial = std::make_shared(); diff --git a/tesseract_urdf/src/joint.cpp b/tesseract_urdf/src/joint.cpp index bae0145b1cf..07f1d4413f4 100644 --- a/tesseract_urdf/src/joint.cpp +++ b/tesseract_urdf/src/joint.cpp @@ -45,6 +45,8 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP namespace tesseract_urdf { +const char* JOINT_ELEMENT_NAME = "joint"; + tesseract_scene_graph::Joint::Ptr parseJoint(const tinyxml2::XMLElement* xml_element) { // get joint name diff --git a/tesseract_urdf/src/limits.cpp b/tesseract_urdf/src/limits.cpp index eb2d29e9398..0d688ec9cde 100644 --- a/tesseract_urdf/src/limits.cpp +++ b/tesseract_urdf/src/limits.cpp @@ -38,6 +38,8 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP namespace tesseract_urdf { +const char* LIMITS_ELEMENT_NAME = "limit"; + tesseract_scene_graph::JointLimits::Ptr parseLimits(const tinyxml2::XMLElement* xml_element) { auto limits = std::make_shared(); diff --git a/tesseract_urdf/src/link.cpp b/tesseract_urdf/src/link.cpp index 96606caede6..c02fbe87821 100644 --- a/tesseract_urdf/src/link.cpp +++ b/tesseract_urdf/src/link.cpp @@ -43,6 +43,8 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP namespace tesseract_urdf { +const char* LINK_ELEMENT_NAME = "link"; + tesseract_scene_graph::Link::Ptr parseLink(const tinyxml2::XMLElement* xml_element, const tesseract_common::ResourceLocator& locator, diff --git a/tesseract_urdf/src/material.cpp b/tesseract_urdf/src/material.cpp index 1aef61fa7bb..fd10f80f474 100644 --- a/tesseract_urdf/src/material.cpp +++ b/tesseract_urdf/src/material.cpp @@ -41,6 +41,8 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP namespace tesseract_urdf { +const char* MATERIAL_ELEMENT_NAME = "material"; + tesseract_scene_graph::Material::Ptr parseMaterial(const tinyxml2::XMLElement* xml_element, std::unordered_map& available_materials, diff --git a/tesseract_urdf/src/mesh.cpp b/tesseract_urdf/src/mesh.cpp index 4ac3e147593..9d95f50947b 100644 --- a/tesseract_urdf/src/mesh.cpp +++ b/tesseract_urdf/src/mesh.cpp @@ -44,6 +44,8 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP namespace tesseract_urdf { +const char* MESH_ELEMENT_NAME = "mesh"; + std::vector parseMesh(const tinyxml2::XMLElement* xml_element, const tesseract_common::ResourceLocator& locator, bool visual, diff --git a/tesseract_urdf/src/mimic.cpp b/tesseract_urdf/src/mimic.cpp index 3c8a1704186..51a4289d2ca 100644 --- a/tesseract_urdf/src/mimic.cpp +++ b/tesseract_urdf/src/mimic.cpp @@ -39,6 +39,8 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP namespace tesseract_urdf { +const char* MIMIC_ELEMENT_NAME = "mimic"; + tesseract_scene_graph::JointMimic::Ptr parseMimic(const tinyxml2::XMLElement* xml_element) { auto m = std::make_shared(); diff --git a/tesseract_urdf/src/octomap.cpp b/tesseract_urdf/src/octomap.cpp index 97fa7bcf927..e45123fd993 100644 --- a/tesseract_urdf/src/octomap.cpp +++ b/tesseract_urdf/src/octomap.cpp @@ -44,6 +44,8 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP namespace tesseract_urdf { +const char* OCTOMAP_ELEMENT_NAME = "tesseract:octomap"; + tesseract_geometry::Octree::Ptr parseOctomap(const tinyxml2::XMLElement* xml_element, const tesseract_common::ResourceLocator& locator, const bool /*visual*/) diff --git a/tesseract_urdf/src/octree.cpp b/tesseract_urdf/src/octree.cpp index a0a6f87d473..a7767f9bb3c 100644 --- a/tesseract_urdf/src/octree.cpp +++ b/tesseract_urdf/src/octree.cpp @@ -42,6 +42,8 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP namespace tesseract_urdf { +const char* OCTREE_ELEMENT_NAME = "tesseract:octree"; + tesseract_geometry::Octree::Ptr parseOctree(const tinyxml2::XMLElement* xml_element, const tesseract_common::ResourceLocator& locator, tesseract_geometry::OctreeSubType shape_type, diff --git a/tesseract_urdf/src/origin.cpp b/tesseract_urdf/src/origin.cpp index 1fd972ad195..e711b4c481d 100644 --- a/tesseract_urdf/src/origin.cpp +++ b/tesseract_urdf/src/origin.cpp @@ -39,6 +39,8 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP namespace tesseract_urdf { +const char* ORIGIN_ELEMENT_NAME = "origin"; + Eigen::Isometry3d parseOrigin(const tinyxml2::XMLElement* xml_element) { Eigen::Isometry3d origin = Eigen::Isometry3d::Identity(); diff --git a/tesseract_urdf/src/point_cloud.cpp b/tesseract_urdf/src/point_cloud.cpp index 17193ec7cbe..d1a474d865f 100644 --- a/tesseract_urdf/src/point_cloud.cpp +++ b/tesseract_urdf/src/point_cloud.cpp @@ -42,6 +42,8 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP namespace tesseract_urdf { +const char* POINT_CLOUD_ELEMENT_NAME = "tesseract:point_cloud"; + tesseract_geometry::Octree::Ptr parsePointCloud(const tinyxml2::XMLElement* xml_element, const tesseract_common::ResourceLocator& locator, tesseract_geometry::OctreeSubType shape_type, diff --git a/tesseract_urdf/src/safety_controller.cpp b/tesseract_urdf/src/safety_controller.cpp index de8fde7dfcc..f863e8421b1 100644 --- a/tesseract_urdf/src/safety_controller.cpp +++ b/tesseract_urdf/src/safety_controller.cpp @@ -38,6 +38,8 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP namespace tesseract_urdf { +const char* SAFETY_CONTROLLER_ELEMENT_NAME = "safety_controller"; + tesseract_scene_graph::JointSafety::Ptr parseSafetyController(const tinyxml2::XMLElement* xml_element) { auto s = std::make_shared(); diff --git a/tesseract_urdf/src/sdf_mesh.cpp b/tesseract_urdf/src/sdf_mesh.cpp index 92614090e50..040fd2f10e8 100644 --- a/tesseract_urdf/src/sdf_mesh.cpp +++ b/tesseract_urdf/src/sdf_mesh.cpp @@ -43,6 +43,8 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP namespace tesseract_urdf { +const char* SDF_MESH_ELEMENT_NAME = "tesseract:sdf_mesh"; + std::vector parseSDFMesh(const tinyxml2::XMLElement* xml_element, const tesseract_common::ResourceLocator& locator, bool visual) diff --git a/tesseract_urdf/src/sphere.cpp b/tesseract_urdf/src/sphere.cpp index 1f55e81e6e0..5a493675646 100644 --- a/tesseract_urdf/src/sphere.cpp +++ b/tesseract_urdf/src/sphere.cpp @@ -37,6 +37,8 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP namespace tesseract_urdf { +const char* SPHERE_ELEMENT_NAME = "sphere"; + tesseract_geometry::Sphere::Ptr parseSphere(const tinyxml2::XMLElement* xml_element) { double radius{ 0 }; diff --git a/tesseract_urdf/src/visual.cpp b/tesseract_urdf/src/visual.cpp index 12c13c5bc4e..2c4b3629ec5 100644 --- a/tesseract_urdf/src/visual.cpp +++ b/tesseract_urdf/src/visual.cpp @@ -43,6 +43,8 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP namespace tesseract_urdf { +const char* VISUAL_ELEMENT_NAME = "visual"; + tesseract_scene_graph::Visual::Ptr parseVisual(const tinyxml2::XMLElement* xml_element, const tesseract_common::ResourceLocator& locator,