Servers by jDrones

Avoidance Experiments with the POC and Benewake TFMINI

Cool,

You need to build this header file from a recent copy of MavLink using the python script in order all the new messages and modifications.
Refer to this excellent blog for detailed instructions:

Please note that mavlink site has moved here: https://mavlink.io/en/

Ok, I was able to generate a new library with mavlink generator. I used regarding to the mentioned instructions c as language and ardupilotmega as xml-file. I copied the folder as “mavlink” into the library folder of Arduino IDE. mavlink is shown as library in Arduino IDE, but compiling still hangs up with the error message “mavlink.h not found”. Indeed there is no mavlink.h in the root directory. There are serveral mavlink.h files in the subfolders named ardupilotmega, common and others. The distance-sensor-header file is located in commons.
So, what do I need to add? Copying those files in mavlink root folder doesn´t work, including mavlink library into the ino-file adds following header files to the code, but with no effort:
#include <checksum.h>
#include <mavlink_conversions.h>
#include <mavlink_helpers.h>
#include <mavlink_types.h>
#include <protocol.h>

Thanks for help in advance!

To make things simpler I added my mavlink library == look at the last line of the blog
Enjoy !!

1 Like

Copied your library and it compiled instantly like a charm! Many thanks to you and your efforts!

2 Likes

Yesterday I tried playing a bit with Mavlink messages but I couldn’t get it to work, so I decided to give the code on Github a try but also that I wasn’t able to run…
I’ve tried different baudrates and swapping RX and TX cables but nothing solved the problem.
I’ve used an arduino mega and since I don’t have the attiny etc. I just placed constant values for distance…

Any idea what I could be doing wrong?
Thanks in advance

Hello Mister Poirier,

I am very interested in your project about avoidance. I have tried to implement it on my pixhawk with the code that you specified about using arduino. But the results of the radar in the mission planner did not show any changes. I am very confused about anything from mavlink from Arduino to Pixhawk to nothing. Yet when I use raspberrie for communication with Pixhawk, it can happen well. I don’t know where is my fault, can you help me solve my problem?

This code runs on an Arduino only.
You have to validate that the systems is sending MavLink messages using the Mavlink inspector tool (CTRL-F on Mission Planner)

I’ve tried the mavlink inspector, and the results are still not there. I just copied pasted yout code on Github, nothing I changed. i use radiolink pixhawk 2.7 and it runs on arducopter 3.6. Does the type of pixhawk and software also affect?

Btw, my arduino is promini 5v, we know pixhawk have level power 3.3v,
does it matter?

You have to confirm the code is working ok on promini : you must have data going out at the serial port, you should see MavLink binary message output on Arduino monitor

I’ve tried to see the serial output from Promini in serial monitor. but I can’t read it because it only shows binner code in the form of boxes and occasional question marks

That is ok , then just make sure you set both serial speed correctly and get tx-rx connection. Then you should configure to read proximity message from MavLink
Proximity Type 2

Revisiting the POC with a Q330 and 5 TFMini covering full 180 Deg

Actually it is 6 TFMini there is one looking down acting as altimeter as well:

image

Avoidance set to 2 Meter

Here is the video of test (Sorry for poor quality and messy background…)

3 Likes

very cool as always
Keep up the cool and interesting work

1 Like

That’s very interesting ! Thank you for the update. :revolving_hearts:

I think TFmini Plus (12m, FOV 3.6°, 1-1000Hz, IP65) also works ?

Thank you
Yes this model would work better as we could speed up the sensor scanning to 1 khz

Great, is it possible to cover 360 with only 4?

YIf the sensor has large FoV, you certainly use it. But if you use TFMini that just covers 3-4 degs it makes the detection quite spotty.

We are currently working on POC using four TFmini Plus for the Ranger Q700. Still having some I2C issues with multiple sensors. The controller, sensor interface and MAVLINK interface are via Teensy 3.2. I’ll post the debugged system here when its tested properly.

2 Likes

@Arbutus Hi, for I2C issues, may be you could check the Github info and see whether it helps a little ?

Servers by jDrones