Aruco Landing Not Working - Real Drone


#1

Hi!

I’m trying out the precision landing on aruco marker for the first time and encountered some issues, the drone doesn’t appear to be pitching backwards in the y direction to position itself on the aruco marker.

It has no problem finding the marker, my calibration at 800x600 appears to be fine with the aruco testing script and I get an FPS of 17 when landing with precision_landing_single_aruco.py. It consistently lands about 2 feet in the positive y direction from the marker, x is usually spot on, but this might be luck considering it takes off directly above the marker.

Q1: My takeoff height is set to 2m, is this enough altitude for the drone to have time to properly land? (I assume it is)

Q2: Unfortunately I had to call it in due to the rain today, but I noticed one parameter I have that may be causing the problem:

I (unknowingly) had LAND_REPOSITION set to 1. Could this be interfering the dronekit message_factory.landing_target_encode ?

Note that I’m using the default PID tuning at 4.5 since I find the drone flies best at its default values, by trial.

Any feedback is appreciated!

Caleb, it would be helpful to the course material if you could provide your paremeter list you use, so we can compare to ours and maybe find other discrepancies.


#2

Hi there Jon!

Wow a FPS of 17 with 800x600 is great!

Hmm let’s get this figured out.

A1:

2m should be high enough for the drone to respond to the aruco error

A2:

I don’t think LAND_REPOSITION should be interfering. This just allows you to pass some pitch/roll/yaw commands to the drone while it continues to land. I run the PL with this variable set to 1 myself.


I have a few common reasons whey this could be happening:

  1. ‘PL’ dataflash logs aren’t reporting pX and pY errors.
    This can be for a multitude of reasons, but if the pX and pY logs are non-existent, there is something causing the error coordinates to not get digested into a precision landing. This can be due to many things, like the Rangefinder not functioning or an issue with the PLND parameters.
  2. Stock autotune PIDs
    I remember trying a PL with the stock PIDs, because it truly did fly pretty smoothly with them. The drone didn’t seem to react well to the PL commands though. Once I ran an autotune and saved the custom PIDs, the PL behavior worked like a charm.

I would start out confirming that the PL log type with pX and pY are non-zero. Then if you can confirm pX and pY are non-zero, try autotuning the pitch and roll axes.

If you’d like I could take a look at one of your dataflash logs for a failed PL flight- this would help me hopefully zero in on an issue if the action plan above does not work for you. If you don’t know how to obtain the dataflash logs, there is a video in the intro sections on how these can be fetched.

I am thinking it is just coincidence the that roll axis seems to be functioning with PL but the pitch axis does not. You can also try offsetting the drone a little from the target and seeing if it adjusts over the target- this would tell you if the roll axis is actually working or not.

Hope to get this straightened out soon!


#3

The dataflash shows non-zero values for pX and pY, the lidar seems to be reporting accurately. I’m using a TFmini-S via UART.

My PL parameters are:

Is there a lesson in the course that goes over modifying the PLND parameters? They seem to be usable as is.

If everything seems “normal”, it would seem like the pid really would be to blame then. I’ll be trying the autotune this week. I’d appreciate if you can take a look at my dataflash log in the mean time! I cannot attach .bin files to the forum however, is there another way to send them?

Thanks!


PL sim script unaffected by wind speed?
#4

Hmm yep I would suspect it is possibly the PIDs. If autotuning does not work, the next thing to look into may be the ArduCopter version. The 3.6*s have been untested for me as my image would not allow a dronekit connection.

I believe the course discusses the correct PLND parameters while writing the dronekit script- which sets the parameters appropriately. They all look fine on your drone from that image.

I’ll gladly take a look at your dataflash logs. If the file isn’t big, you can email me directly at caleberg@dojofordrones.com, or maybe put the log on your google drive and provide a link.


#5

I have gone through the course of precision landing and implemented it on my drone with raspi 4B and imx219 camera. I am using pixhawk cube+ flight controller with 4.4.3 firmware, Drone is autotaking off to certain height through script and then switching to land mode, LANDING_TARGET message is being published everytime when aruco detected and drone is in landing mode but drone is not moving towards aruco tag, i tried with different size of aruco and tags, nothing is working, tried to recalibrate the camera.
I have changed the parameters as mentioned: PLND_ENABLED = 1, PLND_TYPE = 1, PLND_EST_TYPE = 0, LAND_SPEED = 20

Please help
I am attaching my tlog files
https://drive.google.com/drive/folders/1zHnrAcCaqq3hWRnZuliKWZR0F6dDX1t2?usp=sharing


#6

Check what the current rangefinder is with this:

param show RNGFND1_TYPE

Then set it with this

param set RNGFND1_TYPE 1

Are you getting distance data?


#7

I am not using any rangefinder in my case. Should i use any? I am just using downfacing camera


#8

Precision landing requires it with this code.


#9

I can’t see any initialisation of rangefinder in your code: precision_landing_single_aruco.py
Please specify, I am not able to understand the use of rangefinder because the pose estimation from camera in x,y,z is correct. And also in your course of precision landing rangefinder isn’t specified anywhere


#10

I have installed tf-mini s on i2c with pixhawk directly and in rng_fnd1_type i have set it to 25 for tf mini. Distance data is being received on mavlink inspector.


#11

Here is the testing video of drone with rangefinder and camera with the same code.
Drone is not responding to the aruco tag. Please help
https://drive.google.com/file/d/13tzGw2FuohfkbFKNZNTd2DkhCu5vwXfO/view?usp=sharing


#12

Have you run the same code in the sim? I do not have access to a PC for another week, then I can take a look at your code.

You are getting x,y data and the color overlay on the aruco? What if you manually adjust the drone overhead?


#13

I have access to my pc now. Send me your code to my email (dronedojoforum@gmail.com) if you want me to look it over. Also perhaps you can answer my second question.