unknown reason for transform failure
i'm trying to use the gmapping stack with my robot. i broadcast the following tf every 0.05 seconds:
current_time = rospy.Time.now()
odom_quat = tf.transformations.quaternion_about_axis(math.radians(theta), (0, 0, 1))
laser_quat = tf.transformations.quaternion_about_axis(math.radians(-90), (0, 0, 1))
self.tfBdc.sendTransform((x, y, 0.0), odom_quat, current_time, "/base_link", "/odom")
self.tfBdc.sendTransform((0.16, 0.0, 0.2), laser_quat, rospy.Time.now(), "/base_laser", "/base_link")
i check the result in rviz, if i set the fixed frame as 'base_laser' in the 'global options' tag, everything seems to be fine(the 'LaserScan' tag is always green). But if i set the fixed frame as 'odom' or 'base_link' in the 'global option' tag, the 'LaserScan' tag just change to red and green from time to time. The error message in the 'LaserScan' tag says that 'unknown reason for transform failure'. How can i fix that?