New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[jsk_data] Use different value for duration and rate in tf_to_transform.py #1509
Conversation
Rate can be 50 - 100 for example, but duration should be ~1 [s] even so. In previous implementation, the duration will be 1/100 - 1/50 [s] and it is too small to resolve tf.
fc3cb79
to
934113f
Compare
tf.ConnectivityException, | ||
tf.ExtrapolationException): | ||
rospy.logerr('cannot get transform') | ||
except Exception: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It needed to be Exception
Exception in thread Thread-5:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/timer.py", line 223, in run
self._callback(TimerEvent(last_expected, last_real, current_expected, current_real, last_duration))
File "/home/wkentaro/Projects/jsk_apc/src/jsk-ros-pkg/jsk_common/jsk_topic_tools/scripts/tf_to_transform.py", line 32, in _publish_transform
timeout=rospy.Duration(self.duration)
Exception: Lookup would require extrapolation into the past. Requested time 1489937523.406011105 but the earliest data is at time 1489937523.459053278, when looking up transform from frame [right_hand_camera_rgb_optical_frame] to frame [base]. canTransform returned after 1.00738 timeout was 1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I explain why I needed this change.
Catching the Exception is not ideal solution.
@knorth55 Please review. |
+1 |
Please merge this. |
please list up the code that affected by this change. |
Maybe the code used by @knorth55 . |
I made this program, and i think there is yet no one or repo using this program. |
parent_frame_id) | ||
self.child_frame_id = rospy.get_param('~child_frame_id', | ||
child_frame_id) | ||
rate = rospy.get_param('~rate', rate) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GOOD!
@knorth55 : please provide link to the code using this program |
ok, merged, but if this code is only used one place, that is not a common program.... |
i thought it can be used in various program for logging. |
btw why tf.LookupTransform is not ok?
#1482 (comment)
Too much data?
…--
◉ Kei Okada
2017-03-22 16:26 GMT+09:00 Shingo Kitagawa <notifications@github.com>:
i thought it can be used in various program for logging.
maybe no one knows its existence.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#1509 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAeG3CRw8ZAtWYF9twNkS8JAymkWFOKYks5roM0NgaJpZM4MhxEG>
.
|
Im using lookupTransform in this program. |
Yeah. This program is originally created for data_collection_server.py. It is used at projects like:
but current active users are only me and @knorth55 |
I mean why you do not log tf data? because it becomes too large?
ok, merged, but if this code is only used one place, that is not a common
program....
ok, at least this is used in 5 different places......
…--
◉ Kei Okada
2017-03-22 20:01 GMT+09:00 Shingo Kitagawa <notifications@github.com>:
Im using lookupTransform in this program.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#1509 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAeG3FcMuOKcKD98KbwvzGxg9CJFjzfGks5roP-LgaJpZM4MhxEG>
.
--
--
◉ Kei Okada
|
Because /tf cannot be subscribe for synchronizing with other message,
Ah, actually I mean data_collection_server.py. |
I see, another aspect of understanding '/tf' is, Although tf is pub/sub through topic, but has different layer than other topics, because it has strong tf library and the message is cached in tf client or tf2 server. So we can use tf as a very basic information layer, like on euslisp, we use coordinates as a base class of most of class definition (https://github.com/euslisp/jskeus/blob/master/irteus/irtpointcloud.l#L31) |
Yeah, that is the another way. |
Rate can be 50 - 100 for example, but duration should be ~1 [s] even so. In
previous implementation, the duration will be 1/100 - 1/50 [s] and it is
too small to resolve tf.