USC-ACTLab / crazyswarm

A Large Quadcopter Swarm
MIT License
319 stars 316 forks source link

Orientation command #701

Closed fbenti closed 12 months ago

fbenti commented 1 year ago

I encounter the following issue: when using the goTo command, each crazyflie is capable of turning. Instead when I use the cmdPosition command, it seems like that the yaw parameter has no effect at all since nothing happens.

Here below you can see how I'm using the two command.

goTo

for cf in allcfs.crazyflies:
     cf.goTo(goal=np.array([0,0,HOVER_HEIGHT]),yaw=np.pi/2,duration=4)
timeHelper.sleep(5)

cmdPosition

timer = time.time()
while timer + 5 > time.time():
     for cf in allcfs.crazyflies:
           cf.cmdPosition(np.array([0,0,HOVER_HEIGHT]),yaw=np.pi/2)
     timeHelper.sleepForRate(50)
SkogsTomte commented 1 year ago

Just a guess here, but is it possible that cmdPosition uses degrees instead of radians? pi/2 would be very small in degrees and therefore not really noticeable.

fbenti commented 1 year ago

Following the documentation, no that's not the case. Both are expressed in radians.