The link says that the transfer has expired
Try this one:
Thanks! That worked and I was able to update the tf-luna. I’ll test it out when I get some time.
I’m trying to get a TF-Luna setup over I2C in Plane 4.0 on a Navio2 board. I have
RNGFND1_ADDR = 16 and
RNGFND_TYPE = 25 (also tried with 20). The 4 active pins on the Luna wired to the corresponding 4 pins on the Navio2’s I2C port. TF-Luna’s firmware has been updated per instructions here. In Mission Planner I see
rangefinder1 0 and
sonarrange 0, so it doesn’t appear to be working. Am I setting the
Hi Everyone - wonderful discourse going on here. First time post - shout out to the Quebecois, la vrai belle province!
I am attempting to utilize the object avoidance functionality with the multiple TF Lunas (i.e., 6 instead of the full 8).
MRobotics GPS module (w/ i2c port)
Ardupilot (latest release)
TF Luna lidars
(receiving my Hex flow sensor today, and will set that up as well for position maintenance)
I have successfully setup RNGFND1 on serial 4, downward facing and according to QGC’s Mavlink inspector I am getting good results and it seems to work well with Alt-Hold.
Now I am at the stage where i am incorporating the remaining Lunas using the i2c connection so that i can setup multiple Lunas in an avoidance array.
I am connecting my Lunas via the i2c port that is on the GPS, which plugs into serial3/i2c port on the pixracer. The Lunas have been successfully flashed with the new driver. On one of the Lunas I am testing i changed the address to 0x21 (i.e., decimal =33) and the other i left at the default 0x10 (i.e., 16). RNGFND1 is the downward facing Luna and it is plugged into serial 4, and serial 4 is set to rangefinder at 115 baud. RNGFND2 is where i am testing the i2c Lunas, and I have tried both addresses (i.e,. the default 16 on the unchanged Luna and 33 on the one that I updated).
Here is where things get a bit weird…when I setup serial 3 (which is the GPS/i2c port on pixracer) for the rangefinder functionality (switched from the default GPS functionality), RNGFND1 on serial 4 stops working. If I change serial 3 back to GPS, RNGFND1 on serial 4 is active again. In both scenarios I do not get any feedback from the RNGFND2 on the i2c.
A few questions and, please, suggestions are very welcome!
(1) is it possible to use both serial 4 and serial 3 to connect multiple lidars, or are the i2c and serial inputs mutually exclusive? In other words, can i plug in serial 4 + a bunch of lidars on serial 3/i2c?
(2) (a) Let’s assume that i use telem1 and serial 4 for the inputs, when i assign serial2 (which is telemetry i believe) to rangefinder functionality and serial 4 for rangefinder functionality, how does it know which one is RNGFND1 or RNGFND2 (as in the RNGFND settings there is no way to link which rangefinder will connect to which port, i.e., how will it know which of RNGFND1 or 2 is connected to serial4 or serial2?).
(2)(b) With I2c, i assume that because the RNGFND has an address input, that automatically pixracer assigns any rangefinder that has an address under RNGFND_Address to Serial3/i2c (is this correct)?
(3) Lastly, if we are able to connect both serial 4 and serial3/i2c, is there anything i am doing wrong here on a basic level?
Thanks again everyone, once I get this up and running, i will be sure to post a clear instructional on how it was setup for the benefit of everyone. If we can get this lidar array setup + flow sensor, then we have a very solid, low resource, GPS denied platform for basic autonomy. I am currently working with the intel265 on the rover, and I really think that setting it up this way will be faster and less resource intensive. I can then focus on using the companion for object recognition and ROS navigation using object recognition (e.g., follow a red ball or face), while the pixracer uses the sensor array to deal with avoidance and stabilization (in both drone and rover).
BTW I will try a few more tests on the pixracer and then see if i can’t make it work with a pixhawk with the separate i2c port.
Have you read my blog?
It is using serial and multiple I2C TFMini S (not yet tested with Luna)
Salutations de Québec
on i2c port you can connect multiple i2c periph but they must have different addresses or will do conflict and every periph must be powered with power source.
I think you must build a board or config a board for build an array with sensor, i advice you to test a lunar wires on a can node…low spikes in reading and transmission
LOL I suspect you have a thing with Can Node
im building a board for benewake sensors but for can bus
It seems when reading on my phone I missed the initial instruction on your blog P. Looks like I need to do some more programming of the Lunas to get them operating correctly. I will go through the instructional step by step. Appreciate the tutorial and quick response…will be sure to update as to success!
Thanks for the idea Dave - only issue is that i will be connecting the hex flow sensor into the CAN input. I’ll read through Poirier’s blog and see if he addresses the powering issues there. Thanks again both!
Hey Poirier, so i went through the blog. Seems like all my connections are the same as yours. Main difference with Luna is that you don’t need to flash a mode…you simply plug the ground into the 5th pin and i2c mode is activated.
Still getting no response on the manual-indicated default 16 address set on RNGFND1 (with all the other settings you mention). Only difference is that there is no separate power going to the lidar from the I2C port. Can you please confirm that you need a separate voltage lead even for one lidar only when connecting only 1 i2c device to the pixhawk i2c port ? (at this point i am testing with only 1) Thanks again!
if you are good in DYI cable you can share the flow can with other can periphs…
Thanks Dave! I am not too bad, i can put together wiring as needed. But, not sure if the Luna will work on CAN, and assuming it does, what would the wiring look like? Thanks again.
We generally recommend having a dedicated power for Lidar
for make work TF Luna on a node you have first purchase a node and flash it with the proper firmware and adjust few settings, you have to check also if your sensor is uart or i2c,
for power the sensor better use s different power source… better 5v.
This one is 12v in Vin and Vout is 5… the one I’ve designed.
does anybody have a working link for the updated luna firmware and the updater software?
@Siya please confirm that firmware updates are available on the Benewake site
@ppoirier @koswald Please check this TF-Luna update firmware. Thanks. TF-Luna_std_v3.0.4-main.bin (23.5 KB)
thanks for the file, what program do i need to actually upload it to the tf luna