PlanningScene.add_collision_mesh
-
PlanningScene.
add_collision_mesh
(collision_mesh, scale=False)[source] Add a collision mesh to the planning scene.
If there is already a
CollisionMesh
in thePlanningScene
with the same id it will be replaced.- Parameters
collision_mesh (
CollisionMesh
) – The collision mesh we want to add.scale (
bool
, optional) – IfTrue
, the mesh will be copied and scaled according to the robot’s scale factor.
- Returns
None
Examples
>>> scene = PlanningScene(robot) >>> mesh = Mesh.from_stl(compas_fab.get('planning_scene/floor.stl')) >>> cm = CollisionMesh(mesh, 'floor') >>> scene.add_collision_mesh(cm)