def correct_angle(self):
# rospy.loginfo("sadasdafasf")
(x,theta,if_close_line) = self.close_line_cmd.find_line()
r = rospy.Rate(50)
move_velocity = g_msgs.Twist()
if theta > 0:
move_velocity.angular.z = -0.10
else:
move_velocity.angular.z = 0.10
while not rospy.is_shutdown():
(x,theta,if_close_line) = self.close_line_cmd.find_line()
self.cmd_move_pub.publish(move_velocity)
#????????????????
if theta < 0.02 and theta > -0.02:
rospy.loginfo("will Stop!!!!!!!!!!")
self.brake()
break
r.sleep()
#??3??????
go_close_line.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录