Throttle not working

asked 2022-03-27 03:32:51 -0500

distro gravatar image

I get:

ExtrapolationException: Lookup would require extrapolation into the past.  Requested time 1240.327000000 but the earliest data is at time 1240.793000000, when looking up transform from frame [map] to frame

tf is giving me issues when I try to use it, I have tried using throttling to increase the rate of publishing to tf(3000hz and above) and it didn't help. I make use of tf in this function here:

def transform(self,coord,from_frame='map',to_frame='base_scan'):
    self.scope.header.frame_id = from_frame
    self.scope.header.stamp = rospy.get_rostime() # rospy.TIme(0)
    self.scope.point.x = coord[0]
    self.scope.point.y = coord[1]
    self.scope.point.z = 0
    p = self.listener.transformPoint(to_frame,self.scope)
    return [p.point.x,p.point.y]

I use this function in a for loop to change several points from map to base_scan frame. I just print out tooasst to see how effectively the points are being converted and the terminal fluctutates between sevral lines of toast and several lines of said error. Is there any other thing I can do to make the error go away?

edit retag flag offensive close merge delete