Tuesday, April 30, 2013

General purpose robots sooner than you think

This paper details an approach to making cheap and useful general purpose robots.  No scientific breakthroughs are required to achieve the goal, but there is still considerable engineering work needed.  The biggest insight from this paper is that the science fiction portrayal for a general purpose robot of possessing some "intelligence" is completely unnecessary in order to be useful.

Before I discuss the design, I will outline 3 current technology developments.  The last part will discuss the important social disruption that these robots will bring.

The self driving car
Google is leading this development.  The easy part of a self driving car is something we've been able to do for 40 years with remote control toys.  Make the car go faster, slower, reverse and turn.  Using GPS to tell a car to go to any address is also easy (with our current advanced GPS ecosystem).  A slight challenge is recognizing and following a road, and traffic signals, and a crititical challenge, that seems to have been accomplished successfully, is to get from point A to point B safely without harming other vehicles, animals or toddlers.  There was scientific breakthroughs in the area of image processing needed to overcome all of these challenges, but if that was possible and accomplished, then the general purpose robot is just another application. I would be curious how Google's self driving car deals with a trashbag floating along the road.

The self driving car is exceptionally disruptive, because it destroys most transportation jobs.  Car insurance may no longer be needed, or at least less costly, and less profitable to insurance companies, and government revenue dependent on licensing, fines, and income taxes of those in transporation industry are affected.  Self driving cars will make sharing of cars easier, as any idle car within 5 miles of you can come pick you or your parcels up within a few minutes.  So fewer total cars will need to be made.

My general purpose robot design can replace a car, and a self-driving car.

Electric Cars
Electric car motors are much simpler, cheaper, and longer lasting than conventional auto engines.  The major cost in an electric car is a high capacity battery pack.  One design for an electric car, uses the same approach as electric bikes, and places small motors in each wheel instead of one larger motor.

A configurable general purpose robot can transform itself into an electric vehicle, and so make your car/tricycle/bicycle/segway useful when you are not using it, make your robots useful when you are not using them, and bring them with you wherever you go.

3D Printers
3D printers assemble (usually with plastic) a complex solid shape by repeatedly placing drops of melted plastic in precise locations following a computer drawing file.  This dries into a usealbe real world object.  The concept has been extended to being capable of producing most car body and interior components, and on a large scale, using cement, fabricate entire houses.  The core technology is a "print head" that heats and deposits plastic, and a simple microcontroller that tells the printhead where to deposit drops.  A fairly large machine is required in order to move the print head precisely, and a very large machine is required to make large objects, because all existing designs build the finished object within the machine.

The drawback to 3d printers are that it uses much more energy and time than conventional plastic manufacturing (molds) for large runs.  To be truly useful, it requires to be in use 24/7 making truly useful products.  Another disadvantage is there is always a size limit, due to requiring that it be produced inside the machines, and a large size limit, requires a lot of space and a lot of (expensive) materials to build the large machine with.  The advantage compared to traditional manufacturing is being able to make exactly what you want.  If there is an unlimited number of things you want, that can be made, then keeping the machine busy 24/7 would tend to make even generic products cheaper than having them delivered to you.

A general purpose robot can carry a heating plastic-depositing printhead creating objects of unlimited size.

The General Purpose Robot Design
A general purpose robot must be able to assemble and transform itself from interchangeable components.  Most people find the process to accomplish this clever, and I will provide an overview after I list the components in question, but the process does not involve any difficult science.

A computer much like a tablet
It needs camera(s), image processing computing power, its own small battery (for detachability and use as a general computer, tablet or phone), and connectors to other components.  A swiveling base that allows the computer cameras to be pointed at an intentional direction is also needed.

Robot USB connector standard
The USB standard for computer interfaces provides both data and power through a single connector and cable.  That needs development for Robotics, likely with higher power transmission capacity.  Standardized mechanical fastening interface (could be as simple as screws bolts, plates and/or clamps) can be part of the "USB" standard or separate attachment points.

