Page 1 of 1

Velocity

Posted: Mon Dec 23, 2019 6:30 pm
by RyanMco
Hi !
I send by Goto a yaw value : 0.2 so my drone is yawing with angle about 36 degree ..
what Ima trying to do is that I want the speed of yawing with that angle would be more slowly as a result Im trying to see if I can decrease the speed of yawing with given yaw's value, I have searched in file of crazyflie_ros 's scripts (python scripts) but didn't figure out where I can modify the speed .. ofcourse there's a calculation to speed of yawing or something like that .. if not in crazyflie_ros's scripts as in my firmware, but where could I find that?! in goTo? I searched it step by step and didn't find out where I can decrease the speed of yawing ...
my script:

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.2, duration = 2.0, relative = True)
    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)
    
Any help please? much appreciated !

Re: Velocity

Posted: Fri Dec 27, 2019 11:14 am
by arnaud
To change the speed of yaw you need to increase the duration of your goto, for example duration = 4.0 will yaw (and move) twice as slow.

Note that both the way and the linear movement will be slowed down.