Carla: OpenDRIVE standalone mode: export of generated 3D mesh possible?

Created on 19 Oct 2020  路  3Comments  路  Source: carla-simulator/carla

Hello together,

I was able to successfully open an OpenDRIVE file (.xodr) in OpenDRIVE standalone mode.
However, I was wondering if it is possible to export the generated 3D mesh (i.e. as .obj)?

Thank you so much and best regards!

question

Most helpful comment

Hi @phzeller,
We indeed have a way to export this mesh as a .obj file however it's not exposed to the PythonAPI. It's in carla/LibCarla/source/carla/geom/Mesh.cpp and it's called Mesh::GenerateOBJ(). I have plans to expose the whole mesh system to Python but we have other priorities right now, so sadly this is not in our current scope.
As a workaround, you can just call this function from another part of the C++ code and save it to a file. When I did it, Blender 2.82 worked fine for me opening the file.

All 3 comments

You mean after importing the OpenDrive into CARLA and generating the mesh, then exporting that mesh ?

Exactly @XGodina

Hi @phzeller,
We indeed have a way to export this mesh as a .obj file however it's not exposed to the PythonAPI. It's in carla/LibCarla/source/carla/geom/Mesh.cpp and it's called Mesh::GenerateOBJ(). I have plans to expose the whole mesh system to Python but we have other priorities right now, so sadly this is not in our current scope.
As a workaround, you can just call this function from another part of the C++ code and save it to a file. When I did it, Blender 2.82 worked fine for me opening the file.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

UndeadBlow picture UndeadBlow  路  4Comments

syinari0123 picture syinari0123  路  4Comments

hc167 picture hc167  路  4Comments

kk2491 picture kk2491  路  3Comments

jinfagang picture jinfagang  路  3Comments