Using joint angles to animate a character I work on modeling of human locomotion, I have a physical model of walking that runs on a gazebo like software (ODE based). I extracted the joint angles of a walking cycle in a file and want to use that to animate a body in blender.

I have an already rigged model in blender and I would like to animate the model using the joint angles extracted from my model. I need some hints, because I am new to blender and don't know where to start. I guess it should be possible to directly access the armature from python for example and specify the orientation of each joint. Is that possible ? Is there any tool or example showing that ?

Many thanks
Yes it can be done, no I don't know any existing examples. The best I can think of is the bvh import script or the Motion Capture tools addon.

Blender's python api is available online but you may find it easier to use the autocomplete feature in the python console.

As a hint to get started -

bpy.data.objects['metarig'].pose.bones["head"].rotation_mode = 'XYZ'

bpy.data.objects['metarig'].pose.bones['head'].rotation_euler[0] = 32

bpy.data.objects['metarig'].pose.bones['head'].keyframe_insert(data_path="rotation_euler", frame = 10)


I can't say if this is the best or correct way to pose armatures by script.