Batteries/Power source
Batteries that can be stacked and connected vertically in unlimited amounts would generally be placed under the computer swiveling platform.  Some applications might use steam or compressed air "engine" power source.  Ideally, the batteries would be able to "rout" data streams from outside connections to and from the computer tablet, but separate data and power cabling is easier to manufacture.

Platform/wheels/legs
While the batteries can sit on the floor, attaching them to a mobile base, makes the robot mobile.  Mobile platforms need a micro controller that allows them to process commands such as move forward 20mm, turn right 90 degrees, and move forward another 5mm.  The computer tablet takes care of observing where the robot is moving and commanding to the platform to pause if it detects a possible collision.  Wheels are faster, more energy efficient and simpler than articulating legs, but cannot deal with obstacles or stairs easily.

Scaffolding above platform
Simple potentially cubic scaffolding cage that connects to the platform and contains the battery stack.  Tablet computer's swiveling system would be connected to it, as is any cranes/arms (below).

Cranes/arms
Specialized machines or general cranes used to manipulate the world by the robot.  They contain a micro controller that allows the crane to respond to move hand to x-y-z position, grab (with x pressure), move hand to other x-y-z position, release.  The tablet computer takes care of issuing pause commands to prevent accidental punchings.

One alternative that would allow standardizing on a wheel platform would be to use arms for stability, and to crawl up stairs and over obstacles.

Weatherproofing
For outdoor use, above the scaffolding, and attached to it, might be umbrellas or solar panels to protect equipment from rain.

The importance of configurability
The reason for the variable sized battery pack is that sometimes you need very high power delivery to your robot appendages (need to go fast, or lift heavy item).  Some very specialized "arms" include heating elements to cook or iron with, stitching machines, 3D plastic printing "pens", sophisticated arms with multiple degrees of freedom and human-like joint movements that might be able to use a hammer, or sculpt with 3d plastic printing pen, and use general cooking and cleaning tools.

Configurability into an electric car is likely very useful.  Consider a single robot platform that is normally configured as a motorized wheel that can turn with 2 adjustable small balance wheels.  It simply takes 3 or 4 such platforms with the adjustable balance wheels placed out of the way, with a large "car floor" platform spread above the 3 or 4 wheeled platforms, battery stacks above each, and a single computer (with maybe a few extra cameras) to drive the car where it needs to go.  A nice-to-have roof can consist of solar panels.  Weatherproofing the front and sides does not have to be with transparent material, because only the computer needs to be able to see the road.

From a hardware perspective, the expensive components will tend to be the mechanical arms and legs.  Small screen tablets with powerful processors are not that expensive.  Having a high amount of battery capacity can be expensive, but if you use them for your vehicle as well, can be useful enough to be worth it.  The key point is that with  4 platforms and significant battery capaciy, you have 4 general purpose robots with only the hardware cost of 4 small computer tablets and various arms, tools, and stair climbing.

If that cost still seems too high, you can rent or rent out any extra battery capacity, extra arms, platforms, or entire robots from/to others.

Robot self assembly
While all of the above components are likely made in factories, it's important that the robot be able to assemble and transform itself.  There only needs to be a data connection between the tablet computer and one powered arm in order to start the process.  One directed powered arm is enough to attach any other amount of arms.  One directed powered arm can move the computer to a charged battery back.  Arms can lift the scaffolding onto a new platform, then attach any arms to that scaffolding (including themselves if there are 2+ arms).  Arms can move the computer out of the way in order to unload discharged batteries and load charged batteries, and if low on power, branch their arm connections into new power sources beforehand.

Precise positioning system
In order for a robot to build a house, it needs to know exactly where it is to the milimeter or higher accuracy. Technically, it only needs that precision to within a specific reference point, so one low tech solution is to place two stakes down to define an x axis, and the robot immediately knows where the y and z axis are.  With Proper calibration of wheels, tires and/or legs, it should be possible for it to know its exact x,y,z position of every part of its "body".

