mirror of
https://github.com/Jieshoudaxue/ros_senior.git
synced 2026-08-29 08:34:43 +08:00
[fix] fix learning tf bug
This commit is contained in:
@@ -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()
|
||||
@@ -53,10 +53,6 @@ int main(int argc, char ** argv) {
|
||||
ros::spinOnce();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user