Skip to content

Commit 70597a1

Browse files
committed
python: Import gz.math at startup to fix #1129
Signed-off-by: Will Stott <willstott101@gmail.com>
1 parent ad7c53a commit 70597a1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python/src/sdf/_gz_sdformat_pybind11.cc

+4
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@
6565
PYBIND11_MODULE(sdformat, m) {
6666
m.doc() = "sdformat Python Library.";
6767

68+
// Import the gz.math library to automatically add the type conversions
69+
// this module requires to pass mathematical types to python code.
70+
pybind11::module::import("gz.math");
71+
6872
sdf::python::defineAirPressure(m);
6973
sdf::python::defineAltimeter(m);
7074
sdf::python::defineAtmosphere(m);

0 commit comments

Comments
 (0)