![]() |
LidarLite v2 communications issues
hi all,
Looking for ideas here - we use LabView on our robot and had good success last season with the LidarLite. I picked up another one over the summer to continue playing with it to explore other modes - but it is the V2 "blue label" product. Looks identical to the original, same connector, same I2C commands claimed in the manuals. Unfortunately it's not plug-compatible. I've gone back and forth with their tech support but they don't have any LabView expertise. They did say they had to modify their demo code quite a bit to get it to work, so I assume they also found out it's not a plug swap with the V1. I suspect there are changes needed in the WPILib I2C area but it's all pretty opaque since it eventually calls out to C routines and isn't fully implemented as a LabView function. Has anyone else looked into the new version of these units? They are inexpensive and work really well on the robot. We'd love to continue using them but so far no luck in getting it to work. thanks for any help! /greg Westwood HS Warriors Robotics #2478 |
Re: LidarLite v2 communications issues
Greg,
We have been working with the V1 off-season to learn its capabilities. We'd be interested in your experience and sharing your Labview code. I have a V2 on order. From what I have read about the V2, there should not need to be library updates to communicate, but it does require some different I2C commands to get data. It no longer uses the ACK/NACK to signal that it has completed the measurement process. According to their website page here: http://pulsedlight3d.com/products/li...-v2-blue-label "Now broadly compatible with the most basic of I2C drivers and most micro-controller boards. Instead of “ack” and “nack” responses when the sensor is available or busy, a status register (0x01) can be queried to indicate sensor status. The previous measurement value can be read at anytime during an acquisition until it is overwritten by a new value. No need to wait for the sensor to become available to read data. Just fire it up and let it rip!" For the V1, I'm curious about how you did the data read. We are using a time delay between the write command to take a measurement and then reading that measurement. I was never able to find a way to sense the ACK/NACK status using Labview. -Steve |
Re: LidarLite v2 communications issues
1 Attachment(s)
We just did a state machine in periodic tasks that switched between Write and Read inside a 50ms loop. That way we were sure we stayed outside the delays - and yes we could not figure out how to sense ACK/NAK either.
So far on the v2 it's not reacting the same at all. Tech support thinks the WpiLib is sending a "double start" that confuses the unit. I don't have a decent oscilliscope to see what is going on at the digital level but wondering if that is what's doing it. Even when I just open the channel and try to read register x1 it doesn't seem to work. As far as the Labview code - I'd love to share once I get it to work! This is just a test VI to see if I can get anything from the lidar. So far it only returns 0 on every read - the status register and the distance register. The other strange thing - if I connect it to the I2C pins on a NavX-MXP it locks the NavX up! Something really odd going on ... .. . /greg |
Re: LidarLite v2 communications issues
Quote:
The NavX MXP has new firmware that fixes some I2C bus hang issues, you might want to give that a try. http://navx-mxp.kauailabs.com/support/updating-firmware. A place called Salaeae makes an awesome logic analyzer with a i2c protocol decoder that can quickly tell you exactly what you want to know. Let me know if you'd like any more info on that. - Scott |
Re: LidarLite v2 communications issues
Quote:
|
Re: LidarLite v2 communications issues
This is AWESOME! I get to work with LiDAR data in my job in mapping, but to have it on our robots is taking SUPER cool to SUPER AWESOME COOL! :D
|
Re: LidarLite v2 communications issues
Quote:
/greg |
Re: LidarLite v2 communications issues
Well gang, so far I can't get this thing to work with LabView. I've tried the logic analyzer, no luck.
The V1 lidarlite works perfectly. When I switch to the V2 it doesn't work. When I try their suggestions it doesn't work. pretty much have to say the v2 lidarlite is not compatible with labview and we can't use it on our robots :( at this time. Anyone else have luck with it let me know. /Greg |
Re: LidarLite v2 communications issues
Quote:
It'd also be interesting to see both a "write" sequence (writing to a LidarLite register) in addition to the most important bit, a "read" sequence. |
Re: LidarLite v2 communications issues
I have just spent most of the day trying to get my V2 to work. Unit is good since I can get data from it easily with the Arduino libraries. With Labview, I get the same problem as above...nothing but zeros, and no error outputs. Enum is the only thing that seems to work, and that was kind of sketchy too. I had to put it in a flat sequence with some time delays to get it to show an address.
I also have a V1 that works fine in Labview...but I can't get more of them. I'm not sure where we go from here... |
Re: LidarLite v2 communications issues
I had one other thought.
GGorman, have you had the capacitor and pullup resistors in your setup? I have not, and the V1 worked without, but maybe the V2 is more particular. I thought I would ask before going through the trouble if you had already included them. |
Re: LidarLite v2 communications issues
I had some success this weekend. Since the Arduino libraries work fine with the Lidarlite V2, I used the Arduino to collect data over the I2C and then used the MXP UART line to get the data via serial from the Arduino.
The labview code is pretty ugly right now, and I don't have any idea what the latency is, but the update rate on the VI front panel appears very rapid. |
Re: LidarLite v2 communications issues
I just posted 139887 and then got the answer myself but it's for WPILib C++ I2C. Maybe it will give you a hint.
Use WPILib C++ I2C WriteBulk and ReadOnly instead of Read. The integrated Read specifies the register to read then the buffer which the read fills. That does not work. Separate the write the register number using WriteBulk and issue the separate read with ReadOnly. I posted the example program using C++ WPILib. Sorry, I don't know how to merge my thread with this one. |
Re: LidarLite v2 communications issues
3 Attachment(s)
Thanks SLAB! I also figured it out tonight -- thanks to Kevin O'Connor at FIRST as well!
Yes - you have to separate the write and the read. Took me a while to figure it out and Kevin sent me a VI with just a Read command wrapped in it (I'll attach). Attachment 19780 Here's my Begin.vi to set up the LidarLite (just a screen shot): Attachment 19778 Then I use this in PeriodicTasks.vi (any tips and comments on my coding is greatly appreciated!) Attachment 19779 Thanks everyone for your help. I hope this also helps others! /Greg Mentor 2478 and 5419 |
Re: LidarLite v2 communications issues
Quote:
|
| All times are GMT -5. The time now is 00:40. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi