~wecacuee/mrol/mrol-dev

« back to all changes in this revision

Viewing changes to test/simulation/true_pose.py

  • Committer: Julian Ryde
  • Date: 2011-06-03 16:52:15 UTC
  • Revision ID: julian_ryde-20110603165215-oqr6yo9nwng3j9nb
Initial import from revision 206 of Julian Ryde's mrol_mapping repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# blender script to extract the true pose, has to be run in blender console
 
2
 
 
3
robot = bpy.data.objects['Robot']
 
4
#robot = bpy.data.objects['Camera']
 
5
for i in range(16):
 
6
    bpy.context.scene.frame_set(i)
 
7
    fname = str(i).rjust(4, '0') + '.png'
 
8
    mat_str = str(robot.matrix_world)[6:].replace('\n', '')
 
9
    #mat_str = str(robot.matrix_world.translation_part())
 
10
    print(fname + ' ' + mat_str)