Skip to content

Commit

Permalink
Merge pull request #162 from BlueAndi/bugfix/webots_home
Browse files Browse the repository at this point in the history
WEBOTS_HOME was not correct set for linux and MacOS.
  • Loading branch information
BlueAndi authored Oct 15, 2024
2 parents d7d53e5 + e6bbd3d commit 62defa6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/webots_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,21 @@
+ '--serialTxCh ' + ROBOT_SERIAL_TX_CHANNEL + ' ' \
+ '-v'
WEBOTS_CONTROLLER_OPTIONS = '--robot-name=' + ROBOT_NAME + ' --stdout-redirect'
WEBOTS_HOME = os.getenv('WEBOTS_HOME')

if OS_PLATFORM_TYPE == OS_PLATFORM_TYPE_WIN:

WEBOTS_HOME = os.getenv('WEBOTS_HOME').replace('\\', '/')
WEBOTS_CONTROLLER = '"' + WEBOTS_HOME + '/msys64/mingw64/bin/webots-controller.exe"'
WEBOTS_CONTROLLER = f"\"{WEBOTS_HOME.replace('\\', '/')}/msys64/mingw64/bin/webots-controller.exe\""
PROGRAM_NAME = "${PROGNAME}.exe"

elif OS_PLATFORM_TYPE == OS_PLATFORM_TYPE_LINUX:

WEBOTS_CONTROLLER = "$WEBOTS_HOME/webots-controller"
WEBOTS_CONTROLLER = f"{WEBOTS_HOME}/webots-controller"
PROGRAM_NAME = "${PROGNAME}"

elif OS_PLATFORM_TYPE == OS_PLATFORM_TYPE_MACOS:

WEBOTS_CONTROLLER = "$WEBOTS_HOME/Contents/MacOS/webots-controller"
WEBOTS_CONTROLLER = f"{WEBOTS_HOME}/Contents/MacOS/webots-controller"
PROGRAM_NAME = "${PROGNAME}"

else:
Expand Down

0 comments on commit 62defa6

Please sign in to comment.