Skip to content

Looks for executable in incorrect executable location for Webots on Mac #149

@mister-tinker

Description

@mister-tinker

This may be somewhat niche as this issue might be limited to users of Robostack, but I was asked to raise the issue here and I would really appreciate some help.

This occurs when running roslaunch webots_ros e_puck_line.launch.

When I install webots_ros to my Robostack ROS environment, webots_ros looks for the executable at $WEBOTS_HOME/webots, however on Mac this directory does not exist, and instead needs to be called from /Applications/Webots.app/Contents/MacOS/webots.

I can patch this in my local install by changing the following in webots_launcher.py which allows webots_ros to launch Webots successfully.

command = [os.path.join(os.environ['WEBOTS_HOME'], 'webots'), '--mode=' + options.mode, options.world]

to

command = [os.path.join(os.environ['WEBOTS_HOME'], 'Contents/MacOS/webots'), '--mode=' + options.mode, options.world]

Following this however, I get two other issues which I would really like some advice on if possible:

  1. Running roslaunch webots_ros e_puck_line.launch tells me that a file cannot be found:
File not found: '/Applications/Webots.app/resources/qt_warning_filters.conf'.

I think this is a similar issue with the path not mapping correctly on Mac as this file lives at /Applications/Webots.app/Contents/Resources/qt_warning_filters.conf, however I cannot find that this code is in webot_ros anywhere and seems to come from this line in webots itself. I don't see this error if I launch Webots manually however.

  1. Number 1 doesn't seem to prevent Webots from launching epuck, but Webots does not find the controller directories:
WARNING: DEF EPUCK E-puck: The controller directory has not been found, searched the following locations:
/opt/homebrew/Caskroom/miniforge/base/envs/ros_env/share/webots_ros/controllers/ros/
/Applications/Webots.app/Contents/projects/robots/gctronic/e-puck/controllers/ros/
/Applications/Webots.app/Contents/projects/default/controllers/ros/
/Applications/Webots.app/Contents/Resources/projects/controllers/ros/
WARNING: ros: Could not find the controller directory.
Starting the <generic> controller instead.
INFO: <generic>: Starting controller: /Applications/Webots.app/Contents/Resources/projects/controllers/generic/generic

The controller do however, show up when I manually go to select them, and they seem to work but it would be nice to get rid of the errors:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions