Read position and rotation of constrained object

Hello! Regarding my problem from previous post How to set the position of IK Pole Target using script? , I decided to try attaching the dummies to bones and read the position and rotation from them instead of bones themselves. But it didnt help, since Blender does not give me correct location and rotation of constrained/child objects. No matter how the bones themselves move, dummies output only their initial position. Can anything be done about it?

I think you have to do this via the matrix_world.