Carl Advances Robot Preventative Medicine

Carl became sufficiently complex a while back that I wrote up a little “health check” program in hopes of early detection of issues that might stress him. At that time, I didn’t include a check that his life maintaining “juicer” program was running. I was always going to get to it but didn’t.

While working on his new ArUco marker functions, he found himself in the middle of the room when “juicer” decided he needed to be on the dock, and announced “Manual Docking Requested”. I put him on the dock and continued working on my programs with the “inhibit_drive” flag on so as not to interfere with his charging.

After a while I started getting mad at Carl for not recognizing that he was on the dock and charging. I took him off the dock for a while and then put him back on to encourage his “charging detected” rule to fire but nothing seemed to work. Carl just would not recognize that I had helped him (and reward me by telling me “charging state change - charging”)

Not only did he not recognize that he was charging, but when the charge cycle changed he also didn’t recognize and announce “trickle charging, time to get off the dock”. This triggered a thought to check the output of the juicer program to see what was going on. Oops - juicer had left town on vacation leaving Carl to fend for himself.

So now Carl has a “juicerRunning()” check to shout “Warning - Juicer Not Running!” (if not during quiet time.)

2 Likes

I am confused.

Since the obvious solution to juicer not running is to start it, why not make the juicerRunning() routine simply start juicer if it’s not running - and then shout if juicer, (for whatever reason), fails to start?

1 Like

The right way to do that is probably to make juicer a service with some number of restart attempts, but I wanted something I could program and test in a few minutes distraction from the ArUco return to dock stuff. I am so close. Debugging all the things that can go wrong, but it is basically working from anywhere line of sight to the dock.

2 Likes

Cool Beanies!

I am soooooo jealous!

I want to see the video of Carl returning to his dock from some distance/angle from the dock - THAT would be an Oscar-winning performance!

2 Likes

I seem to remember CleoQC mentioning that GoPiGo OS has OpenCV already loaded. Once I finish this docking project on Carl, I’ll have to try out the basic ArUco marker with PiCam example on GoPiGo OS. (It doesn’t use any Carl or Dave specific code, but does require the PyPi Python image utils package “imutils” be installed.)

It could be a neat addition to Bloxter. Something like:

  • if sensor [PiCamera] value [markerID] is equal to [1]
    • Drive [Forward]
  • While sensor [Distance Sensor] value [Distance] is greater than [10 cm]
    • print [Distance]
  • Stop

With several markers on stand-up posts, the bot could

  • visit “Marker 1 - Post Office”, then
  • rotate till it sees “Marker 2”
  • visit “Marker 2 - Market”, then
  • rotate till it sees “Marker 0”
  • drive to “Marker 0 - Home”
  • rotate till see “Marker 1” (to be ready for the next run)
  • Announce “It’s good to be home again”
2 Likes

Should all be doable with onboard resources given what you’re already able to do already. You could also navigate to those areas by using SLAM and designating their location on a map, but that would take more resources.
/K

2 Likes

The latest Hackster.io has this article that might be useful:

It’s not on a Pi, but if it can fit in an ESP-32 board it should fit on a Pi.

1 Like

Interesting, but squeezing is not needed for GoPiGo bots. There is plenty of memory, both storage and random-access for the full OpenCV, with object recognition models, and for TensorFlow-Lite with object recognition models.

With OpenCV or TensorFlow-Lite, Charlie can recognize a book, broccoli, bottle, bowl, bird, bed, backpack, banana, bicycle and 119 other objects (that don’t start with “B” :wink: ), as well as the ArUco markers, facial expressions, and body pose.

The possibilities with a PiCamera on the GoPiGo3 have really been untapped.

2 Likes

No, squeezing is not necessary, but the ESP-32 board isn’t known for being a hot smokin’ processor either and there is the possibility that it will work well with a smaller memory footprint and lower processor load.

2 Likes

Not really, and the fork is several years old. The idea is great as a proof of concept. Everyday I hear about another “look what I did with a micro-controller” like we didn’t go through the whole FPLA, Arduino, (and the GoPiGo3’s ATMEL for that matter).

I’m tiring of hearing “look what I did on a 2040”, and micro-python, and even micro-ROS. Controllers are good for making appliances. Micro-ROS just enables new remote controlled not-what-I-call-a-robot things. The fascination with micro-controllers is raising a generation of appliance builders.

The $35 Raspberry Pi started out as a low cost vehicle to teach computer concepts. Since an OS just gets in the way of learning the basic, basic concepts (that we learned by playing with gates, latches, and counter), they realized a $2 micro-controller would be cheaper and less imposing.

