Ammeter for 24V power that can be read by a Raspberry Pi?
The purpose of the battery gauge, as usually stated in technical requirements, is to predict the remaining charge left in the battery. Calculating it only from current consumption (a.k.a "coulomb counting") has a lot of potential issues.

For example, you need to know what the actual charge is at all times. i.e. your device has to track the charging process as well. Then your algorithm has to account for real current draw, because it affects the capacity (not as part of watt equation, but as general shift of discharge curve). Add to this temperature dependency, battery efficiency and aging and you get yourself a real puzzle.

I am not saying that it cannot be done. In fact, many gauging systems do use current sensor to improve accuracy by integrating discharge current. But primary way of gauging remaining capacity is always based on voltage and temperature. You should read up on CEDV algorithms because the engineers already thought about those "lots of ideas" you've mentioned, and came up with quite interesting solutions.

Anyway, to answer your actual question, using hall effect current sensors like ACS711 works great in our scooter designs. We also used chips with I2C interface, like INA220, when line isolation was not required. Another compelling option is DS2438 (thanks, @Janka)

In past years we started exclusively using Roboteq motor controllers in scooters and even some robotic applications. Their interface provides accurate enough readings for motor current and battery voltage. Unless we need more precise data for some particular application these controllers remove the need for any additional parts. 

Oh, forgot to mention one more option - use battery gauge IC, like BQ34110, if getting results faster is more important for you than DIY aspect of it.