Skip to content

Commit

Permalink
Moved URDF element name definitions to source files
Browse files Browse the repository at this point in the history
  • Loading branch information
marip8 committed Jan 11, 2025
1 parent c7ab162 commit f7b1f72
Show file tree
Hide file tree
Showing 46 changed files with 69 additions and 23 deletions.
2 changes: 1 addition & 1 deletion tesseract_urdf/include/tesseract_urdf/box.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tesseract_urdf/include/tesseract_urdf/calibration.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tesseract_urdf/include/tesseract_urdf/capsule.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tesseract_urdf/include/tesseract_urdf/collision.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tesseract_urdf/include/tesseract_urdf/cone.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tesseract_urdf/include/tesseract_urdf/cylinder.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tesseract_urdf/include/tesseract_urdf/dynamics.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tesseract_urdf/include/tesseract_urdf/geometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tesseract_urdf/include/tesseract_urdf/inertial.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tesseract_urdf/include/tesseract_urdf/joint.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tesseract_urdf/include/tesseract_urdf/limits.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tesseract_urdf/include/tesseract_urdf/link.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tesseract_urdf/include/tesseract_urdf/material.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tesseract_urdf/include/tesseract_urdf/mesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tesseract_urdf/include/tesseract_urdf/mimic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tesseract_urdf/include/tesseract_urdf/octomap.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tesseract_urdf/include/tesseract_urdf/octree.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tesseract_urdf/include/tesseract_urdf/origin.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tesseract_urdf/include/tesseract_urdf/point_cloud.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tesseract_urdf/include/tesseract_urdf/safety_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tesseract_urdf/include/tesseract_urdf/sdf_mesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tesseract_urdf/include/tesseract_urdf/sphere.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tesseract_urdf/include/tesseract_urdf/visual.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions tesseract_urdf/src/box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions tesseract_urdf/src/calibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions tesseract_urdf/src/capsule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down
2 changes: 2 additions & 0 deletions tesseract_urdf/src/collision.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions tesseract_urdf/src/cone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down
2 changes: 2 additions & 0 deletions tesseract_urdf/src/cylinder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down
2 changes: 2 additions & 0 deletions tesseract_urdf/src/dynamics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions tesseract_urdf/src/geometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions tesseract_urdf/src/inertial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<tesseract_scene_graph::Inertial>();
Expand Down
2 changes: 2 additions & 0 deletions tesseract_urdf/src/joint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions tesseract_urdf/src/limits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<tesseract_scene_graph::JointLimits>();
Expand Down
2 changes: 2 additions & 0 deletions tesseract_urdf/src/link.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions tesseract_urdf/src/material.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string, tesseract_scene_graph::Material::Ptr>& available_materials,
Expand Down
2 changes: 2 additions & 0 deletions tesseract_urdf/src/mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP

namespace tesseract_urdf
{
const char* MESH_ELEMENT_NAME = "mesh";

std::vector<tesseract_geometry::PolygonMesh::Ptr> parseMesh(const tinyxml2::XMLElement* xml_element,
const tesseract_common::ResourceLocator& locator,
bool visual,
Expand Down
2 changes: 2 additions & 0 deletions tesseract_urdf/src/mimic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<tesseract_scene_graph::JointMimic>();
Expand Down
2 changes: 2 additions & 0 deletions tesseract_urdf/src/octomap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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*/)
Expand Down
2 changes: 2 additions & 0 deletions tesseract_urdf/src/octree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions tesseract_urdf/src/origin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions tesseract_urdf/src/point_cloud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions tesseract_urdf/src/safety_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<tesseract_scene_graph::JointSafety>();
Expand Down
2 changes: 2 additions & 0 deletions tesseract_urdf/src/sdf_mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP

namespace tesseract_urdf
{
const char* SDF_MESH_ELEMENT_NAME = "tesseract:sdf_mesh";

std::vector<tesseract_geometry::SDFMesh::Ptr> parseSDFMesh(const tinyxml2::XMLElement* xml_element,
const tesseract_common::ResourceLocator& locator,
bool visual)
Expand Down
Loading

0 comments on commit f7b1f72

Please sign in to comment.