Inqling Junior - Ro...
 
Notifications
Clear all

Inqling Junior - Robot Mapping, Vision, Autonomy

240 Posts
10 Users
87 Likes
17.6 K Views
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6658
 

@inq If you were thinking to use GPS to travel in a straight line then you could be in for a surprise unless you spring for the really expensive GPS board. Sorry I don't recall the name but it was mucho dinero for cm/mm? accuracy. Regular GPS is IIRC +-3M.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
Topic starter  
Posted by: @zander

@inq If you were thinking to use GPS to travel in a straight line then you could be in for a surprise unless you spring for the really expensive GPS board. Sorry I don't recall the name but it was mucho dinero for cm/mm? accuracy. Regular GPS is IIRC +-3M.

Differential GPS - and no, I'm not interested.  I'm more interested in inside tracking. 

Military Grade GPS - is far more accurate.  They actually did a study using GPS units on the wing tips, wing root, nose and tail of an airplane.  They succeeded getting full aircraft attitude (pitch, yaw and roll) along with speed, position and direction.  They were able to do a complete navigation gauge system using nothing but GPS.  In fact it was so accurate... they also could also measure wing deflections during maneuvers and due to turbulence.  

And actually even standard GPS is fairly accurate from sample to sample.  It jumps (as much as 32 feet) when it loses or gains a new satellite.  I wrote a program long before accelerometers were standard equipment in cellphones (for Windows CE / Windows Mobile) that would plot a car around a race course.  Taking the 1st derivative to get car speed and second derivative to get longitudinal acceleration (car accelerating and breaking).  Also used curvature calculations of the positions to get cornering accelerations using a = V*V/r.  I got very good correlation between calculated and a very expensive car telemetry system.

VBR,

Inq

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
Inst-Tech reacted
ReplyQuote
Inst-Tech
(@inst-tech)
Member
Joined: 2 years ago
Posts: 554
 
Posted by: @inq

How have you... or would you tackle a robot needing to travel 100 meters in a strait line???

  • Without human RC feedback
  • Outside (if you were thinking GPS) but Inside also.

VBR,

Inq

Good overall observation on the probable problems that one would encounter without some sort of feed back..One solution would be PID control.. very easy to implement, and can solve all three problems..

see this link:

 

It explains just how to do it!...

Regards,

LouisR

LouisR


   
Inq reacted
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2037
 

@inq 

Stepper motors seem a simple solution for exact positioning and on a flat hard non slip surface perhaps they will work fine at some fixed speed. I have read that compared with traditional dc motors they are heavier, use more power, and have far less torque. In addition, they cannot be operated at great rotational speeds and the faster they run, the less torque they have.  There are self balancing robots that use stepper motors so I guess they work fine.

I notice the commercial robot vacuum cleaners all seem to use ordinary dc motors with encoders.

 

 


   
Inq and Inst-Tech reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6658
 

@inq Not differential, better. I will do my best to come up with the name but the mind is like swiss cheese these days.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1112
 
Posted by: @zander

@inq Not differential, better. I will do my best to come up with the name but the mind is like swiss cheese these days.

Where you thinking of RTK GPS ?  But that is differential GPS as far as I understand it, so maybe not. The accuracy of RTK GPS  is stated at 1cm or so which would probably be good enough for precise bot navigation and is used for accurate land surveying purposes. 

I think (hope) that @dronebot-workshop is going to produce a video on using RTK-GPS sometime soon, so maybe all will be made clear.


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
Topic starter  
Posted by: @byron
Posted by: @zander

@inq Not differential, better. I will do my best to come up with the name but the mind is like swiss cheese these days.

Where you thinking of RTK GPS ?  But that is differential GPS as far as I understand it, so maybe not. The accuracy of RTK GPS  is stated at 1cm or so which would probably be good enough for precise bot navigation and is used for accurate land surveying purposes. 

I think (hope) that @dronebot-workshop is going to produce a video on using RTK-GPS sometime soon, so maybe all will be made clear.

... or maybe GLONASS (Russia), Galileo (EU), BeiDou (China).  or even these days, you can get devices that will "receive" data from multiple satellite constellations.  I imagine having more satellites to draw from may improve accuracy.  

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
Topic starter  
Posted by: @inst-tech
Posted by: @inq

How have you... or would you tackle a robot needing to travel 100 meters in a strait line???

  • Without human RC feedback
  • Outside (if you were thinking GPS) but Inside also.

VBR,

Inq

Good overall observation on the probable problems that one would encounter without some sort of feed back..One solution would be PID control.. very easy to implement, and can solve all three problems..

