To complete my tf tree, I must broadcast transformation from odom
to base_link
. I am receiving position from the tracking camera, which is attached to the camera mount relative to base_link
.
So, I have a pose from the tracking_camera_frame
and I know static transform between base_link
and tracking_camera_frame
map
|
|
odom
|
| ?
+------base_link
|
|
+----camera_mount
|
+----tracking_camera_frame
I don't know how to express the transformation odom
to base_link
if I have two mentioned transformations.
When I read about it on the internet, there is always only an example that with multiplication, you can express a point from one coordinate system relative to another.
However, I probably found a solution in the ZED wrapper for ROS, but I don't understand it.
tf2::Transform deltaOdomTf_base = mSensor2BaseTransf.inverse() * deltaOdomTf * mSensor2BaseTransf;
According to this, my example should be
odom_to_base_link = base_link_to_tracking_camera_frame.inverse() * pose * base_link_to_tracking_camera_frame
I would like to understand the background of this calculation. Why is it so, or what is the correct form?
Update:
I asked chatGPT, and it told me that for equation resultTF = deltaTF^-1 * pose * deltaTF
, the deltaTF will be effectively cancelled, and the result will be directly related to parent TF. It is what I want. However, what is the mathematical background of this? I want to understand it step by step.
It looks like resultTF == pose
, but this is not true. So why must these matrices be applied in this order?