diff options
author | Tim Rakowski | 2018-01-04 22:33:49 +0100 |
---|---|---|
committer | Tim Rakowski | 2018-01-04 22:42:12 +0100 |
commit | 387691b49f0fce690f127695b65b54022b171ab5 (patch) | |
tree | 29b353cd6d7e3ac00c7de40e7d47eadd8f94aab7 | |
parent | 834356cbd676971b84a0b60dbcde9576388e4740 (diff) | |
download | aur-ros-lunar-geometric-shapes.tar.gz |
Backported mikepurvis:fix-log-warnings
- Fix log warnings.
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 15 | ||||
-rw-r--r-- | logError_fix.patch | 207 |
3 files changed, 222 insertions, 6 deletions
@@ -1,5 +1,5 @@ # Generated by mksrcinfo v8 -# Tue Dec 12 20:47:21 UTC 2017 +# Thu Jan 4 21:41:57 UTC 2018 pkgbase = ros-lunar-geometric-shapes pkgdesc = ROS - This package contains generic definitions of geometric shapes and bodies. pkgver = 0.5.3 @@ -7,9 +7,9 @@ pkgbase = ros-lunar-geometric-shapes url = http://ros.org/wiki/geometric_shapes arch = any license = BSD + makedepends = ros-lunar-catkin makedepends = cmake makedepends = ros-build-tools - makedepends = ros-lunar-catkin makedepends = pkg-config depends = ros-lunar-random-numbers depends = ros-lunar-visualization-msgs @@ -23,7 +23,9 @@ pkgbase = ros-lunar-geometric-shapes depends = console-bridge depends = qhull source = ros-lunar-geometric-shapes-0.5.3-0.tar.gz::https://github.com/ros-gbp/geometric_shapes-release/archive/release/lunar/geometric_shapes/0.5.3-0.tar.gz + source = logError_fix.patch sha256sums = d467aed74d2d66208fdb475f61850414cbabfb04d5d96bbb5efa5b85bfe14798 + sha256sums = dec7225d75a470c3ee633ec0f0669ae79c9b68e8014a86b991a17fd125ba753a pkgname = ros-lunar-geometric-shapes @@ -11,8 +11,9 @@ pkgrel=1 license=('BSD') ros_makedepends=(ros-lunar-catkin) -makedepends=('cmake' 'ros-build-tools' - ${ros_makedepends[@]} +makedepends=(${ros_makedepends[@]} + cmake + ros-build-tools pkg-config) ros_depends=(ros-lunar-random-numbers @@ -36,8 +37,13 @@ depends=(${ros_depends[@]} # Tarball version (faster download) _dir="geometric_shapes-release-release-lunar-geometric_shapes-${pkgver}-${_pkgver_patch}" -source=("${pkgname}-${pkgver}-${_pkgver_patch}.tar.gz"::"https://github.com/ros-gbp/geometric_shapes-release/archive/release/lunar/geometric_shapes/${pkgver}-${_pkgver_patch}.tar.gz") -sha256sums=('d467aed74d2d66208fdb475f61850414cbabfb04d5d96bbb5efa5b85bfe14798') +source=("${pkgname}-${pkgver}-${_pkgver_patch}.tar.gz"::"https://github.com/ros-gbp/geometric_shapes-release/archive/release/lunar/geometric_shapes/${pkgver}-${_pkgver_patch}.tar.gz" "logError_fix.patch") +sha256sums=('d467aed74d2d66208fdb475f61850414cbabfb04d5d96bbb5efa5b85bfe14798' "dec7225d75a470c3ee633ec0f0669ae79c9b68e8014a86b991a17fd125ba753a") + +prepare() { + cd "${srcdir}" + patch -Np1 -i "logError_fix.patch" +} build() { # Use ROS environment variables @@ -56,6 +62,7 @@ build() { -DCMAKE_BUILD_TYPE=Release \ -DCATKIN_BUILD_BINARY_PACKAGE=ON \ -DCMAKE_INSTALL_PREFIX=/opt/ros/lunar \ + -DCMAKE_PREFIX_PATH=/opt/ros/lunar \ -DPYTHON_EXECUTABLE=/usr/bin/python2 \ -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 \ -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so \ diff --git a/logError_fix.patch b/logError_fix.patch new file mode 100644 index 000000000000..31c39ace151c --- /dev/null +++ b/logError_fix.patch @@ -0,0 +1,207 @@ +Only in patched: build +diff -ura original/geometric_shapes-release-release-lunar-geometric_shapes-0.5.3-0/src/bodies.cpp patched/geometric_shapes-release-release-lunar-geometric_shapes-0.5.3-0/src/bodies.cpp +--- original/geometric_shapes-release-release-lunar-geometric_shapes-0.5.3-0/src/bodies.cpp 2017-11-30 16:08:31.000000000 +0100 ++++ patched/geometric_shapes-release-release-lunar-geometric_shapes-0.5.3-0/src/bodies.cpp 2018-01-04 22:29:06.515092547 +0100 +@@ -788,7 +788,7 @@ + + if (exitcode != 0) + { +- logWarn("Convex hull creation failed"); ++ CONSOLE_BRIDGE_logWarn("Convex hull creation failed"); + qh_freeqhull (!qh_ALL); + int curlong, totlong; + qh_memfreeshort (&curlong, &totlong); +@@ -1174,7 +1174,7 @@ + { + if (i >= bodies_.size()) + { +- logError("There is no body at index %u", i); ++ CONSOLE_BRIDGE_logError("There is no body at index %u", i); + return; + } + +@@ -1185,7 +1185,7 @@ + { + if (i >= bodies_.size()) + { +- logError("There is no body at index %u", i); ++ CONSOLE_BRIDGE_logError("There is no body at index %u", i); + return NULL; + } + else +diff -ura original/geometric_shapes-release-release-lunar-geometric_shapes-0.5.3-0/src/body_operations.cpp patched/geometric_shapes-release-release-lunar-geometric_shapes-0.5.3-0/src/body_operations.cpp +--- original/geometric_shapes-release-release-lunar-geometric_shapes-0.5.3-0/src/body_operations.cpp 2017-11-30 16:08:31.000000000 +0100 ++++ patched/geometric_shapes-release-release-lunar-geometric_shapes-0.5.3-0/src/body_operations.cpp 2018-01-04 22:40:18.975848616 +0100 +@@ -59,7 +59,7 @@ + body = new bodies::ConvexMesh(shape); + break; + default: +- logError("Creating body from shape: Unknown shape type %d", (int)shape->type); ++ CONSOLE_BRIDGE_logError("Creating body from shape: Unknown shape type %d", (int)shape->type); + break; + } + +@@ -112,7 +112,7 @@ + Eigen::Quaterniond q(pose.orientation.w, pose.orientation.x, pose.orientation.y, pose.orientation.z); + if (fabs(q.squaredNorm() - 1.0) > 1e-3) + { +- logError("Quaternion is not normalized. Assuming identity."); ++ CONSOLE_BRIDGE_logError("Quaternion is not normalized. Assuming identity."); + q = Eigen::Quaterniond(1.0, 0.0, 0.0, 0.0); + } + Eigen::Affine3d af(Eigen::Translation3d(pose.position.x, pose.position.y, pose.position.z) * q.toRotationMatrix()); +diff -ura original/geometric_shapes-release-release-lunar-geometric_shapes-0.5.3-0/src/mesh_operations.cpp patched/geometric_shapes-release-release-lunar-geometric_shapes-0.5.3-0/src/mesh_operations.cpp +--- original/geometric_shapes-release-release-lunar-geometric_shapes-0.5.3-0/src/mesh_operations.cpp 2017-11-30 16:08:31.000000000 +0100 ++++ patched/geometric_shapes-release-release-lunar-geometric_shapes-0.5.3-0/src/mesh_operations.cpp 2018-01-04 22:29:06.515092547 +0100 +@@ -133,7 +133,7 @@ + return NULL; + + if (source.size() % 3 != 0) +- logError("The number of vertices to construct a mesh from is not divisible by 3. Probably constructed triangles will not make sense."); ++ CONSOLE_BRIDGE_logError("The number of vertices to construct a mesh from is not divisible by 3. Probably constructed triangles will not make sense."); + + std::set<detail::LocalVertexType, detail::ltLocalVertexValue> vertices; + std::vector<unsigned int> triangles; +@@ -220,7 +220,7 @@ + { + if (!buffer || size < 1) + { +- logWarn("Cannot construct mesh from empty binary buffer"); ++ CONSOLE_BRIDGE_logWarn("Cannot construct mesh from empty binary buffer"); + return NULL; + } + +@@ -285,21 +285,21 @@ + } + catch (resource_retriever::Exception& e) + { +- logError("%s", e.what()); ++ CONSOLE_BRIDGE_logError("%s", e.what()); + return NULL; + } + + if (res.size == 0) + { +- logWarn("Retrieved empty mesh for resource '%s'", resource.c_str()); ++ CONSOLE_BRIDGE_logWarn("Retrieved empty mesh for resource '%s'", resource.c_str()); + return NULL; + } + + Mesh *m = createMeshFromBinary(reinterpret_cast<const char*>(res.data.get()), res.size, scale, resource); + if (!m) + { +- logWarn("Assimp reports no scene in %s.", resource.c_str()); +- logWarn("This could be because of a resource filename that is too long for the Assimp library, a known bug. As a workaround shorten the filename/path."); ++ CONSOLE_BRIDGE_logWarn("Assimp reports no scene in %s.", resource.c_str()); ++ CONSOLE_BRIDGE_logWarn("This could be because of a resource filename that is too long for the Assimp library, a known bug. As a workaround shorten the filename/path."); + } + return m; + } +@@ -344,7 +344,7 @@ + { + if (!scene->HasMeshes()) + { +- logWarn("Assimp reports scene in %s has no meshes", resource_name.c_str()); ++ CONSOLE_BRIDGE_logWarn("Assimp reports scene in %s has no meshes", resource_name.c_str()); + return NULL; + } + EigenSTL::vector_Vector3d vertices; +@@ -352,12 +352,12 @@ + extractMeshData(scene, scene->mRootNode, aiMatrix4x4(), scale, vertices, triangles); + if (vertices.empty()) + { +- logWarn("There are no vertices in the scene %s", resource_name.c_str()); ++ CONSOLE_BRIDGE_logWarn("There are no vertices in the scene %s", resource_name.c_str()); + return NULL; + } + if (triangles.empty()) + { +- logWarn("There are no triangles in the scene %s", resource_name.c_str()); ++ CONSOLE_BRIDGE_logWarn("There are no triangles in the scene %s", resource_name.c_str()); + return NULL; + } + +@@ -378,7 +378,7 @@ + if (shape->type == shapes::CONE) + return shapes::createMeshFromShape(static_cast<const shapes::Cone&>(*shape)); + else +- logError("Conversion of shape of type '%s' to a mesh is not known", shapeStringName(shape).c_str()); ++ CONSOLE_BRIDGE_logError("Conversion of shape of type '%s' to a mesh is not known", shapeStringName(shape).c_str()); + return NULL; + } + +diff -ura original/geometric_shapes-release-release-lunar-geometric_shapes-0.5.3-0/src/shape_operations.cpp patched/geometric_shapes-release-release-lunar-geometric_shapes-0.5.3-0/src/shape_operations.cpp +--- original/geometric_shapes-release-release-lunar-geometric_shapes-0.5.3-0/src/shape_operations.cpp 2017-11-30 16:08:31.000000000 +0100 ++++ patched/geometric_shapes-release-release-lunar-geometric_shapes-0.5.3-0/src/shape_operations.cpp 2018-01-04 22:29:06.515092547 +0100 +@@ -62,7 +62,7 @@ + { + if (shape_msg.triangles.empty() || shape_msg.vertices.empty()) + { +- logWarn("Mesh definition is empty"); ++ CONSOLE_BRIDGE_logWarn("Mesh definition is empty"); + return NULL; + } + else +@@ -117,7 +117,7 @@ + shape_msg.dimensions[shape_msgs::SolidPrimitive::CONE_HEIGHT]); + } + if (shape == NULL) +- logError("Unable to construct shape corresponding to shape_msg of type %d", (int)shape_msg.type); ++ CONSOLE_BRIDGE_logError("Unable to construct shape corresponding to shape_msg of type %d", (int)shape_msg.type); + + return shape; + } +@@ -202,7 +202,7 @@ + } + catch (std::runtime_error &ex) + { +- logError("%s", ex.what()); ++ CONSOLE_BRIDGE_logError("%s", ex.what()); + } + if (ok) + return true; +@@ -451,7 +451,7 @@ + } + else + { +- logError("Unable to construct shape message for shape of type %d", (int)shape->type); ++ CONSOLE_BRIDGE_logError("Unable to construct shape message for shape of type %d", (int)shape->type); + return false; + } + +@@ -512,7 +512,7 @@ + } + else + { +- logError("Unable to save shape of type %d", (int)shape->type); ++ CONSOLE_BRIDGE_logError("Unable to save shape of type %d", (int)shape->type); + } + } + +@@ -580,7 +580,7 @@ + m->computeVertexNormals(); + } + else +- logError("Unknown shape type: '%s'", type.c_str()); ++ CONSOLE_BRIDGE_logError("Unknown shape type: '%s'", type.c_str()); + } + } + return result; +diff -ura original/geometric_shapes-release-release-lunar-geometric_shapes-0.5.3-0/src/shapes.cpp patched/geometric_shapes-release-release-lunar-geometric_shapes-0.5.3-0/src/shapes.cpp +--- original/geometric_shapes-release-release-lunar-geometric_shapes-0.5.3-0/src/shapes.cpp 2017-11-30 16:08:31.000000000 +0100 ++++ patched/geometric_shapes-release-release-lunar-geometric_shapes-0.5.3-0/src/shapes.cpp 2018-01-04 22:29:06.515092547 +0100 +@@ -224,12 +224,12 @@ + + void shapes::OcTree::scaleAndPadd(double scale, double padd) + { +- logWarn("OcTrees cannot be scaled or padded"); ++ CONSOLE_BRIDGE_logWarn("OcTrees cannot be scaled or padded"); + } + + void shapes::Plane::scaleAndPadd(double scale, double padding) + { +- logWarn("Planes cannot be scaled or padded"); ++ CONSOLE_BRIDGE_logWarn("Planes cannot be scaled or padded"); + } + + void shapes::Shape::scale(double scale) |