Navigation

    Robolink logo
    • Register
    • Login
    • Search
    • [[global:header.categories]]
    • [[global:header.recent]]
    • [[global:header.tags]]
    • [[global:header.popular]]
    • [[global:header.users]]
    • [[global:header.groups]]
    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.

    Issues in demo unit for KMSO in NY

    CoDrone Lite/Pro
    3
    12
    5839
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jaykay0408 @robolink_leila last edited by

      @robolink_leila Hello,

      1. I have used time.sleep() before, but doesn't help a lot before. But, I will test this again after refreshing the connection.

      2. However, currently it is solid green (tail LED) when a battery is plugged in
        https://photos.app.goo.gl/vooqh7mF1cR7ifqU6

      3. Even reset doesn't work
        https://photos.app.goo.gl/tWPgEYb8J9Zp4AYZ9

      4. I setup the 30 min tech support this afternoon, but no show.
        Thank you.

      1 Reply Last reply Reply Quote 0
      • robolink_leila
        robolink_leila @jaykay0408 last edited by

        @jaykay0408 That landing looks about right. It varies from drone to drone. You can probably write your own function if you would like that decreases the throttle in increments. For the skipped commands you were mentioning, I have found it useful to insert a time.sleep(1) in between commands. If you use the time library make sure to import time. Let me know if these answer your questions.

        J 1 Reply Last reply Reply Quote 0
        • J
          jaykay0408 @ixmclean last edited by

          @ixmclean One more question:
          As you can see from a video, when a drone lands on a floor using land( ), it hit a ground hardly. I guess this may cause a problem of a motor (position).
          So, is there way for very soft landing using library?
          https://photos.app.goo.gl/4D9fQbA4gCbbpvZA9
          (see the last part of video for landing)
          Thank you

          robolink_leila 1 Reply Last reply Reply Quote 0
          • J
            jaykay0408 @ixmclean last edited by

            @ixmclean Hello,

            1. Yes, sometimes, the communication drops to the drone (1 in 6 times is a rough guess) I've made it a habit to unplug the BLE cable, and re-seat the CoDrone Battery to ensure a fresh connection most of the time.
              --> Mine is almost every time of the communication drop. Anyway, your suggested workaround (i.e., reconnect BLE and battery every try) is working so far (I tested successfully 4 times in a row)

            2. However, the first case of my failures (in my previous note) still happened to me. Even after successful landing, the right front motor is now running. So, my another question is:
              Do you have any library to test a specific motor without takingoff nor calibration?
              Now, whenever the motor is not working, I run calibrate( ) with holding a drone by left hand, and adjusting motor position in a arm until running. Then, re calibrate() -> run the code.
              This is not convenient also not safe (a couple of times hit my fingers). Any suggestions?

            Thank you in advance.

            1 Reply Last reply Reply Quote 0
            • I
              ixmclean last edited by

              sadly, I can't take the drone home to test on my Apple.

              With regards to your code and videos, Yes, sometimes, the communication drops to the drone (1 in 6 times is a rough guess) I've made it a habit to unplug the BLE cable, and re-seat the CoDrone Battery to ensure a fresh connection most of the time. I would say that I don't think I've had mine not execute the rest of the code post takeoff though (if it falters it errors out before take off, or if it does falter [this is rare] it would not take off but continue with the program [and no solid green pairing light])

              J 2 Replies Last reply Reply Quote 0
              • J
                jaykay0408 @ixmclean last edited by

                @ixmclean Hello,
                Thank you so much for your suggestion.

                1. Did you test the code with Mac using terminal and vi?
                2. Based on your suggestion, I tested the following code with PyCharm and here are the results:
                  ====== Code ======
                  import CoDrone
                  from CoDrone import Direction
                  import time
                  drone = CoDrone.CoDrone()
                  drone.pair()
                  drone.takeoff()
                  drone.go(Direction.LEFT, 1)
                  print("LEFT")
                  drone.go(Direction.BACKWARD, 1)
                  print("BACK")
                  drone.go(Direction.FORWARD, 1)
                  print("FORWARD")
                  time.sleep(0.5)
                  drone.go(Direction.RIGHT, 1)
                  print("RIGHT")
                  drone.land()
                  print("Land")
                  drone.close()
                  ======= End of code (I added sleep in case of latency, but not helpful ====
                  (i) first case of results: sometimes right-front motor is not working see a video below.
                  https://photos.app.goo.gl/LswmEPdFrNyaGmVK7
                  --> I plugged the motor into other position. Then, work. So, a motor is not a problem. After adjusting a position of motor to a arm, it works. But, not clearly understand what is a problem
                  (ii) second case of results: sometimes couldn't pair, but no error message. The rest of code are executed, but no movement. I checked this with print(). See a video below:
                  https://photos.app.goo.gl/t5UueFZJjKFgKFhn8
                  (iii) third case of results: sometimes can be paired and takeoff(), but rest of commands didn't work. A drone is just landed (looks like forcely because the program is not ended yet). See video below:
                  https://photos.app.goo.gl/4D9fQbA4gCbbpvZA9
                  (iv) forth case of results: just one time. a dron moved to LEFT, but rest of commands didn't work. Then same as case (iii).
                  https://photos.app.goo.gl/5d61VPaQS2XUAja59

                Also, from time to time, I need to reconnect a battery to be paired.
                3. Any advices and comments are welcome.
                I'd like to know if this is caused by a drone (specific) or programming problem.
                Thank you in advance for your help.

                1 Reply Last reply Reply Quote 0
                • I
                  ixmclean last edited by

                  ok run some tests, and I'm having no issues with my code running at command line
                  Using Ububtu (I have a mac at home, but doubt they'd let me take my project out of the building)

                  any IDE should work. even nano/vi/emacs

                  as far as your a1.py code, I copy/pasted into nano, (added the Direction and ended with a drone.close() ) and it worked the 2nd (and 3rd time) time I ran it (I've noticed that it is common [1 in 4] for the execution to get interrupted (like when I have a battery check for anything under 10% and it would close on a fresh battery, or close itself before my check)
                  as for the runtime, it barely did a forward/backward nudge

                  I added a "1" time component: drone.go(Direction.FORWARD, 1)
                  (and to the backward) and it ran smoothly for 1 sec forward and backward

                  J 1 Reply Last reply Reply Quote 0
                  • I
                    ixmclean last edited by ixmclean

                    ATM I'm using PyCharm. Works well so far. odd that command line isn't working for you though. I run a test on my own system to see if I'm encountering problems.

                    1 Reply Last reply Reply Quote 0
                    • J
                      jaykay0408 @ixmclean last edited by

                      @ixmclean Thank you so much for your quick reply. I just figure out the problem.
                      I have run the program using terminal python script as below:
                      i) MacOS -> Start terminal
                      ii) at command line:

                      python3 a1.py

                      Sometimes, command line interpreter looks like lose some data (not sure, there might be byte data...), which caused the problem.
                      However, using Jupyter is fine.
                      So, my question is :
                      "What are suggested IDE for CoDrone programming rather than Jupyter?"
                      During the competition, some of students are not familiar with Jupyter, so I'd better know what are the suggested IDE.

                      Also, any work around of the problem using command line script programming?

                      Thank you in advance.

                      1 Reply Last reply Reply Quote 0
                      • I
                        ixmclean last edited by

                        here are some correcitons I see:

                        when using go():

                        drone.go(Direction.RIGHT, 1, 30)

                        where your import section must also include: from CoDrone import Direction
                        (here is a the basic page for the go() command: https://support.robolink.com/codrone-library/go)

                        with regards to the set_pitch()/move() based on reading the code, it should work (though I've found that 30 and below sometimes has minimal effect, but not consistent)

                        J 1 Reply Last reply Reply Quote 0
                        • First post
                          Last post