I have a simple scene with a motor and its shaft on which a spool is attached. The animation works, the shaft is rotating and I can control its value from python using :
bpy.data.objects['Constraint.motor'].rigid_body_constraint.motor_ang_target_velocity = 0.5
It must be possible to get the actual rotation (angular position) of the shaft, but when I do :
bpy.data.objects['Spool'].rotation_euler
it only gives me the Euler angles at keyframe 0, but not the actual value as the animation is being played. Is their a way to access this value ?
The final goal is to simulate a motor encoder for a robotics simulation. Thanks !