Skip to content

Set Root Name

SUMMARY

set_root_name sets the name of the tree's root frame.

The Skill

python
tree.set_root_name("map")

The Code

python
"""
Example of TransformTree.set_root_name.
"""

from loguru import logger

from telekinesis.tf import tftree


def main():
    """
    Set the name of the tree's root frame.
    """
    tree = tftree.TransformTree("world")
    logger.info(f"Root name before: {tree.get_root_name()}")

    tree.set_root_name("map")
    logger.info(f"Root name after: {tree.get_root_name()}")

if __name__ == "__main__":
    main()

Parameter Configuration

ParameterTypeDefaultDescription
root_namestrrequiredThe new name for the tree's root frame.

Raises

ExceptionCondition
TypeErrorroot_name is not a string.