RobotStudio event

Getting the location of a frame relative to another frame

edited March 2021 in Developer Tools
Im using the below line to get the XYZ of a frame relative to a frame called "Datum". The values i am getting in Y and Z are very different to what i am expecting. Can someone enlighten me as to why my Y and Z values are so different?

Vector3 x = rotatedFrame.Transform.GetRelativeTransform(datumFrame.Transform).Translation;

The values im getting 

The values im expecting


  • scottdf93
    Robot studio was reporting to significant figures, to get the values expected I needed to use Math.Round