Added handling of rotation of robot reference frame to
global reference frame