Porting InnerModel APIs from C++ to Python
30th June, 2020
Change of plans
According to the intial plan we were going to expose the existing C++ APIs to python by using C++
binding libraries such
boost-python but upon little consideration and discussion we
decided to simply write the whole library from scratch which also proved to be easier than the
The whole innermodel library can be divided into 4 basic components:
InnerModelMaths (InnerModelVector, InnerModelMatrix, InnerModelRTMat, InnerModelRotMat)
InnerModelNode (InnerModelTransform, InnerModelLaser, ...)
InnerModelMaths is a group of fundamental math classes (derived from
np.ndarray) which is used
by rest of the classes for basic operation.
InnerModelNode along with
InnerModelNode) are the base class for all the classes in innermodel lib.
.xml file and produces an
InnerModel object which contains all the information of
InnerModelViewer is the most important class from the point of view of this
project. The final goal of this project is provide python APIs to developers so that they can easily
visualize and make real time changes to elements and see response in the simulator.
As of today, we have a working prototype for the
InnerModelViewer class which can do all the basic
things which we had aimed for: visualize an innermodel scene, get image from a prescribed view point,
changing depth map to point cloud, changing position of a body in real time, etc. But there is a lot
to be tested and polished.
Akash Kumar Singh