Skip to content

crash when using collision avoidance, motion commanded using goTo() #357

Answered by whoenig
boomer319 asked this question in Q&A
Discussion options

You must be logged in to vote

This should work. Here is a test script we successfully used (swapping task of 2 UAVs):

#!/usr/bin/python3
import numpy as np
from crazyflie_py import *
import subprocess 
import shutil
import os

def main():
    swarm = Crazyswarm()
    timeHelper = swarm.timeHelper
    allcfs = swarm.allcfs

    allcfs.setParam("colAv.enable", 1)

    allcfs.setParam("colAv.ellipsoidX", 0.15)
    allcfs.setParam("colAv.ellipsoidY", 0.15)
    allcfs.setParam("colAv.ellipsoidZ", 0.3)

    # for the flight part
    allcfs.takeoff(targetHeight=0.5, duration=3.0)
    timeHelper.sleep(3.0)

    # go to initial positions
    for cf in allcfs.crazyflies:
        pos = np.array(cf.initialPosition) + np.array([0,…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@boomer319
Comment options

Answer selected by boomer319
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants