Open chapulina opened 3 years ago
The EntityComponentManager's API so users can access and modify entities and components
An alternative idea is to only provide python bindings for the simpler wrapper classes, like World
, Model
and Link
, see https://github.com/ignitionrobotics/ign-gazebo/issues/325. The rationale is:
A possible implementation of plugins that can be developed in Python is exploiting the functional features of pybind11. I've never tried to do it myself, but it is maybe possible to develop toolings comparable to https://github.com/ignitionrobotics/ign-gazebo/pull/926 to define a system with custom-defined callbacks implemented in Python
This issue has been mentioned on Gazebo Community. There might be relevant details there:
https://community.gazebosim.org/t/ignition-python-wrappers-released-in-fortress/1332/3
This is so perfect!
I'm so thrilled to see this! I have a quick question, would this be on Fortress only or would it include Citadel too? 👼
Hi @Kakcalu13 , we currently have no plans to work on this in the coming months. This ticket is here to discuss possible approaches and gather feedback from the community. Glad to know there's interest! We also accept contributions 😄
Desired behavior
In the interest of making Gazebo more approachable and quicker to use, we could offer a scripting interface that lets users write plugins in Python (and potentially other languages too, like Ruby and Javascript).
The user could load their Python script through the SDF's
<plugin>
tag, just like they do with C++ libraries right now.Alternatives considered
Users could use ROS to interact with Gazebo using various scripting languages. We could also just offer a scripting API to Ignition Transport, so users can interact with simulation asynchronously.
These 2 approaches limit what the user can do though, because they're constrained to the transport API and must run async.
Implementation suggestion
First we'll need to expose C++ APIs that are commonly used by plugins to scripts, such as:
We can either add C APIs to all of these and then call those C functions from scripts, or use SWIG to generate APIs in other languages from C++.
Finally, we'll need to support loading those scripts from the
<plugin>
tag.Additional context
Related to https://github.com/ignitionrobotics/ign-gazebo/issues/789