Skip to content

Commit fd5a3ce

Browse files
committed
Update pybullet docs
1 parent 149d470 commit fd5a3ce

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/compas_fab/backends/pybullet/client.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ def get_robot_configuration(self, robot):
603603

604604
# =======================================
605605
def convert_mesh_to_body(self, mesh, frame, _name=None, concavity=False, mass=const.STATIC_MASS):
606-
"""Convert compas mesh and its frame to a pybullet body
606+
"""Convert compas mesh and its frame to a pybullet body.
607607
608608
Parameters
609609
----------
@@ -621,6 +621,14 @@ def convert_mesh_to_body(self, mesh, frame, _name=None, concavity=False, mass=co
621621
Returns
622622
-------
623623
:obj:`int`
624+
625+
Notes
626+
-----
627+
If this method is called several times with the same ``mesh`` instance, but the ``mesh`` has been modified
628+
in between calls, PyBullet's default caching behavior will prevent it from recognizing these changes. It
629+
is best practice to create a new mesh instance or to make use of the `frame` argument, if applicable. If
630+
this is not possible, PyBullet's caching behavior can be changed with
631+
``pybullet.setPhysicsEngineParameter(enableFileCaching=0)``.
624632
"""
625633
tmp_obj_path = os.path.join(self._cache_dir.name, '{}.obj'.format(mesh.guid))
626634
mesh.to_obj(tmp_obj_path)

0 commit comments

Comments
 (0)