# Ignition Python wrappers released in Fortress!

**URL:** <https://discourse.openrobotics.org/t/ignition-python-wrappers-released-in-fortress/47925>\
**Category:** Gazebo General\
**Tags:** release, ignition, fortress\
**Created:** [March 14, 2022, 9:44am UTC](https://discourse.openrobotics.org/t/ignition-python-wrappers-released-in-fortress/47925 "2022-03-14T09:44:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahcorde](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/ahcorde/32/36216_2.png) [@ahcorde](https://discourse.openrobotics.org/u/ahcorde)\
**Post date:** [March 14, 2022, 9:44am UTC](https://discourse.openrobotics.org/t/ignition-python-wrappers-released-in-fortress/47925/1 "2022-03-14T09:44:52Z")

</div>

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](https://ignitionrobotics.org/api/math/6.10/pythongetstarted.html). 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](https://github.com/ignitionrobotics/ign-math/tree/ign-math6/examples) to start implementing your own scripts!

You can install this Python package just typing:

```python
sudo apt-get install python3-ignition-math6

```

## Ignition Gazebo

You can find some interesting links:

- Check this [Tutorial](https://ignitionrobotics.org/api/gazebo/6.7/python_interfaces.html) to learn how to use the Ignition Gazebo Python wrappers
- [Example](https://github.com/ignitionrobotics/ign-gazebo/blob/ign-gazebo6/examples/scripts/python_api/testFixture.py)

You can install this Python package just typing:

```python
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:

---

<div class="post-metadata">

**Author:** ![peci1](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/peci1/32/10145_2.png) [@peci1](https://discourse.openrobotics.org/u/peci1)\
**Post date:** [March 14, 2022, 11:03am UTC](https://discourse.openrobotics.org/t/ignition-python-wrappers-released-in-fortress/47925/2 "2022-03-14T11:03:45Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![chapulina\_gazebo](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/chapulina_gazebo/32/1637_2.png) [@chapulina\_gazebo](https://discourse.openrobotics.org/u/chapulina_gazebo)\
**Post date:** [March 14, 2022, 11:09pm UTC](https://discourse.openrobotics.org/t/ignition-python-wrappers-released-in-fortress/47925/3 "2022-03-14T23:09:09Z")

</div>

> [@peci1](#):
>
> 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](https://github.com/ignitionrobotics/ign-gazebo/issues/790).

---

<div class="post-metadata">

**Author:** ![FirefoxMetzger](https://avatars.discourse-cdn.com/v4/letter/f/43a26b/32.png) [@FirefoxMetzger](https://discourse.openrobotics.org/u/FirefoxMetzger)\
**Post date:** [March 26, 2022, 1:27pm UTC](https://discourse.openrobotics.org/t/ignition-python-wrappers-released-in-fortress/47925/4 "2022-03-26T13:27:07Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![FirefoxMetzger](https://avatars.discourse-cdn.com/v4/letter/f/43a26b/32.png) [@FirefoxMetzger](https://discourse.openrobotics.org/u/FirefoxMetzger)\
**Post date:** [March 28, 2022, 6:42am UTC](https://discourse.openrobotics.org/t/ignition-python-wrappers-released-in-fortress/47925/5 "2022-03-28T06:42:17Z")

</div>

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

1. The gazebo bindings [live here](https://github.com/ignitionrobotics/ign-gazebo/tree/ign-gazebo6/python) and are generated by pybind11.
2. According to [this](https://github.com/ignitionrobotics/ign-gazebo/blob/9b07b245e8384628fa20d09a563c48a6a063c0c0/python/src/ignition/gazebo/Server.cc#L36-L41) the server runs in a separate thread unless instructed to run on the main thread.
