I set up 2 bodies manually & assigned Copy Location constraint to one with respect to another body. Then I set up the keyframe for the guiding body & then I started to view the change in the location of the constrained body. What I noticed in the 3D viewport was the constrained object moves, but when I look into its real position the values are stagnant. Why is that? I was unable to find my answer in previously asked questions by other people !!
object.location will never give the "correct" position for a object that has a constraint on it (or a parented object).
That comes from the way parenting and constraints mess with the global coordinates (their effect gets calculated after the
To get the world position of the a child object (or an object governed by a constraint) you should use
matrix_world returns a matrix for the object's transformations in world space. The
.translation part will convert the matrix to a location vector (just like
The blender wiki has a good read for further explanation about the coordinates for parented objects (same principals for constraints).