How to update root translation using python script in bge?
bpy is the Blender API. This means you change the object within the Blender scene not the running BGE scene. Do not use it!

The API for the BGE is bge. The armature gives you access to the (bge-) channels too.