Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crazyflie crashes after flying ~14m #56

Closed
pPatrickK opened this issue Apr 12, 2018 · 5 comments
Closed

Crazyflie crashes after flying ~14m #56

pPatrickK opened this issue Apr 12, 2018 · 5 comments

Comments

@pPatrickK
Copy link

pPatrickK commented Apr 12, 2018

Hi Guys,

3 Observations which we think belong to the same issue:

we try to fly the crazyflie for 8 meters (start @ 0,0,0) on y axis at 0.3m altitude. After ca ~6.5 meters the drone "jumps" higher and crashes into the ground. The drone is still tracked by the motion capture system.

If we let the drone start a 8 meters (start@ 0,8,0) on the y axis, it is good tracked and takes off, but if we want to fly to the origin (negative y direction) it flies in the opposite (positive y) direction up to the wall.

We try to fly the crazyflie for 15 meters (start@ -8,0,0) on x axis at 0.3m altitude. After ca 14 meters the drone "jumps" higher and crashes into the ground. The drone is still tracked by the motion capture system.

If we let the drone start a 9 meters (start@ 9,0,0) on the y axis, it is good tracked and takes off, but if we want to fly to the origin (negative x direction) it flies in the opposite (positive x) direction up to the wall.

What could be the problem and a possible solution?

We use the following script:

#!/usr/bin/env python

import numpy as np
from pycrazyswarm import *

Z = 0.3

if __name__ == "__main__":
    swarm = Crazyswarm()
    timeHelper = swarm.timeHelper
    allcfs = swarm.allcfs

    allcfs.takeoff(targetHeight=Z, duration=1.0+Z)
    timeHelper.sleep(1.5+Z)
    for cf in allcfs.crazyflies:
        pos = np.array(cf.initialPosition) + np.array([15, 0, Z])
        cf.hover(pos, 0, 25.0)

    print("press button to continue...")
    swarm.input.waitUntilButtonPressed()

    allcfs.land(targetHeight=0.02, duration=1.0+Z)
    timeHelper.sleep(1.0+Z)

The hall has a size of 30m x 15m x 10m. We use 38 cameras of the company Vicon for our setup. The dron is a Crazyflie 2. We use two computers, one for the motion capture and one for crazyswarm.

@jpreiss
Copy link
Collaborator

jpreiss commented Apr 12, 2018

We haven't seen bugs like this, but we also haven't flown quite so far from the origin in our experiments. A couple of questions:

  1. Can you reproduce this bug in simulation mode (by appending --sim to your python script)?

  2. Does the issue persist if you use vicon's rigid body tracking instead of libobjecttracker? (change object_tracking_type to motionCapture and create an object in vicon tracker with the same name as your Crazyflie, e.g. cf1)

@whoenig
Copy link
Contributor

whoenig commented Apr 12, 2018

I guess this is related to our hardcoded position limit of +/- 8m. For your space change the value to at least 15, and recompile both firmware and the ros workspace. I believe this limit is not exposed in the simulator, so the simulation should still behave correctly.

@jpreiss
Copy link
Collaborator

jpreiss commented Apr 12, 2018

We should simplify this code to use integer number of millimeters...

@whoenig
Copy link
Contributor

whoenig commented Apr 12, 2018

That's already done upstream. This will, however, still limit the space to +/-16m, similar to your new fullPoseSetPoint.

@pPatrickK
Copy link
Author

That worked.

Thank you very much for the quick response

Best regards
Patrick

jpreiss pushed a commit to jpreiss/crazyswarm that referenced this issue Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants