I’m using PCMD to control the drone. I noticed, that I’m not able to let the drone descend below a certain value (usually around altitude 1.5 m). Is there any message to lower this?
Hi,
This behavior is a bit surprising. Usually the drone should be able to descend to 35cm above ground, and if you still press down for a couple more seconds it should land.
Can you tell a bit more about how you encounter this case? for example did you enable obstacle avoidance? is there any setting you changed?
Thank you
Hi Christoph,
I didn’t change anything w.r.t. obstacle avoidance. The described behaviour has been observed with the Sphinx simulator, “anafi4k” setup with the “empty” world.
I’m not able to descend deeper than 1.30 (over the truck surface, which is at 0.80). This is more or less consistent with attempts to land aside of the truck: I cannot go below 0.50 m, so my current height criteria for initiating a landing is “smaller than 0.60”, this is always reached. The height is measured by OpenCV, but it is consistent with the altitude display that moment
The “problem” is: I find it a bit harsh to “crash” down from 0.6 m, especially for precise landing scenarios. I think I need to reach 0.30 hovering in order to have the most precise touchdown possible.
I will be happy to derive a little test script from my use case if you like. I’m already having that.
EDIT: That being said I should have mentioned the constraints in my initial post, sorry…
@christophe Please find here a little test script: Parrot core flight functions · GitHub
You might need to change the drone IP (parameter --anafi-drone-ip
). The script has an external reference to a file kbhit.py
, which is attached to the gist.
As said: Up to now I was just using it in the simulator. My start script for “Industrial World” and “Empty World” provides valid geo coordinates, elevation 0.0. However, in “Industrial World” the reported altitude while Landed
is 1.1, in “Empty World” 0.2.
state: Landed, lat: 26.067947, lng: -80.38187, alt: 1.1
state: Landed, lat: 26.068196, lng: -80.381451, alt: 0.2
The lowest altitude I can reach in “Industrial World” is about 1.5 m. Together with the reported 1.1 m I would tend to think, that the height over ground could be 40 cm, so close to what you said.
In “Empty World” I cannot go below 0.7 m, which together with the 0.2 landing altitude renders to 50 cm.
However I would need 10 to 20 cm more. Do I have to switch obstacle avoidance? How could I do that?
Hi Neil,
With respect to obstacle avoidance, I misread the topic and thought it was about another product (Anafi Ai), which offers obstacle avoidance. There’s no such feature in Anafi, I’m sorry for the confusion.
I’ll take some time to read your script and come back to you later.
Regards
@christophe Have you been able to investigate here?
I have discovered the “ground_distance” information in the YUV frame metadata. And this never goes below 0.5 (except while landing)
Hi Neil,
So I tested your script, and I modified it to grab the altitude above ground:
from olympe.messages.ardrone3.PilotingState import (
FlyingStateChanged,
GpsLocationChanged,
AltitudeAboveGroundChanged
)
...
ground_alt = self.get_state_safe(AltitudeAboveGroundChanged)
...
ground_alt = round(ground_alt['altitude'], 2) if ground_alt is not None else '??'
...
print(f"state: {state}, lat: {latitude}, lng: {longitude}, alt: {altitude}, gnd_alt: {gnd_altitude}")
The results I see are consistent with what I would expect:
state: Hovering, lat: ??, lng: ??, alt: ??, gnd_alt: 0.96
state: Hovering, lat: 48.87895, lng: 2.3678, alt: 1.0, gnd_alt: 0.96
state: Hovering, lat: 48.87895, lng: 2.3678, alt: 1.0, gnd_alt: 0.97
state: Hovering, lat: 48.87895, lng: 2.3678, alt: 1.0, gnd_alt: 0.95
state: Hovering, lat: 48.87895, lng: 2.3678, alt: 0.99, gnd_alt: 0.82
state: Hovering, lat: 48.87895, lng: 2.3678, alt: 0.87, gnd_alt: 0.77
state: Hovering, lat: 48.87895, lng: 2.3678, alt: 0.82, gnd_alt: 0.69
state: Hovering, lat: 48.87895, lng: 2.3678, alt: 0.66, gnd_alt: 0.51
state: Hovering, lat: 48.87895, lng: 2.3678, alt: 0.56, gnd_alt: 0.5
LANDING
state: Landing, lat: 48.87895, lng: 2.3678, alt: 0.53, gnd_alt: 0.49
state: Landing, lat: 48.87895, lng: 2.3678, alt: 0.49, gnd_alt: 0.19
state: Landing, lat: 48.87895, lng: 2.3678, alt: 0.18, gnd_alt: 0.0
The 0.5m altitude is the limit defined in /etc/colibry/common/reference.cfg
(on drone) :
minAltitudeSet =
{
Default = 0.5; # [m]
MotorDown = 8.0; # [m]
};
I think this is working as intended.
You asked if this can be changed dynamically, but no, there is no message that changes this configuration.
Thanks. My observations make sense then. Not perfect, but ok.
Sorry for highjacking this thread, but do you know by chance, how to obtain the current attitude of the gimbal (pitch, roll, yaw)? I found no way to obtain this information.
Thanks in advance and thanks for your efforts
For the files: Your script is not entirely correct. self.get_state_safe(AltitudeAboveGroundChanged) delivers an OrderedDict.
So this is correct:
ground_alt = self.get_state_safe(AltitudeAboveGroundChanged)
ground_alt = round(ground_alt['altitude'], 2) if ground_alt is not None else '??'
self.logger.info(f"state: {state}, lat: {latitude}, lng: {longitude}, alt: {altitude}, ground_alt: {ground_alt}")
@christophe Christophe, could you please confirm, that the minAltitude
is something around 0.65 with the Anafi USA? We couldn’t make it go deeper in the field.
@Neil Hi,
I don’t see any configuration file where there is a value matching this 0.65m ground altitude value, but I am not particularly familiar with the USA model either. I hope someone else can answer more precisely.
Hi,
Yes, the minAltitude has been set to 0.65m for Anafi USA
You guys are awesome Thanks for the quick answers. We did a flight yesterday and noticed that.
Too bad, this is pretty counter productive for precise landing…
This topic was automatically closed after 30 days. New replies are no longer allowed.