With a precise positioning system, having a robot build a house using traditional construction techniques is "easy".  Foundation, walls, roof all line up into a series of steps.  If no humans are involved, then all raw materials are exactly where a robot last placed it.  3D Printing is "easy" because the printer knows exactly where all previous drops of plastic are.  Its an obviously easier manufacturing process to use a single material in a single application step, but it is still relatively easy to work with a handful of materials, and a finite set of application steps, and sequencing those steps.  As a robot owner, creating or posessing a design drawing is the only human intervention in having robots build a house.  Not yet developed is the engineering of the software necessary to translate a design file into a sequence of steps, and the engineering of executing each step with each material, but this is easy in the sense that for qualified individuals, it is worthwhile work that is very likely to succeed if attempted.  Much like building a house, itself.

Relative ease of robot tasks
What makes the above house building process easy is the lack of any visual image processing requirement.  For cooking, the robot can know where all the cooking tools and ingredients are if it was the one that purchased and/or stored them.  If some items existed in the household prior to the robot, the robot must be trained/programmed to understand what and where  they are.  While different burners and frying pans will perform differently, the same equipment should perform consistently.  Sensors can be used to measure actual pan temperature, and program instructions can be based on pan temperature, rather than more abstract human guidelines applicable to any burner and pan.

egg handling
If a robot knows exactly where a carton of eggs is, than by opening it and holding it a known distance from his camera, and knowing that the egg carton contains only eggs, the visual processing step of identifying each egg and its exact size (size is variable egg to egg) is easy because size has an exact mapping to image pixels, and determining the edges of eggs to surrounding carton is obvious when the scope and context has been predetermined to only consist of eggs and its container.

Once size, location and edges are determined, it is easy to pick up any object.  required pressure is a function of weight, but eggs have a narrow weight range, and predictable weight to size ratio, and at any rate, the pressure to lift a 70g egg will not crush a 40g egg.  Cracking an egg similarly involves known objects at known locations of determinable size.  Someone, somewhere, (perhaps from the egg industry) needs to develop robot egg handling routines, but once that is available, your robot can cook with egg recipes.

cleaning the kitchen
If the robot cooked and served the meals, then it knows where every cooking tool is.  That makes cleaning those easy.  It has a visual processing task of finding any plates and eating utensils it served, but it has the hint of knowing exactly what they looked like and weighed when they were clean, and the general location of where they should be.  Identifying plates and utensils within a framed picture should be relatively easy, and by picking up the items and testing for weight.  If it can't find them, it can ask for human assistance.

cleaning clothes from the floor
Finding something unusual on the floor and determining whether it is dirty laundry is more difficult than previous tasks.  There are still hints available that can be very useful.  If it knows all objects in the house's "proper" location, it is easy to determine that there is something on the floor that does not belong.  Identifying it as trash, laundry, or misplaced object is still more involved than previous tasks.  Additional hints include seeing the clothes on its master(s) recently may make them a more likely solution for identifying those as the item on the floor.  Misplaced constant-shaped objects are easy to identify as long as the object is known to the robot and its visual and weight caracteristics can be measured and matched.  So picking up the unknown laundry item, and holding it by its edges can give clothing items a recognizable shape that further hints that it might be laundry.  Items it does not have instructions for, can be brought to a human to assist in processing.

gardening
While tilling, planting and scheduled watering are easy in the sense that very little interpretation of visual feedback is required, picking fruits and vegetables, weeding and pruning involves a lot of visual interpretation.  Robot assisted remote gardening and farming would still be a tremendously useful service.  For picking fruit, asking the robot to find the 3 largest apples on a tree is relatively easy, and can be presented as a simple human choice for which apple(s) he might select as the nicest.  Identifying potential weeds is relatively easy, and asking a remote human to confirm each weed is helpful.

Programming model
The core system for a robot is safety.  Whenever it is moving, it must guard against hitting anyone or anything unexpectedly.  This has already been accomplished by the driverless car.  For an indoor robot, the general rule of only walk on the floor, and stop whenever you are about to collide with something are both relatively easy.  If someone is about to walk or run into you, then backing up to avoid them or cushioning collision would be a helpful feature.  The safety system is provided by the robot (tablet) computer maker.

Recharging and configuration system is also a core system feature provided by the robot computer maker.  The robot must know when to go replace his batteries with freshly charged ones and set the old batteries to recharge.  The robot must also know how to add and replace arms, platforms, sensors and scaffolds.

The next systems level is the arm and leg interface for responding to movement commands, and specialized commands of attachments such as grabbing, releasing, heating and injecting.  The core safety systems layer has over-riding control to issue a slow down cautionary command, or emergency stop command.  This systems code level is provided by the leg and arm manufacturers.

The Application Programming Interface (API) is the next layer.  It includes specialized egg handling robot movement routines discussed above, how to hammer a nail, and every other specialized task that a robot can accomplish.  The purpose of the API, is to allow other programmers to simply issue the commands get egg, crack egg, heat egg, serve egg as part of their cooking repertoire software.  The APIs are domain specific, and will tend to be created by the world's large number of software experts, but they are also accessible projects for beginner self-taught programmers.

Visual Processing (and other sensor) Engines is the hardest software layer to create.  Ideally, it will allow programmers to provide all of the relevant hints that allow the engine to choose answers among a narrow list of possibilities.  The engine must then provide candidate solutions to a visual processing match together with a confidence level for that match.

Large Application Software such as translating a design file into a sequence of steps for building something are fairly large projects that require software expertise.

Customizing Application software can be done as small software projects.  Examples are enhancing the capabilities and repertoire of cooking applications.

Robot User interfaces include robot training procedures to help the robot incorporate an end user's specific home environment into the software applications used by the robot.  The robot interfaces also allow users to issue simple commands such as make tea, water flowers with appropriate customization options to any such command.

At the basic end user level, a robot master manages his robots much like he manages a music playlist.  A series of tasks is queued, with some scheduled, and pausing, inserting or promoting any task to a higher priority is possible.

24/7 use of robot
In addition to the configuration option of transforming your robot into the core components of a self-driving electric car, your robot can make your car platform, you house, all of the furniture and other non-electronic objects in your home, cook, brew, serve, clean, garden, sew, and farm.  It can also help others build any of those items, and so earn you rental income.

Robots would also be able to work with fiberglass/carbon fiber/kevlar which usually involves labour intensive work with toxic glues.  Automated blacksmithing and forging should also be possible, and so making simple tools and sports equipment is to be expected.

On the electronics front, a robot can assemble solar panels from solar cells, assemble and erect wind turbines. The Arduino platform and tinkerforge platform is quite similar to this general purpose robot platform.  It allows plugging in sensors and other electronic functions and programming applications to use the electronic device.  It further allows reusing all of the components.  The robot will be able to assemble arduino-based projects, and thereby reconfiguring a series of electronic components into an electronic device that is needed for a short period of time.

Even if you and all your neighbours have 10 robots each, there would be no downtime for any of them, as any idle time could be put to community projects such as improving roads, power generation and transmission, trash pickup/disposal, taxi, delivery service, and park maintenance.

Cheaper than industrial robotics
By leveraging general purpose tablet computers and their software development systems, and massed produced mobility platforms (motorized wheels) and power systems, a general purpose robot can be given a much wider range of operation than special purpose industrial robots, and homogenized development systems makes sharing of applications easier, with more features pre-developed, and so development of new applications easier and cheaper.  Economies of scale makes both the hardware cheaper, and any software have more potential users.  Its the latter that is the most important.  The world makes expensive and ambitious films, computer and phone software because a large number of people can afford to consume them.

Most industrial robots and automated processes all fundamentally move an arm in precise x,y,z space with sequenced steps.  3d printing, laser and water cutting, cnc milling, and assembly robots all do this.

Part of the expense of industrial robots is that they require high power in order to move quickly or lift heavy objects.  Speed at the cost of high power does not allow the robot to operate more cheaply than a slower low power personal robot arm.  Only faster.  For the consumer though, they get the end product faster and cheaper if they can have their own robot make it.

High power "industrial" robot arms would still be useful in a personal robot world, but mostly as a shareable item.  A high powered general purpose arm that can accomplish many tasks including holding a 3d printing head, water cutter head, lazer cutter head, and grasping device can likely be kept busy 24/7 as well if they are close enough to end consumers.

