Go to Post A dedicated team is a happy team. - sgreco [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rating: Thread Rating: 5 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 11-01-2015, 21:39
DavisC DavisC is offline
Registered User
FRC #0539 (Titans)
Team Role: College Student
 
Join Date: Jul 2011
Rookie Year: 2010
Location: Virginia
Posts: 200
DavisC is just really niceDavisC is just really niceDavisC is just really niceDavisC is just really nice
Angry Re: LIDAR Sensor has arrived!

Thanks, so I just use kMXP instead of kOnBoard and connect to the expansion port bottom left 2 pins for sda and scl?
__________________
FRC Team 539
Student Member: 2010 Breakaway - 2014 Aerial Assist
Mentor: 2015 Recycle Rush - present
  #2   Spotlight this post!  
Unread 11-01-2015, 21:45
seg9585's Avatar
seg9585 seg9585 is offline
Registered User
AKA: Eric
FRC #4276 (Surf City Vikings)
Team Role: Engineer
 
Join Date: Feb 2006
Rookie Year: 2001
Location: Boeing (Seal Beach, CA)
Posts: 520
seg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond repute
Re: LIDAR Sensor has arrived!

Quote:
Originally Posted by DavisC View Post
Thanks, so I just use kMXP instead of kOnBoard and connect to the expansion port bottom left 2 pins for sda and scl?

Correct. I still had my sensor power pins plugged into the I2C power and ground ports, which seem to work (for what it's worth).

Also, if you execute myLidar.start(); in your init area or constructor, you can access myLidar.getDistance() in both autonomous and teleOp methods and allow it to run its own thread, which will help avoid bogging down the rest of your code (because the update() method includes delay timers up to ~10ms to write and read).
__________________
My FIRST legacy:

Team 204 Student 2001, 2002 (Voorhees, NJ)
Team 1493 College Mentor 2006 - 2008 (Troy, NY)
Team 2150 Intern/Professional Mentor 2007, 2009 (Palos Verdes)
Team 4123 Lead Engineering Mentor 2012 (Bellflower, CA)
Team 4276 Engineering Mentor 2012-2016 (Huntington Beach, CA)
  #3   Spotlight this post!  
Unread 12-01-2015, 20:45
WDB WDB is offline
Registered User
FRC #2363
 
Join Date: Jan 2015
Location: Virginia
Posts: 4
WDB is an unknown quantity at this point
Re: LIDAR Sensor has arrived!

Quote:
Originally Posted by seg9585 View Post
Correct. I still had my sensor power pins plugged into the I2C power and ground ports, which seem to work (for what it's worth).

Also, if you execute myLidar.start(); in your init area or constructor, you can access myLidar.getDistance() in both autonomous and teleOp methods and allow it to run its own thread, which will help avoid bogging down the rest of your code (because the update() method includes delay timers up to ~10ms to write and read).
We tried the I2C port too and failed. Moved over to the MXP and still getting zeroes.

Using lidar.start() in the teleopInit and calling lidar.getDistance() in teleopPeriodic which is returning zero. Am I missing anything?

Thanks!
  #4   Spotlight this post!  
Unread 02-02-2015, 11:23
co1inw co1inw is offline
Student
AKA: Colin Willoughby
FRC #1768 (Nashoba Robotics)
Team Role: Programmer
 
Join Date: Feb 2014
Rookie Year: 2013
Location: United States
Posts: 2
co1inw is an unknown quantity at this point
Re: LIDAR Sensor has arrived!

Quote:
Originally Posted by tech2077 View Post
In case anyone is interested, I wrote up a java class for this, you can use the start/stop functions to use the built in updater Timer, or use the update function to only poll distance when needed.
LIDAR.java
Please correct me if I'm wrong, but there appears to be a bug in this file. You are calling updater.scheduleAtFixedRate(), which would be fine if you didn't already have a while() loop inside your TimerTask. Since you have a while loop, the run() function will never exit, so essentially your timer is useless and is acting like just a Thread object to run this function in the background indefinitely. The 'period' argument isn't being used, so the sensor will be polled every 10ms.

Also, since it came into the discussion, our team is using Java and we have been able to successfully use our RoboRio I2C port for a MaxBotix ultrasonic sensor, but not for the LIDAR sensor. Trying to use the LIDAR gives us write and read errors.

Last edited by co1inw : 02-02-2015 at 11:45.
  #5   Spotlight this post!  
Unread 02-02-2015, 18:48
Pi Fighter's Avatar
Pi Fighter Pi Fighter is offline
Insert Monty Python Reference Here
AKA: Trevor
FRC #1718 (Fighting Pi)
Team Role: College Student
 
Join Date: May 2009
Rookie Year: 2008
Location: Armada, MI
Posts: 34
Pi Fighter has a spectacular aura aboutPi Fighter has a spectacular aura about
Re: LIDAR Sensor has arrived!

Hello all, a while ago our team posted that we were able to successfully collect data from the Lidar sensor using LabVIEW. Today I'm posting the code we're using to collect the data, as well as pictures of the placement of these VI's in the robot project. Feel free to use them as needed.
Attached Thumbnails
Click image for larger version

Name:	1718 Lidar Code (Begin).png
Views:	88
Size:	17.7 KB
ID:	18104  Click image for larger version

Name:	1718 Lidar Code (Periodic Tasks).png
Views:	71
Size:	18.9 KB
ID:	18109  
Attached Files
File Type: vi I2C Lidar Present (SubVI).vi (16.2 KB, 28 views)
File Type: vi Pi-DAR (Sub VI).vi (15.4 KB, 26 views)
File Type: vi Averaging Smooth (SubVI).vi (18.4 KB, 22 views)
  #6   Spotlight this post!  
Unread 08-01-2015, 00:40
PaulDavis1968's Avatar
PaulDavis1968 PaulDavis1968 is offline
Embedded Software/Systems Engineer
AKA: Master of Complexity
FRC #2053 (TigerTronics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Endicot NY
Posts: 91
PaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nice
Re: LIDAR Sensor has arrived!

Ordered! I have been drooling over this for 6 months. And we might have a use for it. I was going to buy it for my self regardless. If it works out I will get one for the team so we have two.
  #7   Spotlight this post!  
Unread 08-01-2015, 06:21
dellagd's Avatar
dellagd dellagd is offline
Look for me on the field!
AKA: Griffin D
FRC #2590 (Nemesis) #2607 (The Fighting Robovikings)
Team Role: Mentor
 
Join Date: Sep 2011
Rookie Year: 2011
Location: PA
Posts: 890
dellagd has a reputation beyond reputedellagd has a reputation beyond reputedellagd has a reputation beyond reputedellagd has a reputation beyond reputedellagd has a reputation beyond reputedellagd has a reputation beyond reputedellagd has a reputation beyond reputedellagd has a reputation beyond reputedellagd has a reputation beyond reputedellagd has a reputation beyond reputedellagd has a reputation beyond repute
Re: LIDAR Sensor has arrived!

Based on the datasheet it seems this wouldn't work on polycarbonate, since it transmittance is just as high at 905nm as it is in the visible spectrum, and the laser would mostly go right through. I really don't know much about LIDAR systems, so does anyone else with more experience know if this would be the case?
__________________
Check out some cool personal projects in computers, electronics, and RC vehicles on my blog!

2016 MAR DCMP Engineering Excellence Award
2016 MAR Westtown Innovation in Control Award
2016 MAR Hatboro-Horsham Industrial Design Award
2015 Upper Darby District Winners - Thanks 225 and 4460!
2015 Upper Darby District Industrial Design Award
2015 Hatboro-Horsham District Winners - Thanks 2590 and 5407!
2014 Virginia Regional Winners - Thanks so much 384 and 1610, I will never forget that experience!
2014 Virginia Quality Award
2014 MAR Bridgewater-Raritan Innovation in Control Award
2014 MAR Hatboro-Horsham Gracious Professionalism Award
2013 MAR Bridgewater-Raritan Innovation in Control Award
2012 MAR Lenape Quality Award
  #8   Spotlight this post!  
Unread 08-01-2015, 09:46
PaulDavis1968's Avatar
PaulDavis1968 PaulDavis1968 is offline
Embedded Software/Systems Engineer
AKA: Master of Complexity
FRC #2053 (TigerTronics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Endicot NY
Posts: 91
PaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nice
Re: LIDAR Sensor has arrived!

Quote:
Originally Posted by dellagd View Post
Based on the datasheet it seems this wouldn't work on polycarbonate, since it transmittance is just as high at 905nm as it is in the visible spectrum, and the laser would mostly go right through. I really don't know much about LIDAR systems, so does anyone else with more experience know if this would be the case?

I asked this question on their forum.

https://groups.google.com/forum/#!forum/pulsedlight3d
  #9   Spotlight this post!  
Unread 08-01-2015, 10:27
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,077
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: LIDAR Sensor has arrived!

Polycarbonate doesn't have 100% transmittance for near IR, but it's still very high. You will get a small amplitude return from polycarb, which will be higher if there are scratches or dirt on the surface, or if you are getting specular returns from other light sources. You can configure the LIDAR-Lite to present either the strongest, first, or last return to you, and I'd expect whatever is behind the panel to be the strongest return the vast majority of the time (but not always).

Experientially, LIDAR sucks for detecting transparent objects and requires lots of signal processing and integration of multiple scans over time to have any chance of accurately detecting a transparent object.
  #10   Spotlight this post!  
Unread 08-01-2015, 11:01
seg9585's Avatar
seg9585 seg9585 is offline
Registered User
AKA: Eric
FRC #4276 (Surf City Vikings)
Team Role: Engineer
 
Join Date: Feb 2006
Rookie Year: 2001
Location: Boeing (Seal Beach, CA)
Posts: 520
seg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond repute
Re: LIDAR Sensor has arrived!

FYI, I have detected distance to transparent windows with moderate levels of success. I'd assume polycarbonate behaves similarly, but would have to do more testing. We are programming up the LIDAR against the roboRio tonight so I'll try it out.
__________________
My FIRST legacy:

Team 204 Student 2001, 2002 (Voorhees, NJ)
Team 1493 College Mentor 2006 - 2008 (Troy, NY)
Team 2150 Intern/Professional Mentor 2007, 2009 (Palos Verdes)
Team 4123 Lead Engineering Mentor 2012 (Bellflower, CA)
Team 4276 Engineering Mentor 2012-2016 (Huntington Beach, CA)
  #11   Spotlight this post!  
Unread 20-01-2015, 11:09
IronicDeadBird's Avatar
IronicDeadBird IronicDeadBird is offline
Theory Crafting Fo days...
AKA: Charles Ives "M" Waldo IV
FRC #1339 (Angelbots)
Team Role: Tactician
 
Join Date: Feb 2014
Rookie Year: 2005
Location: Colorado
Posts: 952
IronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond repute
Man I wanted one of these and I don't even have a reason...
Any cool uses for them I have a couple ideas but none of them are viable this year cause auto too short...
__________________
HERO 俺を讃える声や 喝采なんて 欲しくはないさ
I liked my team more before they stole my jacket.
Play is for kids this is serious...
  #12   Spotlight this post!  
Unread 23-01-2015, 12:09
PaulDavis1968's Avatar
PaulDavis1968 PaulDavis1968 is offline
Embedded Software/Systems Engineer
AKA: Master of Complexity
FRC #2053 (TigerTronics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Endicot NY
Posts: 91
PaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nice
Re: LIDAR Sensor has arrived!

Quote:
Originally Posted by IronicDeadBird View Post
Man I wanted one of these and I don't even have a reason...
Any cool uses for them I have a couple ideas but none of them are viable this year cause auto too short...

I wanted one of these period. I don't care if we use it.
  #13   Spotlight this post!  
Unread 07-02-2015, 13:11
muvicado muvicado is offline
Registered User
FRC #0135
 
Join Date: Feb 2015
Location: United States
Posts: 2
muvicado is an unknown quantity at this point
Re: LIDAR Sensor has arrived!

Quote:
Originally Posted by seg9585 View Post
Just wanted to share that a new LIDAR (laser radar/rangefinder) is out on the market from "PulsedLight3D" for $90 -- Class I laser so it's FIRST legal. Just arrived today in the mail, and I hooked it up to my Arduino:



Did some initial testing via I2C, seems to be very accurate between ~20cm and 650cm (as far as I could test it tonight without finding a larger room), 0.5 deg beam width

Here's a snapshot of my Serial output with distance in cm (~100 Hz samples averaged and output at 5 Hz), sitting on my desk facing up to the ceiling.


http://pulsedlight3d.com/
We're going to have fun with this!
Do you know if more than one LIDAR-Lite can be connected via CAN through the MXP's can bus?

The LIDAR-Lite appears to have a fixed slave address - 0xC4.

LIDAR-Lite Spec

Why would they not make it configurable? Seems like that would prevent one from being able to use multiple LIDAR-Lites on the same I2C bus.

Maybe I'm missing something. The LIDAR's slave address must be configurable somehow.
  #14   Spotlight this post!  
Unread 07-02-2015, 14:59
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: LIDAR Sensor has arrived!

Quote:
Originally Posted by muvicado View Post
Maybe I'm missing something. The LIDAR's slave address must be configurable somehow.
The pre-release descriptions all talk vaguely about being able to control multiple devices on the I2C bus, but none of the available documentation I've been able to find mentions anything about configuring the slave address.
  #15   Spotlight this post!  
Unread 07-02-2015, 15:41
muvicado muvicado is offline
Registered User
FRC #0135
 
Join Date: Feb 2015
Location: United States
Posts: 2
muvicado is an unknown quantity at this point
Re: LIDAR Sensor has arrived!

Quote:
Originally Posted by muvicado View Post
Do you know if more than one LIDAR-Lite can be connected via CAN through the MXP's can bus?

The LIDAR-Lite appears to have a fixed slave address - 0xC4.

LIDAR-Lite Spec

Why would they not make it configurable? Seems like that would prevent one from being able to use multiple LIDAR-Lites on the same I2C bus.

Maybe I'm missing something. The LIDAR's slave address must be configurable somehow.
Okay, I discovered the slave address can't be changed on the current version of LIDAR_Lite. From PulsedLight's forum, I learned a work-around for this. Using a DIO pin for each LIDAR, connect pin 2 of connector J1 on the LIDAR to a dedicated DIO pin on the RIO, using this as a "device select" line. Just before and just after the Write/Read sequence to each LIDAR, set teh LIDAR's device select high and low, respectively. We will try this out, using a C++ application.
Closed Thread


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 03:42.

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