Skip to content

Ground Truth from python #47

Closed Answered by alhasacademy96
mr-cubus asked this question in Q&A
Discussion options

You must be logged in to vote

Hi again,

We do not have a function for getting a list of all objects spawned but i have created a python script to do this for you (manually). It provides the objects with their positions PER arena, meaning it is organized per arena:

import yaml


# Custom constructor for handling unknown YAML tags (needed to avoid errors when loading the YAML file for AAI)
def custom_constructor(loader, tag_suffix, node):
    if isinstance(node, yaml.MappingNode):
        return loader.construct_mapping(node)
    elif isinstance(node, yaml.SequenceNode):
        return loader.construct_sequence(node)
    return None


yaml.add_multi_constructor("", custom_constructor)


def parse_config_file(file_path):…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mr-cubus
Comment options

Answer selected by mr-cubus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants