Landing

Firmware/software/electronics/mechanics
Post Reply
RyanMco
Expert
Posts: 159
Joined: Tue Apr 09, 2019 6:15 am

Landing

Post by RyanMco »

Hi guys!
Im using cf.land(target=0.0, duration=2.0) which I use crazyflie_ros library .. Goto works fine .. Takeoff works fine but just landing isn't working at all!! My drone isn't landing just after finishing the path it's fall like idiot however there's land!
What do I do to let my cf.land works and let my drone land in proper way? Cf.land isn't working
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Landing

Post by arnaud »

I have not seen that behavior in my previous tests, are you calling"sleep(2)" after calling landing to let the time to the Crazyflie to land before calling cf.stop()?

Also something to check: are you sure you are calling with the right argument, the argument for landing in targetHeight and not target: https://github.com/whoenig/crazyflie_ro ... vel.py#L26.
RyanMco
Expert
Posts: 159
Joined: Tue Apr 09, 2019 6:15 am

Re: Landing

Post by RyanMco »

Yup .. Im calling it right like this:

Code: Select all

 cf.takeoff(targetHeight = 0.5, duration = 2.0)
 time.sleep(3.0)

 cf.goTo(goal = [0.5, 0.0, 0.0], yaw=0.2, duration = 2.0, relative = True)
 time.sleep(3.0)
 cf.land(targetHeight = 0.0, duration = 2.0)
    
but it's not landing in proper way it's like just stopping and falling after doing goTo ..
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Landing

Post by arnaud »

But what do you have after, do you have cf.stop()? Have you tried having a sleep() after calling the landing function?
RyanMco
Expert
Posts: 159
Joined: Tue Apr 09, 2019 6:15 am

Re: Landing

Post by RyanMco »

I have cf.stop()

didn't try sleep .. does that matter? sleep isn't matter .. does it?
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Landing

Post by kimberly »

If you do cf.stop() before the drone has a chance to hit the ground and land, it will stop all the motors and everything, So it makes sense that it falls out of the sky as it does. The cf.land(targetHeight = 0.0, duration = 2.0) is only the initilizer, meaning that it will start going down but it will not 'block' the code until it has landed.

Add a very long time.sleep (like 10 seconds) after cf.land() and then you will know.
Post Reply