def __init__(self):
self.lock = threading.Lock()
self.sub_imu = rospy.Subscriber('imu', Imu, self.imu_cb)
self.last_imu_angle = 0
self.imu_angle = 0
while not rospy.is_shutdown():
self.last_imu_angle = self.imu_angle
rospy.sleep(10)
rospy.loginfo("imu_drift:"+str((self.imu_angle-self.last_imu_angle)*180/3.1415926))
评论列表
文章目录