Skip to content

Update URDF parser to use Tesseract XML namespace #1081

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tesseract_support/urdf/abb_irb2400.urdf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- | This document was autogenerated by xacro from irb2400.xacro | -->
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
<!-- =================================================================================== -->
<robot name="abb_irb2400" xmlns:xacro="http://ros.org/wiki/xacro">
<robot name="abb_irb2400" xmlns:xacro="http://ros.org/wiki/xacro" tesseract:make_convex="true">
<!-- Conversion were obtained from http://www.e-paint.co.uk/Lab_values.asp
unless otherwise stated. -->
<!-- Actual colors -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- | This document was autogenerated by xacro from irb2400.xacro | -->
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
<!-- =================================================================================== -->
<robot name="abb_irb2400_external_positioner" xmlns:xacro="http://ros.org/wiki/xacro">
<robot name="abb_irb2400_external_positioner" xmlns:xacro="http://ros.org/wiki/xacro" tesseract:make_convex="true">
<!-- Conversion were obtained from http://www.e-paint.co.uk/Lab_values.asp
unless otherwise stated. -->
<!-- Actual colors -->
Expand Down
2 changes: 1 addition & 1 deletion tesseract_support/urdf/abb_irb2400_on_positioner.urdf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- | This document was autogenerated by xacro from irb2400.xacro | -->
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
<!-- =================================================================================== -->
<robot name="abb_irb2400_on_positioner" xmlns:xacro="http://ros.org/wiki/xacro">
<robot name="abb_irb2400_on_positioner" xmlns:xacro="http://ros.org/wiki/xacro" tesseract:make_convex="true">
<!-- Conversion were obtained from http://www.e-paint.co.uk/Lab_values.asp
unless otherwise stated. -->
<!-- Actual colors -->
Expand Down
2 changes: 1 addition & 1 deletion tesseract_support/urdf/boxbot.urdf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- | This document was autogenerated by xacro from boxbot.xacro | -->
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
<!-- =================================================================================== -->
<robot name="boxbot" xmlns:xacro="http://ros.org/wiki/xacro">
<robot name="boxbot" xmlns:xacro="http://ros.org/wiki/xacro" tesseract:make_convex="true">
<link name="base_link"/>
<link name="boxbot_linkX"/>
<link name="boxbot_linkY"/>
Expand Down
2 changes: 1 addition & 1 deletion tesseract_support/urdf/car_seat_demo.urdf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- | This document was autogenerated by xacro from car_seat_demo.xacro | -->
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
<!-- =================================================================================== -->
<robot name="car_seat_demo">
<robot name="car_seat_demo" tesseract:make_convex="true">
<!-- link list -->
<link name="base_link">
<visual>
Expand Down
2 changes: 1 addition & 1 deletion tesseract_support/urdf/car_seat_demo.xacro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
<robot name="car_seat_demo" xmlns:xacro="http://ros.org/wiki/xacro">
<robot name="car_seat_demo" xmlns:xacro="http://ros.org/wiki/xacro" tesseract:make_convex="true">
<xacro:include filename="$(find tesseract_support)/urdf/sia20d_macro.xacro"/>
<xacro:motoman_sia20d prefix=""/>
<xacro:include filename="$(find tesseract_support)/urdf/car_seat_demo_macro.xacro"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<robot name="gudel" xmlns:xacro="http://wiki.ros.org/xacro">
<robot name="gudel" xmlns:xacro="http://wiki.ros.org/xacro" tesseract:make_convex="true">
<xacro:include filename="$(find tesseract_support)/urdf/gantry_robot_underslung/gudel_fp6_macro.xacro"/>
<xacro:gudel_fp6 prefix=""/>
</robot>
2 changes: 1 addition & 1 deletion tesseract_support/urdf/iiwa7.urdf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<robot name="kuka_liwa_7" xmlns:xacro="http://wiki.ros.org/xacro">
<robot name="kuka_liwa_7" xmlns:xacro="http://wiki.ros.org/xacro" tesseract:make_convex="true">
<!-- link list -->
<link name="link_0">
<visual>
Expand Down
2 changes: 1 addition & 1 deletion tesseract_support/urdf/lbr_iiwa_14_r820.urdf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- | This document was autogenerated by xacro from lbr_iiwa_14_r820.xacro | -->
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
<!-- =================================================================================== -->
<robot name="kuka_lbr_iiwa_14_r820" xmlns:xacro="http://wiki.ros.org/xacro">
<robot name="kuka_lbr_iiwa_14_r820" xmlns:xacro="http://wiki.ros.org/xacro" tesseract:make_convex="true">
<!-- link list -->
<link name="base_link">
<visual>
Expand Down
2 changes: 1 addition & 1 deletion tesseract_support/urdf/lbr_iiwa_14_r820.xacro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
<robot name="kuka_lbr_iiwa_14_r820" xmlns:xacro="http://wiki.ros.org/xacro">
<robot name="kuka_lbr_iiwa_14_r820" xmlns:xacro="http://wiki.ros.org/xacro" tesseract:make_convex="true">
<xacro:include filename="$(find tesseract_support)/urdf/lbr_iiwa_14_r820_macro.xacro"/>
<xacro:kuka_lbr_iiwa_14_r820 prefix=""/>
</robot>
2 changes: 1 addition & 1 deletion tesseract_support/urdf/online_planning_example.urdf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- | This document was autogenerated by xacro from online_planning_example.xacro | -->
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
<!-- =================================================================================== -->
<robot name="online_planning_example">
<robot name="online_planning_example" tesseract:make_convex="true">
<!-- Conversion were obtained from http://www.e-paint.co.uk/Lab_values.asp
unless otherwise stated. -->
<!-- Actual colors -->
Expand Down
2 changes: 1 addition & 1 deletion tesseract_support/urdf/online_planning_example.xacro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<robot name="online_planning_example" xmlns:xacro="http://wiki.ros.org/xacro">
<robot name="online_planning_example" xmlns:xacro="http://wiki.ros.org/xacro" tesseract:make_convex="true">

