What program do you use and which MAVLink message are you sending to FC (or SITL) ?
Im using squilter target_land.py
Im connected to qgroundcontrol via radio baud 57600, using a real drone (Pixhawk2.1 arducopter v3.65
I did some prints in the program and I know the camera is seeing the target and getting the values, the problem is I dont know how to monitor them on the Qgroundcontrol. The M255 is not available in the analyzer
def send_land_message(x, y):
msg = vehicle.message_factory.landing_target_encode(
0, # time_boot_ms (not used)
0, # target num
0, # frame
(x-horizontal_resolution/2)*horizontal_fov/horizontal_resolution,
(y-vertical_resolution/2)*vertical_fov/vertical_resolution,
0, # altitude. Not supported.
0,0) # size of target in radians
vehicle.send_mavlink(msg)
vehicle.flush()
Your message looks ok , You had the PLND_ENABLED and PLND_TYPE to 1.0 (Companion Computer) and mavlink message is passing OK from CC to FC ?
Then you should be able to read Landing_target.angle (M255 is relative == search Widget with LANDING)
Yes I have PLND Enabled and Type to 1
I dont know if the message is going through to the FC, when i search âlandingâ in qgroundcontrol analyzer nothing appears
Unless something changed in the code, that was working ok. Have you tried sending static values of x-y just to make sure?
Yes but still i cant find anything with those parameters
X and Y values should range from -1 to 1 right?
Can you share your camera values please? FOV and size
Looking at my lab picture it was 0,6 to -0,6 and the camera was a Logitech C920
After I worked with JeVois so the GoV did not applied the same way.
Here is the link from my github : https://github.com/patrickpoirier51/JeVois--Python-Tracking
Thats about all there is to it
Awesome thanks!! The Jevois calculates the height? Or how are you getting the Z value?
Yes you can measure distance with Aruco tag but in this case, Z is used to pass the tag ID so you can filter/match the tag with a specific command
Can you please Share your PID values? I got the pY and pX to the FC but its not doing the corrections as it should.
I dont have them as this project is quite old and the initial platform has been rebuild
I i remember well , I slightly over-damped the vehicle.
Do you by any chance have the PIDs you used for this project?
Iâm having issues implementing precision landing with my setup. I have a RPi that is receiving serial with tag from a JeVois Smart Camera. Sending mavlink messages using the scripts in @ppoirierâs github. Using mavlink inspector I can see that the FC (Pixhawk Cube Black) is receiving the messages as angle_x and angle_y. From the flight logs I can see that PL.px and PL.py is aquired and is evidenced by a flight controller that reacts viciously (drone makes huge corrections, pitching and rolling hard in a tight space) and eventually drifts away from the target site (while pitching and rolling).
@ppoirierâs code sends 17 as the distance in the mavlink message when it is seeing ArUco tag 17 consistently and 8 as the distance when it is seeing ArUco tag 8 consistently. In order to calm the reactions of the drone down, I changed the code to send 5 as the distance consistently⌠but now canât seem to get any reaction from drone when it picks up the ArUco tag. Iâve tried the Kalman filter with values from 0.5 to 5, but I donât get consistent results to verify improvement. Usually I am using the RawFilter Data parameter for the interpretation of the mavlink messages.
I then attempting sending updated distance values to the flight controller by using the JeVois setting:
setpar dopose true
setpar markerlen 317 (mm)
and making the nessesary code changes to send the true z-value in place of the ID. However, I am seeing little to no reaction from the drone. I made sure to scale the z values by dividing by 100 so that the flight controller is reading the results in decimeters. I forgot to try dividing by 1000 in this last flight test, so I may try to do that and see if I get better results. However, seeing that I had no response with the FC reading decimeters, I am skeptical that changing the code to send z-values placed into meters will make much of a difference.
Iâll try sending the 17 and 8 values again, but am not sure how to calm down the extreme âbuckingâ. If that has no responce with the drone, Iâll try using the calculated z-values from the JeVois and dividing by 1000 in order to place into meters.
Am I mistaken in thinking the the mavlink message should only be sending angle_x, angle_y, and distance? I see that there are areas in the mavlink message for x, y, z, but these are unpopulated.
Any advice / thoughts are well appreciated! Also, thanks to @ppoirier for getting me this far.
Iâll upload a helpful flight log tomorrow.
Hello
Aruco 17 and 8 correspond to the tags of the Landing Target. Looking at the video you will see the target pad is made of a large and small tags, so while Landing the JeVOIS will automatically switch from bigger to smaller while it gets closer.
As for the âpsycho waspâ behaviour, you can reduce the gain of Landing Target message (I tuned it with SITL) and dampen the vehicle PID so it is less reactive and do not use the Kalman filter as it is adding lag to control loop
Hello,
Thanks for the response @ppoirier. I didnât realize there was a setting for the gain of the Landing_Target message. Am I able to change it through QGroundControl and if so where?
Okay, Iâll stay away from using the Kalman filter. I wasnât getting very good results with it anyways.
Right now I am in process of setting up SITL and will try changing the gain of Landing_Target message in there.
Did you add in a sensor lag as well?
Thanks!
Unlike OpenMV, there is no implementation on JeVOIS but it can be done if you are eager to install the dev. toolkit ⌠at the time it was kreepy
Otherwise you run a python script on a pi Zero using pymavlink like I did
But you did it ?
Here is the link from my github : https://github.com/patrickpoirier51/JeVoisâPython-Tracking
could you tell a bit about how you got those libraries in?
Well, now itâs my time to ask questions
I see on github you found a solution ?
The simplest solution for me was to make new python module using jevois-inventor
Can you explain what you did and can we get access to this script ?
@ppoirier
I used the top menu in jevois-inventor to add custom script, (basically yours, the one that you used on Rpi) - that is why I tried to install pymavlink on JeVois too, then I discovered that what you programmed, was not for the JeVois , but for the Rpi.
My idea of a superneat solution was to run whole thing on Jevois, the C code that output serial data could very well do so in a mavlink format (even if this one packet type we need was hardcoded, no mavlink library used.)
Another way would be to run a python script that packaged the serial output from the (unmodified) Aruco-Demo - and sent it as mavlink on the dedicated serial port. - again - no pymavlink is really necessary.
I did try to copy in the pymavlink/dronecode libraries to the Python3.7 of the Jevois, but ultimately the missing past and future libraries stopped me from completing that idea.
The main take from this is: because we only need to generate this one basic mavlink frame, there is really no need for the whole library.
This is basically the only feature needed to have a small, neat , ArUco precision landing âeveryoneâ could use.