Merge branch 'miheev-dev' of https://github.com/IliaMiheev/probody into gerasimova-dev
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 998 B |
@@ -39,9 +39,7 @@ def color_detection(data, print_type='str'):
|
||||
else:
|
||||
color = None
|
||||
|
||||
#в MAIN для вызова функции должно быть:
|
||||
#color_sub = rospy.Subscriber('main_camera/image_raw', Image,
|
||||
#lambda img: color_detection(img, print_type='rgb'),
|
||||
#queue_size=1)
|
||||
#rospy.sleep(2)
|
||||
#color_sub.unregister()
|
||||
<<separator>>
|
||||
color_sub = rospy.Subscriber('main_camera/image_raw', Image, lambda img: color_detection(img, print_type='rgb'), queue_size=1)
|
||||
rospy.sleep(2)
|
||||
color_sub.unregister()
|
||||
@@ -20,6 +20,7 @@ land = rospy.ServiceProxy('land', Trigger) #сервис для посадки
|
||||
rospy.init_node('flight')
|
||||
bridge = CvBridge()
|
||||
|
||||
|
||||
def navigate_wait(x=0, y=0, z=1, speed=0.5, frame_id='aruco_map', auto_arm=False, tolerance=0.2,sleep=2):
|
||||
"""
|
||||
Летит в указанную точку и ждет, пока дрон туда ДОЛЕТИТ.
|
||||
@@ -88,13 +89,14 @@ def signal_handler(sig, frame):
|
||||
signal.signal(signal.SIGINT, signal_handler)
|
||||
|
||||
<<qr_function>>
|
||||
<<ColorDetect>>
|
||||
|
||||
def main():
|
||||
navigate_wait(z=1,frame_id='body',auto_arm=True) #должно быть. включает моторы и поднимает дрон на метр вверх
|
||||
#в дальнейшем не передавать переменной auto_arm значение True
|
||||
|
||||
|
||||
<<navigate_wait>>
|
||||
<<main>>
|
||||
|
||||
|
||||
land() #посадка
|
||||
|
||||
Reference in New Issue
Block a user