see this link:

 

It explains just how to do it!...

Regards,

LouisR

I look forward to getting out today to the library so I can view this.  It looks like it will be a valuable resource!  Thank you.

VBR,

Inq

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
Inst-Tech reacted
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
Topic starter  
Posted by: @robotbuilder

@inq 

Stepper motors seem a simple solution for exact positioning and on a flat hard non slip surface perhaps they will work fine at some fixed speed. I have read that compared with traditional dc motors they are heavier, use more power, and have far less torque. In addition, they cannot be operated at great rotational speeds and the faster they run, the less torque they have.  There are self balancing robots that use stepper motors so I guess they work fine.

I notice the commercial robot vacuum cleaners all seem to use ordinary dc motors with encoders.

 

 

I guess I was sounding like someone trying to justify stepper motors because I am using it on this particular robot...

You are correct in all of the benefits of motors over steppers.  They are much heavier.  They are not near as strong (for that weight).  And... they are decidedly slower.  Although, the Internet says I should be able to get 1000 rpm, I have yet found a way to get one anywhere near that. 

My only criteria for using steppers for this robot is ease of use.  I don't have to have any software feedback code to handle basically the same duties that encoders provide with lots of fine tuning PID algorithms in software.  Steppers do that part for free.  Also, I don't really have a need for the motor advantages of speed or power.  I am only targeting indoor type floor/carpet traveling.  Outdoors over terrain isn't even an option.  And I doubt that I will even be able to go the full speed of the steppers when considering I have to see and chart all that mapping data.  Again... I'm saving compute power, time and coding time to the goal of this project - Mapping and Travel Planning after the mapping.

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
Inst-Tech reacted
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
Topic starter  

Apologies for the very long and rambling post.  It is a very non-trivial problem!

In alphabetical order...

@byron, @davee, @inst-tech, @jimbooth97, @robotbuilder, @zander.  There are many more members that I've read and I have in mind, but couldn't find their posts that originally interested me.  For instance... 

  • Jim's "https://youtu.be/9X2tnwHZ35I" fascinated me because of its simplicity and perfection at solving a problem.  There is a very savvy mind using a minimalistic approach and knowing what is needed and what is not needed!  
  • At the other extreme is @robotbuilder's Arlo with the intricacies of a generalized robot that must integrate a barely fathomable number of inputs and outputs.  I can't get my mind around all the aspects that had to be solved.

Anyway... there is a tremendous set of resources here on this forum with different backgrounds and different formal trainings and different perspectives to tackling a problem.  When I wrote this...

Posted by: @inq

How have you... or would you tackle a robot needing to travel 100 meters in a strait line???

  • Without human RC feedback
  • Outside (if you were thinking GPS) but Inside also.

VBR,

Inq

... I didn't succeed in prompting my desired responses.  The motive force isn't really the goal I was looking for.  I was wanting a brainstorm session on how to (1) observe, (2) interpret and (3) plan a movement strategy in the environment.  Here are the things I'm thinking about, but have little to no actual experience using them.  I'm basically using a white sheet of paper.  I'm wondering in this diverse member group if we can rule-out aspects that are impractical due my ignorance on a subject.  Or we might blue-sky off each other and come up with something entirely new.  I'll now throw out some ideas to stir the pot... I'll add my comments.  Some are simply IMHO... no actual experience.  If you believe differently that I'm wrong and and need to reconsider a preconceived notion... that is a desirable outcome.

Goal Definition

Let's start out with a definition of a goal.  Right now, it may seem like Inqling Jr is just about a self-balancing robot.  That aspect, I hope to get done in a week or two (hobby time permitting).  But that is not the goal... that is merely the tool for the goal.  I expect I will spend months on the purely programming aspects as follows...

I want to make Inqling Jr. work more like a human in its travels.  If I walk into a new house, I might walk into every room and get a layout map of the entire house.  So, later I can go directly to the toilet.

To divide and conquer 🤗 or segregate and simplify tasks for a robot, that involves:

  1. Robot goes into every room, get its dimensions and determines any obstacles (furniture).  
  2. Mapping the entire floor space for relative locations of the rooms.
  3. Displaying this map to a human and let the human identify rooms and obstacles by names, ie... my bedside table in master bedroom.
  4. At some future time, turn on the robot, it must first determine where it is.
  5. Give it a command to go to my bedside table.
  6. Plan the most expedient route - In a perfect world where none of the obstacles have been moved, it should be able to go their without using any visual feedback.
  7. In a non-perfect world, "Trust, but Verify".  Motors veer, steppers skip steps, tires slip, furniture moves, doors are closed.  Sense during travels that the location in the map is still what "it" remembers.
  8. Get to the target and celebrate!

