Comments (6)
Making the change in those 4 places, plus getting rid of the controller folder worked 🎉 . Will create a PR!
from webots.
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.
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.
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.
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.
We should probably get rid of this folder: /Applications/Webots.app/Contents/MacOS/lib/controller
as it seems redundant...
from webots.
Related Issues (20)
- Language support - JuliaLang
- A parallelization problem: We are working on a project to train robots in webots through reinforcement learning
- Accelerometer not reproducible
- ROS sensor messages from the same update have slightly different timestamps HOT 1
- Reinforcement learning, highway_overtake will be disconnected directly after SimulationReset HOT 1
- 3D window offset HOT 7
- [SOLVED] When i open empty.wbt it did not open blockly when i have it insalled. HOT 5
- ERROR: Error downloading EXTERNPROTO 'Oak': Cannot download 'https://raw.githubusercontent.com/cyberbotics/webots/R2023b/projects/objects/trees/protos/Oak.proto', error code: 3: Host raw.githubusercontent.com not found HOT 2
- webots crash HOT 1
- ImportError: cannot import name 'Robot' from 'controller' HOT 1
- Difficulty in calculating the correct position in the webots environment
- stdout failed to redirect to the console HOT 1
- TouchSensor return zero force when used in a Joint
- Can't reference fields from PROTO javascript functions if not referenced directly
- ROS2 Support HOT 1
- Fail to install webots on WSL2 Ubuntu-22.04 HOT 3
- Importing PROTOs from non-official web sources HOT 4
- Node Ancestry Should be Considered for Node Type Restrictions in PROTOs HOT 1
- `Device`s with duplicate names cause unexpected behavior
- Webots Simulink Error: Unable to Access lib.pointer in wb_lidar_get_point_cloud API Call
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webots.