Navigation

    Robolink logo
    • Register
    • Login
    • Search
    • [[global:header.categories]]
    • [[global:header.recent]]
    • [[global:header.tags]]
    • [[global:header.popular]]
    • [[global:header.users]]
    • [[global:header.groups]]
    1. Home
    2. smilebean
    As of September 2021, we have moved technical support to Robolink Help

    Welcome to the Robolink Community forum!

    You can post here to interact with others in the Robolink community. We're checking it weekly, and we'll respond to some messages. If you're looking for technical support, head over to Robolink Help.
    S
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 25
    • Best 0
    • Groups 0

    smilebean

    @smilebean

    0
    Reputation
    1658
    Profile views
    25
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    smilebean Unfollow Follow

    Latest posts made by smilebean

    • RE: Control CoDrone with OpenCV and Python

      @robolink_arnold Okay.Thank you!

      posted in CoDrone Lite/Pro
      S
      smilebean
    • Control CoDrone with OpenCV and Python

      I want to Control CoDrone do "follow me " by OpenCV , It is possible?
      I find some example about tracking, they use the ccd . Is CoDrone has ccd?

      posted in CoDrone Lite/Pro
      S
      smilebean
    • RE: How to control my Drone with OpenCV?

      @robolink_arnold
      Thank you! If I have any questions about openCV , i will ask for help.

      posted in CoDrone Lite/Pro
      S
      smilebean
    • RE: How to control my Drone with OpenCV?

      @robolink_arnold About the delay , this is my code. Today I try the code, it happened. Maybe 1/10 , the delay above 2000ms.
      from time import sleep
      from petrone.drone import *
      from petrone.protocol import *
      from petrone.system import *
      import cv2

      def eventUpdateInformation(data):
      print("eventUpdateInformation() / {0} / {1} / {2} / Ver:{3} / 20{4:02}.{5}.{6}".format(data.modeUpdate,
      data.deviceType,
      data.imageType, data.version,
      data.year, data.month,
      data.day))

      cap = cv2.VideoCapture('rtsp://192.168.100.1/cam1/mpeg4')
      #cap = cv2.VideoCapture(0)
      fourcc = cv2.VideoWriter_fourcc(*'XVID')
      out = cv2.VideoWriter('outputVideo.avi',fourcc, 20.0, (640,480))

      drone = Drone(True, True, True, True, True)

      drone.connect()
      sleep(1)

      drone.sendTakeOff()
      sleep(1)

      while (cap.isOpened()):

      ret, frame = cap.read()
      
      out.write(frame)
      
      cv2.imshow('frame', frame)
      
      key = cv2.waitKey(1) & 0xFF
      
      if key == ord("W"):
          drone.sendControl(0, 0, 0, 70)
          print("T 60")
      
      if key == ord("S"):
          drone.sendControl(0, 0, 0, -70)
          print("T -60")
      
      if key == ord("A"):
          drone.sendControl(0, 0, 50, 0)
          print("Y 100")
      
      if key == ord("D"):
          drone.sendControl(0, 0, -50, 0)
          print("Y -100")
      
      if key == ord("i"):
          drone.sendControl(0, 50, 0, 0)
          print("P 100")
      
      if key == ord("k"):
          drone.sendControl(0, -50, 0, 0)
          print("P -100")
      
      if key == ord("j"):
          drone.sendControl(-50, 0, 0, 0)
          print("R 100")
      
      if key == ord("l"):
          drone.sendControl(50, 0, 0, 0)
          print("R -100")
      
      if key == ord("z"):
          drone.sendControl(0,0,0,0)
          print("hover")
      sleep(0.05)
      
      if key == ord("q"):
          drone.sendLanding()
          print("LANDING")
          cap.release()
          cv2.destroyAllWindows()
          sleep(2)
          drone.close()
          print("CLOSE")
          break
      
      if key == ord("x"):
          drone.sendStop()
          print("STOP")
          cap.release()
          cv2.destroyAllWindows()
          sleep(2)
          drone.close()
          print("CLOSE")
          break
      

      print("Disconnecting device.")
      drone.sendLinkDisconnect()
      sleep(0.2)
      drone.close()

      cap.release()
      out.release()

      cv2.destroyAllWindows()

      posted in CoDrone Lite/Pro
      S
      smilebean
    • RE: How to control my Drone with OpenCV?

      I install drivers you say. About the delay, maybe it happened when I use pycharm and anaconda in the same time. I want to know how to do about this. I mean control the Drone with OpenCV. Is it Opencv image recognition?
      About this code,I can't save the video I catch with CoDrone, but computer camera can.0_1532325151639_code.png

      posted in CoDrone Lite/Pro
      S
      smilebean
    • RE: How to control my Drone with OpenCV?

      The FPV transfer to PC have delay 3000~4000ms. Is it normal?
      I can use the Key_Control example thank you!
      Can you show me how to use OpenCV to control CoDrone?

      posted in CoDrone Lite/Pro
      S
      smilebean
    • RE: How to control my Drone with OpenCV?

      When I use pycharm, I have the same problem(Key_Control).0_1530588853043_problem.png
      And the FPV transfer to PC have delay 3000~4000ms. Is it normal?

      posted in CoDrone Lite/Pro
      S
      smilebean
    • RE: How to control my Drone with OpenCV?

      When I create a project , how not to use the virtual env of python?
      We date on monday 11pm in Taiwan.

      posted in CoDrone Lite/Pro
      S
      smilebean
    • RE: How to control my Drone with OpenCV?

      What do I need to prepare before video call? I trying to use pycharm now .If I have any question , I will ask, thank you!

      posted in CoDrone Lite/Pro
      S
      smilebean
    • RE: How to control my Drone with OpenCV?

      I live in Taiwan (GMT+8). Can we video call next week? Monday ,Tuesday or Friday(7/2,7/3 or 7/6) . And I can cooperate with you at any time , just give me a time, thank you!

      posted in CoDrone Lite/Pro
      S
      smilebean