yawing in specific height
Posted: Tue Dec 17, 2019 1:53 pm
Hi guys!
Im facing a problem like this, Im trying to do square coordination path by my drone by using crazyflie_ros scripts, and takeoff is working, goto is working but something weird is happenning..
I run this code:
so my drone is hovering at height 0.5 and it's fine! but once he wants to go to 0.5 (0.5,0.0,0.0) what's happening that my drone goes there to that point and hovering there but it's not hovering in proper way it's like doing circle (not actually a circle but it's something like a circle) and he's not hovering steadily on [0.5,0,0] he's just going to that coordination but hovering there isn't steadily on that point, he's like going to that point and hover there like a circle manner(not steady) .. my yaw is 0.0 so it's weird why he's doing that once he goes to 0.5 0 0!
I tried to do
it works fine he actually hover on it's place in proper hovering and steady at all! but once I tell him to go to any point other than 0 0 0 by goTo then my crazyflie at the new goal setpoint(in my case it's 0.5 0 0 ) so will not hover there like its hovering on 0 0 0 .. any help what would be the problem?
I don't know why if I send by goTo a point other than 0 0 0 then he will not hover on that new point in proper and steady hovering but yeah he goes there but not hovering steady on that point!, my yaw is 0 so actually I don't know why he's doing like a circle on hovering to the new point!
any help? maybe I should put kp and kd as 0? I don't know how can I fix the problem, truly he goes to the required point that he gets by goTo but its hovering there isn't steady! although if I send him 0 0 0 by goTo then it's steady!
any help to solve the problem to be more steady on the new point that I give by goTo?!
the data that I send isn't from flowdeck it's from slam (ROS) , I verified the data that I get from slam and it's fine I get it correctly !
thanks alot
Im facing a problem like this, Im trying to do square coordination path by my drone by using crazyflie_ros scripts, and takeoff is working, goto is working but something weird is happenning..
I run this code:
Code: Select all
import rospy
import crazyflie
import time
import uav_trajectory
if __name__ == '__main__':
rospy.init_node('test_high_level')
cf = crazyflie.Crazyflie("crazyflie", "/vicon/crazyflie/crazyflie")
cf.setParam("commander/enHighLevel", 1)
cf.setParam("stabilizer/estimator", 2) # Use EKF
cf.setParam("stabilizer/controller", 1) # Use mellinger controller
cf.takeoff(targetHeight = 0.5, duration = 2.0)
time.sleep(3.0)
cf.goTo(goal = [0.5, 0.0, 0.0], yaw=0.0, duration = 2.0, relative = True)
time.sleep(3.0)
cf.goTo(goal = [-0.5, 0.0, 0.0], yaw=0.0, duration = 2.0, relative = True)
time.sleep(3.0)
cf.land(targetHeight = 0.0, duration = 2.0)
I tried to do
Code: Select all
cf.goTo(goal = [0.0, 0.0, 0.0], yaw=0.0, duration = 2.0, relative = True)
time.sleep(3.0)
I don't know why if I send by goTo a point other than 0 0 0 then he will not hover on that new point in proper and steady hovering but yeah he goes there but not hovering steady on that point!, my yaw is 0 so actually I don't know why he's doing like a circle on hovering to the new point!
any help? maybe I should put kp and kd as 0? I don't know how can I fix the problem, truly he goes to the required point that he gets by goTo but its hovering there isn't steady! although if I send him 0 0 0 by goTo then it's steady!
any help to solve the problem to be more steady on the new point that I give by goTo?!
the data that I send isn't from flowdeck it's from slam (ROS) , I verified the data that I get from slam and it's fine I get it correctly !
thanks alot