I have a robot model in blender. Whose links are formed as parent child relationship and a tree is formed. At the moment I am looking how to get translation and rotation of the child object with respect to its parent object. I am using Blender 2.79b at the moment. Selecting any object in the scene gives (0, 0, 0) for translation and (0, 0, 0) for rotation.
Any leads will be appreciated.
location = context.object.matrix_local.translation
and Euler rotationeuler_rotation = context.object.matrix_local.to_euler()
$\endgroup$