Relative Vision

The most common things hobby robots do is to first perceive their immediate surroundings.  To my knowledge they typically make decisions based only on their immediate surroundings start the next steps and dump the data.  Rinse and repeate.  Here are the sensors that I'm aware and what I think about them...

  • Ultrasonic Sonar (HC-SR04 and ilk) - I've routinely get false readings and they're rather undefined what the reading is from.  Did I get a hit off an obstacle or was it merely the floor.  Was it to the left or right.  Nada.
  • Video (ESP32-CAM) - Very powerful, and human relatable, but way too much processing power required to get spatial data.  Have to use two in stereo, identify edges and then bodies and then associate from other eye to triangulate and determine distance.  Can I say just say Nada fast enough?
  • IR Sensors (TCRT5000L and ilk) - Not enough range beyond a line following robot.  Nada.
  • ToF (VL53L0X, VL53L5CX, and ilk) - This is what I've settled on for Inqling Jr.  The latter version does an 8x8 "pixel" image giving depth.  This sounds like the easiest/best solution for mapping rooms and obstacles.
  • That's all I got!  Are there other / better options???

Global Vision

This problem is far larger and one I haven't seen any research on or robots using some form to solve this issue.  What I mean by global vision is how to keep a frame of reference for a mapping.  A simple "vision" robot using methods above, can slip, lose its orientation and get out of sync with its map. 

In example of what I mean, look at the initial days of map making of the oceans long before the New World.  They mapped intricate shorelines with every inlet and river and underwater dangers.  Yet from hindsight of modern maps, those maps look decidedly deformed, stretched, offset, and mal-oriented.  It was simply, they had no global form of reliable global positioning.  A compass, sextant and chronograph are only so-so accurate and in inferior hands or in inferior conditions, error builds up very fast.  How do we handle this in a robot.  My initial ideas... and they're weak.

  • GPS - If you're outside, this is a viable candidate as long as the accuracy is good enough for the job.  Might not handle house size areas, but sq-kilometer size areas, it is certainly good enough. 
  • Magnetometer - This is the only one I've got for indoors. 

For instance - In an average house the walls are generally parallel and perpendicular.  I imagine if a robot starts moving around in/out of rooms and if it is totally dependent on stepper/encoders for keeping track of orientation AND location changes, that error would build up and the maps would have walls non parallel.  Like those early costal maps.  

If you use some algorithm like, "Follow all walls going clockwise" I don't know that the robot would ever be able to decide when its finished.  I believe that the error would get so bad, that when we humans see it has come full circle, it would be so far off the robot's starting point, that it could not recognize that it is finished.

Using a Magnetometer would at least, keep the yaw angles (wall angles) in-sync and parallel.  Hopefully this global vision would give enough feedback correction to let it find "the end".

Devil's advocate - Then there is problem if there is a local magnetic anomaly... ie.  it drives by the fridge and the big metal box with a motor makes the robot lose its mind.  

Enough of my thoughts... please jump in and correct, or en-lighten or just throw out your random thoughts on any or all aspects.

Very big thanks!

VBR,

Inq

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
Inst-Tech reacted
ReplyQuote
Inst-Tech
(@inst-tech)
Member
Joined: 2 years ago
Posts: 554
 

@inq, reviewing you criteria, I will attempt to make it short and sweet..

  Well thought out decision making are the hall marks of successful project .. and it appears your on track with that part..so I will offer this link to other possibilities that are attune to your specs.

the following link discuses the various ways to accomplish navigation to target using potential Field, Slam , and Ladar, along with PID control algorithms.

Regards,

LouisR

 

LouisR


   
Inq reacted
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2037
 

@inq 

It was of great help to me when I read this book many decades ago for it gave me the language in which to frame certain problems. The word cybernetics meant steersman.

http://pespmc1.vub.ac.be/books/IntroCyb.pdf

The reason I wouldn't bother with a self balancing robot is because it complicates things and my interest was AI not the ability to balance. A wobbling robot for example adds to the complexity of grabbing images (by camera or LIDAR) or trying to pick things up. Solvable but expensive and adds nothing to the AI of the machine. In a sense you are also simplifying things by using stepper motors to avoid the complexity of using encoder input and modifying pwm output to achieve a goal like going in a straight line.

