GithubHelp home page GithubHelp logo

Comments (6)

SarvagyaVaish avatar SarvagyaVaish commented on September 26, 2024 1

Making the change in those 4 places, plus getting rid of the controller folder worked 🎉 . Will create a PR!

from webots.

omichel avatar omichel commented on September 26, 2024

The launcher adds this /System/Volumes/Data/Applications/Webots.app/Contents/lib/controller folder in the DYLD_LIBRAY_PATH, see https://github.com/cyberbotics/webots/blob/master/src/controller/launcher/webots_controller.c#L392 which works fine for the C/C++ versions. However, the Python driver uses a different path as seen in https://github.com/cyberbotics/webots/blob/master/lib/controller/python/vehicle/driver.py#L46. So, I guess the bug is there and we should remove the 'MacOS' folder from there. Can you check if that fixes the issue for you?

from webots.

SarvagyaVaish avatar SarvagyaVaish commented on September 26, 2024

Yup. That should work for my system configuration. Not sure how to test it. Perhaps building from source?
Also, would removing MacOS from the path break any other system configs?

from webots.

omichel avatar omichel commented on September 26, 2024

No, you don't need to build from sources, you can simply modify this driver.py file from your local Webots installation. It is located somewhere in the Webots.app bundle, I sure you will find it.

from webots.

SarvagyaVaish avatar SarvagyaVaish commented on September 26, 2024

We'll need to update all of these locations, right?

/Applications/Webots.app/Contents/lib/controller/python/vehicle/car.py:
   42              path = os.path.join('lib', 'controller', 'car.dll')
   43          elif sys.platform == 'darwin':
   44:             path = os.path.join('Contents', 'MacOS', 'lib', 'controller', 'libcar.dylib')
   45          self.api = ctypes.cdll.LoadLibrary(os.path.join(os.environ['WEBOTS_HOME'], path))
   46          self.api.wbu_car_get_front_wheel_radius.restype = ctypes.c_double

/Applications/Webots.app/Contents/lib/controller/python/vehicle/driver.py:
   44              driver = 'driver.dll'
   45          elif sys.platform == 'darwin':
   46:             path = os.path.join('Contents', 'MacOS', 'lib', 'controller')
   47              car = 'libcar.dylib'
   48              driver = 'libdriver.dylib'

/Applications/Webots.app/Contents/MacOS/lib/controller/python/vehicle/car.py:
   42              path = os.path.join('lib', 'controller', 'car.dll')
   43          elif sys.platform == 'darwin':
   44:             path = os.path.join('Contents', 'MacOS', 'lib', 'controller', 'libcar.dylib')
   45          self.api = ctypes.cdll.LoadLibrary(os.path.join(os.environ['WEBOTS_HOME'], path))
   46          self.api.wbu_car_get_front_wheel_radius.restype = ctypes.c_double

/Applications/Webots.app/Contents/MacOS/lib/controller/python/vehicle/driver.py:
   44              driver = 'driver.dll'
   45          elif sys.platform == 'darwin':
   46:             path = os.path.join('Contents', 'MacOS', 'lib', 'controller')
   47              car = 'libcar.dylib'
   48              driver = 'libdriver.dylib'

from webots.

omichel avatar omichel commented on September 26, 2024

We should probably get rid of this folder: /Applications/Webots.app/Contents/MacOS/lib/controller as it seems redundant...

from webots.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.