An AtomID_Map is a C++ class (and also presumably a python class) which maps AtomIDs in one pose to AtomIDs in a second pose. Rosetta only contains coordinate alignment tools; it refuses to guess at a sequence alignment if the two poses don’t match in sequence/length. The AtomID_Map is how you tell superimpose_pose which atoms correspond.
Intializing an AtomID_Map is generally done with a loop over the two proteins that will fill the map. There are some partially automatic initializers in core/pose/util.hh (like initialise_atomid_map, etc). These still require you to fill in the second half of the map yourself (the IDs of the second pose).
If you have two poses of the same protein, you can try calpha_superimpose_pose instead – it will autogenerate the AtomID map. The C++ files src/core/scoring/rms_util.* contain most of the functions related to this.
You can also just use Evan’s code from the script you mentioned.