(btw, when posting code here trying to use the < character after the > for code indentation ignores all the code after it, hence the missing < before robotPose)

but whatever i put in the uz="" part, it is completely ignored. The same is true for rotations defined in the environment sdf files. Just create a model (box or whatever) and try to set the rotation of the pose, they get ignored as well.

All this means that rpose.orientation = initial_pose.orientation is a quaternion

q = x*i + y*j + z*k + w = ux*i + uy*j + uz*k + theta.

This would explain why you don't get the expected result when changing uz: the rotation axis is always the same, namely the line passing through zero and directed along (0,0,1), but the rotation angle should vary according to uz.