<xacro:include filename="$(find tesseract_support)/urdf/gantry_robot_underslung/gantry_robot_underslung.xacro"/>

Expand Down
2 changes: 1 addition & 1 deletion tesseract_support/urdf/pick_and_place_plan.urdf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- | This document was autogenerated by xacro from pick_and_place_plan.xacro | -->
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
<!-- =================================================================================== -->
<robot name="robot">
<robot name="robot" tesseract:make_convex="true">
<!-- Create links -->
<link name="world"/>
<link name="base_link"/>
Expand Down
2 changes: 1 addition & 1 deletion tesseract_support/urdf/pick_and_place_plan.xacro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
<robot name="robot" xmlns:xacro="http://www.ros.org/wiki/xacro">
<robot name="robot" xmlns:xacro="http://www.ros.org/wiki/xacro" tesseract:make_convex="true">
<!-- Create links -->
<link name="world"/>
<link name="base_link"/>
Expand Down
2 changes: 1 addition & 1 deletion tesseract_support/urdf/puzzle_piece_workcell.urdf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- | This document was autogenerated by xacro from puzzle_piece_workcell.xacro | -->
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
<!-- =================================================================================== -->
<robot name="puzzle_piece_workcell">
<robot name="puzzle_piece_workcell" tesseract:make_convex="true">
<link name="world"/>
<link name="table">
<visual>
Expand Down
2 changes: 1 addition & 1 deletion tesseract_support/urdf/puzzle_piece_workcell.xacro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
<robot name="puzzle_piece_workcell" xmlns:xacro="http://wiki.ros.org/xacro">
<robot name="puzzle_piece_workcell" xmlns:xacro="http://wiki.ros.org/xacro" tesseract:make_convex="true">
<xacro:include filename="$(find tesseract_support)/urdf/lbr_iiwa_14_r820_macro.xacro" />

