Trajectron-plus-plus icon indicating copy to clipboard operation
Trajectron-plus-plus copied to clipboard

fixed #51 KeyError attention_radius[(VEHICLE, VEHICLE)] in encode_edge

Open j-scharrenbach opened this issue 3 years ago • 0 comments

Fixes #51: Instead of returning a newly created NodeType object, the one already existent within the Environment object is returned.

def _get_edge_type_from_str(self, edge_type_str):
    n1_type_str, n2_type_str = edge_type_str.split('->')
    return (self.env.NodeType[self.env.NodeType.node_type_list.index(n1_type_str)],
            self.env.NodeType[self.env.NodeType.node_type_list.index(n2_type_str)])

j-scharrenbach avatar Nov 09 '21 09:11 j-scharrenbach