[fix] fix learning tf bug

This commit is contained in:
jieshoudaxue
2023-07-07 11:08:32 +08:00
parent 1b31562cd6
commit ad92bbeb92
2 changed files with 3 additions and 5 deletions
+3 -1
View File
@@ -28,7 +28,7 @@ def main():
rate = rospy.Rate(10)
while not rospy.is_shutdown():
try:
(translation, rotation) = tf_listener.lookupTransform("/turtle2", "turtle1", torpy.Time(0))
(translation, rotation) = tf_listener.lookupTransform("/turtle2", "turtle1", rospy.Time(0))
except (tf.LookupException, tf.ConnectivityException, tf.ExtrapolationException):
continue
@@ -44,5 +44,7 @@ def main():
cmd_pub.publish(cmd_vel)
rate.sleep()
if __name__ == "__main__":
main()
-4
View File
@@ -53,10 +53,6 @@ int main(int argc, char ** argv) {
ros::spinOnce();
}
return 0;
}