<!-- This contains the macro "ses_part_macro" that places the clip wrt the tool tip -->
Expand Down
2 changes: 1 addition & 1 deletion tesseract_support/urdf/scene_graph_example.urdf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- | This document was autogenerated by xacro from scene_graph_example.xacro | -->
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
<!-- =================================================================================== -->
<robot name="irb2400_iiwa_cowork">
<robot name="irb2400_iiwa_cowork" tesseract:make_convex="true">
<!-- Conversion were obtained from http://www.e-paint.co.uk/Lab_values.asp
unless otherwise stated. -->
<!-- Actual colors -->
Expand Down
2 changes: 1 addition & 1 deletion tesseract_support/urdf/scene_graph_example.xacro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
<robot name="irb2400_iiwa_cowork" xmlns:xacro="http://wiki.ros.org/xacro">
<robot name="irb2400_iiwa_cowork" xmlns:xacro="http://wiki.ros.org/xacro" tesseract:make_convex="true">
<xacro:include filename="$(find tesseract_support)/urdf/lbr_iiwa_14_r820_macro.xacro" />
<xacro:include filename="$(find tesseract_support)/urdf/abb_irb2400.urdf" />

Expand Down
2 changes: 1 addition & 1 deletion tesseract_support/urdf/sia20d.xacro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" ?>

