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 If
True
, the mesh will be copied and scaled according to the robot’s scale factor.
- collision_mesh
- Returns:
None
Examples
>>> with RosClient() as client: ... robot = client.load_robot() ... scene = PlanningScene(robot) ... mesh = Mesh.from_stl(compas_fab.get('planning_scene/floor.stl')) ... cm = CollisionMesh(mesh, 'floor') ... scene.add_collision_mesh(cm)