PlanningScene.append_collision_mesh
- PlanningScene.append_collision_mesh(collision_mesh, scale=False)[source]
Append a collision mesh to the planning scene.
Appends a
CollisionMesh
to thePlanningScene
using id as an identifier of a group or cluster of collision meshes. If the group does not exist, it will be created implicitly; if it does exist, the meshes will be appended to it instead.Grouping meshes under a common identifier allows to remove them all in one operation, using the
remove_collision_mesh()
with the group identifier.- Parameters
collision_mesh (
CollisionMesh
) – The collision mesh we want to append to thePlanningScene
.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.append_collision_mesh(cm)