AnalyticalPyBulletClient.body_from_obj

AnalyticalPyBulletClient.body_from_obj(path, scale=1.0, concavity=False, mass=0, collision=True, color=(0.5, 0.5, 0.5, 1))[source]

Create a PyBullet body from an OBJ file.

Parameters:
pathstr

Path to the OBJ file.

scalefloat, optional

Factor by which to scale the mesh. Defaults to 1.

concavitybool, optional

When False (the default), the mesh will be loaded as its convex hull for collision checking purposes. Only applicable to static (massless) objects. For non-static meshes, use OBJs preprocessed by pybullet.vhacd.

massfloat, optional

Mass of the body to be created, in kg. If 0 mass is given (the default), the object is static.

collisionbool

When True, body will be included in collision checking calculations. Defaults to True.

colortuple of float

RGBa color components of the body.

Returns:
int