Skip to content

Commit

Permalink
refactored enum into seperate file
Browse files Browse the repository at this point in the history
  • Loading branch information
seefelke committed Nov 24, 2024
1 parent cfbd170 commit 668b6d7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 8 additions & 0 deletions code/planning/src/BehaviourEnum.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from enum import IntEnum

# getattr(Behaviour, "name").value returns the ID
# Behaviour(id) returns Behaviour.NAME


class BehaviourEnum(IntEnum):
CRUISING = 0
7 changes: 0 additions & 7 deletions code/planning/src/local_planner/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import math
import carla
import os
from enum import IntEnum

# import rospy

Expand All @@ -24,12 +23,6 @@
EARTH_RADIUS_EQUA = 6378137.0


# getattr(Behaviour, "name").value returns the ID
# Behaviour(id) returns Behaviour.NAME
class Behaviour(IntEnum):
CRUISING = 0


def get_distance(pos_1, pos_2):
"""Calculate the distance between two positions
Expand Down

0 comments on commit 668b6d7

Please sign in to comment.