Edit: answering about adding an additional transform.
The transform structure is required to be a directed tree structure with no loops or cycles. I am not clear on exactly what you are wanting to do but I think that you're getting confused about position in the tree versus value.
To start off with. There's no such thing as a "fixed frame" in the tree. Every transform is relative. When you are viewing it or querying the tree you can pick your "fixed frame" for your context. But that does not change the tree at all.
If you have the base -> odom transform that is the same as the inverse of the odom -> base transform. Or vice versa, and you can publish that result just by using the inverse value and reversing the parent child values. But because you're getting a loop it suggests that you already have a value for that transform.
If you have two sources of information for estimating the transform from base_link to odom. You will need to create an estimator which will consume both sources of information for that transform and then create the fused estimate. This is how things like wheel odometry are fused with visual odometry etc. You likely want to leverage that framework.
There's lots of resources on this.
How to attach things as leaves: https://answers.ros.org/question/2071...
Tree structure: https://answers.ros.org/question/1900...
robot_pose_ekf: http://wiki.ros.org/robot_pose_ekf
Previous answer about how to evaluate transforms.
Yes. All transforms are relative to other elements in the tree.
You can ask tf for any transfrom to take data from the source_frame
to the target_frame
Where the logic is that source_frame
is the frame in which the data is initially represented, and target_frame
is the one that you want it represented in afterwards.
The relationship of the frames in the internal tf tree representation does not matter.
If you're asking about how to view things in rviz or similar such that the base_link
is fixed. Use the setting "Fixed Frame".