<robot name="motoman_sia20d" xmlns:xacro="http://ros.org/wiki/xacro">
<robot name="motoman_sia20d" xmlns:xacro="http://ros.org/wiki/xacro" tesseract:make_convex="true">
<xacro:include filename="$(find tesseract_support)/urdf/sia20d_macro.xacro" />
<xacro:motoman_sia20d prefix=""/>
</robot>
Expand Down
1 change: 0 additions & 1 deletion tesseract_urdf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ add_library(
src/capsule.cpp
src/collision.cpp
src/cone.cpp
src/convex_mesh.cpp
src/cylinder.cpp
src/dynamics.cpp
src/geometry.cpp
Expand Down
5 changes: 4 additions & 1 deletion tesseract_urdf/include/tesseract_urdf/box.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <tesseract_common/macros.h>
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#include <memory>
#include <string_view>
TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_geometry/fwd.h>
Expand All @@ -41,12 +42,14 @@ class XMLDocument;

namespace tesseract_urdf
{
static constexpr std::string_view BOX_ELEMENT_NAME = "box";

/**
* @brief Parse a xml box element
* @param xml_element The xml element
* @return Tesseract Geometry Box
*/
std::shared_ptr<tesseract_geometry::Box> parseBox(const tinyxml2::XMLElement* xml_element, int version);
std::shared_ptr<tesseract_geometry::Box> parseBox(const tinyxml2::XMLElement* xml_element);

tinyxml2::XMLElement* writeBox(const std::shared_ptr<const tesseract_geometry::Box>& box, tinyxml2::XMLDocument& doc);

Expand Down
6 changes: 4 additions & 2 deletions tesseract_urdf/include/tesseract_urdf/calibration.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <tesseract_common/macros.h>
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#include <memory>
#include <string_view>
TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_scene_graph/fwd.h>
Expand All @@ -41,13 +42,14 @@ class XMLDocument;

namespace tesseract_urdf
{
static constexpr std::string_view CALIBRATION_ELEMENT_NAME = "calibration";

/**
* @brief Parse a xml calibration element
* @param xml_element The xml element
* @return Tesseract JointCalibration
*/
std::shared_ptr<tesseract_scene_graph::JointCalibration> parseCalibration(const tinyxml2::XMLElement* xml_element,
int version);
std::shared_ptr<tesseract_scene_graph::JointCalibration> parseCalibration(const tinyxml2::XMLElement* xml_element);

tinyxml2::XMLElement*
writeCalibration(const std::shared_ptr<const tesseract_scene_graph::JointCalibration>& calibration,
Expand Down
5 changes: 4 additions & 1 deletion tesseract_urdf/include/tesseract_urdf/capsule.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <tesseract_common/macros.h>
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#include <memory>
#include <string_view>
TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_geometry/fwd.h>
Expand All @@ -41,12 +42,14 @@ class XMLDocument;

namespace tesseract_urdf
{
static constexpr std::string_view CAPSULE_ELEMENT_NAME = "tesseract:capsule";

/**
* @brief Parse a xml capsule element
* @param xml_element The xml element
* @return Tesseract Geometry Capsule
*/
std::shared_ptr<tesseract_geometry::Capsule> parseCapsule(const tinyxml2::XMLElement* xml_element, int version);
std::shared_ptr<tesseract_geometry::Capsule> parseCapsule(const tinyxml2::XMLElement* xml_element);

tinyxml2::XMLElement* writeCapsule(const std::shared_ptr<const tesseract_geometry::Capsule>& capsule,
tinyxml2::XMLDocument& doc);
Expand Down
8 changes: 5 additions & 3 deletions tesseract_urdf/include/tesseract_urdf/collision.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <tesseract_common/macros.h>
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#include <memory>
#include <vector>
#include <string_view>
TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_common/fwd.h>
Expand All @@ -43,16 +43,18 @@ class XMLDocument;

namespace tesseract_urdf
{
static constexpr std::string_view COLLISION_ELEMENT_NAME = "collision";

/**
* @brief Parse xml element collision
* @param xml_element The xml element
* @param locator The Tesseract resource locator
* @param version The version number
* @param make_convex_meshes Flag to indicate if the meshes should be converted to convex hulls
* @return A Collision object
*/
std::shared_ptr<tesseract_scene_graph::Collision> parseCollision(const tinyxml2::XMLElement* xml_element,
const tesseract_common::ResourceLocator& locator,
int version);
bool make_convex_meshes);

/**
* @brief writeCollision Write collision object to URDF XML
Expand Down
5 changes: 4 additions & 1 deletion tesseract_urdf/include/tesseract_urdf/cone.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <tesseract_common/macros.h>
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#include <memory>
#include <string_view>
TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_geometry/fwd.h>
Expand All @@ -41,12 +42,14 @@ class XMLDocument;

namespace tesseract_urdf
{
static constexpr std::string_view CONE_ELEMENT_NAME = "tesseract:cone";

/**
* @brief Parse a xml cone element
* @param xml_element The xml element
* @return Tesseract Geometry Cone
*/
std::shared_ptr<tesseract_geometry::Cone> parseCone(const tinyxml2::XMLElement* xml_element, int version);
std::shared_ptr<tesseract_geometry::Cone> parseCone(const tinyxml2::XMLElement* xml_element);

tinyxml2::XMLElement* writeCone(const std::shared_ptr<const tesseract_geometry::Cone>& cone,
tinyxml2::XMLDocument& doc);
Expand Down
77 changes: 0 additions & 77 deletions tesseract_urdf/include/tesseract_urdf/convex_mesh.h

This file was deleted.

5 changes: 4 additions & 1 deletion tesseract_urdf/include/tesseract_urdf/cylinder.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <tesseract_common/macros.h>
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#include <memory>
#include <string_view>
TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_geometry/fwd.h>
Expand All @@ -41,12 +42,14 @@ class XMLDocument;

namespace tesseract_urdf
{
static constexpr std::string_view CYLINDER_ELEMENT_NAME = "cylinder";

/**
* @brief Parse a xml cylinder element
* @param xml_element The xml element
* @return Tesseract Geometry Cylinder
*/
std::shared_ptr<tesseract_geometry::Cylinder> parseCylinder(const tinyxml2::XMLElement* xml_element, int version);
std::shared_ptr<tesseract_geometry::Cylinder> parseCylinder(const tinyxml2::XMLElement* xml_element);

tinyxml2::XMLElement* writeCylinder(const std::shared_ptr<const tesseract_geometry::Cylinder>& cylinder,
tinyxml2::XMLDocument& doc);
Expand Down
Loading
Loading