I've tried :

  • to use obj2udf library(PyPI) then It can generate 1 URDF per 1 STL(it doesn't work because I can't find how to program to change link name or add link and can't combine STL) so now I have URDF of each link instead of a robot URDF.
  • to combine each urdf in pybullet and think it won't work when use as simulation. additional :
  • after I have URDF I will try to work with pybullet.
  • I am working on window 10 with Visual studio code.
  • use miniconda.

so is there a way or some function of python that can generate robot URDF

reference code:

import os
import sys
from object2urdf import ObjectUrdfBuilder

# Build single URDFs
object_folder = "Base"

builder = ObjectUrdfBuilder(object_folder, urdf_prototype='_prototype_Base.urdf')
builder.build_urdf(filename="Base\Base.stl", force_overwrite=True, decompose_concave=True, force_decompose=False, center = 'mass')

1 Answer 1


Thank you,Now I have found odio_urdf library that can generate urdf by programming in python like you code in urdf file.

  • $\begingroup$ If you have found a solution, and your question has been answered, don't forget to mark the answer (in this case, your answer) as the accepted answer by clicking the tick icon next to the answer. That way, the question gets removed from the unanswered question list. Thanks. $\endgroup$ Commented Jul 22, 2021 at 17:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.