You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have travous on tf 1.11.9, where getFrameStrings() fails if it called just after rospy.init_node()
$ ./hoge.py
Traceback (most recent call last):
File "./hoge.py", line 8, in <module>
print tflistener.getFrameStrings()
File "/opt/ros/indigo/lib/python2.7/dist-packages/tf/listener.py", line 98, in getFrameStrings
return [p for p, _ in data.items()]
and if we comment in time.sleep() then it works ok.This does not happens on 1.11.8, so maybe because of #149.
I do not well understand how tflistener.getFrameStrings called on 1.11.8, but for example, we can avoid this problem by.
def getFrameStrings(self):
""" Not a recommended API, only here for backwards compatibility """
data = yaml.load(self._buffer.all_frames_as_yaml())
return data and [p for p, _ in data.items()]
The text was updated successfully, but these errors were encountered:
k-okada
added a commit
to tork-a/rtmros_nextage
that referenced
this issue
Aug 10, 2017
Fixes#152
The empty yaml was coming through as a list not a dict so was breaking the expectations.
I used the shorthand `or {}` since I know any valid data won't evaluate to zero. A more complete solution is described here: https://stackoverflow.com/a/35777649/604099
Ahh, if there's no data, by default the yaml parser creates a list but if there's data it's a dict. PS As that's a deprecated API please switch to one of the supported ones like: allFramesAsString()
Fixes#152
The empty yaml was coming through as a list not a dict so was breaking the expectations.
I used the shorthand `or {}` since I know any valid data won't evaluate to zero. A more complete solution is described here: https://stackoverflow.com/a/35777649/604099
I have travous on tf 1.11.9, where
getFrameStrings()
fails if it called just afterrospy.init_node()
the code is
and if we comment in
time.sleep()
then it works ok.This does not happens on 1.11.8, so maybe because of #149.I do not well understand how
tflistener.getFrameStrings
called on 1.11.8, but for example, we can avoid this problem by.The text was updated successfully, but these errors were encountered: