From 617a2048b8f05d5cb6ebd04ce75bca9288bc2ee8 Mon Sep 17 00:00:00 2001 From: askman92 <67750964+askman92@users.noreply.github.com> Date: Sun, 3 Mar 2024 22:05:37 +0000 Subject: [PATCH] Create patch for webots_ros to launch Webots from correct directory on MacOS (#455) * Add launch path patch for webots launcher script * Rename ros-noetic-webots-ros.osx_arm64.patch to ros-noetic-webots-ros.osx.patch --------- Co-authored-by: Tobias Fischer --- patch/ros-noetic-webots-ros.osx.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 patch/ros-noetic-webots-ros.osx.patch diff --git a/patch/ros-noetic-webots-ros.osx.patch b/patch/ros-noetic-webots-ros.osx.patch new file mode 100644 index 000000000..f033c724b --- /dev/null +++ b/patch/ros-noetic-webots-ros.osx.patch @@ -0,0 +1,13 @@ +diff --git a/scripts/webots_launcher.py b/scripts/webots_launcher.py +index f20a0ac..c2983a2 100755 +--- a/scripts/webots_launcher.py ++++ b/scripts/webots_launcher.py +@@ -64,7 +64,7 @@ options, args = optParser.parse_args() + if 'WEBOTS_HOME' not in os.environ: + sys.exit('WEBOTS_HOME environment variable not defined.') + +-command = [os.path.join(os.environ['WEBOTS_HOME'], 'webots'), '--mode=' + options.mode, options.world] ++command = [os.path.join(os.environ['WEBOTS_HOME'], 'Contents/MacOS/webots'), '--mode=' + options.mode, options.world] + + if options.stream.lower() != 'false': + if options.stream.lower() == 'true':