summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2018-01-07 07:28:55 +0100
committerAlexis Ballier <aballier@gentoo.org>2018-01-07 07:38:49 +0100
commit9c588b5aa80e77849fa0b36a36a80869f903e7ff (patch)
tree363052eaf4f6fb89cae1664230e4bfccfda42c4c /dev-ros
parentdev-libs/collada-dom: bump to 2.5.0 (diff)
downloadgentoo-9c588b5aa80e77849fa0b36a36a80869f903e7ff.tar.gz
gentoo-9c588b5aa80e77849fa0b36a36a80869f903e7ff.tar.bz2
gentoo-9c588b5aa80e77849fa0b36a36a80869f903e7ff.zip
dev-ros/tf2: forward port console bridge patch
Package-Manager: Portage-2.3.19, Repoman-2.3.6
Diffstat (limited to 'dev-ros')
-rw-r--r--dev-ros/tf2/files/logging2.patch98
-rw-r--r--dev-ros/tf2/tf2-0.5.17.ebuild1
2 files changed, 99 insertions, 0 deletions
diff --git a/dev-ros/tf2/files/logging2.patch b/dev-ros/tf2/files/logging2.patch
new file mode 100644
index 000000000000..38a3ee3c0bb6
--- /dev/null
+++ b/dev-ros/tf2/files/logging2.patch
@@ -0,0 +1,98 @@
+Index: tf2/src/buffer_core.cpp
+===================================================================
+--- tf2.orig/src/buffer_core.cpp
++++ tf2/src/buffer_core.cpp
+@@ -123,7 +123,7 @@ bool BufferCore::warnFrameId(const char*
+ {
+ std::stringstream ss;
+ ss << "Invalid argument passed to "<< function_name_arg <<" in tf2 frame_ids cannot be empty";
+- logWarn("%s",ss.str().c_str());
++ CONSOLE_BRIDGE_logWarn("%s",ss.str().c_str());
+ return true;
+ }
+
+@@ -131,7 +131,7 @@ bool BufferCore::warnFrameId(const char*
+ {
+ std::stringstream ss;
+ ss << "Invalid argument \"" << frame_id << "\" passed to "<< function_name_arg <<" in tf2 frame_ids cannot start with a '/' like: ";
+- logWarn("%s",ss.str().c_str());
++ CONSOLE_BRIDGE_logWarn("%s",ss.str().c_str());
+ return true;
+ }
+
+@@ -218,26 +218,26 @@ bool BufferCore::setTransform(const geom
+ bool error_exists = false;
+ if (stripped.child_frame_id == stripped.header.frame_id)
+ {
+- logError("TF_SELF_TRANSFORM: Ignoring transform from authority \"%s\" with frame_id and child_frame_id \"%s\" because they are the same", authority.c_str(), stripped.child_frame_id.c_str());
++ CONSOLE_BRIDGE_logError("TF_SELF_TRANSFORM: Ignoring transform from authority \"%s\" with frame_id and child_frame_id \"%s\" because they are the same", authority.c_str(), stripped.child_frame_id.c_str());
+ error_exists = true;
+ }
+
+ if (stripped.child_frame_id == "")
+ {
+- logError("TF_NO_CHILD_FRAME_ID: Ignoring transform from authority \"%s\" because child_frame_id not set ", authority.c_str());
++ CONSOLE_BRIDGE_logError("TF_NO_CHILD_FRAME_ID: Ignoring transform from authority \"%s\" because child_frame_id not set ", authority.c_str());
+ error_exists = true;
+ }
+
+ if (stripped.header.frame_id == "")
+ {
+- logError("TF_NO_FRAME_ID: Ignoring transform with child_frame_id \"%s\" from authority \"%s\" because frame_id not set", stripped.child_frame_id.c_str(), authority.c_str());
++ CONSOLE_BRIDGE_logError("TF_NO_FRAME_ID: Ignoring transform with child_frame_id \"%s\" from authority \"%s\" because frame_id not set", stripped.child_frame_id.c_str(), authority.c_str());
+ error_exists = true;
+ }
+
+ if (std::isnan(stripped.transform.translation.x) || std::isnan(stripped.transform.translation.y) || std::isnan(stripped.transform.translation.z)||
+ std::isnan(stripped.transform.rotation.x) || std::isnan(stripped.transform.rotation.y) || std::isnan(stripped.transform.rotation.z) || std::isnan(stripped.transform.rotation.w))
+ {
+- logError("TF_NAN_INPUT: Ignoring transform for child_frame_id \"%s\" from authority \"%s\" because of a nan value in the transform (%f %f %f) (%f %f %f %f)",
++ CONSOLE_BRIDGE_logError("TF_NAN_INPUT: Ignoring transform for child_frame_id \"%s\" from authority \"%s\" because of a nan value in the transform (%f %f %f) (%f %f %f %f)",
+ stripped.child_frame_id.c_str(), authority.c_str(),
+ stripped.transform.translation.x, stripped.transform.translation.y, stripped.transform.translation.z,
+ stripped.transform.rotation.x, stripped.transform.rotation.y, stripped.transform.rotation.z, stripped.transform.rotation.w
+@@ -252,7 +252,7 @@ bool BufferCore::setTransform(const geom
+
+ if (!valid)
+ {
+- logError("TF_DENORMALIZED_QUATERNION: Ignoring transform for child_frame_id \"%s\" from authority \"%s\" because of an invalid quaternion in the transform (%f %f %f %f)",
++ CONSOLE_BRIDGE_logError("TF_DENORMALIZED_QUATERNION: Ignoring transform for child_frame_id \"%s\" from authority \"%s\" because of an invalid quaternion in the transform (%f %f %f %f)",
+ stripped.child_frame_id.c_str(), authority.c_str(),
+ stripped.transform.rotation.x, stripped.transform.rotation.y, stripped.transform.rotation.z, stripped.transform.rotation.w);
+ error_exists = true;
+@@ -274,7 +274,7 @@ bool BufferCore::setTransform(const geom
+ }
+ else
+ {
+- logWarn("TF_OLD_DATA ignoring data from the past for frame %s at time %g according to authority %s\nPossible reasons are listed at http://wiki.ros.org/tf/Errors%%20explained", stripped.child_frame_id.c_str(), stripped.header.stamp.toSec(), authority.c_str());
++ CONSOLE_BRIDGE_logWarn("TF_OLD_DATA ignoring data from the past for frame %s at time %g according to authority %s\nPossible reasons are listed at http://wiki.ros.org/tf/Errors%%20explained", stripped.child_frame_id.c_str(), stripped.header.stamp.toSec(), authority.c_str());
+ return false;
+ }
+ }
+@@ -633,7 +633,7 @@ geometry_msgs::TransformStamped BufferCo
+ case tf2_msgs::TF2Error::LOOKUP_ERROR:
+ throw LookupException(error_string);
+ default:
+- logError("Unknown error code: %d", retval);
++ CONSOLE_BRIDGE_logError("Unknown error code: %d", retval);
+ assert(0);
+ }
+ }
+@@ -1604,7 +1604,7 @@ void BufferCore::_chainAsVector(const st
+ case tf2_msgs::TF2Error::LOOKUP_ERROR:
+ throw LookupException(error_string);
+ default:
+- logError("Unknown error code: %d", retval);
++ CONSOLE_BRIDGE_logError("Unknown error code: %d", retval);
+ assert(0);
+ }
+ }
+@@ -1623,7 +1623,7 @@ void BufferCore::_chainAsVector(const st
+ case tf2_msgs::TF2Error::LOOKUP_ERROR:
+ throw LookupException(error_string);
+ default:
+- logError("Unknown error code: %d", retval);
++ CONSOLE_BRIDGE_logError("Unknown error code: %d", retval);
+ assert(0);
+ }
+ }
diff --git a/dev-ros/tf2/tf2-0.5.17.ebuild b/dev-ros/tf2/tf2-0.5.17.ebuild
index 5751b898da20..775ef1258bc2 100644
--- a/dev-ros/tf2/tf2-0.5.17.ebuild
+++ b/dev-ros/tf2/tf2-0.5.17.ebuild
@@ -23,3 +23,4 @@ RDEPEND="
DEPEND="${RDEPEND}
test? ( dev-ros/roscpp )
"
+PATCHES=( "${FILESDIR}/logging2.patch" )