PlanningScene.add_attached_collision_mesh

PlanningScene.add_attached_collision_mesh(attached_collision_mesh, scale=False)[source]

Add an attached collision object to the planning scene.

Parameters:
attached_collision_meshAttachedCollisionMesh

The AttachedCollisionMesh (a CollisionMesh attached to a Robot’s compas_robots.model.Link) that we want to add to the PlanningScene.

scalebool, optional

If True, the mesh will be copied and scaled according to the robot’s scale factor.

Returns:
None

Examples

>>> with RosClient() as client:
...     robot = client.load_robot()
...     scene = PlanningScene(robot)
...     mesh = Mesh.from_stl(compas_fab.get('planning_scene/cone.stl'))
...     cm = CollisionMesh(mesh, 'tip')
...     end_effector_link_name = 'tool0'
...     touch_links = ['wrist_3_link', 'tool0']
...     acm = AttachedCollisionMesh(cm, end_effector_link_name, touch_links)
...     scene.add_attached_collision_mesh(acm)