1 |
commit: 787cc0e0ee016a7f911c8f22ce51563c80628cbc |
2 |
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Dec 28 18:58:36 2017 +0000 |
4 |
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 28 19:10:51 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=787cc0e0 |
7 |
|
8 |
dev-ros/tf2: fix build with ocnsole bridge 0.4 |
9 |
|
10 |
Package-Manager: Portage-2.3.19, Repoman-2.3.6 |
11 |
|
12 |
dev-ros/tf2/files/logging.patch | 98 ++++++++++++++++++++++++++++++++++++++++ |
13 |
dev-ros/tf2/tf2-0.5.16-r1.ebuild | 1 + |
14 |
2 files changed, 99 insertions(+) |
15 |
|
16 |
diff --git a/dev-ros/tf2/files/logging.patch b/dev-ros/tf2/files/logging.patch |
17 |
new file mode 100644 |
18 |
index 00000000000..20ce562b1f3 |
19 |
--- /dev/null |
20 |
+++ b/dev-ros/tf2/files/logging.patch |
21 |
@@ -0,0 +1,98 @@ |
22 |
+Index: tf2/src/buffer_core.cpp |
23 |
+=================================================================== |
24 |
+--- tf2.orig/src/buffer_core.cpp |
25 |
++++ tf2/src/buffer_core.cpp |
26 |
+@@ -123,7 +123,7 @@ bool BufferCore::warnFrameId(const char* |
27 |
+ { |
28 |
+ std::stringstream ss; |
29 |
+ ss << "Invalid argument passed to "<< function_name_arg <<" in tf2 frame_ids cannot be empty"; |
30 |
+- logWarn("%s",ss.str().c_str()); |
31 |
++ CONSOLE_BRIDGE_logWarn("%s",ss.str().c_str()); |
32 |
+ return true; |
33 |
+ } |
34 |
+ |
35 |
+@@ -131,7 +131,7 @@ bool BufferCore::warnFrameId(const char* |
36 |
+ { |
37 |
+ std::stringstream ss; |
38 |
+ ss << "Invalid argument \"" << frame_id << "\" passed to "<< function_name_arg <<" in tf2 frame_ids cannot start with a '/' like: "; |
39 |
+- logWarn("%s",ss.str().c_str()); |
40 |
++ CONSOLE_BRIDGE_logWarn("%s",ss.str().c_str()); |
41 |
+ return true; |
42 |
+ } |
43 |
+ |
44 |
+@@ -218,26 +218,26 @@ bool BufferCore::setTransform(const geom |
45 |
+ bool error_exists = false; |
46 |
+ if (stripped.child_frame_id == stripped.header.frame_id) |
47 |
+ { |
48 |
+- 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()); |
49 |
++ 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()); |
50 |
+ error_exists = true; |
51 |
+ } |
52 |
+ |
53 |
+ if (stripped.child_frame_id == "") |
54 |
+ { |
55 |
+- logError("TF_NO_CHILD_FRAME_ID: Ignoring transform from authority \"%s\" because child_frame_id not set ", authority.c_str()); |
56 |
++ CONSOLE_BRIDGE_logError("TF_NO_CHILD_FRAME_ID: Ignoring transform from authority \"%s\" because child_frame_id not set ", authority.c_str()); |
57 |
+ error_exists = true; |
58 |
+ } |
59 |
+ |
60 |
+ if (stripped.header.frame_id == "") |
61 |
+ { |
62 |
+- 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()); |
63 |
++ 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()); |
64 |
+ error_exists = true; |
65 |
+ } |
66 |
+ |
67 |
+ if (std::isnan(stripped.transform.translation.x) || std::isnan(stripped.transform.translation.y) || std::isnan(stripped.transform.translation.z)|| |
68 |
+ std::isnan(stripped.transform.rotation.x) || std::isnan(stripped.transform.rotation.y) || std::isnan(stripped.transform.rotation.z) || std::isnan(stripped.transform.rotation.w)) |
69 |
+ { |
70 |
+- 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)", |
71 |
++ 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)", |
72 |
+ stripped.child_frame_id.c_str(), authority.c_str(), |
73 |
+ stripped.transform.translation.x, stripped.transform.translation.y, stripped.transform.translation.z, |
74 |
+ stripped.transform.rotation.x, stripped.transform.rotation.y, stripped.transform.rotation.z, stripped.transform.rotation.w |
75 |
+@@ -252,7 +252,7 @@ bool BufferCore::setTransform(const geom |
76 |
+ |
77 |
+ if (!valid) |
78 |
+ { |
79 |
+- 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)", |
80 |
++ 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)", |
81 |
+ stripped.child_frame_id.c_str(), authority.c_str(), |
82 |
+ stripped.transform.rotation.x, stripped.transform.rotation.y, stripped.transform.rotation.z, stripped.transform.rotation.w); |
83 |
+ error_exists = true; |
84 |
+@@ -274,7 +274,7 @@ bool BufferCore::setTransform(const geom |
85 |
+ } |
86 |
+ else |
87 |
+ { |
88 |
+- 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()); |
89 |
++ 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()); |
90 |
+ return false; |
91 |
+ } |
92 |
+ } |
93 |
+@@ -622,7 +622,7 @@ geometry_msgs::TransformStamped BufferCo |
94 |
+ case tf2_msgs::TF2Error::LOOKUP_ERROR: |
95 |
+ throw LookupException(error_string); |
96 |
+ default: |
97 |
+- logError("Unknown error code: %d", retval); |
98 |
++ CONSOLE_BRIDGE_logError("Unknown error code: %d", retval); |
99 |
+ assert(0); |
100 |
+ } |
101 |
+ } |
102 |
+@@ -1593,7 +1593,7 @@ void BufferCore::_chainAsVector(const st |
103 |
+ case tf2_msgs::TF2Error::LOOKUP_ERROR: |
104 |
+ throw LookupException(error_string); |
105 |
+ default: |
106 |
+- logError("Unknown error code: %d", retval); |
107 |
++ CONSOLE_BRIDGE_logError("Unknown error code: %d", retval); |
108 |
+ assert(0); |
109 |
+ } |
110 |
+ } |
111 |
+@@ -1613,7 +1613,7 @@ void BufferCore::_chainAsVector(const st |
112 |
+ case tf2_msgs::TF2Error::LOOKUP_ERROR: |
113 |
+ throw LookupException(error_string); |
114 |
+ default: |
115 |
+- logError("Unknown error code: %d", retval); |
116 |
++ CONSOLE_BRIDGE_logError("Unknown error code: %d", retval); |
117 |
+ assert(0); |
118 |
+ } |
119 |
+ } |
120 |
|
121 |
diff --git a/dev-ros/tf2/tf2-0.5.16-r1.ebuild b/dev-ros/tf2/tf2-0.5.16-r1.ebuild |
122 |
index 5c97f8328ef..55afc005d04 100644 |
123 |
--- a/dev-ros/tf2/tf2-0.5.16-r1.ebuild |
124 |
+++ b/dev-ros/tf2/tf2-0.5.16-r1.ebuild |
125 |
@@ -23,3 +23,4 @@ RDEPEND=" |
126 |
DEPEND="${RDEPEND} |
127 |
test? ( dev-ros/roscpp ) |
128 |
" |
129 |
+PATCHES=( "${FILESDIR}/logging.patch" ) |