Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
797fd4e6b2 |
8
.gitignore
vendored
8
.gitignore
vendored
@ -2,11 +2,3 @@
|
||||
/sdformat_1.4.11.tar.bz2
|
||||
/sdformat_2.0.0.tar.bz2
|
||||
/sdformat2_2.0.1.tar.bz2
|
||||
/sdformat-2.3.0.tar.bz2
|
||||
/sdformat-2.3.2.tar.bz2
|
||||
/sdformat-3.7.0.tar.bz2
|
||||
/sdformat-4.1.1.tar.bz2
|
||||
/sdformat-4.2.0.tar.bz2
|
||||
/sdformat-5.1.0.tar.bz2
|
||||
/sdformat-5.2.0.tar.bz2
|
||||
/sdformat-6.0.0.tar.bz2
|
||||
|
57
sdformat-1.4.10-gtest.patch
Normal file
57
sdformat-1.4.10-gtest.patch
Normal file
@ -0,0 +1,57 @@
|
||||
diff -up ./cmake/SDFUtils.cmake.gtest ./cmake/SDFUtils.cmake
|
||||
--- ./cmake/SDFUtils.cmake.gtest 2013-11-18 20:50:30.975458969 -0500
|
||||
+++ ./cmake/SDFUtils.cmake 2013-11-18 21:00:52.068647047 -0500
|
||||
@@ -102,17 +102,21 @@ macro (sdf_build_tests)
|
||||
add_executable(${BINARY_NAME} ${GTEST_SOURCE_file})
|
||||
|
||||
add_dependencies(${BINARY_NAME}
|
||||
- gtest gtest_main sdformat
|
||||
- ${tinyxml_libraries}
|
||||
+ sdformat ${tinyxml_libraries}
|
||||
)
|
||||
-
|
||||
+ if(NOT GTEST_FOUND)
|
||||
+ add_dependencies(${BINARY_NAME} gtest gtest_main)
|
||||
+ endif()
|
||||
+
|
||||
target_link_libraries(${BINARY_NAME}
|
||||
- libgtest.a
|
||||
- libgtest_main.a
|
||||
+ ${GTEST_LIBRARY}
|
||||
+ ${GTEST_MAIN_LIBRARY}
|
||||
sdformat
|
||||
pthread
|
||||
${tinyxml_libraries}
|
||||
)
|
||||
+
|
||||
+ include_directories(${GTEST_INCLUDE_DIR})
|
||||
|
||||
add_test(${BINARY_NAME} ${CMAKE_CURRENT_BINARY_DIR}/${BINARY_NAME}
|
||||
--gtest_output=xml:${CMAKE_BINARY_DIR}/test_results/${BINARY_NAME}.xml)
|
||||
diff -up ./test/CMakeLists.txt.gtest ./test/CMakeLists.txt
|
||||
--- ./test/CMakeLists.txt.gtest 2013-11-18 20:55:13.775499141 -0500
|
||||
+++ ./test/CMakeLists.txt 2013-11-18 21:01:03.068073795 -0500
|
||||
@@ -2,9 +2,6 @@ include_directories (
|
||||
${PROJECT_SOURCE_DIR}/include
|
||||
${PROJECT_BINARY_DIR}/include
|
||||
${Boost_INCLUDE_DIRS}
|
||||
- ${PROJECT_SOURCE_DIR}/test/gtest/include
|
||||
- ${PROJECT_SOURCE_DIR}/test/gtest
|
||||
- ${PROJECT_SOURCE_DIR}/test
|
||||
)
|
||||
|
||||
link_directories(
|
||||
@@ -13,13 +10,6 @@ link_directories(
|
||||
|
||||
configure_file (test_config.h.in ${PROJECT_BINARY_DIR}/test_config.h)
|
||||
|
||||
-# Build gtest
|
||||
-add_library(gtest STATIC gtest/src/gtest-all.cc)
|
||||
-add_library(gtest_main STATIC gtest/src/gtest_main.cc)
|
||||
-target_link_libraries(gtest_main gtest)
|
||||
-set(GTEST_LIBRARY "${PROJECT_BINARY_DIR}/test/libgtest.a")
|
||||
-set(GTEST_MAIN_LIBRARY "${PROJECT_BINARY_DIR}/test/libgtest_main.a")
|
||||
-
|
||||
execute_process(COMMAND cmake -E remove_directory ${CMAKE_BINARY_DIR}/test_results)
|
||||
execute_process(COMMAND cmake -E make_directory ${CMAKE_BINARY_DIR}/test_results)
|
||||
include_directories(${GTEST_INCLUDE_DIRS})
|
299
sdformat-2.0.0-urdf3.patch
Normal file
299
sdformat-2.0.0-urdf3.patch
Normal file
@ -0,0 +1,299 @@
|
||||
diff -up ./src/parser_urdf.cc.urdf3 ./src/parser_urdf.cc
|
||||
--- ./src/parser_urdf.cc.urdf3 2014-04-11 14:42:48.000000000 -0400
|
||||
+++ ./src/parser_urdf.cc 2014-05-26 14:31:34.251525903 -0400
|
||||
@@ -28,6 +28,8 @@
|
||||
|
||||
using namespace sdf;
|
||||
|
||||
+#undef USE_EXTERNAL_URDF
|
||||
+
|
||||
typedef boost::shared_ptr<urdf::Collision> UrdfCollisionPtr;
|
||||
typedef boost::shared_ptr<urdf::Visual> UrdfVisualPtr;
|
||||
typedef boost::shared_ptr<urdf::Link> UrdfLinkPtr;
|
||||
@@ -298,7 +300,12 @@ std::string Vector32Str(const urdf::Vect
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void ReduceCollisionToParent(UrdfLinkPtr _link,
|
||||
- const std::string &_groupName, UrdfCollisionPtr _collision)
|
||||
+#if USE_EXTERNAL_URDF
|
||||
+ const std::string &_groupName,
|
||||
+#else
|
||||
+ const std::string &/*_groupName*/,
|
||||
+#endif
|
||||
+ UrdfCollisionPtr _collision)
|
||||
{
|
||||
boost::shared_ptr<std::vector<UrdfCollisionPtr> > cols;
|
||||
#if USE_EXTERNAL_URDF
|
||||
@@ -312,9 +319,6 @@ void ReduceCollisionToParent(UrdfLinkPtr
|
||||
cols = boost::shared_ptr<std::vector<UrdfCollisionPtr> >(
|
||||
&_link->collision_array);
|
||||
}
|
||||
-#else
|
||||
- cols = _link->getCollisions(_groupName);
|
||||
-#endif
|
||||
|
||||
if (!cols)
|
||||
{
|
||||
@@ -323,22 +327,37 @@ void ReduceCollisionToParent(UrdfLinkPtr
|
||||
// new group name, create add vector to map and add Collision to the vector
|
||||
_link->collision_groups.insert(make_pair(_groupName, cols));
|
||||
}
|
||||
+#else
|
||||
+ cols = boost::shared_ptr<std::vector<UrdfCollisionPtr> >(
|
||||
+ &_link->collision_array);
|
||||
+#endif
|
||||
|
||||
- // group exists, add Collision to the vector in the map
|
||||
+ // add Collision to the vector of collisions in link
|
||||
std::vector<UrdfCollisionPtr>::iterator colIt =
|
||||
find(cols->begin(), cols->end(), _collision);
|
||||
+
|
||||
if (colIt != cols->end())
|
||||
sdfwarn << "attempted to add collision to link ["
|
||||
<< _link->name
|
||||
+#if USE_EXTERNAL_URDF
|
||||
<< "], but it already exists under group ["
|
||||
<< _groupName << "]\n";
|
||||
+#else
|
||||
+ << "], but it already exists in link\n";
|
||||
+#endif
|
||||
+
|
||||
else
|
||||
cols->push_back(_collision);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void ReduceVisualToParent(UrdfLinkPtr _link,
|
||||
- const std::string &_groupName, UrdfVisualPtr _visual)
|
||||
+#if USE_EXTERNAL_URDF
|
||||
+ const std::string &_groupName,
|
||||
+#else
|
||||
+ const std::string &/*_groupName*/,
|
||||
+#endif
|
||||
+ UrdfVisualPtr _visual)
|
||||
{
|
||||
boost::shared_ptr<std::vector<UrdfVisualPtr> > viss;
|
||||
#if USE_EXTERNAL_URDF
|
||||
@@ -351,9 +370,6 @@ void ReduceVisualToParent(UrdfLinkPtr _l
|
||||
{
|
||||
viss = boost::shared_ptr<std::vector<UrdfVisualPtr> >(&_link->visual_array);
|
||||
}
|
||||
-#else
|
||||
- viss = _link->getVisuals(_groupName);
|
||||
-#endif
|
||||
|
||||
if (!viss)
|
||||
{
|
||||
@@ -365,15 +381,23 @@ void ReduceVisualToParent(UrdfLinkPtr _l
|
||||
sdfdbg << "successfully added a new visual group name ["
|
||||
<< _groupName << "]\n";
|
||||
}
|
||||
+#else
|
||||
+ viss = boost::shared_ptr<std::vector<UrdfVisualPtr> >(&_link->visual_array);
|
||||
+#endif
|
||||
|
||||
// group exists, add Visual to the vector in the map if it's not there
|
||||
std::vector<UrdfVisualPtr>::iterator visIt
|
||||
= find(viss->begin(), viss->end(), _visual);
|
||||
+
|
||||
if (visIt != viss->end())
|
||||
sdfwarn << "attempted to add visual to link ["
|
||||
<< _link->name
|
||||
+#if USE_EXTERNAL_URDF
|
||||
<< "], but it already exists under group ["
|
||||
<< _groupName << "]\n";
|
||||
+#else
|
||||
+ << "], but it already exists in link.\n";
|
||||
+#endif
|
||||
else
|
||||
viss->push_back(_visual);
|
||||
}
|
||||
@@ -844,6 +868,7 @@ void ReduceVisualsToParent(UrdfLinkPtr _
|
||||
// "lump::"+group name+"::'+_link name
|
||||
// lump but keep the _link name in(/as) the group name,
|
||||
// so we can correlate visuals to visuals somehow.
|
||||
+#if USE_EXTERNAL_URDF
|
||||
for (std::map<std::string,
|
||||
boost::shared_ptr<std::vector<UrdfVisualPtr> > >::iterator
|
||||
visualsIt = _link->visual_groups.begin();
|
||||
@@ -888,6 +913,21 @@ void ReduceVisualsToParent(UrdfLinkPtr _
|
||||
}
|
||||
}
|
||||
}
|
||||
+#else
|
||||
+ std::string lumpGroupName = std::string("lump::")+_link->name;
|
||||
+ for (std::vector<UrdfVisualPtr>::iterator
|
||||
+ visualIt = _link->visual_array.begin();
|
||||
+ visualIt != _link->visual_array.end(); ++visualIt)
|
||||
+ {
|
||||
+ // transform visual origin from _link frame to
|
||||
+ // parent link frame before adding to parent
|
||||
+ (*visualIt)->origin = TransformToParentFrame((*visualIt)->origin,
|
||||
+ _link->parent_joint->parent_to_joint_origin_transform);
|
||||
+ // add the modified visual to parent
|
||||
+ ReduceVisualToParent(_link->getParent(), lumpGroupName,
|
||||
+ *visualIt);
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
@@ -899,6 +939,7 @@ void ReduceCollisionsToParent(UrdfLinkPt
|
||||
// "lump::"+group name+"::'+_link name
|
||||
// lump but keep the _link name in(/as) the group name,
|
||||
// so we can correlate visuals to collisions somehow.
|
||||
+#if USE_EXTERNAL_URDF
|
||||
for (std::map<std::string,
|
||||
boost::shared_ptr<std::vector<UrdfCollisionPtr> > >::iterator
|
||||
collisionsIt = _link->collision_groups.begin();
|
||||
@@ -951,6 +992,23 @@ void ReduceCollisionsToParent(UrdfLinkPt
|
||||
}
|
||||
}
|
||||
// this->PrintCollisionGroups(_link->getParent());
|
||||
+#else
|
||||
+ std::string lumpGroupName = std::string("lump::")+_link->name;
|
||||
+ for (std::vector<UrdfCollisionPtr>::iterator
|
||||
+ collisionIt = _link->collision_array.begin();
|
||||
+ collisionIt != _link->collision_array.end(); ++collisionIt)
|
||||
+ {
|
||||
+ // transform collision origin from _link frame to
|
||||
+ // parent link frame before adding to parent
|
||||
+ (*collisionIt)->origin = TransformToParentFrame(
|
||||
+ (*collisionIt)->origin,
|
||||
+ _link->parent_joint->parent_to_joint_origin_transform);
|
||||
+
|
||||
+ // add the modified collision to parent
|
||||
+ ReduceCollisionToParent(_link->getParent(), lumpGroupName,
|
||||
+ *collisionIt);
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
@@ -1161,8 +1219,21 @@ void URDF2SDF::ParseSDFExtension(TiXmlDo
|
||||
{
|
||||
sdf->material = GetKeyValueAsString(childElem);
|
||||
}
|
||||
- else if (childElem->ValueStr() == "visual")
|
||||
+ else if (0 && childElem->ValueStr() == "visual")
|
||||
{
|
||||
+ // anything inside of visual tags:
|
||||
+ // <gazebo reference="link_name">
|
||||
+ // <visual>
|
||||
+ // <extention_stuff_here/>
|
||||
+ // </visual>
|
||||
+ // </gazebl>
|
||||
+ // are treated as blobs that gets inserted
|
||||
+ // into visuals for the link
|
||||
+ // <visual name="link_name[anything here]">
|
||||
+ // <stuff_from_urdf_link_visuals/>
|
||||
+ // <extention_stuff_here/>
|
||||
+ // </visual>
|
||||
+
|
||||
// a place to store converted doc
|
||||
for (TiXmlElement* e = childElem->FirstChildElement(); e;
|
||||
e = e->NextSiblingElement())
|
||||
@@ -1826,6 +1897,7 @@ std::string GetGeometryBoundingBox(
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void PrintCollisionGroups(UrdfLinkPtr _link)
|
||||
{
|
||||
+#if USE_EXTERNAL_URDF
|
||||
sdfdbg << "COLLISION LUMPING: link: [" << _link->name << "] contains ["
|
||||
<< static_cast<int>(_link->collision_groups.size())
|
||||
<< "] collisions.\n";
|
||||
@@ -1838,6 +1910,11 @@ void PrintCollisionGroups(UrdfLinkPtr _l
|
||||
<< static_cast<int>(colsIt->second->size())
|
||||
<< "] Collision objects\n";
|
||||
}
|
||||
+#else
|
||||
+ sdfdbg << "COLLISION LUMPING: link: [" << _link->name << "] contains ["
|
||||
+ << static_cast<int>(_link->collision_array.size())
|
||||
+ << "] collisions.\n";
|
||||
+#endif
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -2211,6 +2288,7 @@ void CreateCollisions(TiXmlElement* _ele
|
||||
{
|
||||
// loop through all collision groups. as well as additional collision from
|
||||
// lumped meshes (fixed joint reduction)
|
||||
+#if USE_EXTERNAL_URDF
|
||||
for (std::map<std::string,
|
||||
boost::shared_ptr<std::vector<UrdfCollisionPtr> > >::const_iterator
|
||||
collisionsIt = _link->collision_groups.begin();
|
||||
@@ -2287,6 +2365,33 @@ void CreateCollisions(TiXmlElement* _ele
|
||||
}
|
||||
}
|
||||
}
|
||||
+#else
|
||||
+ unsigned int defaultMeshCount = 0;
|
||||
+ for (std::vector<UrdfCollisionPtr>::const_iterator
|
||||
+ collision = _link->collision_array.begin();
|
||||
+ collision != _link->collision_array.end();
|
||||
+ ++collision)
|
||||
+ {
|
||||
+ sdfdbg << "creating default collision for link [" << _link->name
|
||||
+ << "]";
|
||||
+
|
||||
+ std::string collisionPrefix = _link->name;
|
||||
+
|
||||
+ if (defaultMeshCount > 0)
|
||||
+ {
|
||||
+ // append _[meshCount] to link name for additional collisions
|
||||
+ std::ostringstream collisionNameStream;
|
||||
+ collisionNameStream << collisionPrefix << "_" << defaultMeshCount;
|
||||
+ collisionPrefix = collisionNameStream.str();
|
||||
+ }
|
||||
+
|
||||
+ /* make a <collision> block */
|
||||
+ CreateCollision(_elem, _link, *collision, collisionPrefix);
|
||||
+
|
||||
+ // only 1 default mesh
|
||||
+ ++defaultMeshCount;
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -2295,6 +2400,7 @@ void CreateVisuals(TiXmlElement* _elem,
|
||||
{
|
||||
// loop through all visual groups. as well as additional visuals from
|
||||
// lumped meshes (fixed joint reduction)
|
||||
+#if USE_EXTERNAL_URDF
|
||||
for (std::map<std::string,
|
||||
boost::shared_ptr<std::vector<UrdfVisualPtr> > >::const_iterator
|
||||
visualsIt = _link->visual_groups.begin();
|
||||
@@ -2371,6 +2477,33 @@ void CreateVisuals(TiXmlElement* _elem,
|
||||
}
|
||||
}
|
||||
}
|
||||
+#else
|
||||
+ unsigned int defaultMeshCount = 0;
|
||||
+ for (std::vector<UrdfVisualPtr>::const_iterator
|
||||
+ visual = _link->visual_array.begin();
|
||||
+ visual != _link->visual_array.end();
|
||||
+ ++visual)
|
||||
+ {
|
||||
+ sdfdbg << "creating default visual for link [" << _link->name
|
||||
+ << "]";
|
||||
+
|
||||
+ std::string visualPrefix = _link->name;
|
||||
+
|
||||
+ if (defaultMeshCount > 0)
|
||||
+ {
|
||||
+ // append _[meshCount] to _link name for additional visuals
|
||||
+ std::ostringstream visualNameStream;
|
||||
+ visualNameStream << visualPrefix << "_" << defaultMeshCount;
|
||||
+ visualPrefix = visualNameStream.str();
|
||||
+ }
|
||||
+
|
||||
+ // create a <visual> block
|
||||
+ CreateVisual(_elem, _link, *visual, visualPrefix);
|
||||
+
|
||||
+ // only 1 default mesh
|
||||
+ ++defaultMeshCount;
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
27
sdformat-2.0.0-urdfdom.patch
Normal file
27
sdformat-2.0.0-urdfdom.patch
Normal file
@ -0,0 +1,27 @@
|
||||
diff -up ./cmake/SearchForStuff.cmake.urdfdom ./cmake/SearchForStuff.cmake
|
||||
--- ./cmake/SearchForStuff.cmake.urdfdom 2014-04-16 21:49:40.269514105 -0400
|
||||
+++ ./cmake/SearchForStuff.cmake 2014-04-16 21:50:31.687724816 -0400
|
||||
@@ -50,6 +50,22 @@ if (USE_EXTERNAL_URDF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
+################################################
|
||||
+# Find gtest
|
||||
+find_package(GTest)
|
||||
+if (GTEST_FOUND)
|
||||
+ set(GTEST_LIBRARY ${GTEST_LIBRARIES})
|
||||
+ set(GTEST_MAIN_LIBRARY ${GTEST_MAIN_LIBRARIES})
|
||||
+ set(GTEST_INCLUDE_DIR ${GTEST_INCLUDE_DIRS})
|
||||
+else()
|
||||
+ add_library(gtest STATIC "${PROJECT_SOURCE_DIR}/test/gtest/src/gtest-all.cc")
|
||||
+ add_library(gtest_main STATIC "${PROJECT_SOURCE_DIR}/test/gtest/src/gtest_main.cc")
|
||||
+ target_link_libraries(gtest_main gtest)
|
||||
+ set(GTEST_LIBRARY "${PROJECT_BINARY_DIR}/test/libgtest.a")
|
||||
+ set(GTEST_MAIN_LIBRARY "${PROJECT_BINARY_DIR}/test/libgtest_main.a")
|
||||
+ set(GTEST_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/test/gtest/include")
|
||||
+endif()
|
||||
+
|
||||
#################################################
|
||||
# Macro to check for visibility capability in compiler
|
||||
# Original idea from: https://gitorious.org/ferric-cmake-stuff/
|
||||
diff -up ./src/CMakeLists.txt.urdfdom ./src/CMakeLists.txt
|
@ -1,25 +0,0 @@
|
||||
diff -up ./doc/CMakeLists.txt.latex ./doc/CMakeLists.txt
|
||||
--- ./doc/CMakeLists.txt.latex 2015-01-31 12:49:05.006191779 -0500
|
||||
+++ ./doc/CMakeLists.txt 2015-01-31 12:49:20.322782756 -0500
|
||||
@@ -13,9 +13,6 @@ if (DOXYGEN_FOUND)
|
||||
${CMAKE_BINARY_DIR}/doxygen/html
|
||||
COMMAND cp ${CMAKE_SOURCE_DIR}/doc/search.js
|
||||
${CMAKE_BINARY_DIR}/doxygen/html/search
|
||||
- COMMAND make -C ${CMAKE_BINARY_DIR}/doxygen/latex
|
||||
- COMMAND mv ${CMAKE_BINARY_DIR}/doxygen/latex/refman.pdf
|
||||
- ${CMAKE_BINARY_DIR}/doxygen/latex/sdf-${SDF_VERSION_FULL}.pdf
|
||||
|
||||
COMMENT "Generating API documentation with Doxygen" VERBATIM)
|
||||
endif()
|
||||
diff -up ./doc/sdf.in.latex ./doc/sdf.in
|
||||
--- ./doc/sdf.in.latex 2015-01-31 12:51:34.554962874 -0500
|
||||
+++ ./doc/sdf.in 2015-01-31 12:51:43.026289868 -0500
|
||||
@@ -1234,7 +1234,7 @@ SERVER_BASED_SEARCH = NO
|
||||
# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
|
||||
# generate Latex output.
|
||||
|
||||
-GENERATE_LATEX = YES
|
||||
+GENERATE_LATEX = NO
|
||||
|
||||
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
443
sdformat-2.0.1-urdf3.patch
Normal file
443
sdformat-2.0.1-urdf3.patch
Normal file
@ -0,0 +1,443 @@
|
||||
diff -r d79259b26096 src/parser_urdf.cc
|
||||
--- a/src/parser_urdf.cc Mon Aug 04 13:07:16 2014 -0700
|
||||
+++ b/src/parser_urdf.cc Sat Aug 23 14:30:18 2014 -0400
|
||||
@@ -297,85 +297,15 @@
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
-void ReduceCollisionToParent(UrdfLinkPtr _link,
|
||||
- const std::string &_groupName, UrdfCollisionPtr _collision)
|
||||
+void ReduceCollisionToParent(UrdfLinkPtr _link, UrdfCollisionPtr _collision)
|
||||
{
|
||||
- boost::shared_ptr<std::vector<UrdfCollisionPtr> > cols;
|
||||
-#if USE_EXTERNAL_URDF && defined(URDF_GE_0P3)
|
||||
- if (_link->collision)
|
||||
- {
|
||||
- cols.reset(new std::vector<UrdfCollisionPtr>);
|
||||
- cols->push_back(_link->collision);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- cols = boost::shared_ptr<std::vector<UrdfCollisionPtr> >(
|
||||
- &_link->collision_array);
|
||||
- }
|
||||
-#else
|
||||
- cols = _link->getCollisions(_groupName);
|
||||
-#endif
|
||||
-
|
||||
- if (!cols)
|
||||
- {
|
||||
- // group does not exist, create one and add to map
|
||||
- cols.reset(new std::vector<UrdfCollisionPtr>);
|
||||
- // new group name, create add vector to map and add Collision to the vector
|
||||
- _link->collision_groups.insert(make_pair(_groupName, cols));
|
||||
- }
|
||||
-
|
||||
- // group exists, add Collision to the vector in the map
|
||||
- std::vector<UrdfCollisionPtr>::iterator colIt =
|
||||
- find(cols->begin(), cols->end(), _collision);
|
||||
- if (colIt != cols->end())
|
||||
- sdfwarn << "attempted to add collision to link ["
|
||||
- << _link->name
|
||||
- << "], but it already exists under group ["
|
||||
- << _groupName << "]\n";
|
||||
- else
|
||||
- cols->push_back(_collision);
|
||||
+ _link->collision_array.push_back(_collision);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
-void ReduceVisualToParent(UrdfLinkPtr _link,
|
||||
- const std::string &_groupName, UrdfVisualPtr _visual)
|
||||
+void ReduceVisualToParent(UrdfLinkPtr _link, UrdfVisualPtr _visual)
|
||||
{
|
||||
- boost::shared_ptr<std::vector<UrdfVisualPtr> > viss;
|
||||
-#if USE_EXTERNAL_URDF && defined(URDF_GE_0P3)
|
||||
- if (_link->visual)
|
||||
- {
|
||||
- viss.reset(new std::vector<UrdfVisualPtr>);
|
||||
- viss->push_back(_link->visual);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- viss = boost::shared_ptr<std::vector<UrdfVisualPtr> >(&_link->visual_array);
|
||||
- }
|
||||
-#else
|
||||
- viss = _link->getVisuals(_groupName);
|
||||
-#endif
|
||||
-
|
||||
- if (!viss)
|
||||
- {
|
||||
- // group does not exist, create one and add to map
|
||||
- viss.reset(new std::vector<UrdfVisualPtr>);
|
||||
- // new group name, create vector, add vector to map and
|
||||
- // add Visual to the vector
|
||||
- _link->visual_groups.insert(make_pair(_groupName, viss));
|
||||
- sdfdbg << "successfully added a new visual group name ["
|
||||
- << _groupName << "]\n";
|
||||
- }
|
||||
-
|
||||
- // group exists, add Visual to the vector in the map if it's not there
|
||||
- std::vector<UrdfVisualPtr>::iterator visIt
|
||||
- = find(viss->begin(), viss->end(), _visual);
|
||||
- if (visIt != viss->end())
|
||||
- sdfwarn << "attempted to add visual to link ["
|
||||
- << _link->name
|
||||
- << "], but it already exists under group ["
|
||||
- << _groupName << "]\n";
|
||||
- else
|
||||
- viss->push_back(_visual);
|
||||
+ _link->visual_array.push_back(_visual);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -839,54 +769,17 @@
|
||||
/// reduce fixed joints: lump visuals to parent link
|
||||
void ReduceVisualsToParent(UrdfLinkPtr _link)
|
||||
{
|
||||
- // lump visual to parent
|
||||
- // lump all visual to parent, assign group name
|
||||
- // "lump::"+group name+"::'+_link name
|
||||
- // lump but keep the _link name in(/as) the group name,
|
||||
- // so we can correlate visuals to visuals somehow.
|
||||
- for (std::map<std::string,
|
||||
- boost::shared_ptr<std::vector<UrdfVisualPtr> > >::iterator
|
||||
- visualsIt = _link->visual_groups.begin();
|
||||
- visualsIt != _link->visual_groups.end(); ++visualsIt)
|
||||
+ for (std::vector<UrdfVisualPtr>::iterator
|
||||
+ visualIt = _link->visual_array.begin();
|
||||
+ visualIt != _link->visual_array.end(); ++visualIt)
|
||||
{
|
||||
- if (visualsIt->first.find(std::string("lump::")) == 0)
|
||||
- {
|
||||
- // it's a previously lumped mesh, re-lump under same _groupName
|
||||
- std::string lumpGroupName = visualsIt->first;
|
||||
- sdfdbg << "re-lumping group name [" << lumpGroupName
|
||||
- << "] to link [" << _link->getParent()->name << "]\n";
|
||||
- for (std::vector<UrdfVisualPtr>::iterator
|
||||
- visualIt = visualsIt->second->begin();
|
||||
- visualIt != visualsIt->second->end(); ++visualIt)
|
||||
- {
|
||||
- // transform visual origin from _link frame to parent link
|
||||
- // frame before adding to parent
|
||||
- (*visualIt)->origin = TransformToParentFrame((*visualIt)->origin,
|
||||
- _link->parent_joint->parent_to_joint_origin_transform);
|
||||
- // add the modified visual to parent
|
||||
- ReduceVisualToParent(_link->getParent(), lumpGroupName,
|
||||
- *visualIt);
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- // default and any other groups meshes
|
||||
- std::string lumpGroupName = std::string("lump::")+_link->name;
|
||||
- sdfdbg << "adding modified lump group name [" << lumpGroupName
|
||||
- << "] to link [" << _link->getParent()->name << "].\n";
|
||||
- for (std::vector<UrdfVisualPtr>::iterator
|
||||
- visualIt = visualsIt->second->begin();
|
||||
- visualIt != visualsIt->second->end(); ++visualIt)
|
||||
- {
|
||||
- // transform visual origin from _link frame to
|
||||
- // parent link frame before adding to parent
|
||||
- (*visualIt)->origin = TransformToParentFrame((*visualIt)->origin,
|
||||
- _link->parent_joint->parent_to_joint_origin_transform);
|
||||
- // add the modified visual to parent
|
||||
- ReduceVisualToParent(_link->getParent(), lumpGroupName,
|
||||
- *visualIt);
|
||||
- }
|
||||
- }
|
||||
+ // transform visual origin from _link frame to parent link
|
||||
+ // frame before adding to parent
|
||||
+ (*visualIt)->origin = TransformToParentFrame((*visualIt)->origin,
|
||||
+ _link->parent_joint->parent_to_joint_origin_transform);
|
||||
+ // add the modified visual to parent
|
||||
+ // ReduceVisualToParent(_link->getParent(), *visualIt);
|
||||
+ _link->getParent()->visual_array.push_back(*visualIt);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -894,63 +787,19 @@
|
||||
/// reduce fixed joints: lump collisions to parent link
|
||||
void ReduceCollisionsToParent(UrdfLinkPtr _link)
|
||||
{
|
||||
- // lump collision parent
|
||||
- // lump all collision to parent, assign group name
|
||||
- // "lump::"+group name+"::'+_link name
|
||||
- // lump but keep the _link name in(/as) the group name,
|
||||
- // so we can correlate visuals to collisions somehow.
|
||||
- for (std::map<std::string,
|
||||
- boost::shared_ptr<std::vector<UrdfCollisionPtr> > >::iterator
|
||||
- collisionsIt = _link->collision_groups.begin();
|
||||
- collisionsIt != _link->collision_groups.end(); ++collisionsIt)
|
||||
+ for (std::vector<UrdfCollisionPtr>::iterator
|
||||
+ collisionIt = _link->collision_array.begin();
|
||||
+ collisionIt != _link->collision_array.end(); ++collisionIt)
|
||||
{
|
||||
- if (collisionsIt->first.find(std::string("lump::")) == 0)
|
||||
- {
|
||||
- // if it's a previously lumped mesh, relump under same _groupName
|
||||
- std::string lumpGroupName = collisionsIt->first;
|
||||
- sdfdbg << "re-lumping collision [" << collisionsIt->first
|
||||
- << "] for link [" << _link->name
|
||||
- << "] to parent [" << _link->getParent()->name
|
||||
- << "] with group name [" << lumpGroupName << "]\n";
|
||||
- for (std::vector<UrdfCollisionPtr>::iterator
|
||||
- collisionIt = collisionsIt->second->begin();
|
||||
- collisionIt != collisionsIt->second->end(); ++collisionIt)
|
||||
- {
|
||||
- // transform collision origin from _link frame to
|
||||
- // parent link frame before adding to parent
|
||||
- (*collisionIt)->origin = TransformToParentFrame(
|
||||
- (*collisionIt)->origin,
|
||||
- _link->parent_joint->parent_to_joint_origin_transform);
|
||||
- // add the modified collision to parent
|
||||
- ReduceCollisionToParent(_link->getParent(), lumpGroupName,
|
||||
- *collisionIt);
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- // default and any other group meshes
|
||||
- std::string lumpGroupName = std::string("lump::")+_link->name;
|
||||
- sdfdbg << "lumping collision [" << collisionsIt->first
|
||||
- << "] for link [" << _link->name
|
||||
- << "] to parent [" << _link->getParent()->name
|
||||
- << "] with group name [" << lumpGroupName << "]\n";
|
||||
- for (std::vector<UrdfCollisionPtr>::iterator
|
||||
- collisionIt = collisionsIt->second->begin();
|
||||
- collisionIt != collisionsIt->second->end(); ++collisionIt)
|
||||
- {
|
||||
- // transform collision origin from _link frame to
|
||||
- // parent link frame before adding to parent
|
||||
- (*collisionIt)->origin = TransformToParentFrame(
|
||||
- (*collisionIt)->origin,
|
||||
- _link->parent_joint->parent_to_joint_origin_transform);
|
||||
-
|
||||
- // add the modified collision to parent
|
||||
- ReduceCollisionToParent(_link->getParent(), lumpGroupName,
|
||||
- *collisionIt);
|
||||
- }
|
||||
- }
|
||||
+ // transform collision origin from _link frame to
|
||||
+ // parent link frame before adding to parent
|
||||
+ (*collisionIt)->origin = TransformToParentFrame(
|
||||
+ (*collisionIt)->origin,
|
||||
+ _link->parent_joint->parent_to_joint_origin_transform);
|
||||
+ // add the modified collision to parent
|
||||
+ // ReduceCollisionToParent(_link->getParent(), *collisionIt);
|
||||
+ _link->getParent()->collision_array.push_back(*collisionIt);
|
||||
}
|
||||
- // this->PrintCollisionGroups(_link->getParent());
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
@@ -1827,17 +1676,8 @@
|
||||
void PrintCollisionGroups(UrdfLinkPtr _link)
|
||||
{
|
||||
sdfdbg << "COLLISION LUMPING: link: [" << _link->name << "] contains ["
|
||||
- << static_cast<int>(_link->collision_groups.size())
|
||||
+ << static_cast<int>(_link->collision_array.size())
|
||||
<< "] collisions.\n";
|
||||
- for (std::map<std::string,
|
||||
- boost::shared_ptr<std::vector<UrdfCollisionPtr > > >::iterator
|
||||
- colsIt = _link->collision_groups.begin();
|
||||
- colsIt != _link->collision_groups.end(); ++colsIt)
|
||||
- {
|
||||
- sdfdbg << " collision_groups: [" << colsIt->first << "] has ["
|
||||
- << static_cast<int>(colsIt->second->size())
|
||||
- << "] Collision objects\n";
|
||||
- }
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -2206,86 +2046,21 @@
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
-void CreateCollisions(TiXmlElement* _elem,
|
||||
- ConstUrdfLinkPtr _link)
|
||||
+void CreateCollisions(TiXmlElement* _elem, ConstUrdfLinkPtr _link)
|
||||
{
|
||||
- // loop through all collision groups. as well as additional collision from
|
||||
- // lumped meshes (fixed joint reduction)
|
||||
- for (std::map<std::string,
|
||||
- boost::shared_ptr<std::vector<UrdfCollisionPtr> > >::const_iterator
|
||||
- collisionsIt = _link->collision_groups.begin();
|
||||
- collisionsIt != _link->collision_groups.end(); ++collisionsIt)
|
||||
+ // loop through collisions
|
||||
+ for (std::vector<UrdfCollisionPtr>::const_iterator
|
||||
+ collision = _link->collision_array.begin();
|
||||
+ collision != _link->collision_array.end();
|
||||
+ ++collision)
|
||||
{
|
||||
- unsigned int defaultMeshCount = 0;
|
||||
- unsigned int groupMeshCount = 0;
|
||||
- unsigned int lumpMeshCount = 0;
|
||||
- // loop through collisions in each group
|
||||
- for (std::vector<UrdfCollisionPtr>::iterator
|
||||
- collision = collisionsIt->second->begin();
|
||||
- collision != collisionsIt->second->end();
|
||||
- ++collision)
|
||||
- {
|
||||
- if (collisionsIt->first == "default")
|
||||
- {
|
||||
- sdfdbg << "creating default collision for link [" << _link->name
|
||||
- << "]";
|
||||
+ sdfdbg << "creating default collision for link [" << _link->name
|
||||
+ << "]";
|
||||
|
||||
- std::string collisionPrefix = _link->name;
|
||||
+ std::string collisionPrefix = _link->name + (*collision)->name;
|
||||
|
||||
- if (defaultMeshCount > 0)
|
||||
- {
|
||||
- // append _[meshCount] to link name for additional collisions
|
||||
- std::ostringstream collisionNameStream;
|
||||
- collisionNameStream << collisionPrefix << "_" << defaultMeshCount;
|
||||
- collisionPrefix = collisionNameStream.str();
|
||||
- }
|
||||
-
|
||||
- /* make a <collision> block */
|
||||
- CreateCollision(_elem, _link, *collision, collisionPrefix);
|
||||
-
|
||||
- // only 1 default mesh
|
||||
- ++defaultMeshCount;
|
||||
- }
|
||||
- else if (collisionsIt->first.find(std::string("lump::")) == 0)
|
||||
- {
|
||||
- // if collision name starts with "lump::", pass through
|
||||
- // original parent link name
|
||||
- sdfdbg << "creating lump collision [" << collisionsIt->first
|
||||
- << "] for link [" << _link->name << "].\n";
|
||||
- /// collisionPrefix is the original name before lumping
|
||||
- std::string collisionPrefix = collisionsIt->first.substr(6);
|
||||
-
|
||||
- if (lumpMeshCount > 0)
|
||||
- {
|
||||
- // append _[meshCount] to link name for additional collisions
|
||||
- std::ostringstream collisionNameStream;
|
||||
- collisionNameStream << collisionPrefix << "_" << lumpMeshCount;
|
||||
- collisionPrefix = collisionNameStream.str();
|
||||
- }
|
||||
-
|
||||
- CreateCollision(_elem, _link, *collision, collisionPrefix);
|
||||
- ++lumpMeshCount;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- sdfdbg << "adding collisions from collision group ["
|
||||
- << collisionsIt->first << "]\n";
|
||||
-
|
||||
- std::string collisionPrefix = _link->name + std::string("_") +
|
||||
- collisionsIt->first;
|
||||
-
|
||||
- if (groupMeshCount > 0)
|
||||
- {
|
||||
- // append _[meshCount] to _link name for additional collisions
|
||||
- std::ostringstream collisionNameStream;
|
||||
- collisionNameStream << collisionPrefix << "_" << groupMeshCount;
|
||||
- collisionPrefix = collisionNameStream.str();
|
||||
- }
|
||||
-
|
||||
- CreateCollision(_elem, _link, *collision, collisionPrefix);
|
||||
- ++groupMeshCount;
|
||||
- }
|
||||
- }
|
||||
+ /* make a <collision> block */
|
||||
+ CreateCollision(_elem, _link, *collision, collisionPrefix);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2293,83 +2068,18 @@
|
||||
void CreateVisuals(TiXmlElement* _elem,
|
||||
ConstUrdfLinkPtr _link)
|
||||
{
|
||||
- // loop through all visual groups. as well as additional visuals from
|
||||
- // lumped meshes (fixed joint reduction)
|
||||
- for (std::map<std::string,
|
||||
- boost::shared_ptr<std::vector<UrdfVisualPtr> > >::const_iterator
|
||||
- visualsIt = _link->visual_groups.begin();
|
||||
- visualsIt != _link->visual_groups.end(); ++visualsIt)
|
||||
+ // loop through visuals
|
||||
+ for (std::vector<UrdfVisualPtr>::const_iterator
|
||||
+ visual = _link->visual_array.begin();
|
||||
+ visual != _link->visual_array.end(); ++visual)
|
||||
{
|
||||
- unsigned int defaultMeshCount = 0;
|
||||
- unsigned int groupMeshCount = 0;
|
||||
- unsigned int lumpMeshCount = 0;
|
||||
- // loop through all visuals in this group
|
||||
- for (std::vector<UrdfVisualPtr>::iterator
|
||||
- visual = visualsIt->second->begin();
|
||||
- visual != visualsIt->second->end();
|
||||
- ++visual)
|
||||
- {
|
||||
- if (visualsIt->first == "default")
|
||||
- {
|
||||
- sdfdbg << "creating default visual for link [" << _link->name
|
||||
- << "]";
|
||||
+ sdfdbg << "creating default visual for link [" << _link->name
|
||||
+ << "]";
|
||||
|
||||
- std::string visualPrefix = _link->name;
|
||||
+ std::string visualPrefix = _link->name + (*visual)->name;
|
||||
|
||||
- if (defaultMeshCount > 0)
|
||||
- {
|
||||
- // append _[meshCount] to _link name for additional visuals
|
||||
- std::ostringstream visualNameStream;
|
||||
- visualNameStream << visualPrefix << "_" << defaultMeshCount;
|
||||
- visualPrefix = visualNameStream.str();
|
||||
- }
|
||||
-
|
||||
- // create a <visual> block
|
||||
- CreateVisual(_elem, _link, *visual, visualPrefix);
|
||||
-
|
||||
- // only 1 default mesh
|
||||
- ++defaultMeshCount;
|
||||
- }
|
||||
- else if (visualsIt->first.find(std::string("lump::")) == 0)
|
||||
- {
|
||||
- // if visual name starts with "lump::", pass through
|
||||
- // original parent link name
|
||||
- sdfdbg << "creating lump visual [" << visualsIt->first
|
||||
- << "] for link [" << _link->name << "].\n";
|
||||
- /// visualPrefix is the original name before lumping
|
||||
- std::string visualPrefix = visualsIt->first.substr(6);
|
||||
-
|
||||
- if (lumpMeshCount > 0)
|
||||
- {
|
||||
- // append _[meshCount] to _link name for additional visuals
|
||||
- std::ostringstream visualNameStream;
|
||||
- visualNameStream << visualPrefix << "_" << lumpMeshCount;
|
||||
- visualPrefix = visualNameStream.str();
|
||||
- }
|
||||
-
|
||||
- CreateVisual(_elem, _link, *visual, visualPrefix);
|
||||
- ++lumpMeshCount;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- sdfdbg << "adding visuals from visual group ["
|
||||
- << visualsIt->first << "]\n";
|
||||
-
|
||||
- std::string visualPrefix = _link->name + std::string("_") +
|
||||
- visualsIt->first;
|
||||
-
|
||||
- if (groupMeshCount > 0)
|
||||
- {
|
||||
- // append _[meshCount] to _link name for additional visuals
|
||||
- std::ostringstream visualNameStream;
|
||||
- visualNameStream << visualPrefix << "_" << groupMeshCount;
|
||||
- visualPrefix = visualNameStream.str();
|
||||
- }
|
||||
-
|
||||
- CreateVisual(_elem, _link, *visual, visualPrefix);
|
||||
- ++groupMeshCount;
|
||||
- }
|
||||
- }
|
||||
+ // create a <visual> block
|
||||
+ CreateVisual(_elem, _link, *visual, visualPrefix);
|
||||
}
|
||||
}
|
||||
|
44
sdformat-2.0.1-urdfdom.patch
Normal file
44
sdformat-2.0.1-urdfdom.patch
Normal file
@ -0,0 +1,44 @@
|
||||
diff -up ./cmake/sdf_config.h.in.urdfdom ./cmake/sdf_config.h.in
|
||||
--- ./cmake/sdf_config.h.in.urdfdom 2014-08-22 21:07:12.473338538 -0400
|
||||
+++ ./cmake/sdf_config.h.in 2014-08-22 21:07:34.382208622 -0400
|
||||
@@ -26,7 +26,7 @@
|
||||
#cmakedefine BUILD_TYPE_RELEASE 1
|
||||
#cmakedefine HAVE_URDFDOM 1
|
||||
#cmakedefine USE_EXTERNAL_URDF 1
|
||||
-#cmakedefine URDF_GT_0P3 1
|
||||
+#cmakedefine URDF_GE_0P3 1
|
||||
|
||||
#define SDF_SHARE_PATH "${CMAKE_INSTALL_PREFIX}/share/"
|
||||
#define SDF_VERSION_PATH "${CMAKE_INSTALL_PREFIX}/share/sdformat/${SDF_PKG_VERSION}"
|
||||
diff -up ./cmake/SearchForStuff.cmake.urdfdom ./cmake/SearchForStuff.cmake
|
||||
--- ./cmake/SearchForStuff.cmake.urdfdom 2014-07-11 13:50:35.000000000 -0400
|
||||
+++ ./cmake/SearchForStuff.cmake 2014-08-22 20:59:39.239507142 -0400
|
||||
@@ -62,12 +62,25 @@ if (USE_EXTERNAL_URDF)
|
||||
set (URDF_GE_0P3 TRUE)
|
||||
endif()
|
||||
|
||||
- # what am I doing here? pkg-config and cmake
|
||||
- set(URDF_INCLUDE_DIRS ${URDF_INCLUDEDIR})
|
||||
- set(URDF_LIBRARY_DIRS ${URDF_LIBDIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
+################################################
|
||||
+# Find gtest
|
||||
+find_package(GTest)
|
||||
+if (USE_EXTERNAL_GTEST AND GTEST_FOUND)
|
||||
+ set(GTEST_LIBRARY ${GTEST_LIBRARIES})
|
||||
+ set(GTEST_MAIN_LIBRARY ${GTEST_MAIN_LIBRARIES})
|
||||
+ set(GTEST_INCLUDE_DIR ${GTEST_INCLUDE_DIRS})
|
||||
+else()
|
||||
+ add_library(gtest STATIC "${PROJECT_SOURCE_DIR}/test/gtest/src/gtest-all.cc")
|
||||
+ add_library(gtest_main STATIC "${PROJECT_SOURCE_DIR}/test/gtest/src/gtest_main.cc")
|
||||
+ target_link_libraries(gtest_main gtest)
|
||||
+ set(GTEST_LIBRARY "${PROJECT_BINARY_DIR}/test/libgtest.a")
|
||||
+ set(GTEST_MAIN_LIBRARY "${PROJECT_BINARY_DIR}/test/libgtest_main.a")
|
||||
+ set(GTEST_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/test/gtest/include")
|
||||
+endif()
|
||||
+
|
||||
#################################################
|
||||
# Macro to check for visibility capability in compiler
|
||||
# Original idea from: https://gitorious.org/ferric-cmake-stuff/
|
@ -1,12 +0,0 @@
|
||||
diff -up ./CMakeLists.txt.cmakefix ./CMakeLists.txt
|
||||
--- ./CMakeLists.txt.cmakefix 2017-08-20 10:57:23.929560910 -0400
|
||||
+++ ./CMakeLists.txt 2017-08-20 10:57:30.692546169 -0400
|
||||
@@ -186,7 +186,7 @@ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}
|
||||
# OS Specific initialization
|
||||
if (UNIX)
|
||||
sdf_setup_unix()
|
||||
-else (WIN32)
|
||||
+elseif (WIN32)
|
||||
sdf_setup_windows()
|
||||
else (APPLE)
|
||||
sdf_setup_apple()
|
@ -1,21 +0,0 @@
|
||||
diff -urN sdformat-6.0.0.orig/CMakeLists.txt sdformat-6.0.0/CMakeLists.txt
|
||||
--- sdformat-6.0.0.orig/CMakeLists.txt 2018-01-25 20:43:24.000000000 +0000
|
||||
+++ sdformat-6.0.0/CMakeLists.txt 2018-11-23 20:04:09.020944630 +0000
|
||||
@@ -61,6 +61,8 @@
|
||||
|
||||
set (USE_FULL_RPATH OFF CACHE BOOL "Set to true to enable full rpath")
|
||||
|
||||
+set (RUBY_LIB_INSTALL_DIR "lib/ruby" CACHE STRING "Installation directory for ruby scripts (relative to CMAKE_INSTALL_PREFIX)")
|
||||
+
|
||||
|
||||
if (USE_FULL_RPATH)
|
||||
# use, i.e. don't skip the full RPATH for the build tree
|
||||
diff -urN sdformat-6.0.0.orig/src/cmd/CMakeLists.txt sdformat-6.0.0/src/cmd/CMakeLists.txt
|
||||
--- sdformat-6.0.0.orig/src/cmd/CMakeLists.txt 2018-01-25 20:43:24.000000000 +0000
|
||||
+++ sdformat-6.0.0/src/cmd/CMakeLists.txt 2018-11-23 20:04:16.367048961 +0000
|
||||
@@ -14,4 +14,4 @@
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cmdsdformat${SDF_MAJOR_VERSION}.rb" @ONLY)
|
||||
|
||||
# Install the ruby command line library in an unversioned location.
|
||||
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cmdsdformat${SDF_MAJOR_VERSION}.rb DESTINATION lib/ruby/ignition)
|
||||
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cmdsdformat${SDF_MAJOR_VERSION}.rb DESTINATION ${RUBY_LIB_INSTALL_DIR}/ignition)
|
188
sdformat.spec
188
sdformat.spec
@ -1,41 +1,38 @@
|
||||
%global apiver_major 6
|
||||
%global apiver %{apiver_major}.0
|
||||
%global hghash d79259b26096
|
||||
%global apiver 2.0
|
||||
|
||||
Name: sdformat
|
||||
Version: 6.0.0
|
||||
Release: 4%{?dist}
|
||||
Version: 2.0.1
|
||||
Release: 3%{?dist}
|
||||
Summary: The Simulation Description Format
|
||||
|
||||
License: ASL 2.0
|
||||
URL: http://sdformat.org/
|
||||
Source0: http://gazebosim.org/distributions/%{name}/releases/%{name}-%{version}.tar.bz2
|
||||
# Disable doxygen latex documentation
|
||||
Patch0: %{name}-2.0.1-latex.patch
|
||||
# Make ruby install path configurable
|
||||
Patch1: %{name}.ruby-lib-install-dir.patch
|
||||
|
||||
BuildRequires: gcc-c++
|
||||
URL: http://gazebosim.org/sdf.html
|
||||
Source0: https://bitbucket.org/osrf/%{name}/get/%{name}2_%{version}.tar.bz2
|
||||
# Unbundle urdfdom and urdfdom-headers from sdformat, build against system versions.
|
||||
# Work progressing upstream
|
||||
Patch0: sdformat-2.0.1-urdfdom.patch
|
||||
# Automatically discovers and uses system gtest if available.
|
||||
# Not yet submitted upstream
|
||||
Patch1: sdformat-1.4.10-gtest.patch
|
||||
# Changes from the upstream "update_urdf_3.0" branch to parser_urdf.cc
|
||||
Patch2: sdformat-2.0.1-urdf3.patch
|
||||
BuildRequires: boost-devel
|
||||
BuildRequires: cmake
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: doxygen-latex
|
||||
BuildRequires: graphviz
|
||||
BuildRequires: gtest-devel
|
||||
BuildRequires: ignition-cmake-devel
|
||||
BuildRequires: ignition-math-devel >= 4
|
||||
BuildRequires: ruby-devel >= 1.9
|
||||
BuildRequires: /usr/bin/ruby
|
||||
BuildRequires: rubygem-multi_xml
|
||||
BuildRequires: texlive-refman
|
||||
BuildRequires: tinyxml-devel
|
||||
BuildRequires: urdfdom-devel
|
||||
|
||||
#Test dependencies
|
||||
BuildRequires: python2
|
||||
BuildRequires: python
|
||||
|
||||
%description
|
||||
The Simulation Description Format (SDF) is an XML file format used to
|
||||
The Simulation Description Format (SDF) is an XML file format used to
|
||||
describe all the elements in a software simulation environment. Originally
|
||||
part of the Gazebo 3D robotic simulator, %{name} is a C++ library for reading
|
||||
part of the Gazebo 3D robotic simulator, %{name} is a C++ library for reading
|
||||
and writing files in the sdf format.
|
||||
|
||||
%package devel
|
||||
@ -43,7 +40,6 @@ Summary: Development files and libraries for %{name}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
# For libdir/cmake directory
|
||||
Requires: cmake
|
||||
Requires: tinyxml-devel
|
||||
|
||||
%description devel
|
||||
The %{name}-devel package contains libraries and header files for
|
||||
@ -57,33 +53,21 @@ The %{name}-doc package contains development documentation for
|
||||
%{name}.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p0 -b .latex
|
||||
%patch1 -p1
|
||||
%setup -q -n osrf-%{name}-%{hghash}
|
||||
%patch0 -p0 -b .urdfdom
|
||||
%patch1 -p0 -b .gtest
|
||||
%patch2 -p1 -b .urdf3
|
||||
# Remove bundled urdf components
|
||||
rm -rf src/urdf
|
||||
rm -rf test/gtest
|
||||
|
||||
%build
|
||||
mkdir build
|
||||
pushd build
|
||||
%cmake .. \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO="-std=c++11 %{optflags}" \
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-std=c++11 %{optflags}" \
|
||||
-DLIB_INSTALL_DIR:STRING=%{_lib} \
|
||||
-DRUBY_LIB_INSTALL_DIR:STRING=%{ruby_vendorlibdir} \
|
||||
-DUSE_EXTERNAL_URDF=ON \
|
||||
-DSSE3_FOUND=false \
|
||||
-DSSSE3_FOUND=false \
|
||||
-DSSE4_1_FOUND=false \
|
||||
-DSSE4_2_FOUND=false \
|
||||
%ifnarch x86_64
|
||||
-DSSE2_FOUND=false \
|
||||
%endif
|
||||
-DUSE_UPSTREAM_CFLAGS=false \
|
||||
|
||||
%cmake -DCMAKE_BUILD_TYPE=None -DCMAKE_CXX_FLAGS_NONE="%{optflags}" -DLIB_INSTALL_DIR:STRING=%{_lib} -DUSE_EXTERNAL_URDF=ON -DUSE_EXTERNAL_GTEST=ON ..
|
||||
|
||||
popd
|
||||
cat build/sdf/sdf_config.h
|
||||
make -C build %{?_smp_mflags}
|
||||
make -C build doc
|
||||
|
||||
@ -91,18 +75,16 @@ make -C build doc
|
||||
make -C build install DESTDIR=%{buildroot}
|
||||
|
||||
%check
|
||||
# The INTEGRATION_schema_test uses xmllint to validate flies
|
||||
# against schemas. It requires an internet connection, so it
|
||||
# fails when built on koji
|
||||
export GTEST_COLOR=no
|
||||
make -C build test ARGS="-V -E INTEGRATION_schema_test"
|
||||
make -C build test || cat build/Testing/Temporary/LastTest.log
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%license LICENSE COPYING
|
||||
%doc AUTHORS README.md Changelog.md Migration.md
|
||||
%doc AUTHORS COPYING LICENSE README
|
||||
%exclude %{_datadir}/%{name}/cmake
|
||||
%{_datadir}/%{name}
|
||||
%{_datadir}/ignition/sdformat%{apiver_major}.yaml
|
||||
%{ruby_vendorlibdir}/ignition/cmdsdformat%{apiver_major}.rb
|
||||
%{_libdir}/*.so.*
|
||||
|
||||
%files devel
|
||||
@ -112,113 +94,11 @@ make -C build test ARGS="-V -E INTEGRATION_schema_test"
|
||||
%{_libdir}/cmake/%{name}
|
||||
|
||||
%files doc
|
||||
%license LICENSE COPYING
|
||||
%doc build/doxygen/html
|
||||
|
||||
%changelog
|
||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Fri Jan 25 2019 Jonathan Wakely <jwakely@redhat.com> - 6.0.0-2
|
||||
- Rebuilt for Boost 1.69
|
||||
|
||||
* Fri Nov 23 2018 Till Hofmann <thofmann@fedoraproject.org> - 6.0.0-1
|
||||
- Update to release 6.0.0
|
||||
- Install ruby script into %%{ruby_vendorlibdir}
|
||||
- Remove obsolete %%post and %%postun ldconfig scriptlets
|
||||
|
||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Sun Mar 18 2018 Iryna Shcherbina <ishcherb@redhat.com> - 5.2.0-4
|
||||
- Update Python 2 dependency declarations to new packaging standards
|
||||
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
||||
|
||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Tue Jan 23 2018 Jonathan Wakely <jwakely@redhat.com> - 5.2.0-2
|
||||
- Rebuilt for Boost 1.66
|
||||
|
||||
* Sun Aug 20 2017 Rich Mattes <richmattes@gmail.com> - 5.2.0-1
|
||||
- Update to release 5.2.0
|
||||
|
||||
* Sun Aug 20 2017 Rich Mattes <richmattes@gmail.com> - 5.1.0-5
|
||||
- Add a fix for a cmake syntax error
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Mon Jul 24 2017 Björn Esser <besser82@fedoraproject.org> - 5.1.0-3
|
||||
- Rebuilt for Boost 1.64
|
||||
|
||||
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
|
||||
|
||||
* Sat Feb 25 2017 Rich Mattes <richmattes@gmail.com> - 5.1.0-1
|
||||
- Update to release 5.1.0
|
||||
|
||||
* Wed Feb 08 2017 Kalev Lember <klember@redhat.com> - 4.2.0-3
|
||||
- Rebuilt for Boost 1.63
|
||||
|
||||
* Wed Jan 11 2017 Rich Mattes <richmattes@gmail.com> - 4.2.0-2
|
||||
- Add tinyxml-devel to sdformat-devel's requirements
|
||||
|
||||
* Sun Oct 16 2016 Rich Mattes <richmattes@gmail.com> - 4.2.0-1
|
||||
- Update to release 4.2.0 (rhbz#1383544)
|
||||
|
||||
* Sun Jul 17 2016 Rich Mattes <richmattes@gmail.com> - 4.1.1-1
|
||||
- Update to release 4.1.1 (rhbz#1246705)
|
||||
|
||||
* Tue Jul 05 2016 Rich Mattes <richmattes@gmail.com> - 3.7.0-4
|
||||
- Update for boost/gcc-6.1.1 symbol generation change (rhbz#1331983)
|
||||
|
||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
* Mon Jan 18 2016 Jonathan Wakely <jwakely@redhat.com> - 3.7.0-2
|
||||
- Rebuilt for Boost 1.60
|
||||
|
||||
* Mon Jan 04 2016 Rich Mattes <richmattes@gmail.com> - 3.7.0-1
|
||||
- Update to release 3.7.0 (rhbz#1246705)
|
||||
|
||||
* Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 2.3.2-7
|
||||
- Rebuilt for Boost 1.59
|
||||
|
||||
* Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.2-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159
|
||||
|
||||
* Wed Jul 22 2015 David Tardon <dtardon@redhat.com> - 2.3.2-5
|
||||
- rebuild for Boost 1.58
|
||||
|
||||
* Sun Jul 05 2015 Rich Mattes <richmattes@gmail.com> - 2.3.2-4
|
||||
- Rebuild for boost (rhbz#1239159)
|
||||
|
||||
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
* Thu May 28 2015 Rich Mattes <richmattes@gmail.com> - 2.3.2-2
|
||||
- Update to release 2.3.2 (rhbz#1225680)
|
||||
|
||||
* Sat May 23 2015 Rich Mattes <richmattes@gmail.com> - 2.3.0-1
|
||||
- Update to release 2.3.0
|
||||
- Use license macro
|
||||
- Remove upstream patches
|
||||
|
||||
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 2.0.1-4
|
||||
- Rebuilt for GCC 5 C++11 ABI change
|
||||
|
||||
* Sat Jan 31 2015 Rich Mattes <richmattes@gmail.com> - 2.0.1-3
|
||||
- Disable latex documentation generation
|
||||
|
||||
* Thu Jan 29 2015 Petr Machata <pmachata@redhat.com> - 2.0.1-3
|
||||
- Rebuild for boost 1.57.0
|
||||
* Sat Oct 04 2014 Rich Mattes <richmattes@gmail.com> - 2.0.1-3
|
||||
- Rebuild for console-bridge-0.2.7
|
||||
|
||||
* Sun Sep 07 2014 Rich Mattes <richmattes@gmail.com> - 2.0.1-2
|
||||
- Added CMake version script
|
||||
|
Loading…
Reference in New Issue
Block a user