Servers by jDrones

Avoidance Experiments with the POC and Benewake TFMINI

(ppoirier) #24

Hello, I don’t think having tested in guided. Incidentally I am revisiting the avoidance library theses days with a new setup, and I will try this mode and report back

(Dpsoftware) #25

Oh thank for your answer I will stay tuned!

(RickyG) #26

Hey Patrick
IS there a document on how to actually build this thing. Would love to give it a try.

(ppoirier) #27

The POC ?

Well the blog is pretty self explain it all…

(MartinKeilloh) #28

Hi Patrick hope you and your family are well and a very merry xmas to you all,like Ricky g I would love to do this im woundering if you could maybe do a laymans /idots guide on how to implement this and thank you for all your hard work,ile buy new benewakes with I2C if that makes things easier

4 Likes
(Vabe) #29

I know that the VL53L0X has a too small range to be useful, but what about the VL53L1X?
Because it would bring the cost down significantly…
Are 3 meters enough for a useful obstacle avoidance?

(ppoirier) #30

Yes for indoor only it would work.

(Marcel Essers) #31

Dear Patrick,
I´m pretty impressed of your TFMini POC ! So I tried to (re)build it according to your instructions. I got 5 TFMini (one facing downwards) and attached them each to a Attiny85, flashing those worked after some troubleshooting, so most of the hardware is set up and ready. But I can´t get the ProMini to work, compiling the ino-file in Arduino 1.8.9 is always stopped by error message that “mavlink_msg_distance_sensor.h” was not found. I used several mavlink libraries from github, but none of them works.
So, I´m stuck here. Any idea what I´m doing wrong?

(ppoirier) #32

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/

(Marcel Essers) #33

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!

(ppoirier) #34

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

1 Like
(Marcel Essers) #35

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

2 Likes
(Vabe) #36

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

(juarendra ramadhani) #37

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?

(ppoirier) #38

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)

(juarendra ramadhani) #39

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?

(juarendra ramadhani) #40

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

(ppoirier) #41

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

(juarendra ramadhani) #42

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

(ppoirier) #43

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