You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lately I tried to use cmdVel to move three cfs to adopt cmdVel in my own formation control code. So, I write down the example script to give cmdVel to three cfs like below, but when I run this script only third cf which is "allcfs.crazyflies[2]" is move and other cfs are not react at all.. can anybody give me some advice of this problem? thk u!!
This discussion was converted from issue #787 on October 01, 2024 18:37.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
lately I tried to use cmdVel to move three cfs to adopt cmdVel in my own formation control code. So, I write down the example script to give cmdVel to three cfs like below, but when I run this script only third cf which is "allcfs.crazyflies[2]" is move and other cfs are not react at all.. can anybody give me some advice of this problem? thk u!!
-> test script :
from pycrazyswarm import *
swarm = Crazyswarm()
timeHelper = swarm.timeHelper
allcfs = swarm.allcfs
step = 0
for cf in allcfs.crazyflies:
cf.cmdVel(0,0,0,0)
timeHelper.sleep(1)
for cf in allcfs.crazyflies:
cf.cmdVel(0,0,0,0)
timeHelper.sleep(1)
for cf in allcfs.crazyflies:
cf.cmdVel(0,0,0,0)
timeHelper.sleep(1)
start = timeHelper.time()
while 0.0 <= timeHelper.time() - start <= 2.0:
for cf in allcfs.crazyflies:
cf.cmdVel(0.0, 0.0, 0.0, 39400)
timeHelper.sleep(1)
print(timeHelper.time()-start)
while 2.0 <= timeHelper.time()- start <= 6.0:
for cf in allcfs.crazyflies:
cf.cmdVel(-1,0.0,0.0,39000)
timeHelper.sleep(1)
print(timeHelper.time()-start)
Beta Was this translation helpful? Give feedback.
All reactions