Ignition Python wrappers released in Fortress!

We are happy to announce that we have released a stable Python API to Ignition Math! We’ve also released a proof-of-concept Python API for Ignition Gazebo in Fortress, and we’d love to hear feedback from the community!

Ignition Math

You might want to check this tutorial about how to get started with the Ignition Math Python wrappers. Ignition Math not only contains just linear algebra classes, you can find here classes such as: Inertial, SphericalCoordinates, DiffDriveOdometry, PID, Temperature, SpeedLimiter or even shapes like Sphere or Capsule.

You can find here some Python examples to start implementing your own scripts!

You can install this Python package just typing:

sudo apt-get install python3-ignition-math6

Ignition Gazebo

You can find some interesting links:

  • Check this Tutorial to learn how to use the Ignition Gazebo Python wrappers
  • Example

You can install this Python package just typing:

sudo apt-get install python3-ignition-gazebo6

NOTE: Bindings are available on Ubuntu Focal, and macOS

If bugs come up and more features are desired, please open new tickets for them. We’d love to hear what the community thinks of the proof-of-concept before adding more features to the current implementation.

:gazebo: Simulation Dev Team :gazebo:

5 Likes

Great work! I assume it is still not possible to write plugins (systems) in Python, is that right? (I mean the type you can include as a system from SDF).

Not yet. Here’s an issue tracking that.

Uh, that sounds exciting! I took a quick look at the python code and the examples. From that I have several questions:

  1. Where does the code for the bindings live and how are they generated? (Mainly asking because - I guess - docs don’t exist yet, so having some kind of reference would be handy.)
  2. From the gazebo example it looks like the gazebo server runs asynchronously. Is that thread or process based? Also, can/will it be possible to turn of parallelism?
  3. The main reason I’m asking the above is: Will we be able to control the state of the simulator through python, e.g., change the position/velocity/pose/… of a body in the sim?
  4. Is Windows support planned? (last I checked ignition had GUI problems on windows, but I’m very happy to have just the simulator + python)
  5. Regarding ignition-math bindings: What is the envisioned use-case/why would I want to choose this over a numpy-based solution in python? Moreso, is/will there be interoperability?

Answering two of own questions, since I managed to work them out:

  1. The gazebo bindings live here and are generated by pybind11.
  2. According to this the server runs in a separate thread unless instructed to run on the main thread.