How to update root translation using python script in bge? I am trying to change root translation of armature (loaded by using bvh) using python script in bge but not able to update values.
I tried following

bpy.context.scene.frame_set(3)  
bpy.data.objects['walk_turn_180'].pose.bones[0].location = [0, -10, 0]


Its not working for me. When I change frame the values are reset to original values.

Another try..

scene = bge.logic.getCurrentScene()  
source = scene.objects  
main_arm = source.get('walk_turn_180')  
bpy.context.scene.frame_set(3)  
main_arm.channels[0].location = [0, -10, 0 ] 
main_arm.update()


but still no luck.

Is there any best way to do it or am I doing something wrong? 
Also, instead of bpy.context.scene.frame_set(3) is there any method to change keframe using 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.