How can I display 3D bounding boxes?

Hola,

I have a lidar that gives me bounding boxes as a vector of x, y, w, h
I’d like to display them in a 3D viewer with my lidar data, is this possible ?

Hello,

Yes it is possible !

You need to use what we call RealObjects.
It is simple structure used to define a 3D object
It has fields such as x, y, z, color, width, height, length

RealObjects can be created in C++, Python (rtmaps_python_bridge.pck) or by using the component Real Object Constant Generator.

You can find the python sample in your RTMaps directory :
<RTMaps_Install_Dir>\packages\rtmaps_python_bridge\samples\Chapter2_Types_Creation\realObjects.py

As for the component Real Object Constant Generator, as it name implies it output RealObjects created with the component’s properties.
Right click → Help to have a more detailed description of its usage and properties.

No matter the way you create RealObjects, RealObjects vectors are supported i.e
you can output a vector of RealObjects and connect it to a 3D viewer without any issues.

By default, the objects are displayed as cubes or pyramids.
You can configure the 3D viewer to display models instead (by editing the property object_n_cfg_file).

To see this in action you can :
Check out the Kitti demo
And the demo in <RTMaps_Install_Dir>/samples/demo_ibeo_highway.rtd