About sensor to rig


In configuration, under sensor I have nominalSensor2Rig_FLU configuration with “roll-pitch-yaw” and “t”.
I understand that driveworks constructs a transformation matrix based on these when calling dwRig_getSensorToRigTransformation.
What is underlying mathematical formula behind this? I have been trying to figure out how exactly these 6 parameters are used to construct sensor to rig transformation matrix. I am using camera sensor in particular.

So far I have tried:
trans = T * Rz * Ry * Rz * S, where S is matrix that swaps axis in a form:
[0 0 1 0; -1 0 0 0; 0 -1 0 0; 0 0 0 1]; T is translation matrix [0 0 0 t[0]; 0 0 0 t[1]; 0 0 0 t[2]; 0 0 0 1], and Rz, Ry, Rx are general 4x4 rotation matrices around their designated axis (note: I am using MATLAB notation to write matrices).
Rz - yaw rotation, Ry - pitch rotation, Rx - roll rotation. I made sure to take care of degrees vs. radians as well.

However, I haven’t come close to what dwRig_getSensorToRigTransformation returns (and I have tried many different combinations).

Thank you in advance!

Hi @marek.piirikivi ,

We will check internally and get back to you. Thanks.


I was able to get this issue resolved this morning. I had forgotten to include corrections from config file.
So in conclusion I needed to add together both nominal and correction sensor2rig parameters. For rotations I needed to turn them into radians.
And then T * Tx * Ty * Tz * S (in form that I had described in initial post) did the trick for me. There were some accuracy differences but they were mainly around 0.05 degrees maximum differences (which can be ignored).

Thank you for your time!

1 Like


You can still check this internally… I think I still have some issues as I am not always getting expected results.

Please let us know what’s your current issues. Thanks.