I have a question regarding Rotation (R) and Translation (T) matrices, I hope someone can help me as we use R and T a lot in robotics to find the position of the robot.
I have R and T of an object frame in regards to a camera frame and R and T of a second object in regards to the same camera. If both objects are on a common surface/plane
question #1: (being on the same surface/plane) this means R for both objects in reference to the camera is the same! is this assumption correct?
question #2: how can I compute the distance between objects (along an x or y axis for example) using the translation matrices?
I have a 1x3 translation matrix and a 3x3 rotation matrix => I derived a 4x4 transformation matrix from R and T
thanks in advance
A rotation matrix and a translation matrix can be combined into a single matrix as follows, where the r's in the upper-left 3-by-3 matrix form a rotation and p, q and r form a translation vector. This matrix represents rotations followed by a translation.
Now consider translation and rotation. t is a fixed point under the rotation if and only if t is on the axis of the rotation. As a result, we say translation and rotation is commutative if and only if the translation vector and rotation axis is collinear.
Answer to 2): If translation is the vector resulting of subtracting point2's position to point1's position then Euclidean distance follows the formula linked here.
Then you just need to compute sqrt(x^2 + y^2 + z^2) as (x,y,z) of translation vector(between 1 and 2) as it is already the difference between the two points coordinates.
That means you have to compute the euclidean norm of the translation vector.
If you have 2 translation vectors (one for each point) then just subtract them, and calculate the euclidean distance of the resulting vector.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With