So, how does a robot work anyway?

Continuing the discussion from "This board requires newer software" when loading Raspbian for Robots:
 

Sometimes we forget that some of the people who get a robot might be a bit new to the topic of both programming in general and robotics in particular.

Note that this thread is not intended to teach programming or a particular skill, rather it is intended to provide a broad overview of what robotics is, what we’re doing here, and “how to get here from there.”
 

First, some definitions:

  • Robotics
    For the sake of this thread, I am defining “robotics” as the skill and learning required to make a “robot” do something.  It might be something as simple as moving around or as complicated as going to the refrigerator and getting a beer on command.
     
    Others may disagree, but IMHO getting a robot to do something, no matter how simple, is “robotics”.
     

  • A robot
    I consider any autonomous device that can be programmed to do something under the control of some software program to be a robot.
     
    Some people consider tethered devices at the end of a cable to be robots.  (i.e. bomb robots or robots designed to be used in intensely radioactive environments.)  Others believe that a robot should be entirely independent of immediate manual control.
     
    Though I think that, ultimately, a robot should be capable of independent action, I’m not going to argue semantics.
     

  • Software
    Software is a sequence of commands, usually written in a higher level language like Python, C, C++, etc., used to tell the robot how to function and what to do.
     

  • Hardware
    This is the actual electronic and/or mechanical mechanism that people recognize as the robot itself and is what actually does something under the control of the software.
     

  • Interfaces
    An “interface” is the way one part of the robot talks to a different, unrelated, part of the robot.
     
    For example:  The software telling the robot hardware to move uses a software interface to talk to the robot.
     
    Likewise, the GUI, or remote connection that allows you to program and/or issue commands to the robot is also an “interface”, often called the “user interface”.

====================

What is “robotics” anyway?
As far as I am concerned anything you do with a robot, (aside from knocking it off the kitchen table!)[1], is robotics.

It can be as simple as programming the robot to move forward 1 foot, turn around, and drive back.  (The “driving back” isn’t necessary, but it keeps you from chasing the robot all around the room!  :wink:)

Or it can be a robot using a complex robot operating system like ROS, connecting fancy stereo cameras and a LIDAR to it, and expecting it to recognize (and chase!) the dog.
 

The software
Robotics software can be extremely simple, like the block-based software that comes built-in to the GoPiGo O/S, or something more complicated like Python.

====================

Robotics is a learned skill, like riding a bicycle or driving a car, so don’t expect your robot to navigate to the corner store as your first project.

Unless you are already exceptionally skilled, I recommend starting with the block-based software, (Bloxter), as a way of getting familiar with the robot before trying more advanced projets.

Even more advanced programmers can benefit from this as it provides a quick way to find out what the robot can do and how sensitive the commands are.[2]

Be aware that robotics, (like everything else), isn’t always as easy as it seems.  However, it’s not impossibly difficult either and a bit of diligent effort will go a long way.

And this is where we, the forum members, come into the picture.

You will experience difficulties and you will have problems.  We all do and we all have so you’re not alone!

There are no stupid questions.  So feel free to ask, no matter how “stupid” you think it might be.

====================

  1. I’ve already done that too!
    https://forum.dexterindustries.com/t/breaking-news-charlie-critically-injured-more-news-at-11/8188

  2. Even when I am working on an advanced project, I like the convenience of using Bloxter (the “Blockly/Scratch” like programming environment where you fit blocks representing functional robot or programming actions together to make a program), as a convenient “sandbox” to try out a new idea.

3 Likes

And a dream!

Robot Dreams - Mine and “His” (Revival from 2018 Dexter Industries Blog)

(What it takes to make robot dreams come to “life”)

I am a recently retired software engineer (with a mechanical engineering degree). Retirement has increased the time I have to devote to my robot dreams, and my robot’s dreams.

Psychologists have a term, cognitive dissonance, that describes the stress I feel when I think about my robot dreams. I may have time to make my robot smarter, but building a smart robot is hard - really, really hard!

What are my robot dreams? I will feel satisfied when my robot:

  • can independently manage its power needs: i.e. either contiguous or continuous, endless life
  • is aware of humans and objects in its environment
  • can interact with humans using a speech interface
  • learns useful facts and behaviors from its experiences and its “wilderness”, the Internet

So what would this robot’s dreams look like? (“Do Androids Dream Of Electric Sheep?”) During the time the robot will be constrained to sitting on its charger it could:

  • evaluate its power situation: Vbatt, fast or trickle charging, maintain and evaluate historical power statistics, decide when to move off its charger
  • evaluate short term memories for estimated usefulness: e.g. categorizing/culling photos taken while exploring, updating hypothesized room maps based on sensor data (distance sensor, PiCam, encoder/IMU) taken while exploring
  • Use the Internet to identify proposed extensions to its knowledge graphs in its useful objects database
  • Use recent experiences to evaluate prior proposed knowledge graph extensions for truth and usefulness

