Go to Post you should see my scout sheet its the bomb diggity - Mirza95vx [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
  #31   Spotlight this post!  
Unread 13-01-2015, 02:25
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 WDB View Post
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!
I assume you have the correct wires connected per the datasheet and are using the correct pins on the MXP?
I added an execution counter to the lidar class' update() method to ensure the code was properly executing (and output this counter to the SmartDashboard). Could you do this as well as a form of troubleshooting?
__________________
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)
  #32   Spotlight this post!  
Unread 13-01-2015, 10:51
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: LIDAR Sensor has arrived!

Quote:
Originally Posted by tech2077 View Post
Poking around the linux side with i2ctools there are definitive read/write errors showing up for the onboard port, so I'll be sure to let them know.
What port in Linux are you referring to? What is the dev path you are using?
  #33   Spotlight this post!  
Unread 13-01-2015, 11:32
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 tech2077 View Post
I'll do testing on this as soon as I can, but from what I have tested most surfaces do not refract it enough to actually change the measurements. The only situations I've noticed a problem is with a few thin plastics they are entirely transparent to the IR laser.
Based on discussion with NI, I'm led to believe the problem may be specific to Java and not the controller itself. NI claims their ADXL345 accelerometer works just fine with I2C when using LabView modules, but I can't get the accelerometer to work with the onboard port either when using Java.

https://decibel.ni.com/content/thread/26778
__________________
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)
  #34   Spotlight this post!  
Unread 13-01-2015, 11:44
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,590
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: LIDAR Sensor has arrived!

Can you try in C++ as well (either the accelerometer or the LIDAR). Java and C++ share a lot of code, and that might help pinpoint where the issue is.
  #35   Spotlight this post!  
Unread 16-01-2015, 01:42
tech2077 tech2077 is offline
Registered User
AKA: Matthew Skolaut
FRC #3847 (Spectrum 3847)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Houston
Posts: 21
tech2077 is an unknown quantity at this point
Re: LIDAR Sensor has arrived!

Quote:
Originally Posted by Joe Ross View Post
Can you try in C++ as well (either the accelerometer or the LIDAR). Java and C++ share a lot of code, and that might help pinpoint where the issue is.
Verified to have the same error.
  #36   Spotlight this post!  
Unread 16-01-2015, 09:57
marshall's Avatar
marshall marshall is online now
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,330
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: LIDAR Sensor has arrived!

We picked up one of these... it seems very sensitive to glossy/reflective surfaces. Much more so than the lidar system we yanked from a Neato vacuum robot. Not sure what others are seeing. We haven't dived into the sample code yet beyond running it.
  #37   Spotlight this post!  
Unread 17-01-2015, 16:12
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,537
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: LIDAR Sensor has arrived!

We have 2 of these and played with them today with LabVIEW. We have been unable to get them to work with the native I2C port on the roborio. However, we have them working just fine on the MXP expansion I2C with identical code. We've pinned them out, swapped the lasers themselves, and still have zero luck with the native port.

The native port DOES know the sensor is connected. We received read and read/write errors stating that the device is busy. This is different that the 'resource not found' error we get when the device is not plugged into to power or not plugged into the I2C.

On the MxP I2C port we are reading then writing in alternating 20 ms loops. We lowered the timing of these loops incrementally until we started getting errors. At 10 ms polling we receive all zeros, at 15 ms we receive data, so 20 ms is where we are (50 hz). We average 5 loops in a moving average filter and the data looks very good.

I know we can improve this by doing the write then checking for the ready bit, but this worked just as well and gave us a resolution we're happy with. Plus after 6 hours of banging our head against the native port we were already pretty frustrated.

We have noticed that when the sensor was aiming at the ceiling and our flourescent lights we got highly inaccurate results.
  #38   Spotlight this post!  
Unread 20-01-2015, 00:22
Merfoo's Avatar
Merfoo Merfoo is offline
Registered User
FRC #0955 (CV Robotics)
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2012
Location: America
Posts: 48
Merfoo is an unknown quantity at this point
Re: LIDAR Sensor has arrived!

How would one program the LIDAR Sensor for use via DIO in Java?
  #39   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: 958
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...
  #40   Spotlight this post!  
Unread 20-01-2015, 11:17
marshall's Avatar
marshall marshall is online now
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,330
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: LIDAR Sensor has arrived!

Quote:
Originally Posted by Merfoo View Post
How would one program the LIDAR Sensor for use via DIO in Java?
I don't know that you can. It's designed to work via PWM output or I2C. The I2C implementation should be pretty similar to the arduino example on their website. The PWM setup will likely just be reading analog input values but don't quote me on that.
  #41   Spotlight this post!  
Unread 20-01-2015, 11:27
tech2077 tech2077 is offline
Registered User
AKA: Matthew Skolaut
FRC #3847 (Spectrum 3847)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Houston
Posts: 21
tech2077 is an unknown quantity at this point
Re: LIDAR Sensor has arrived!

Quote:
Originally Posted by Merfoo View Post
How would one program the LIDAR Sensor for use via DIO in Java?
Two possible methods:
  1. Use a low pass filter and read through analog (less programming but requires a resistor and capacitor connected to the output, or
  2. Directly measure the pwm pulse and convert the timing to distance (more programming, but the sensor just drops in and works)

I plan on eventually writing up a pwm based class due to the problems teams have had with this sensor and the onboard i2c port.
  #42   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.
  #43   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.
  #44   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:	95
Size:	17.7 KB
ID:	18104  Click image for larger version

Name:	1718 Lidar Code (Periodic Tasks).png
Views:	74
Size:	18.9 KB
ID:	18109  
Attached Files
File Type: vi I2C Lidar Present (SubVI).vi (16.2 KB, 30 views)
File Type: vi Pi-DAR (Sub VI).vi (15.4 KB, 28 views)
File Type: vi Averaging Smooth (SubVI).vi (18.4 KB, 26 views)
  #45   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.
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 10:45.

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