Page 1 of 1
Posted: Mon Dec 16, 2019 5:06 pm
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
Posted: Tue Dec 17, 2019 7:08 am
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
Posted: Tue Dec 17, 2019 1:40 pm
Yup .. Im calling it right like this:
Code: Select all
cf.takeoff(targetHeight = 0.5, duration = 2.0)
cf.goTo(goal = [0.5, 0.0, 0.0], yaw=0.2, duration = 2.0, relative = True)
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 ..
Posted: Tue Dec 17, 2019 1:54 pm
But what do you have after, do you have cf.stop()? Have you tried having a sleep() after calling the landing function?
Posted: Tue Dec 17, 2019 6:15 pm
I have cf.stop()
didn't try sleep .. does that matter? sleep isn't matter .. does it?
Posted: Thu Dec 19, 2019 10:22 am
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.