Skip to content

Commit

Permalink
Create patch for webots_ros to launch Webots from correct directory o…
Browse files Browse the repository at this point in the history
…n 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 <info@tobiasfischer.info>
  • Loading branch information
askman92 and Tobias-Fischer authored Mar 3, 2024
1 parent c06cdce commit 617a204
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions patch/ros-noetic-webots-ros.osx.patch
Original file line number Diff line number Diff line change
@@ -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':

0 comments on commit 617a204

Please sign in to comment.