They can teach every kid English but few will turn out to be Shakespeare. They can teach every child programming, but few will turn out to be a Knuth, Dave Cutler, or Jimmy Wales.

Creating with hardware and software is complex - more complex than business and parents would like to believe. Everyone wants to be a computer engineer, but will they invest what it really takes.

Thank you for spotting the article - it was interesting reading. I enjoy being aware of what folks are doing.

2 Likes

Sorry for bothering you with this.

Unfortunately, I have no idea what you are doing, (most if it is an unintelligible wall of code to my simple mind), nor what you have already read.  All I know is what you say you’re doing and, (if I see an article that looks like it might be helpful to you and your struggles with Carl and Dave), I share it.  I will stop if you wish.

I guess that depends on which end of the spectrum you’re at.

You, (and possibly myself), started when transistors themselves were relatively new and field-effect transistors were “bleeding edge”.  We learned things, (like a CMOS NAND gate could be used as an audio amplifier by putting a feedback resistor around it), because that was what we had to do.  Pre-packaged gates were a godsend!

But neither of us learned computers by designing our own CPU’s, (at least I didn’t), but by using the existing microcontrollers and programming them in whatever languages there were for them.  The first program I ever wrote was in basic on a PDP-10 using a 110 baud current-loop teletype.

Beginning programmers don’t start with assembly language, few start with K&R C.  Instead you start with the basics, advance to something more complex, and then - if you discover that you are really interested - advance to even more complex topics.

Some “programmers” will never become “real” programmers - my granddaughter Masha dreams of being an animator and game illustrator some day - and that’s a skill I will likely never master.

Again, I apologize for dumping more reading material on you.  I will try to be more considerate next time.

1 Like

No need for that - I told you it is interesting. Just because I am not loving the micro-controller fad doesn’t mean I’m not interested in reading about what folks are doing with them. I’m addicted to wanting to know what is the latest trend in everything.

2 Likes

My struggles come from being a procrastinator, a bit lazy, and a one-person team. I read about the latest CMU “it taught itself to ____” (one thing with many person years of research and effort by some really bright kid that can code rings around me before I can log in…), and I generalize that to "I want Carl to teach himself to do ___ and ___ and ___ and ___ AND to think up new things to teach it self, AND be able to explain why it did everything it does and why it wants to learn everything it wants to learn. BUT I’m still trying to teach myself how to manually program and integrate each new “Carl ability”. (Last night added logging to speak.log everything Carl says even if he is in quiet mode.)

The struggle is really with me, not the hardware, nor the software. I also know that getting “intelligent behavior” from Carl and Dave is not a simple matter, so I have to be more patient with myself.

2 Likes

Apparently using a very specific definition of “lazy” given how much you’ve accomplished :grinning:
/K

2 Likes

. . . .and I want to win the 200 gazillion dollar Powerball, world leaders to grow up, and women to act rationally.

Not for nuthin’, but I think you need to scope your desires a bit better.

If you had a team of clever college kids and hot-shot MIT or Va. Tech graduates, a massive DARPA grant, and years to play with, then maybe this isn’t an unreachable goal.  (Note that I did not say it was not unreasonable.)

You, my friend, are (essentially), a one man band, (aside from what help we can give).  You aren’t going to sound like the London Symphony Orchestra, and no amount of head banging will make you sound like them.

If I had accomplished a tenth of what you’ve done, I’d be jumping up and down!

2 Likes

Lazy:

  • Did not accomplish the entire US space research effort, (starting with the Mercury missions).

  • Did not single-handedly deduce the entire general theory of relativity.

  • Is not the father of modern computing.

  • Failed to accomplish, single-handedly, everything in Heinlein’s book I Robot.

Yep.  Lazy alright. . . .

:man_facepalming:

2 Likes

You are correct. I bought the ROS2 T-shirt, wrote a few tunes, but Dave got stuck singing in the shower.

I can’t complain of being bored, and I’m not so audacious to

(You do realize that heresy can only portend bad luck don’t you?)

So I have to complain about something. I’m the safest target.

2 Likes

My standard has always been Heinlein’s “Gay Deceiver” from The Number Of The Beast.

2 Likes

Never got around to that one. I discovered Heinlein in junior high - his “juvenile” novels (Have Spacesuit, Will Travel, was, I think, my first. But then there was Podkayne of Mars and The Rolling Stones, which segued into The Moon is a Harsh Mistress and Starship Troopers). That led me to other greats - Clark, Asimov, Niven & Pournelle. And then I discovered Byte Magazine and Pournelle’s Chaos Manor column…
/K

PS - I’m currently reading Sea of Rust - just over half done and enjoying it. Just not enough time to relax and read.

2 Likes