First understand how others have solved some of the problems you allude to. Those that built robotic vacuum cleaners had to come up with working solutions. A useful behavior after obstacle avoidance might be finding the charger. This might be extended to moving about from beacon to beacon (feature to feature) to navigate a building.

Most of this advanced stuff requires a large (and stable) enough base from which to work from with plenty of computing power. I can't put a laptop on your balancing robot unless you make it larger like a Segway 🙂

 

 


   
Inq reacted
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
Topic starter  
Posted by: @robotbuilder

The reason I wouldn't bother with a self balancing robot is because it complicates things and my interest was AI not the ability to balance.

It may be counter intuitive why I profess to eliminate hardware and software programming by using steppers versus encodered motors and then turn around and add complexity by making self balancing.  After the Inqling series of robots (at least a 3rd and possibly a 4th) with at least as large of leaps in complexity as there is between Senior and this Junior... I have plans for a new series after Inqling that involves bi-pedal motion.  I'm taking this opportunity to study the complexities of balance at an early stage.

Posted by: @robotbuilder

Most of this advanced stuff requires a large (and stable) enough base from which to work from with plenty of computing power. I can't put a laptop on your balancing robot unless you make it larger like a Segway 🙂

I'm not worried about computing power.  When I expand beyond what one or more ESP8266 can handle, I have ESP32's and then Raspberry Pi's.  Although not representative of total computer power, a Pi 4 compiles Arduino code at a rate as fast as my I7 desktop.  I was quite surprised.  I'll use C++ on it that will buy be me at least an order of magnitude over Python that many use.  And after that I'm quite adept at offloading via TCP to whatever size computer, I need.  At the moment, I don't see that I'll need to expand beyond even the RasPi 4. ... unless I start using Encoders.  🤣 

But in the end... it's all just big fun for me and totally an intellectual pursuit!  I don't have your philosophy that I must create something practical.  I have no delusions of competing with Boston Dynamics and anything "practical" implies, I'm wanting to sell it... and I have absolutely no desire to build a company again.  No liability, no employees, no bull-$#!+ dealing with customers.  Not for this ole boy!

VBR,

Inq

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
Inst-Tech reacted
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2037
 

@inq 

I have plans for a new series after Inqling that involves bi-pedal motion. I'm taking this opportunity to study the complexities of balance at an early stage.

 

A bi-pedal robot would be well out of my pay packet. Also it is not an easy mechanical problem.

However you wrote:
I was wanting a brainstorm session on how to
(1) observe,
(2) interpret
(3) plan a movement strategy in the environment.

That is the AI I was addressing and not the means of locomotion. Real AI would be goal driven so if one of the stepper motors failed it would still figure out how to keep moving like the Terminator that pulled itself forward with its arms when it lost its legs. And if it lost its arms it could roll to its target. An intelligent entity has goals and is able to try different methods to achieve those goals it is not simply a reflex machine like some insects that simply freeze if their evolved "program" fails.

A Pi 4 compiles Arduino code at a rate as fast as my I7 desktop. I was quite surprised. I'll use C++ on it that will buy be me at least an order of magnitude over Python that many use.

The advantage of Python for many is it is easier (apparently) than C++ and there is support for easy to install libraries. The reason I gave up C++ 12 years ago and turned to FreeBasic was because I just couldn't figure out how to install the required libraries and its multi folder set up (projects) whereas FreeBASIC was nearly as fast and had easy to use libraries provided by advanced members on the forum. I can run FreeBASIC on the RPi as well and use OpenCV to grab images so my robot can "see".

Not sure there is much, if any, high level AI in the Boston robots at this stage. Some (maybe most) robot demos are remote controlled by humans in all those amazing videos.

My feeling is there is a lot of hype around AI and people see what is not there.

Do you remember the Honda robot Asimo?
"This is the real dirty little secret of Asimo. While it could respond to basic visual commands and hand signs, much of the time it was operated by remote control. Asimo was not autonomous in it’s behaviors. It is not capable of doing advanced AI thinking tasks. Asimo can run but only if told to run. It required so much supervision with basic tasks, it wasn’t about to be useful in taking over day-to-day human work."

 


   
Inq reacted
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
Topic starter  
Posted by: @robotbuilder

Not sure there is much, if any, high level AI in the Boston robots at this stage. Some (maybe most) robot demos are remote controlled by humans in all those amazing videos.

@robotbuilder - The link

to their factory robots... is that RC'd?  It seems rather worthless if it is not autonomous AND goal oriented to at least transfer boxes as is shown.

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
Inst-Tech reacted
ReplyQuote
Page 2 / 16