May Be In Love With The $4 Grove Ultrasonic Ranger

I have the short range unidirectional beam VOR (two LEDs with a separator), but Carl is not great at seeing them until he gets close. The have-to-turn-around part is quite limiting as you mentioned.

The wall following is a whole separate interest as you know - I’ve been thinking on that forever.

2 Likes

Have you considered replacing them with two IR lasers?  Or, if you want a visible light beam, two red laser-pointers or a couple of bright LED’s behind collimator lenses.  Or perhaps one beam?

1 Like

Actually, I’ve been avoiding the whole “finish the docking challenge”; I just can’t seem to get motivated to finish it. As “Cyclical Obsessive”, I am sure I will get back to it, just not sure when.

1 Like

We have a lot more in common than either of us may wish to admit.  I have the same bursts of energy followed by periods of lethargy.  This whole Ukrainian nonsense has made motivation even more difficult - but I’m getting there.

1 Like

I see today that my memory was failing me, as I just found a study I did for IR in 2017 and revised in 2020 to add US.

IR vs US Wall Detection by Distance and Incidence Angle


Analysis:

  • These values are for distance from bot to a beige color wall

  • IR provides valid distance readings at greater incidence angles than US out to 18 inches

    • IR max of +/- 60 degrees at 12 inches from a wall
    • US provides +/- 15 degrees irrespective of distance
  • US provides valid distance readings at greater distance than IR

    • IR max distance around 24 inches (+/-15 degrees incidence)
    • US max distance around 48 inches (+/-15 degrees incidence)
2 Likes

Doesn’t that contradict the data you just captured a few days ago?  I was golden out to about 60 cm or so, (I didn’t try further - I didn’t have the room.)

1 Like

No - The max distance in the old study was the max distance the sensor could provide reliable wall detection. The IR sensor can provide reliable “normal to wall” distance readings out to 48 inches but I did not feel it could reliably provide the two, off-normal readings to enable “wall detection”.

This was part of my initial study of GoPiGo3 “wall detection”. Before I wrote the wall following, I wanted Carl to recognize there was a wall worth following, not just an obstacle in its path.

I did write a “Guard Closest Object” program that would:

  • perform 360 degree scan to find the nearest object
  • navigate to the “guard post” in front of the chosen object
  • turn 180 to object
  • Perform 160 degree sector scan, warn:
    • If something moves closer, announce “I saw that”
    • If something moves within Guard Area, announce “Back off. I am protecting this area”

I still want to program my “wall sentry”:

  • find a wall, then repeat wall following loop:
    • wall follow (wall on right) till end of wall (obstacle or opening)
    • 180 turn, rest a moment,
    • wall follow (wall on left) till end of wall (obstacle or opening)
    • 180 turn, rest a moment,

And then, with an enhancement to:

  • pause at the center of the wall to face normal to the wall,
  • perform the sector-scan-warning behavior for 5 or 10 minutes,
  • continue the wall-following loop.
2 Likes

. . . . and what was that you were saying about “beautiful unicorns”?  :wink:

Seriously, this sounds like as ambitious a project for you as the New Remote Camera Robot project was, (and is), for me.

Far be it for me to suggest, but this sounds like a LIDAR task to me.

To me, wall following would work like this:

  • Approach and somehow assume a 90° position relative to the wall at some distance.  How to get to 90° is the tough part.
  • Turn an accurate 90° in one direction or the other.
  • Aim the sensor(s) at a 45° angle toward the wall.
  • Move forward such that the distance does not change.
  • Rinse and Repeat.

What say ye?

1 Like

I’ve thought about this “angled sensor” concept a lot. Distinguishing between rotation away from the wall due to non-straight driving, versus straight driving not at 90 to the wall is not possible, but it may not matter, the correction for either is a slight turn toward the wall.

And at 45 degrees angle, it should detect the end of the wall by a corner or an opening, but it may miss a chair leg, so I’m thinking the bot needs to scan for a no-obstacle distance along wall before initiating the wall following with 45 degree thing.

You are correct it is not a simple behavior, but really, your Remote Camera Robot project is “order - moon shot” while the wall sentry is “order - two burgers at McDonalds” (unless the bot is in Russia I guess.)

2 Likes

I’d rather order the burgers from Burger King - I think they taste better.  And, AFAIK, they’re still open.  KFC is still open as far as I know too.

Likewise, in the couple of shopping malls I checked this last weekend, the McDonald’s was open there - maybe the mall owners told them that if McDonald’s pulled out, they’d sell the space to someone else - or re-negotiate a “penalty” rent when they decide to come back.  Of course, that was then, this is now, and who knows what’s going on tomorrow.

Sigh. . .  I guess that’s a matter of opinion.  Yes, my project has been “chewy”, but then again all this ROS stuff has my head spinning - and as far as I am concerned, if my project is a moon-shot, you’re trying to colonize Mars!

I had the advantage that most of the really hard stuff - the servers and the streaming camera - came pre-programmed.  I just added fluff.

Good luck!  My hat’s off to you!

It’s not possible to detect and, (as you said), it doesn’t really matter.  Also that solves the “curved wall problem” - you simply adjust toward or away as necessary.

Try not to over-engineer this and you’ll be happier. :wink:

1 Like

That’s why ROSbot Dave has been sleeping and LegacyBot Dave has been seen on almost every day lately.

2 Likes

So then, what’s happening with the fancy camera and the LIDAR?  All that was ROS stuff, right?  Or, do you have a version of di_sensors I haven’t seen yet? :grinning: :wink:

2 Likes

The LIDAR is ROSbot Dave only. The Oak-D-Lite is LegacyDave only while I am learning how to program it and then learn to program the robot with what I learned how to program on the Oak thingy.

And since that all sounds like more than my brain can wrap around right now, both are being ignored while Dave learns about VScode, and the US sensor, and I think about things that sound easier like wall following.

2 Likes

When I start reading about things like Server Sent Events, (etc.), I am reminded about the anecdote I heard years ago:

And then I think of the smoke that must be coming out of my ears, and it’s no wonder I believe I’m loosing my mind!

2 Likes

Finally had a chance to try this with Finm:ark.

First 4 loops through:

Distance Readings: [259]
Average Reading: 259 mm
Minimum Reading: 259 mm
Maximum Reading: 259 mm
Std Dev Reading: 0 mm
Three SD as a percent of reading: 0.0 %

Distance Readings: [259, 259]
Average Reading: 259 mm
Minimum Reading: 259 mm
Maximum Reading: 259 mm
Std Dev Reading: 0 mm
Three SD as a percent of reading: 0.0 %

Distance Readings: [259, 259, 262]
Average Reading: 260 mm
Minimum Reading: 259 mm
Maximum Reading: 262 mm
Std Dev Reading: 1 mm
Three SD as a percent of reading: 1.6 %

Distance Readings: [259, 259, 262, 258]
Average Reading: 260 mm
Minimum Reading: 258 mm
Maximum Reading: 262 mm
Std Dev Reading: 2 mm
Three SD as a percent of reading: 1.7 %

Distance Readings: [259, 259, 262, 258, 257]
Average Reading: 259 mm
Minimum Reading: 257 mm
Maximum Reading: 262 mm
Std Dev Reading: 2 mm
Three SD as a percent of reading: 1.9 %

This is in a dim room looking at a piece of cardboard. So very consistent readings. The only downside is that I had the sensor at ~25 cm, so it’s reading about a cm long.
/K

2 Likes

Well cry me a river!
:wink:

We should have problems that big. . . .

1 Like

Dave’s correction at 10 cm for the IR distance sensor

1 Like

5%, so in the same ballpark of error as what I saw.

It’s a good demonstration of the difference between precision and accuracy, which my science lab teachers rightly harped on.

One of my favorites:
image

/K

2 Likes

Also a good demonstration of theory and reality:

archeryApr05x

2 Likes

But then again accuracy may be less important than incidence

This guy demonstrates wall following is much better with ToF IR

2 Likes