Go to Post It will really be different for us (ESPECIALLY since our robot drives consistently this year). - Karibou [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 04-10-2015, 23:37
GGorman GGorman is offline
Registered User
FRC #5419 (A-Team)
Team Role: Mentor
 
Join Date: Mar 2015
Rookie Year: 2010
Location: United States
Posts: 5
GGorman is an unknown quantity at this point
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
Reply With Quote
  #2   Spotlight this post!  
Unread 07-10-2015, 12:51
sraque's Avatar
sraque sraque is offline
Registered User
AKA: Steve Raque
FRC #2614 (MARS)
Team Role: Mentor
 
Join Date: Jun 2012
Rookie Year: 2009
Location: Morgantown, WV
Posts: 83
sraque is on a distinguished road
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
Reply With Quote
  #3   Spotlight this post!  
Unread 11-10-2015, 14:02
GGorman GGorman is offline
Registered User
FRC #5419 (A-Team)
Team Role: Mentor
 
Join Date: Mar 2015
Rookie Year: 2010
Location: United States
Posts: 5
GGorman is an unknown quantity at this point
Re: LidarLite v2 communications issues

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
Attached Files
File Type: pdf Labview Document.pdf (27.5 KB, 58 views)

Last edited by GGorman : 11-10-2015 at 16:02. Reason: added picture
Reply With Quote
  #4   Spotlight this post!  
Unread 12-10-2015, 12:51
slibert slibert is offline
Software Mentor
AKA: Scott Libert
FRC #2465 (Kauaibots)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2005
Location: Kauai, Hawaii
Posts: 353
slibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud of
Re: LidarLite v2 communications issues

Quote:
Originally Posted by GGorman View Post
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
We had a v1 LIDAR Lite connected to NavX MXPs I2C port and that worked ok last year.

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
Reply With Quote
  #5   Spotlight this post!  
Unread 12-10-2015, 14:01
marshall's Avatar
marshall marshall is offline
My pants are louder than yours.
FRC #0900 (The Zebracorns)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2003
Location: North Carolina
Posts: 1,325
marshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond repute
Re: LidarLite v2 communications issues

Quote:
Originally Posted by slibert View Post
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
This is seriously one of the best tools I own. I love my logic analyzer.
__________________
"La mejor salsa del mundo es la hambre" - Miguel de Cervantes
"The future is unwritten" - Joe Strummer
"Simplify, then add lightness" - Colin Chapman
Reply With Quote
  #6   Spotlight this post!  
Unread 13-10-2015, 05:44
runneals's Avatar
runneals runneals is offline
FTC Mentor - The Robot Corps 7491
FRC #3928 (Team Neutrino)
Team Role: Alumni
 
Join Date: Oct 2012
Rookie Year: 2006
Location: Nevada, Iowa
Posts: 397
runneals has a spectacular aura aboutrunneals has a spectacular aura about
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!
__________________
David Runneals
FRC 3928 Team Neutrino 4-H: Mentor (2015 Off-Season - ?)
FTC North Super Regional Championship: Game Announcer (2015)
FTC 7491 The Robot Corps 4-H: Mentor (2013 - ?)
FRC 2167 Mentor (2014)
FRC 3928 Team Neutrino 4-H: Member, Co-Captain, & Media Coordinator (2013)
Reply With Quote
  #7   Spotlight this post!  
Unread 01-11-2015, 13:32
GGorman GGorman is offline
Registered User
FRC #5419 (A-Team)
Team Role: Mentor
 
Join Date: Mar 2015
Rookie Year: 2010
Location: United States
Posts: 5
GGorman is an unknown quantity at this point
Re: LidarLite v2 communications issues

Quote:
Originally Posted by slibert View Post
We had a v1 LIDAR Lite connected to NavX MXPs I2C port and that worked ok last year.

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
Thanks for the tips! I'll snag the firmware update and grab one of the logic analyzers!

/greg
Reply With Quote
  #8   Spotlight this post!  
Unread 17-11-2015, 17:56
GGorman GGorman is offline
Registered User
FRC #5419 (A-Team)
Team Role: Mentor
 
Join Date: Mar 2015
Rookie Year: 2010
Location: United States
Posts: 5
GGorman is an unknown quantity at this point
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
Reply With Quote
  #9   Spotlight this post!  
Unread 17-11-2015, 19:04
slibert slibert is offline
Software Mentor
AKA: Scott Libert
FRC #2465 (Kauaibots)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2005
Location: Kauai, Hawaii
Posts: 353
slibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud of
Re: LidarLite v2 communications issues

Quote:
Originally Posted by GGorman View Post
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
Could you post a capture from the logic analyzer showing the I2C sequence for attempting to communicate w/the LidarLite? It'd be interesting to see where things are breaking down in the communication.

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.
Reply With Quote
  #10   Spotlight this post!  
Unread 23-11-2015, 19:43
sraque's Avatar
sraque sraque is offline
Registered User
AKA: Steve Raque
FRC #2614 (MARS)
Team Role: Mentor
 
Join Date: Jun 2012
Rookie Year: 2009
Location: Morgantown, WV
Posts: 83
sraque is on a distinguished road
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...
Reply With Quote
  #11   Spotlight this post!  
Unread 23-11-2015, 19:57
sraque's Avatar
sraque sraque is offline
Registered User
AKA: Steve Raque
FRC #2614 (MARS)
Team Role: Mentor
 
Join Date: Jun 2012
Rookie Year: 2009
Location: Morgantown, WV
Posts: 83
sraque is on a distinguished road
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.
Reply With Quote
  #12   Spotlight this post!  
Unread 30-11-2015, 19:19
sraque's Avatar
sraque sraque is offline
Registered User
AKA: Steve Raque
FRC #2614 (MARS)
Team Role: Mentor
 
Join Date: Jun 2012
Rookie Year: 2009
Location: Morgantown, WV
Posts: 83
sraque is on a distinguished road
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.
Reply With Quote
  #13   Spotlight this post!  
Unread 30-11-2015, 22:57
SLAB-Mr.Thomas SLAB-Mr.Thomas is offline
Registered User
FRC #4237
 
Join Date: Jan 2015
Location: USA
Posts: 14
SLAB-Mr.Thomas is an unknown quantity at this point
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.

Last edited by SLAB-Mr.Thomas : 01-12-2015 at 15:07.
Reply With Quote
  #14   Spotlight this post!  
Unread 17-01-2016, 20:51
GGorman GGorman is offline
Registered User
FRC #5419 (A-Team)
Team Role: Mentor
 
Join Date: Mar 2015
Rookie Year: 2010
Location: United States
Posts: 5
GGorman is an unknown quantity at this point
Re: LidarLite v2 communications issues

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). WPI_I2CReadOnly.vi

Here's my Begin.vi to set up the LidarLite (just a screen shot):
Click image for larger version

Name:	BeginVi.JPG
Views:	83
Size:	78.3 KB
ID:	19778

Then I use this in PeriodicTasks.vi (any tips and comments on my coding is greatly appreciated!)
Click image for larger version

Name:	PeriodicTasks.JPG
Views:	66
Size:	42.3 KB
ID:	19779

Thanks everyone for your help. I hope this also helps others!

/Greg
Mentor 2478 and 5419

Last edited by GGorman : 17-01-2016 at 21:24.
Reply With Quote
  #15   Spotlight this post!  
Unread 04-01-2017, 15:19
bmammen's Avatar
bmammen bmammen is offline
Registered User
AKA: Brent Mammen
FRC #5801 (Inspire)
Team Role: Mentor
 
Join Date: Oct 2014
Rookie Year: 2014
Location: Kansas City
Posts: 33
bmammen is an unknown quantity at this point
Re: LidarLite v2 communications issues

Quote:
Originally Posted by GGorman View Post
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
FYI - This works, and is required, on the v3 Garmin Branded LidarLite as well. Thanks for figuring this out, it was driving us crazy!
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:29.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi