From f0f9bcc7735095dafdce1b331a6cc95197e5afaa Mon Sep 17 00:00:00 2001 From: Ioan Sucan Date: Tue, 21 Jan 2014 19:16:44 -0800 Subject: [PATCH 1/8] parse visual and collision names --- urdf_parser/src/link.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/urdf_parser/src/link.cpp b/urdf_parser/src/link.cpp index b69824ad..ffcf87e8 100644 --- a/urdf_parser/src/link.cpp +++ b/urdf_parser/src/link.cpp @@ -362,6 +362,10 @@ bool parseVisual(Visual &vis, TiXmlElement *config) if (!vis.geometry) return false; + const char *name_char = config->Attribute("name"); + if (name_char) + vis.name = name_char; + // Material TiXmlElement *mat = config->FirstChildElement("material"); if (mat) { @@ -405,6 +409,10 @@ bool parseCollision(Collision &col, TiXmlElement* config) if (!col.geometry) return false; + const char *name_char = config->Attribute("name"); + if (name_char) + col.name = name_char; + col.group_name = std::string("default"); const char *group_name_char = config->Attribute("group"); if (group_name_char) From a311b589d7e10150eba9c1383e7fa040eba9f77b Mon Sep 17 00:00:00 2001 From: Dave Coleman Date: Mon, 10 Feb 2014 16:42:14 +0900 Subject: [PATCH 2/8] Just rename a folder instead of contained files. --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 096c79d4..d2e030c5 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,7 @@ For now, the details of the URDF specifications reside on http://ros.org/wiki/ur This is not best practice for installing, but works. This version is for ROS Hydro but should be easily customized for future version of ROS: ``` -sudo mv /opt/ros/hydro/include/urdf_parser/exportdecl.h /opt/ros/hydro/include/urdf_parser/_exportdecl.h -sudo mv /opt/ros/hydro/include/urdf_parser/urdf_parser.h /opt/ros/hydro/include/urdf_parser/_urdf_parser.h +sudo mv /opt/ros/hydro/include/urdf_parser/ /opt/ros/hydro/include/_urdf_parser/ sudo mv /opt/ros/hydro/lib/liburdfdom_model.so /opt/ros/hydro/lib/_liburdfdom_model.so sudo mv /opt/ros/hydro/lib/liburdfdom_model_state.so /opt/ros/hydro/lib/_liburdfdom_model_state.so sudo mv /opt/ros/hydro/lib/liburdfdom_sensor.so /opt/ros/hydro/lib/_liburdfdom_sensor.so From 05a7ff59b0f0cddbee97b68d0d17d753c860c060 Mon Sep 17 00:00:00 2001 From: Dave Coleman Date: Mon, 10 Feb 2014 16:47:43 +0900 Subject: [PATCH 3/8] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index d2e030c5..e076e4d9 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,9 @@ For now, the details of the URDF specifications reside on http://ros.org/wiki/ur [![Build Status](https://travis-ci.org/ros/urdfdom.png)](https://travis-ci.org/ros/urdfdom) ### Installing from Source with ROS + +**Warning: this will break ABI compatibility with future /opt/ros updates through the debian package manager. Use at your own risk.** + This is not best practice for installing, but works. This version is for ROS Hydro but should be easily customized for future version of ROS: ``` From edf3751c8e57be5c4b055a2961a2b77263167d09 Mon Sep 17 00:00:00 2001 From: Dave Coleman Date: Mon, 10 Feb 2014 16:48:33 +0900 Subject: [PATCH 4/8] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e076e4d9..45157d74 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ For now, the details of the URDF specifications reside on http://ros.org/wiki/ur ### Installing from Source with ROS -**Warning: this will break ABI compatibility with future /opt/ros updates through the debian package manager. Use at your own risk.** +**Warning: this will break ABI compatibility with future /opt/ros updates through the debian package manager. This is a hack, use at your own risk.** This is not best practice for installing, but works. This version is for ROS Hydro but should be easily customized for future version of ROS: From bc1855cec8a5ad00421ec9e0ec1e6d917f0f2f68 Mon Sep 17 00:00:00 2001 From: Ioan Sucan Date: Sat, 15 Feb 2014 19:46:44 -0800 Subject: [PATCH 5/8] remove deprecated functionality --- CMakeLists.txt | 4 ++-- urdf_parser/src/link.cpp | 38 -------------------------------------- 2 files changed, 2 insertions(+), 40 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f89ea964..2ed60b87 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,8 +2,8 @@ cmake_minimum_required( VERSION 2.8 FATAL_ERROR ) project (urdfdom CXX C) set (URDF_MAJOR_VERSION 0) -set (URDF_MINOR_VERSION 2) -set (URDF_PATCH_VERSION 10) +set (URDF_MINOR_VERSION 3) +set (URDF_PATCH_VERSION 0) set (URDF_VERSION ${URDF_MAJOR_VERSION}.${URDF_MINOR_VERSION}.${URDF_PATCH_VERSION}) diff --git a/urdf_parser/src/link.cpp b/urdf_parser/src/link.cpp index 86dade36..b1b34b69 100644 --- a/urdf_parser/src/link.cpp +++ b/urdf_parser/src/link.cpp @@ -384,11 +384,6 @@ bool parseVisual(Visual &vis, TiXmlElement *config) } } - vis.group_name = std::string("default"); - const char *group_name_char = config->Attribute("group"); - if (group_name_char) - logWarn("The notion of a group name for visual tags is not supported by URDF."); - return true; } @@ -413,11 +408,6 @@ bool parseCollision(Collision &col, TiXmlElement* config) if (name_char) col.name = name_char; - col.group_name = std::string("default"); - const char *group_name_char = config->Attribute("group"); - if (group_name_char) - logWarn("The notion of a group name for collision tags is not supported by URDF."); - return true; } @@ -447,8 +437,6 @@ bool parseLink(Link &link, TiXmlElement* config) } // Multiple Visuals (optional) - // For backward compatibility, we fill the map from group_name to visual tag (for ROS Groovy); - // Please use the visual_array instead for (TiXmlElement* vis_xml = config->FirstChildElement("visual"); vis_xml; vis_xml = vis_xml->NextSiblingElement("visual")) { @@ -456,18 +444,6 @@ bool parseLink(Link &link, TiXmlElement* config) vis.reset(new Visual()); if (parseVisual(*vis, vis_xml)) { - boost::shared_ptr > > viss = link.getVisuals(vis->group_name); - if (!viss) - { - // group does not exist, create one and add to map - viss.reset(new std::vector >); - // new group name, create vector, add vector to map and add Visual to the vector - link.visual_groups.insert(make_pair(vis->group_name,viss)); - } - - // group exists, add Visual to the vector in the map - viss->push_back(vis); - link.visual_array.push_back(vis); } else @@ -484,26 +460,12 @@ bool parseLink(Link &link, TiXmlElement* config) link.visual = link.visual_array[0]; // Multiple Collisions (optional) - // For backward compatibility, we fill the map from group_name to collision tag (for ROS Groovy); - // Please use the collision_array instead for (TiXmlElement* col_xml = config->FirstChildElement("collision"); col_xml; col_xml = col_xml->NextSiblingElement("collision")) { boost::shared_ptr col; col.reset(new Collision()); if (parseCollision(*col, col_xml)) { - boost::shared_ptr > > cols = link.getCollisions(col->group_name); - - if (!cols) - { - // group does not exist, create one and add to map - cols.reset(new std::vector >); - // new group name, create vector, add vector to map and add Collision to the vector - link.collision_groups.insert(make_pair(col->group_name,cols)); - } - - // group exists, add Collision to the vector in the map - cols->push_back(col); link.collision_array.push_back(col); } else From 64084cd5fdc2a212bfed4ae914a8c4698a49cb39 Mon Sep 17 00:00:00 2001 From: Ioan Sucan Date: Sat, 15 Feb 2014 19:47:43 -0800 Subject: [PATCH 6/8] re-enable SOVERSION --- urdf_parser/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/urdf_parser/CMakeLists.txt b/urdf_parser/CMakeLists.txt index 6caf90a1..cd23331d 100644 --- a/urdf_parser/CMakeLists.txt +++ b/urdf_parser/CMakeLists.txt @@ -2,19 +2,19 @@ include_directories(include) add_library(urdfdom_world SHARED src/pose.cpp src/model.cpp src/link.cpp src/joint.cpp src/world.cpp) target_link_libraries(urdfdom_world ${tinyxml_libraries} ${console_bridge_LIBRARIES} ${Boost_LIBRARIES}) -#set_target_properties(urdfdom_world PROPERTIES SOVERSION 0.2) +set_target_properties(urdfdom_world PROPERTIES SOVERSION 0.2) add_library(urdfdom_model SHARED src/pose.cpp src/model.cpp src/link.cpp src/joint.cpp) target_link_libraries(urdfdom_model ${tinyxml_libraries} ${console_bridge_LIBRARIES} ${Boost_LIBRARIES}) -#set_target_properties(urdfdom_model PROPERTIES SOVERSION 0.2) +set_target_properties(urdfdom_model PROPERTIES SOVERSION 0.2) add_library(urdfdom_sensor SHARED src/urdf_sensor.cpp) target_link_libraries(urdfdom_sensor urdfdom_model ${tinyxml_libraries} ${console_bridge_LIBRARIES} ${Boost_LIBRARIES}) -#set_target_properties(urdfdom_sensor PROPERTIES SOVERSION 0.2) +set_target_properties(urdfdom_sensor PROPERTIES SOVERSION 0.2) add_library(urdfdom_model_state SHARED src/urdf_model_state.cpp src/twist.cpp) target_link_libraries(urdfdom_model_state ${tinyxml_libraries} ${console_bridge_LIBRARIES} ${Boost_LIBRARIES}) -#set_target_properties(urdfdom_model_state PROPERTIES SOVERSION 0.2) +set_target_properties(urdfdom_model_state PROPERTIES SOVERSION 0.2) # -------------------------------- From ad268df8103f397f2c4576224b5da2f14706634d Mon Sep 17 00:00:00 2001 From: Dirk Thomas Date: Fri, 14 Mar 2014 14:36:11 -0700 Subject: [PATCH 7/8] fix INCLUDE_DIRS and LIBRARIES variables when path contains spaces --- cmake/urdfdom-config.cmake.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/urdfdom-config.cmake.in b/cmake/urdfdom-config.cmake.in index d3bdbf8f..f56baa52 100644 --- a/cmake/urdfdom-config.cmake.in +++ b/cmake/urdfdom-config.cmake.in @@ -3,12 +3,12 @@ if (@PKG_NAME@_CONFIG_INCLUDED) endif() set(@PKG_NAME@_CONFIG_INCLUDED TRUE) -set(@PKG_NAME@_INCLUDE_DIRS @CMAKE_INSTALL_PREFIX@/include) +set(@PKG_NAME@_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include") foreach(lib @PKG_LIBRARIES@) set(onelib "${lib}-NOTFOUND") find_library(onelib ${lib} - PATHS @CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ + PATHS "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@" NO_DEFAULT_PATH ) if(NOT onelib) From e35d6f6156c6aa04ab6639ec57f49616b12b731a Mon Sep 17 00:00:00 2001 From: Jose Luis Rivero Date: Mon, 24 Mar 2014 21:34:46 +0100 Subject: [PATCH 8/8] Fix soname versions --- urdf_parser/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/urdf_parser/CMakeLists.txt b/urdf_parser/CMakeLists.txt index cd23331d..7ce2429d 100644 --- a/urdf_parser/CMakeLists.txt +++ b/urdf_parser/CMakeLists.txt @@ -2,19 +2,19 @@ include_directories(include) add_library(urdfdom_world SHARED src/pose.cpp src/model.cpp src/link.cpp src/joint.cpp src/world.cpp) target_link_libraries(urdfdom_world ${tinyxml_libraries} ${console_bridge_LIBRARIES} ${Boost_LIBRARIES}) -set_target_properties(urdfdom_world PROPERTIES SOVERSION 0.2) +set_target_properties(urdfdom_world PROPERTIES SOVERSION 0.3) add_library(urdfdom_model SHARED src/pose.cpp src/model.cpp src/link.cpp src/joint.cpp) target_link_libraries(urdfdom_model ${tinyxml_libraries} ${console_bridge_LIBRARIES} ${Boost_LIBRARIES}) -set_target_properties(urdfdom_model PROPERTIES SOVERSION 0.2) +set_target_properties(urdfdom_model PROPERTIES SOVERSION 0.3) add_library(urdfdom_sensor SHARED src/urdf_sensor.cpp) target_link_libraries(urdfdom_sensor urdfdom_model ${tinyxml_libraries} ${console_bridge_LIBRARIES} ${Boost_LIBRARIES}) -set_target_properties(urdfdom_sensor PROPERTIES SOVERSION 0.2) +set_target_properties(urdfdom_sensor PROPERTIES SOVERSION 0.3) add_library(urdfdom_model_state SHARED src/urdf_model_state.cpp src/twist.cpp) target_link_libraries(urdfdom_model_state ${tinyxml_libraries} ${console_bridge_LIBRARIES} ${Boost_LIBRARIES}) -set_target_properties(urdfdom_model_state PROPERTIES SOVERSION 0.2) +set_target_properties(urdfdom_model_state PROPERTIES SOVERSION 0.3) # --------------------------------