Skip to content

Commit

Permalink
Changed imports
Browse files Browse the repository at this point in the history
  • Loading branch information
flimdejong committed Nov 13, 2024
1 parent 2af8274 commit d8d3828
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions roboteam_ai/src/RL/src/resetReferee.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
import struct
import time
from google.protobuf.timestamp_pb2 import Timestamp
from roboteam_ai.src.RL.src.getState import get_referee_state

current_dir = os.path.dirname(os.path.abspath(__file__))
roboteam_path = os.path.abspath(os.path.join(current_dir, "..", "..", ".."))
roboteam_path = os.path.abspath(os.path.join(current_dir, "..", "..", "..", ".."))

# Add to sys.path
sys.path.append(roboteam_path)

from roboteam_networking.proto.messages_robocup_ssl_referee_pb2 import Referee
from roboteam_ai.src.RL.src.getState import get_referee_state

REFEREE_CONTROL_PORT = 10003
MULTICAST_GROUP = '224.5.23.1'
Expand Down Expand Up @@ -42,7 +42,6 @@ def send_halt_command():
finally:
sock.close()


def reset_referee_state():
# Step 1: Retrieve the current referee state
referee_state, _ = get_referee_state()
Expand Down
3 changes: 1 addition & 2 deletions roboteam_ai/src/RL/src/sentActionCommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
import sys
import os

# Make sure to go back to the main roboteam directory
current_dir = os.path.dirname(os.path.abspath(__file__))
roboteam_path = os.path.abspath(os.path.join(current_dir, "..", "..", "..", ".."))
roboteam_path = os.path.abspath(os.path.join(current_dir, "../../../.."))

# Add to sys.path
sys.path.append(roboteam_path)
Expand Down

0 comments on commit d8d3828

Please sign in to comment.