How do I calculate how long my robot's battery will last?
Did you read the battery life specs for your smartphone?  Did you believe them?  Calculating battery life for a smartphone is easier than doing it for a robot.  There are many ways to calculate this, and @geometrikal gave a reasonable summary of it.  But there is a problem with this approach.  The accuracy of your calculations are only as accurate as your data-- and your data is terrible.  I posit that while you can do these calculations, the results will be meaningless to the point that you're better off not trying (very hard).

Let's just look at your main drive motors.  Some things that can effect the current draw of these motors are:  speed, weight, dirt/tile/carpet/floor, acceleration, breaking, etc.  Can you accurately predict the usage of your robot and figure out how much power your motor will require?  Probably not.

Now look at the arm motors.  Same thing applies here.  Can you predict how the arm will be used?  How much current will the arm require when picking up something heavy vs. something light?  

How about your CPU?  The power consumption of the CPU depends on what the software is doing.  Doing lots of complex calculations with massive memory accesses will consume a lot of current, but sitting idle the CPU power consumption will be less.  Many CPU's also have ways to achieve lower power modes by reducing the clock rate, going into a sleep mode, and turning off various peripherals.  Have you mapped out how your software is going to work?  Does your OS support various power-down modes, and if so then which ones?  

Then there is your power system.  What is the efficiency of your power supplies at different loads?  A typical SMPS efficiency can vary from 60% to 95% depending on the design and what load it is at.  If the load is constant then the efficiency of the power supply and the wiring will be different than if the load is pulsed (a.k.a. PWM-ing the motors).  Have you worked all this out?

The accuracy of this data is going to directly effect the accuracy of your battery life estimates.  The problem is that your accuracy is going to be terrible.  There might be a 2x to 20x difference between your low and high estimates.  

Here is what I recommend doing:


Go through the exercise with worst case and reasonable numbers.  Don't worry about getting it super accurate (since it won't be anyway).  Basically all you are doing is seeing if the size of battery is "somewhere near correct".  Then, if possible, choose the next larger battery size!
Once the robot is built, build something like a robot course.  This is a basic set of operations/movements/etc that the robot can do over and over-- exactly the same way each time.  Hopefully this course will approximate what you think will be a typical use for the robot.  This course does two things:  it tells you what you can expect, but more importantly it gives you a way to judge if any power improvements you made really worked!


Note: The battery life figures that you get from step 2 are only estimates.  Even those are only as accurate as your test course.  It won't be super accurate for real world uses, but it will be a whole lot more accurate than what you did for step #1 and more accurate for what you might have gotten if you spent weeks calculating everything out.