Trajectron-plus-plus
Trajectron-plus-plus copied to clipboard
fixed #51 KeyError attention_radius[(VEHICLE, VEHICLE)] in encode_edge
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)])