During the time the robot is not conserving energy or not charging, it might:

  • recognize me, my wife, and “stranger”,
  • manage its theory of mind about what we are doing (sleeping or watching TV mean do-no-disturb)
  • identify sounds of dishwasher, typing, music, TV, conversations, rain outside, lawn sprinklers running
  • investigate a floorboard, a wall, a window, a room, a light, the ceiling, a doorway, that “new thing” not seen before
  • search the Internet for alternate phrases to express useful concepts (so interactions are less repetitive)

Of course, it will not be able to do everything all the time, so it will need to learn to manage its catalog of behaviors according to the situation.

History (According To My Robots):

Forty years ago my first robot, a Heathkit Hero robot, had a 1MHz Motorola 6800 family brain made with four-thousand transistors. While it had many capabilities useful to its existence such as power on self-test, and automatic calibration of the head panning servo, it suffered from “Eternal Sunshine of the Spotless Mind”, and was hopelessly dependant on me for care and feeding. It weighed 40 lbs. and “ran” for less than 30 minutes.
Hero_robot
My “Hero”

Twenty-five years ago, I had a Cye robot that could find its recharger independently. It would develop an hypothesized map of its environment, but “understood” nothing, (and left spoked-wheel tracks in the carpets).


Cye Robot - Look at them scary wheels

Cye_Home_Base
Cye’s Recharger Base (in a reference corner)

rugtracs
Tracks from Cye’s sprocket wheels. Very accurate odometry, but he was not welcome to wander the house.

Eighteen years ago, I built a Rug Warrior Pro (RWP) robot kit, from the Massachusetts Institute of Technology (MIT) robotics curriculum. The RWP had a 2 MHz HC6811 processor with 32KB of memory that ran small, interactive C language programs. I started a user group that grew to several hundred RWP users, and together we pushed the limits of this “adorable” little bot. (e.g. Using Braitenburg Vehicle “reactive behaviors to appear complex or intelligent”, and assisted numerous Fire Fighting Robot Contest winners.)

RWP_Pogo
Rug Warrior Pro Robot ($600 in 1999)

Four years ago, I upgraded the processor in my, then 15 year old, RWP robot with the 700MHz Raspberry Pi B+ to become the “Rug Warrior Pi robot”, and started learning to program in Python. While this robot had vastly greater processing capacity, it had only me to program it. It also was hampered by poor health from my limited electrical engineering skills (false encoder clicks, and variability of ultrasonic distance sensor and current draw sensor readings, as well as unbuffered bumper sensors may have drawn more current than allowed.)


Rug Warrior Pi - Replaced Brain with Raspberry Pi and new sensor suite

Today, meet Carl (2018)

Carl is built upon the Dexter Industries GoPiGo3 base robot kit, and a four-core 1.2GHz 1GB Raspberry Pi 3B processor containing several billion transistors.


Carl, the GoPiGo3 bot (before battery pack moved internal to figure)

The GoPiGo3 is a superb platform to build upon, coupled with excellent programming examples and tutorials, as well as responsive forum support from the DI engineering staff.

Carl’s Spec Sheet:

The GoPiGo3 power circuitry is quite sophisticated, feeding the componentry, with isolation and protection, over a wide input voltage range. My robot is powered with 8 AA size 2800mAH NiMH cells which yields 3 to 9 hours of “running” programs depending on the amount of wandering, servo scanning, distance measuring, wall finding, and photo capturing “he decides to do.” (Detail test report of Carl on his prior 2300 mAH cells here.)

Currently, Carl announces, (using text-to-speech), when he is getting worried about his battery charge, and will shutdown completely if he has not been connected to his charger by his “safety point.” (Shutting down with 10 to 20% capacity reserved can extend the cells’ useful life by many years. My 10 year old Toyota Prius has 168 NiMH cells that are still going strong. It recharges when the cells reach 20% reserve. ) The GoPiGo3 board also has low voltage monitoring and management that I have not integrated into Carl’s power planning.

It is said that we are uniquely shaped by our memory of life experiences and what we learn from those memories. Carl is a long way from learning anything on his own, but he does keep a log of each hour I let him run. His life.log lists what he was doing for his 336 hours of contiguous life to date. Paraphrasing someone smarter than me: If he doesn’t learn from his history, he will be destined to repeat it.

Hopefully my dreams for Carl will soon become reality, and he will learn to find his refrigerator (charger), drink all the juice he wants, and start dreaming for himself.

=== 2024: I’m still dreaming with GoPiGo3 robots.

Carl and Dave:

2 Likes

Robot:
Been there, done that. . . :wink:

2 Likes

Back then I would have sacrificed body parts to have one of those!

I still feel incredibly lucky to have a (two!) GoPiGo3 robots, though they have a nasty habit of making me CRAZY!!! (er)

Some people are into guns, others are into big cars.  Me?  I chase robots all over the living room floor. . .
:deaf_person:

Maybe it doesn’t peg the “macho” meter, but it works for me.

1 Like