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

Constant height while flying over obstacles with Flow Deck #540

Open
EnricaSo opened this issue Jan 28, 2020 · 10 comments · May be fixed by #1431
Open

Constant height while flying over obstacles with Flow Deck #540

EnricaSo opened this issue Jan 28, 2020 · 10 comments · May be fixed by #1431

Comments

@EnricaSo
Copy link

I have a Crazyflie 2.1 flashed with febc780 (CLEAN) and equipped with a flow deck v2 and I am using the crazyflie-lib-python to send high-level commands (goto). I am facing the following issue.

I would like to stabilize the drone height with the only help of IMU, barometer, and optic flow, and no z-ranger. However, I would like to access the z-ranger measurements to know if there is any obstacle on the ground. Right now, I observe that whenever the drone detects an obstacle beneath itself it overshoots in position believing that its height from the ground has changed. However, it is not the case: the ground level is unchanged, but there is an obstacle. How could I change this behavior? If the stabilization in z without the z-ranger is unfeasible, how would you solve this problem?

Regards,
Enrica

@knmcguire
Copy link
Member

Hi!

So just to rephrase a bit: Currently you are looking at the state estimate of the position, and you expected the position to jump up whenever there is a obstacle underneath there, right? But that is not happening?

About your question about doing IMU only height/stabilization, it is a interesting feature but since it is not generic to our firmware (yet), I would advice that you post those questions on the forum.bitcraze.io. We would like to keep the issues in github to be about problems with the current firmware or wanted generic functionality if that is okay :)

@EnricaSo
Copy link
Author

Hello!

Thank you for your reply. What you just wrote is not what I meant, I am sorry for the miscommunication.

The situation is the following: the ground is flat and there is an obstacle on it. The position of the drone does jump up when it flies over the obstacle, while I would like it to be constant. This leads me to think that the z-position estimate that I read is more the estimate of the height from the ground level, rather than the relative position to the starting point. I would like to measure the height of the obstacle with the z-ranger without overshooting in position. Is it possible? How would you do it? I can provide plots of the ground-truth position and the estimated one if needed. And yes, I can repost this question on the forum.

Thanks a lot for your help.

@knmcguire knmcguire changed the title Position stabilization with flow deck v2 Constant height while flying over obstacles Jan 29, 2020
@knmcguire
Copy link
Member

Ahhh oke. I understand now. Actually maintaining a constant height while flying over obstacles with the zranger is indeed a wanted feature. I will change the title to make the issue more clear.

So this can be done in two ways:

  • A step detection with the z-ranger (sudden changes will not be included for the position estimation)
  • Integrating the barometer properly into the kalman filter

It is not an quick solution for this, but I think it will be beneficial for other people as well.

@krichardsson
Copy link
Contributor

A quick comment on the barometer and the kalman filter:
There is code in the kalman filter (estimator_kalman.c) for using the barometer but it is disabled. It can be enabled by setting the KALMAN_USE_BARO_UPDATE define. I'm not sure how well it works though, I don't think it has been tested for a long time.

@EnricaSo
Copy link
Author

Thanks a lot for your help, I'll test it and update you.

@krichardsson
Copy link
Contributor

Hi @EnricaSo! I just wanted to check if you have made any progress on this or if it should be closed?

@EnricaSo
Copy link
Author

EnricaSo commented Mar 4, 2020

Hi @krichardsson, I couldn't solved the issue. However, you can close it.

@krichardsson
Copy link
Contributor

Thanks! I like the functionality, let's leave it open if someone else wants to have a go at it.

@luttesudo
Copy link

Dear Krichardsson,
Is there a official release code to improve this problem?

Thanks.

@knmcguire
Copy link
Member

There is currently no implementation that does this functionality, or else we would have attached it to this ticket. However, if you have an idea of how to do it or have an implementation that works, feel free to contribute.

cafeciaojoe pushed a commit to cafeciaojoe/crazyflie-firmware that referenced this issue Sep 27, 2024
@gemenerik gemenerik changed the title Constant height while flying over obstacles Constant height while flying over obstacles with Flow Deck V2 Oct 30, 2024
@gemenerik gemenerik changed the title Constant height while flying over obstacles with Flow Deck V2 Constant height while flying over obstacles with Flow Deck Oct 30, 2024
@gemenerik gemenerik linked a pull request Oct 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants