Author Topic: LIDAR - in a way I can relate to  (Read 8722 times)

RideTheGlide

  • Peahi Status
  • *****
  • Posts: 620
    • View Profile
    • Email
Re: LIDAR - in a way I can relate to
« Reply #30 on: February 04, 2019, 06:29:28 PM »
That sounds okay except it bounces around so you have to get a few readings and vote. The high spikes are bigger than the low ones so I can't average them. It also returns ambient light readings. I spit out distance and ambiance readings every 750 ms in a loop and pointed it around and it became very obvious that above a given brightness, distance sensing goes to hell. Still worth playing with for now.

I confess I don't really know the difference between the expensive Lidar sensors (about $150) and the much cheaper Time of Flight sensors (about five bucks) which seems likely to be what is used in inexpensive measuring systems like the Stanley pocket laser measurer for 12 bucks.

I ordered one of the $5 laser TOF sensors, but it will be a while before it gets here from Asia. What I am using now is single point infrared. The Sharp that I like triangulates using infrared. 
Real lidar implies actual moving parts that can do a quick sweep. It also uses back scattering and has multiple sensors for the returned light. It maps in 3D using a lot of points for distance. That's what I am trying to do but I can't do it as quickly with the cheap parts.
2017 GoPlus 9'9"
2018 Hydro-Force fastblast 12'6"
2019 BKC 12'

PonoBill

  • Cortez Bank Status
  • *****
  • Posts: 25864
    • View Profile
Re: LIDAR - in a way I can relate to
« Reply #31 on: February 04, 2019, 09:45:16 PM »
Most of the Lidar systems I've looked at use a spinning mirror for the scan. I actually bought one of the $150 units from Sparkfun, but haven't done anything with it (it's in Hood River). And then there's this guy for $319:https://www.sparkfun.com/products/14756

Foote 10'4X34", SIC 17.5 V1 hollow and an EPS one in Hood River. Foote 9'0" x 31", L41 8'8", 18' Speedboard, etc. etc.

RideTheGlide

  • Peahi Status
  • *****
  • Posts: 620
    • View Profile
    • Email
Re: LIDAR - in a way I can relate to
« Reply #32 on: February 05, 2019, 04:57:00 AM »
Most of the Lidar systems I've looked at use a spinning mirror for the scan. I actually bought one of the $150 units from Sparkfun, but haven't done anything with it (it's in Hood River).

I am going a little more low budget for the moment. I just ordered one of these from a US seller (so I can work with it soon):



So I can point my little single point ir (to be replaced by laser for more accuracy when that shows up) around. I will move it around in a grid pattern. Where I am in the pattern will give me X and Y and the distance will give me Z and I can make a contour map. There will be some interesting geometry in that to reduce skew. The further away the point is in the Z plane, the further the sample point moved in X and Y per degree of pan and tilt. It's going to be really rough with ir as it actually has a cone of reflection, not a true single point. It's not too wide, but it's a cone. With ir, if I set it in front of a football and can tell is a tapered column I will be happy. With laser, I should be able to map the laces. When I get the laser range finder, I think I can legitimately call it Lidar.


Anyway, all that processing and mechanics is built in to your Lidar unit. I will have to pan around back and forth so I don't wrap the wires around the arm and because I am using servos with a limited range of motion. I would have had the same issue with stepper motors with respect to the wires. The Lidar units solve the wrapping wire problem by pointing the laser straight down at the pivot point of a spinning mirror.
The funny thing is that if I value my time at all, my Lidar will be way more expensive than yours, much slower, bigger and won't handle the environments your can. But the hobby is more about the journey than the destination.  ;D
« Last Edit: February 05, 2019, 04:59:50 AM by RideTheGlide »
2017 GoPlus 9'9"
2018 Hydro-Force fastblast 12'6"
2019 BKC 12'

PonoBill

  • Cortez Bank Status
  • *****
  • Posts: 25864
    • View Profile
Re: LIDAR - in a way I can relate to
« Reply #33 on: February 05, 2019, 08:42:33 PM »
The funny thing is that if I value my time at all, my Lidar will be way more expensive than yours, much slower, bigger and won't handle the environments your can. But the hobby is more about the journey than the destination.  ;D

It's ALL about the journey. For me this makes no commercial sense at all, just keeping my brain working. I try to step it up every year, learn something harder.  I think it makes a difference, I think I'm sharper now than I was at 40, though that might just be the dementia fooling me.
Foote 10'4X34", SIC 17.5 V1 hollow and an EPS one in Hood River. Foote 9'0" x 31", L41 8'8", 18' Speedboard, etc. etc.

RideTheGlide

  • Peahi Status
  • *****
  • Posts: 620
    • View Profile
    • Email
Re: LIDAR - in a way I can relate to
« Reply #34 on: February 06, 2019, 03:52:49 AM »
The funny thing is that if I value my time at all, my Lidar will be way more expensive than yours, much slower, bigger and won't handle the environments your can. But the hobby is more about the journey than the destination.  ;D

It's ALL about the journey. For me this makes no commercial sense at all, just keeping my brain working. I try to step it up every year, learn something harder.  I think it makes a difference, I think I'm sharper now than I was at 40, though that might just be the dementia fooling me.

I doubt there is commercial use for what I will do to start with since it could be done with off shelf hardware. I have started thinking about what the next step will be to see what the data looks like once I get it. There's the easy way; dump it into a CSV file and open it in Excel to do a surface chart as pictured below or a possibly more interesting and challenging way to deliver the data over the web:

https://almende.github.io/chap-links-library/graph3d.html



2017 GoPlus 9'9"
2018 Hydro-Force fastblast 12'6"
2019 BKC 12'

RideTheGlide

  • Peahi Status
  • *****
  • Posts: 620
    • View Profile
    • Email
Re: LIDAR - in a way I can relate to
« Reply #35 on: February 08, 2019, 04:39:33 AM »
I should get the ESP32 tonight or tomorrow. I did find info on using the 2 cores independently on the Randaom Nerd Tutorials site you sent me to for a different article.
https://randomnerdtutorials.com/esp32-dual-core-arduino-ide/

I decided to put my Arduino Pro Mini on my toy car and when I have the ESP32 Lidar working, I will have it communicate with the Pro Mini to drive around while the ESP32 is mapping. I got the Bluetooth command interface working on the Pro Mini last night and the motor control wired, but had to charge a battery to test. I expect that to go smoothly as this is mostly just a slight port from code that worked on a MEGA.
« Last Edit: February 08, 2019, 04:43:52 AM by RideTheGlide »
2017 GoPlus 9'9"
2018 Hydro-Force fastblast 12'6"
2019 BKC 12'

RideTheGlide

  • Peahi Status
  • *****
  • Posts: 620
    • View Profile
    • Email
Re: LIDAR - in a way I can relate to
« Reply #36 on: February 08, 2019, 03:57:33 PM »
A little more running monologue. My ESP32 came and I moved the IR range finder over to it. Recompiled the little testing sketch and it ran just fine. Played with the range finder a little, moving objects in front of it. IR is going to give me some pretty rough numbers. It finds edges but not surface contours or indentations unless they are pretty big.
The toy car works with the little Pro Mini, though I need a better battery. Drove it back and forth a couple of times with my phone. But I put all that aside for now. If I decide this thing needs to move around intelligently, I have a solution. Not really much more to do until the pan and tilt comes. I have a peel and stick mini breadboard to put on it to mount the sensor and then the fun will begin.

EDIT - actually I do have the tilt compensated compass I can wire and do a little testing with. I need it to know how many degrees off center I pan and tilt for calculations. I don't know how else I could ever calibrate to the servos well enough to get decent numbers.
« Last Edit: February 08, 2019, 04:50:37 PM by RideTheGlide »
2017 GoPlus 9'9"
2018 Hydro-Force fastblast 12'6"
2019 BKC 12'

RideTheGlide

  • Peahi Status
  • *****
  • Posts: 620
    • View Profile
    • Email
Re: LIDAR - in a way I can relate to
« Reply #37 on: February 08, 2019, 07:18:29 PM »
and still a little more and then I probably won't get back to geeking out until next week after my tilt/pan arm gets here.

Below is the kind of data I will turn into 3D points.I will point to whatever the servos center at and get the bearing, pitch and roll at that point. Then as I point around getting distances, I will use the bearing to know how many degrees off center I am aimed horizontally, pitch will give me the vertical and roll will either be used to adjust the compass perfectly on the board or taken into account with pitch to get the vertical number. If I tie this into mapping/gps at some point, then I will care what the bearing is specifically. To start with all I want it for is to know how many degrees I point the sensor off center.

2017 GoPlus 9'9"
2018 Hydro-Force fastblast 12'6"
2019 BKC 12'

RideTheGlide

  • Peahi Status
  • *****
  • Posts: 620
    • View Profile
    • Email
Re: LIDAR - in a way I can relate to
« Reply #38 on: February 10, 2019, 02:35:31 PM »
Had all sorts of trouble getting compass and TOF distance sensor running together on ESP32, then also on Arduino again when I stepped back to that, so I decided just to go with coordinates based on servos. I gathered data to plot, but right now Excel seems to be having a tough time doing an area plot with 12,159 data points. I may have to find another way to plot it.

https://youtu.be/vw61Fo5RLCY
2017 GoPlus 9'9"
2018 Hydro-Force fastblast 12'6"
2019 BKC 12'

RideTheGlide

  • Peahi Status
  • *****
  • Posts: 620
    • View Profile
    • Email
Re: LIDAR - in a way I can relate to
« Reply #39 on: February 10, 2019, 03:05:16 PM »
Found a way to generate it online, but can't set options to have decreasing Z toward me; doesn't rotate 360 degrees.  So this is viewing from the backside of the plot. You can see the general shape of the jug in there. Really rough and need to invert Z if I am going to use this plotting page.

Was going to edit this into prior post, but cold not find how I might add attachments.

2017 GoPlus 9'9"
2018 Hydro-Force fastblast 12'6"
2019 BKC 12'

PonoBill

  • Cortez Bank Status
  • *****
  • Posts: 25864
    • View Profile
Re: LIDAR - in a way I can relate to
« Reply #40 on: February 10, 2019, 03:48:24 PM »
Pretty cool. I'm working on my project today since it's a bit too "blustery" to foil or downwind. 60 mph from a very unusual westerly direction. My power keeps going off. Good thing the IDE saves differentials, though my sketch got corrupted in one momentary blackout. I just restored it from the last save and got most of it back, though of course, I don't remember what I did. That's okay, the second solution is often better, though there have been times when I've lost a little "magic".

I'm having some issues getting two channels of low energy Bluetooth to play nice. I might have to do something brute force instead of the elegant handoff they are supposed to manage.
Foote 10'4X34", SIC 17.5 V1 hollow and an EPS one in Hood River. Foote 9'0" x 31", L41 8'8", 18' Speedboard, etc. etc.

RideTheGlide

  • Peahi Status
  • *****
  • Posts: 620
    • View Profile
    • Email
Re: LIDAR - in a way I can relate to
« Reply #41 on: February 10, 2019, 05:22:47 PM »
I have a UPS to keep from losing stuff. I worked on the "LidarLike" stuff off and on. I had the compass and range working at the same time for a bit when I took the earlier screen shot. When I had trouble later, I found all kinds of info on line about problems with I2C on the ESP32, especially if you have more than one device. Even with one, it will often get out of phase with some other source of interrupts and stop working sometimes. I had seen that and thought I had some issue with wiring or whatever. I am going to set it aside until the laser range finder comes and maybe play with the IOT side of things on the ESP32. I also have a level shifter on the way as I thought it might be kind of interesting to do some kind of fancy integrated sensor on one slaved to the other.

Had some actual work from my job to do also. Not doing the sort of work I have done for the last 40 years as the project stream for us kind of dried up. But I am staying relevant with the client by doing business rule and document automation work as well as maintenance on the last project we did for them. I have been where I am a long time and would have to take a big cut to move on, plus there is that whole ageism issue. Some different kinds of challenges; still puzzles to solve so it's still interesting enough to do for a while. Hopefully it gets me to retirement, which is not far away.
2017 GoPlus 9'9"
2018 Hydro-Force fastblast 12'6"
2019 BKC 12'

RideTheGlide

  • Peahi Status
  • *****
  • Posts: 620
    • View Profile
    • Email
Re: LIDAR - in a way I can relate to
« Reply #42 on: February 26, 2019, 11:44:20 AM »
My little laser TOF sensor showed up. May breathe some life back in this thread later. First I have to solder the pins on without going blind. Unlike Pono, that is not my favorite part. But now I have to go get some dental work done, so it may not be today...
2017 GoPlus 9'9"
2018 Hydro-Force fastblast 12'6"
2019 BKC 12'

RideTheGlide

  • Peahi Status
  • *****
  • Posts: 620
    • View Profile
    • Email
Re: LIDAR - in a way I can relate to
« Reply #43 on: February 26, 2019, 04:45:35 PM »
Not my favorite part, but my ugly handy work  is done. Think I used enough solder? I got the near one about right. the rest? Well, they aren't touching/shorting and I don't think I have to worry much about them coming loose...

EDIT - I did trim them and break off the extra pins.

« Last Edit: February 26, 2019, 04:51:53 PM by RideTheGlide »
2017 GoPlus 9'9"
2018 Hydro-Force fastblast 12'6"
2019 BKC 12'

PonoBill

  • Cortez Bank Status
  • *****
  • Posts: 25864
    • View Profile
Re: LIDAR - in a way I can relate to
« Reply #44 on: February 26, 2019, 06:56:38 PM »
I use a rework system for most of my soldering. Tin the pins with an iron and then use the hot air to flow it out. Takes about ten minutes to get good with it. About 75 bux. Money well spent, I have one here and in hood river.

The ESP32 boards come in a zillion different configurations, I've settled on the Doit boards which seems to have most of the I2C problem well in hand, they are the one that Random Nerd recommends. I probably should have mentioned that earlier. .
« Last Edit: February 26, 2019, 07:28:22 PM by PonoBill »
Foote 10'4X34", SIC 17.5 V1 hollow and an EPS one in Hood River. Foote 9'0" x 31", L41 8'8", 18' Speedboard, etc. etc.

 


SimplePortal 2.3.7 © 2008-2024, SimplePortal