google-deepmind / google-deepmind/mujoco
Allow running Simulate app with plugin libraries from any folder
- Dominant language
- C++
- Stars
- 15.2k
- Forks
- 1.8k
- Avg merge
- 10d 16h
- Merged PRs (30d)
- 25
Description
### The feature, motivation and pitch
Hi all -- I'm an engineer working with NASA on building out tools/applications with [`mujoco_ros2_control`](https://github.com/ros-controls/mujoco_ros2_control).
One thing that we have been working on is making new plugins, which works great with our custom entrypoint in `mujoco_ros2_control`.
However, we run into limitations running the `simulate` app standalone with our custom plugins if MuJoCo happens to be installed in a root-owned folder. This is due to the logic below, which assumes plugins are placed in a specific location which is tunable via preprocessor directive, but always is _relative to the mujoco executable directory_ -- meaning that users _have_ to copy their plugin libraries to this folder when they may not necessarily have permissions to do so:
https://github.com/google-deepmind/mujoco/blob/080668df42e2258b5c84f9630816f0a43bdcb562/simulate/main.cc#L189-L197
Would the maintainers be amenable to providing some kind of environment variable, command-line args, or other mechanism where users could specify additional paths to scan for plugins that may be anywhere on a user's file system? Or maybe we're unaware of an existing mechanism to do this.
We're happy to contribute changes, but wanted to get alignment from maintainers. Thanks for your help!
### Alternatives
Our only alternative, really, is what we have working now: Automation that tries to copy the built plugin libraries to the install location, but gives users a warning if there is a permissions-related failure or their `simulate` binary is not found, prompting them to manually do the copying if possible.
### Additional context
_No response_
Contributor guide
Research direction
Read simulate/main.cc around lines 189-197 to understand how plugin paths are currently derived from the executable location. Determine with maintainers which path-selection mechanism is acceptable, then verify that simulate can discover plugins from user-specified locations without copying them into the installation directory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100