maliput_py
Maliput Python Interface
Date
October 21, 2021

Maliput Python Interface

Overview

The maliput_py package provides a maliput python interface covering:

Python bindings are created using pybind11 library.

Maliput api

maliput.api submodule provides bindings to maliput::api entities such as:

Code example:

inertial_position = maliput.api.InertialPosition(x=1., y=2., z=3.)

Maliput math

maliput.math submodule provides bindings to maliput::math entities such as:

Code example:

rpy = maliput.math.RollPitchYaw(1.0, 2.0, 3.0)
quaternion = rpy.ToQuaternion()

Maliput plugin

maliput.plugin submodule provides bindings for the Maliput Plugin Architecture.

Code example:

# Plugins` id can be listed by doing:
plugin_ids = maliput.plugin.MaliputPluginManager().ListPlugins()
# A loaded plugin can be obtained by doing:
my_plugin = maliput.plugin.MaliputPluginManager().GetPlugin("foo_plugin")

There is also provided a method to easily get a maliput::api::RoadNetwork from a maliput::plugin::RoadNetworkLoader implementation.

Code example:

road_network = maliput.plugin.create_road_network("my_road_network_loader_plugin", dict())
num_junctions = road_network.road_geometry().num_junctions()
maliput::api::InertialPosition
maliput::math::RollPitchYaw
maliput::api
maliput::math
maliput::plugin::MaliputPluginManager
maliput::plugin