Challenges to the vision
The key challenges are precision of movement and image processing.  Milestone projects include:

  • Building a lego model house from steps
  • Building any lego model from a digital file
  • Place 3 objects over 100 meters apart to form an equilateral triangle within 1mm accuracy.
  • Assembling an (old style) mechanical watch.
The first one seems like a high school student project.  The second, not so hard in that the simple rule is that bricks on the bottom need to be placed first, and software modeling already exists.  The only real obstacle to translating a software model to the real world is the precision of the instrument in determining x,y,z positions. The 3rd challenge is addressed below, and the 4th challenge is easier than the 3rd in terms of positional awareness capabilities, but requires very precise motor steps to execute.

Measuring distances 200 yards away visually

Golfers frequently want to know exactly how far away a golf flag (precise standard size) that is about 200 yards away is.  Using a low definition camera, a computer would see the flag as 5 pixels high.  At exactly 190 yards distance, the flag would appear 6 pixels high, and at exactly 220 yards away it would appear 4 pixels high.  To know exactly how far away a specific point (golf ball) is, one simply needs to move the camera forward until the flag appears to be 6 pixels high, and then measure the distance of the ball away from the 190 yard point.

With a higher resolution camera and 10x optical zoom, the golf flag would appear 51 pixels high at 199 yards away, and 49 pixels high at 201 yards away.  A precise measurement can be made by measuring any point from the 199 or 201 yard points.  Mathematics can provide sub-millimeter precision of distance to any object of precise known size.

Measuring distances through wheel revolutions
Another mathematical measurement technique is made by taking a wheel of known radius, and measuring by counting the revolutions it makes while travelling from point to point.  This can lack precision, because the measurements will vary with tire pressure, dirt on tire, and any wheel slippage.  One solution to this, is to use a robot platform that uses a wheel for main mobility, but also uses walking sticks for additional balance, and to provide slip free precise distance counting for its travelled motion.

Precise motor control by chaining arms
The simplest robot arm design is a ball socket than can move a stick extending from it, and a claw that can grasp objects.  If that claw can grab a ball then an arm can be infinitely extended with other ball-stick-claw attachments.  The 2 advantages of this approach is that each ball-stick-claw can have a single range of motion (so a disk instead of a ball which is the simplest shape for servo motors), and very precise fine tuned precision can also be accomplished by combining arms.

One solution for precision is to have a final arm with a very short stick portion, and small motor designed for precision, but another solution is simply to have many arms with crude but variable precision:  If one arm can only go to positions that are 1mm apart, then chaining it with another arm with 1.1mm incremental motion, and a 3rd with 1.025mm increments, then 0.025mm precision is possible by adding the motion of one arm, subtracting the other, and adjusting with the 3rd.

Cheaper robot arms by using the tinker toy model
Although not directly related to precision, an even cheaper design model for robot arms than a series of connected ball-stick-claws, is to use the tinker toy model of disk-and-stick connections, where the disks are fairly simple motors, and the sticks may transmit power and data along the connections.  Fine angled axes may be created by using some curved sticks.  Only one claw is needed at the end of the arm, and the claw is the most complex type of machine and motor within a robot arm.

Social implications
The driverless car eliminates transportation jobs.  Personal manufacturing eliminates most industrial jobs, and the need to deliver their output.  The ease of personal farming, and the lack of importance of delivery centers, might eliminate the need for cities.  Since building greenhouses tend to involve more labour time than material costs, there is a capability to grow more food in northern climates and remove the roofs in the summer time.

While there will be a lot of work available in improving robot design and software, as well as in creating product design files, that is far fewer created jobs than the loss of practically every low skilled job.  Art, entertainment, science, social interaction "industries", and some knowledge work would still be valuable.  But it still means massive unemployment, and total unemployment in the truly essential fields of food and shelter industries.

We might have the ability to generate infinite renewable power, grow all needed food, and fabricate every product we wish to consume, but if too few of us can find employment to buy our robots, then too few robots will be made and too few of their benefits will materialize.

Many people's vision of a robot future is robot driven factories.  The personal robot makes factories irrelevant, except for highly localized specialized processes that can in fact simply be cooperative purchases/development that rent out access to the specialized process.

The solution of basic income and social dividends
Basic income is meant to allow every citizen to survive by giving an equal amount in cash to all citizens.  It is paid through tax revenue.  Social dividends is providing sharing excess tax revenue, the result of either tax increases or program cuts, and distributing that surplus as a supplemental equal cash amount to all citizens.  Both basic income and social dividends solve many additional social problems than income innequality insecurity, and have no disadvantages.

If robot makers, software developers, designers, raw material and building material producers, artists, scientists and philosophers make Trillions of dollars, then they can pay most of those earnings as taxes, and the rest of the population is supported through basic income.

Everyone's wealth is substantially improved through basic income and social dividends, because without it, the producers cannot be paid for their production.  The producers will stay much richer than non-producers, and there will remain plenty to purchase with excess wealth:  Raising children, fine wine, 200 foot yachts, solid gold toilets, beachfront land, social status symbols and memberships.

The point is important enough to repeat.  You can only become rich if people depend on your production, and they are able to pay you for that dependence.  The more people that want and can afford your services, the richer you are, even if you are taxed at a high rate, because if your taxes flow to them, they will purchase more of your services.

In addition to cash basic income, its possible to consider giving robots to people on certain birthdays.  There remains an energy and materials cost to making any item or service.  Poor people might prefer to do their own housework and rent out their robot for other people's work projects.

The complete non-solution of every other alternative
No other alternative has any value

Government regulation against the use of robots
Preventing the use of robots is destructive.  We have a duty to not force anyone to do something useless or inefficient if we have the technology to not force them into useless activities.  Other countries won't necessarily follow your country's stupidity.  It is similarly stupid to force people into useless work for the purpose of deserving welfare.  It prevents those people from creating or finding useful activities.

The goal of society should be to maximize wealth and  wealth distribution.  Broad wealth redistribution always feeds further total wealth, because more people are able to afford other people's help.  Basic income is the most efficient possible means of wealth distribution because there is no bureaucratic filter needed to decide who is entitled to how much.  Everyone receives the same amount.

Force work sharing for the few remaining jobs
If one person would prefer to work 40 or 60 hours per week for high wealth, while another prefers complete leisure with comfort, there is no reason to interfere with both of their choices.  Some income inequality is actually productive since some entrepreneurs can develop a new and improved device that might initially cost more than the standard affordable version.  If some richer people can afford the better device, then it will be produced, and purchased, and likely in a few years, cost the same as the inferior device, but be affordable by everyone by then.

If a person wants to work 60 hours, he is better off if no one else wants his job, because he can obtain higher wages because of it.  If that job pays attractive wages, someone else may give up part of their leisure time to help out with the work.  No regulatory intervention whatsoever is needed to keep everyone happy.  Basic income creates a balanced free market for labour, instead of the corrupt imbalanced market of forcing slaves to depend on and accept some master's patronage.

Organize labour for high paying union and government jobs
This is an attempt at political corruption by the left, hoping to fight against the usual right wing political corruptions.  Labour unions are only strong when there is a high demand for labour.  Very few people would be lucky enough to receive a union job.  For general youth and unemployed, few of them would be convinced that supporting labour unions will result in their employment or union benefits. The more people that actually receive a great paying job, the higher the cost on the rest of society.

Instead of choosing lucky labour winners over corporate winners, basic income simply and fairly equalizes wealth and opportunity.  Labour and the unemployed both receive a pay raise as a result of basic income.  Middle class income levels would enjoy a net after tax pay increase, and only high income levels would see a slight reduction in after tax benefits.

Right wing security solutions
Massive poverty and desperation can be thought to be solvable through massive security.  Why not robot security?  One disadvantage to the rich of an evil war on the poor is that they might risk their own death, and their robots stay unproductive and risk damage.  Wars are waged because some people aspire to win through war, but the core stupidity of supporting someone else's war benefits, is that you would be far richer, and at least as healthy, in a peaceful society where, while some inequality still exists, wealth is redistributed broadly.