Stabilizing the drone



  • How do we stabilize the drone? According to the lessons, you can "trim" the drone using the remote or programmatically using the set_trim() function. The documentation/lessons also says, once you trim, you do not have to do it again and the trim you applied will persist on the drone until reset.

    I cannot seem to stabilize the drone and it does not seem like the trim settings persist. Here is the code I am using. Since the drone is drifting right, I use -10 for the roll, and since the drone is drifting forward, I use -10 for the pitch: drone.set_trim(-10, -10). This statement seems to be countering the right drift but not the forward one. Any ideas on why this is happening?

    import CoDrone_mini
    import time
    
    drone = CoDrone_mini.CoDrone()
    drone.pair()
    
    drone.set_trim(-10, -10)
    time.sleep(2)
    
    drone.takeoff()
    drone.hover(1)
    drone.land()
    
    drone.close()
    

    Now, after I set the trim programmatically, when I apply the program as above (commenting out the trim lines), the drone still does not stay in place (not stationary). Is there a video showing if anyone got the drone to simply take off, over, stay stationary and land?

    I'm wondering if the drone will always kinda drift.

    I am thinking the "trimming" is the "calibration" on the drone so that it stays put when it's up. Or is calibration another thing we need to do?



  • I just realized this thread is a duplicate of what someone else already posted. Please close this thread if needed.


Log in to reply
 

Looks like your connection to Robolink community was lost, please wait while we try to reconnect.